{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D5","name":"Coupling","shortDescription":{"text":"Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D5"},{"id":"D6","name":"Cohesion (LCOM4)","shortDescription":{"text":"Cohesion (LCOM4)"},"helpUri":"https://codehealth.canine.dev/dimensions/D6"},{"id":"D10","name":"Test Quality","shortDescription":{"text":"Test Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D10"},{"id":"D12","name":"Dependency Hygiene","shortDescription":{"text":"Dependency Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/D12"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D14","name":"License Compliance","shortDescription":{"text":"License Compliance"},"helpUri":"https://codehealth.canine.dev/dimensions/D14"},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"id":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"id":"D24","name":"Comment Value","shortDescription":{"text":"Comment Value"},"helpUri":"https://codehealth.canine.dev/dimensions/D24"},{"id":"D26","name":"Project Cohesion","shortDescription":{"text":"Project Cohesion"},"helpUri":"https://codehealth.canine.dev/dimensions/D26"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"],"owasp":"A05:2025"}},{"id":"D30","name":"Dependency Vulnerabilities","shortDescription":{"text":"Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D30","relationships":[{"target":{"id":"CWE-1395","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-937","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1395","CWE-937"],"owasp":"A03:2025"}},{"id":"D31","name":"IaC \u0026 Container Security","shortDescription":{"text":"IaC \u0026 Container Security"},"helpUri":"https://codehealth.canine.dev/dimensions/D31","relationships":[{"target":{"id":"CWE-1032","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-732","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-16","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A02:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1032","CWE-732","CWE-16"],"owasp":"A02:2025"}},{"id":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"D36","name":"Supply-chain Provenance \u0026 Signing","shortDescription":{"text":"Supply-chain Provenance \u0026 Signing"},"helpUri":"https://codehealth.canine.dev/dimensions/D36","relationships":[{"target":{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1357","CWE-494"],"owasp":"A03:2025"}},{"id":"D43","name":"Malicious Dependencies","shortDescription":{"text":"Malicious Dependencies"},"helpUri":"https://codehealth.canine.dev/dimensions/D43","relationships":[{"target":{"id":"CWE-506","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-506"],"owasp":"A08:2025"}},{"id":"AX10","name":"Code composition","shortDescription":{"text":"Code composition"},"helpUri":"https://codehealth.canine.dev/dimensions/AX10"},{"id":"AX3","name":"Project dependency cycles","shortDescription":{"text":"Project dependency cycles"},"helpUri":"https://codehealth.canine.dev/dimensions/AX3"},{"id":"AX4","name":"Dependency direction","shortDescription":{"text":"Dependency direction"},"helpUri":"https://codehealth.canine.dev/dimensions/AX4"},{"id":"AX9","name":"CQS / query purity","shortDescription":{"text":"CQS / query purity"},"helpUri":"https://codehealth.canine.dev/dimensions/AX9"},{"id":"C1","name":"Data Protection","shortDescription":{"text":"Data Protection"},"helpUri":"https://codehealth.canine.dev/dimensions/C1"},{"id":"C4","name":"Data Retention","shortDescription":{"text":"Data Retention"},"helpUri":"https://codehealth.canine.dev/dimensions/C4"},{"id":"ED3","name":"Event naming","shortDescription":{"text":"Event naming"},"helpUri":"https://codehealth.canine.dev/dimensions/ED3"},{"id":"ES1","name":"Fold determinism","shortDescription":{"text":"Fold determinism"},"helpUri":"https://codehealth.canine.dev/dimensions/ES1"},{"id":"ES2","name":"Immutable events","shortDescription":{"text":"Immutable events"},"helpUri":"https://codehealth.canine.dev/dimensions/ES2"},{"id":"M1","name":"Documentation (README)","shortDescription":{"text":"Documentation (README)"},"helpUri":"https://codehealth.canine.dev/dimensions/M1"},{"id":"M2","name":"Architecture documentation","shortDescription":{"text":"Architecture documentation"},"helpUri":"https://codehealth.canine.dev/dimensions/M2"},{"id":"M3","name":"Folder \u0026 project structure","shortDescription":{"text":"Folder \u0026 project structure"},"helpUri":"https://codehealth.canine.dev/dimensions/M3"},{"id":"M4","name":"Documentation accuracy","shortDescription":{"text":"Documentation accuracy"},"helpUri":"https://codehealth.canine.dev/dimensions/M4"},{"id":"P1","name":"CI/CD gates","shortDescription":{"text":"CI/CD gates"},"helpUri":"https://codehealth.canine.dev/dimensions/P1"},{"id":"P10","name":"Library API \u0026 versioning","shortDescription":{"text":"Library API \u0026 versioning"},"helpUri":"https://codehealth.canine.dev/dimensions/P10"},{"id":"P12","name":"CI test-gate honesty","shortDescription":{"text":"CI test-gate honesty"},"helpUri":"https://codehealth.canine.dev/dimensions/P12"},{"id":"P2","name":"Observability","shortDescription":{"text":"Observability"},"helpUri":"https://codehealth.canine.dev/dimensions/P2"},{"id":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"P4","name":"Deployment \u0026 Rollback","shortDescription":{"text":"Deployment \u0026 Rollback"},"helpUri":"https://codehealth.canine.dev/dimensions/P4"},{"id":"P5","name":"DR \u0026 Backup","shortDescription":{"text":"DR \u0026 Backup"},"helpUri":"https://codehealth.canine.dev/dimensions/P5"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"P8","name":"Schema migrations","shortDescription":{"text":"Schema migrations"},"helpUri":"https://codehealth.canine.dev/dimensions/P8"},{"id":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"R1","name":"Type Safety","shortDescription":{"text":"Type Safety"},"helpUri":"https://codehealth.canine.dev/dimensions/R1"},{"id":"R10","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/R10"},{"id":"R2","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/R2"},{"id":"R3","name":"Large Files","shortDescription":{"text":"Large Files"},"helpUri":"https://codehealth.canine.dev/dimensions/R3"},{"id":"R4","name":"Test Coverage","shortDescription":{"text":"Test Coverage"},"helpUri":"https://codehealth.canine.dev/dimensions/R4"},{"id":"R5","name":"Dependency Freshness","shortDescription":{"text":"Dependency Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/R5"},{"id":"R6","name":"Tooling","shortDescription":{"text":"Tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/R6"},{"id":"R7","name":"Dead Code","shortDescription":{"text":"Dead Code"},"helpUri":"https://codehealth.canine.dev/dimensions/R7"},{"id":"R8","name":"Dependency Hygiene","shortDescription":{"text":"Dependency Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/R8"},{"id":"R9","name":"Circular Imports","shortDescription":{"text":"Circular Imports"},"helpUri":"https://codehealth.canine.dev/dimensions/R9"},{"id":"SC1","name":"Supply-chain hygiene","shortDescription":{"text":"Supply-chain hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/SC1"},{"id":"X1","name":"Async correctness","shortDescription":{"text":"Async correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/X1"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X13","name":"Undrained process stream","shortDescription":{"text":"Undrained process stream"},"helpUri":"https://codehealth.canine.dev/dimensions/X13"},{"id":"X14","name":"Bypassable address classification","shortDescription":{"text":"Bypassable address classification"},"helpUri":"https://codehealth.canine.dev/dimensions/X14"},{"id":"X15","name":"Unvalidated length from an untrusted reader","shortDescription":{"text":"Unvalidated length from an untrusted reader"},"helpUri":"https://codehealth.canine.dev/dimensions/X15"},{"id":"X17","name":"Uncapped recursion over a caller-supplied document","shortDescription":{"text":"Uncapped recursion over a caller-supplied document"},"helpUri":"https://codehealth.canine.dev/dimensions/X17"},{"id":"X18","name":"Disposal-pattern correctness","shortDescription":{"text":"Disposal-pattern correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/X18"},{"id":"X19","name":"Unrestored process-global state","shortDescription":{"text":"Unrestored process-global state"},"helpUri":"https://codehealth.canine.dev/dimensions/X19"},{"id":"X2","name":"Cancellation propagation","shortDescription":{"text":"Cancellation propagation"},"helpUri":"https://codehealth.canine.dev/dimensions/X2"},{"id":"X20","name":"Mistyped argument guard","shortDescription":{"text":"Mistyped argument guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X20"},{"id":"X21","name":"Side-effecting pattern guard","shortDescription":{"text":"Side-effecting pattern guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X21"},{"id":"X22","name":"Contradicted release guard","shortDescription":{"text":"Contradicted release guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X22"},{"id":"X23","name":"Unguarded diagnostic materialisation","shortDescription":{"text":"Unguarded diagnostic materialisation"},"helpUri":"https://codehealth.canine.dev/dimensions/X23"},{"id":"X24","name":"Document value interpolated into markup unescaped","shortDescription":{"text":"Document value interpolated into markup unescaped"},"helpUri":"https://codehealth.canine.dev/dimensions/X24"},{"id":"X25","name":"Inert configuration knob","shortDescription":{"text":"Inert configuration knob"},"helpUri":"https://codehealth.canine.dev/dimensions/X25"},{"id":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"X27","name":"Collection changed while being enumerated","shortDescription":{"text":"Collection changed while being enumerated"},"helpUri":"https://codehealth.canine.dev/dimensions/X27"},{"id":"X28","name":"Index access outside its own emptiness guard","shortDescription":{"text":"Index access outside its own emptiness guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X28"},{"id":"X29","name":"Per-element action decided by a fixed element","shortDescription":{"text":"Per-element action decided by a fixed element"},"helpUri":"https://codehealth.canine.dev/dimensions/X29"},{"id":"X30","name":"Support guard that admits what it rejects","shortDescription":{"text":"Support guard that admits what it rejects"},"helpUri":"https://codehealth.canine.dev/dimensions/X30"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"X4","name":"Structured logging","shortDescription":{"text":"Structured logging"},"helpUri":"https://codehealth.canine.dev/dimensions/X4"},{"id":"X6","name":"Hand-rolled structured-format parsing","shortDescription":{"text":"Hand-rolled structured-format parsing"},"helpUri":"https://codehealth.canine.dev/dimensions/X6"},{"id":"X7","name":"Silent fallback defaults","shortDescription":{"text":"Silent fallback defaults"},"helpUri":"https://codehealth.canine.dev/dimensions/X7"},{"id":"X9","name":"Subsumed condition operand","shortDescription":{"text":"Subsumed condition operand"},"helpUri":"https://codehealth.canine.dev/dimensions/X9"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::remote::server_events::handle_server_event_inner (cyclomatic 414): jcode_tui::tui::app::remote::server_events::handle_server_event_inner has cyclomatic complexity 414 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/server_events.rs"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a1d603db37665f3f6557f3042c7292ea4f9a26c7d8f273be0831963f381b6b8"}},{"ruleId":"D1","level":"warning","message":{"text":"Config::apply_env_overrides (cyclomatic 312): Config::apply_env_overrides has cyclomatic complexity 312 (threshold 15). Of this number, 309 points are the body\u0027s own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/config/env_overrides.rs"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3f648eed855bcf28254a6b0b704a4e685f18090d776ccbf382b5948f9e39b91"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::client_lifecycle::handle_client (cyclomatic 291): jcode_app_core::server::client_lifecycle::handle_client has cyclomatic complexity 291 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_lifecycle.rs"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"18d6b66d5bb434c73af2e577df03fcc43b07c5c3929830cda9aeeab207f412a6"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::remote::key_handling::submit_prepared_remote_enter_input (cyclomatic 242): jcode_tui::tui::app::remote::key_handling::submit_prepared_remote_enter_input has cyclomatic complexity 242 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/key_handling.rs"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ea69a65752633c4b51992558753c9b956e99dec09f744e695dda2fb78748c98"}},{"ruleId":"D1","level":"warning","message":{"text":"App::run_turn_interactive (cyclomatic 219): App::run_turn_interactive has cyclomatic complexity 219 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/turn.rs"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"edc9eb9a6ebba0a645667403d834dda3aa500d51867f8a38018c52b254ff7ed1"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::remote::key_handling::key_events::handle_remote_key_internal (cyclomatic 190): jcode_tui::tui::app::remote::key_handling::key_events::handle_remote_key_internal has cyclomatic complexity 190 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/key_handling/key_events.rs"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"a579df795d383950e5927273ef7251d7a0ca501576149ea183bcd1cd0015f116"}},{"ruleId":"D1","level":"warning","message":{"text":"Agent::run_turn_streaming_mpsc (cyclomatic 178): Agent::run_turn_streaming_mpsc has cyclomatic complexity 178 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/turn_streaming_mpsc.rs"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"aed8b8497528486f55ecec415cbdfde8735e9f85736a75fac121b094fccb210d"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_debug_command (cyclomatic 176): App::handle_debug_command has cyclomatic complexity 176 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_cmds.rs"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"39290a2ce1ecbe67274e1cb9f6d9bd82312a7252548a4f77a9fe63a7f5864650"}},{"ruleId":"D1","level":"warning","message":{"text":"Agent::run_turn (cyclomatic 161): Agent::run_turn has cyclomatic complexity 161 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/turn_loops.rs"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c29c7255c4968e20206adb141556f40b4d0bf0b63506885ae163150dc3d9aef"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui_markdown::markdown_render_full::render_markdown_with_link_urls (cyclomatic 149): jcode_tui_markdown::markdown_render_full::render_markdown_with_link_urls has cyclomatic complexity 149 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_full.rs"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"e99420083e630cfdbacd9a1f814d6afb238326f07dd06c2256ea1703f3a05c3a"}},{"ruleId":"D1","level":"warning","message":{"text":"BridgeState::legacy_event_to_api_inner (cyclomatic 141): BridgeState::legacy_event_to_api_inner has cyclomatic complexity 141 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/translate.rs"},"region":{"startLine":1692}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ed5c32edaf7f4d98640bf12540d73f63b04096564ef3d10a8823947f3d8b2ad"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui_markdown::markdown_render_lazy::render_markdown_lazy_with_link_urls (cyclomatic 141): jcode_tui_markdown::markdown_render_lazy::render_markdown_lazy_with_link_urls has cyclomatic complexity 141 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_lazy.rs"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"de6ec02305b7f724e8cae6784ea75b93a89488d71a2fd07c3c5567b9772d2f62"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_mouse_event (cyclomatic 135): App::handle_mouse_event has cyclomatic complexity 135 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/navigation.rs"},"region":{"startLine":1329}}}],"partialFingerprints":{"codehealthFindingId/v1":"efbc74530d164f5e619ee9383b09103b27a29936bd6d7091e0f5b566fecd1ef7"}},{"ruleId":"D1","level":"warning","message":{"text":"insertEvent (cyclomatic 135): insertEvent has cyclomatic complexity 135 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":1183}}}],"partialFingerprints":{"codehealthFindingId/v1":"a770eb6f52af10d9d4bab2dcf4b042056e3e7332a43f28503b3843b142494932"}},{"ruleId":"D1","level":"warning","message":{"text":"BridgeState::translate_request (cyclomatic 134): BridgeState::translate_request has cyclomatic complexity 134 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/translate.rs"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ec94e8499e4344f3d7f6880d855419332ad7b73cdf8538f8587eec845b11157"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_viewport::draw_messages (cyclomatic 132): jcode_tui::tui::ui_viewport::draw_messages has cyclomatic complexity 132 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_viewport.rs"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ce53c11a3767edb4bb4814ef2e878bbfd74f0103199321cb795c1a72a396d03"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_inline_interactive_key (cyclomatic 113): App::handle_inline_interactive_key has cyclomatic complexity 113 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":3532}}}],"partialFingerprints":{"codehealthFindingId/v1":"ada342f34c04723ea159961628169f11fb209e8c8fbeb05ce28e0d61ca351792"}},{"ruleId":"D1","level":"warning","message":{"text":"CommunicateTool::execute (cyclomatic 112): CommunicateTool::execute has cyclomatic complexity 112 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/communicate.rs"},"region":{"startLine":810}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb18544494b3c6a99fb0152236b8993eded40f2958092ece2992bff3a73e0686"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui::draw_inner (cyclomatic 106): jcode_tui::tui::ui::draw_inner has cyclomatic complexity 106 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui.rs"},"region":{"startLine":2981}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5585bdd2412cee3c340bc19f1f2bf456a06614937a868e22b2b9ee496f6b45e"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::render_tool_message (cyclomatic 102): jcode_tui::tui::ui_messages::render_tool_message has cyclomatic complexity 102 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":3961}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1a1213e847a87750a1551be39da6367aa03cf4d23894e7a1b408af7df679d2c"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_provider_cursor_runtime::wire::decode_exec_server_message (cyclomatic 97): jcode_provider_cursor_runtime::wire::decode_exec_server_message has cyclomatic complexity 97 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/wire.rs"},"region":{"startLine":691}}}],"partialFingerprints":{"codehealthFindingId/v1":"47c32ae8ff734178e9d18a5990d93279c9912c026eacca214f7b2093eee0895a"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_provider_openrouter::request::build_chat_messages (cyclomatic 95): jcode_provider_openrouter::request::build_chat_messages has cyclomatic complexity 95 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter/src/request.rs"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bf95793ab853c2577ad8adc87a6fdda4a4f85c27193bdb3ecfe8d254f4080be"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_inline_interactive::draw_inline_interactive (cyclomatic 94): jcode_tui::tui::ui_inline_interactive::draw_inline_interactive has cyclomatic complexity 94 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_inline_interactive.rs"},"region":{"startLine":595}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc0ba12a449e748b68b56ede1e6787ee6c8d67f533f34de9a5b4fa4284a5fbdb"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::bin::memory_recall_bench::cmd_metrics (cyclomatic 92): jcode::bin::memory_recall_bench::cmd_metrics has cyclomatic complexity 92 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":1014}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d9d992dd940cdd4878d7d2596715507e985800cbe80f61ac7807c15e505f9ba"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui_anim::shape_char_3x3 (cyclomatic 91): jcode_tui_anim::shape_char_3x3 has cyclomatic complexity 91 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-anim/src/lib.rs"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d00a4124a9d531ffb62fca2bcc510d1ffb652934099f5be21da6738000b287f"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_provider_cursor_runtime::agent_transport::run_agent_turn (cyclomatic 90): jcode_provider_cursor_runtime::agent_transport::run_agent_turn has cyclomatic complexity 90 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/agent_transport.rs"},"region":{"startLine":758}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ce64a3a7270c8a189a50fbf65764d6dc4edd043d493d638fea01a1a95dff56d"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_tools::get_tool_summary_with_budget (cyclomatic 89): jcode_tui::tui::ui_tools::get_tool_summary_with_budget has cyclomatic complexity 89 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tools.rs"},"region":{"startLine":847}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a5291e2b508c4f3c2fc926eb2b908d70f69039a74dd23761bb493af19030dd4"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_render_core::markdown::parse_markdown_with_options (cyclomatic 87): jcode_render_core::markdown::parse_markdown_with_options has cyclomatic complexity 87 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/markdown.rs"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"a16861b6d99b0500e39b54fc510684a3a6cc1430650d9b928fdb4d34be9fa96c"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_provider_openai_runtime::openai_stream_runtime::continue_persistent_ws_locked (cyclomatic 83): jcode_provider_openai_runtime::openai_stream_runtime::continue_persistent_ws_locked has cyclomatic complexity 83 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs"},"region":{"startLine":539}}}],"partialFingerprints":{"codehealthFindingId/v1":"3eb73c5833ec3b3eff533efb44fef47e1cea8162bc18c74fb4f1efd0e1fa5138"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::dispatch::run_main (cyclomatic 80): jcode::cli::dispatch::run_main has cyclomatic complexity 80 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/dispatch.rs"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d494ec3d8a75142049c6ca6096fd4003e91806aed3b3b53ccc2f03b5e7f0aff"}},{"ruleId":"D1","level":"warning","message":{"text":"App::get_suggestions_for (cyclomatic 79): App::get_suggestions_for has cyclomatic complexity 79 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui_input_helpers.rs"},"region":{"startLine":478}}}],"partialFingerprints":{"codehealthFindingId/v1":"e477027fd58e2cbf8cfeb24969115dd54fedb2e6d6f1540e0b78d9595b09de7d"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::debug_command_exec::execute_debug_command (cyclomatic 78): jcode_app_core::server::debug_command_exec::execute_debug_command has cyclomatic complexity 78 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_command_exec.rs"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"d18242b77edde38a37a6500f5f83163f04c9a3f5ca257ee49e0a9d0c6bf65331"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_login_input (cyclomatic 77): App::handle_login_input has cyclomatic complexity 77 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth.rs"},"region":{"startLine":1841}}}],"partialFingerprints":{"codehealthFindingId/v1":"603a873098fc0b71cb222e9bc85b2cb39f7a76a52080e31a60abd1af2c07a059"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::commands::handle_session_command (cyclomatic 75): jcode_tui::tui::app::commands::handle_session_command has cyclomatic complexity 75 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":1698}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ddc59eb553bcb1bd1ff57c9923c83b94bdc579d5cd5091c56ca3c74f90a0e3a"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::remote::handle_tick (cyclomatic 75): jcode_tui::tui::app::remote::handle_tick has cyclomatic complexity 75 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"0237ced7b3d7dc14dcfaea90edafea43d8cbe71b56331311ab1e32695bc4cbde"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::debug_swarm_read::maybe_handle_swarm_read_command (cyclomatic 73): jcode_app_core::server::debug_swarm_read::maybe_handle_swarm_read_command has cyclomatic complexity 73 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_swarm_read.rs"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"1eaae4622fa4b08a153a27062bd863d833534cfd65e2be8b1913b26c7f00242f"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::remote::process_remote_followups (cyclomatic 72): jcode_tui::tui::app::remote::process_remote_followups has cyclomatic complexity 72 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote.rs"},"region":{"startLine":1461}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf82ae1a80352b810af0bdfc5718346eeefebc01ea7a673b6621f680ce694679"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::runtime_commands::execute (cyclomatic 70): jcode_app_core::server::runtime_commands::execute has cyclomatic complexity 70 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/runtime_commands.rs"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"c257ef9a84eb275e73d54430258ae01b61d2cb8d14d9b4ce2dc99726a3f586eb"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::tool::browser_request::bridge_request (cyclomatic 70): jcode_app_core::tool::browser_request::bridge_request has cyclomatic complexity 70 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/browser_request.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"dac35ed005caf2b594e39f5de04399a0b95544df398dfc2b72674acfea7b1b4a"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_provider_openai::request::build_responses_input_with_logger (cyclomatic 69): jcode_provider_openai::request::build_responses_input_with_logger has cyclomatic complexity 69 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai/src/request.rs"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fc4e6fab15974653ef56ba4e0945f8115570bf62326648105ac7b73dc9db00a"}},{"ruleId":"D1","level":"warning","message":{"text":"fetch (cyclomatic 64): fetch has cyclomatic complexity 64 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":510}}}],"partialFingerprints":{"codehealthFindingId/v1":"33cc7f7c2865d5d125ff4324a5101648eb3bda669c750db99c585941601d9e4b"}},{"ruleId":"D1","level":"warning","message":{"text":"App::run_remote (cyclomatic 59): App::run_remote has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/run_shell.rs"},"region":{"startLine":901}}}],"partialFingerprints":{"codehealthFindingId/v1":"617d7541d8891358b593f3601dbfb7749e0cc465e8b77833c4d77f23d9cb713e"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::tui_launch::list_sessions (cyclomatic 59): jcode::cli::tui_launch::list_sessions has cyclomatic complexity 59 (threshold 15). Of this number, 46 points are the body\u0027s own statements and 13 belong to 3 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/tui_launch.rs"},"region":{"startLine":606}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa75d93b841e75140f3c07412a55bae78cc30f80bd17e07c0c15a3b48196e32f"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_prepare::render_message_into (cyclomatic 57): jcode_tui::tui::ui_prepare::render_message_into has cyclomatic complexity 57 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_prepare.rs"},"region":{"startLine":1428}}}],"partialFingerprints":{"codehealthFindingId/v1":"a31cc5ad6034415c38329373aaa8a07714d71d0bfeb4c3208bc35bfe54c1a682"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui_render::swarm_gallery::render_swarm_strip_vertical (cyclomatic 56): jcode_tui_render::swarm_gallery::render_swarm_strip_vertical has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/swarm_gallery.rs"},"region":{"startLine":957}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0c2e4dc283bdbcedfa6382599cc6904509a462f5e56790367c4507000209f4c"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::provider_init::init_provider_with_model_policy (cyclomatic 56): jcode::cli::provider_init::init_provider_with_model_policy has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: ProviderChoice::as_arg_value (cyclomatic 57) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/provider_init.rs"},"region":{"startLine":1525}}}],"partialFingerprints":{"codehealthFindingId/v1":"f334015947b421799a946e4d0618daaed47e6fe5ff5c797ecae590a500807ae8"}},{"ruleId":"D1","level":"warning","message":{"text":"GmailTool::execute (cyclomatic 54): GmailTool::execute has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/gmail.rs"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3efcf3385ac79da096d1f51f3dc8011101d09173ca83efd9ceca1c66296c47e"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::info_widget_layout::calculate_placements_anchored (cyclomatic 54): jcode_tui::tui::info_widget_layout::calculate_placements_anchored has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_layout.rs"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"579a96cee211a8f81c973302ef3245005f098d9c75b3f7a826d2293ce833cd13"}},{"ruleId":"D1","level":"warning","message":{"text":"App::build_model_picker_entries (cyclomatic 52): App::build_model_picker_entries has cyclomatic complexity 52 (threshold 15). Of this number, 45 points are the body\u0027s own statements and 7 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":1668}}}],"partialFingerprints":{"codehealthFindingId/v1":"2320cfdf95b7d35a64676177144d8c2285f2f20457ad86dcdfa4835e56b610fc"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::cloud_move::run_cli (cyclomatic 52): jcode::cli::cloud_move::run_cli has cyclomatic complexity 52 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_move.rs"},"region":{"startLine":2111}}}],"partialFingerprints":{"codehealthFindingId/v1":"d699b2ff089d674cc8b962d01fbda61ebb3d76e772a632d70fedc406e07d0a95"}},{"ruleId":"D1","level":"warning","message":{"text":"OpenAIProvider::complete (cyclomatic 51): OpenAIProvider::complete has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_provider_impl.rs"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff7f4e0d344d860a9511769998beb32d1b829e77aa375fbbddd4b4056550b855"}},{"ruleId":"D1","level":"warning","message":{"text":"App::eval_assertions (cyclomatic 51): App::eval_assertions has cyclomatic complexity 51 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_script.rs"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e54702454675f1c683a5675f9b6a94d50cfeead42d3d09067f27a9a65429227"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::debug_swarm_write::maybe_handle_swarm_write_command (cyclomatic 50): jcode_app_core::server::debug_swarm_write::maybe_handle_swarm_write_command has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_swarm_write.rs"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"cce1131b2036ab31e327e76a5b82734335ca356f29a30766c98ddd17a98ab96f"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_render_core::preprocess::normalize_latex_delimiters_and_environments (cyclomatic 50): jcode_render_core::preprocess::normalize_latex_delimiters_and_environments has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/preprocess.rs"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"b37da5ad9077451526bf6153c08f6643ae77a083b6b4dae6d84e4ef04e73709c"}},{"ruleId":"D1","level":"warning","message":{"text":"insertTurnDetails (cyclomatic 49): insertTurnDetails has cyclomatic complexity 49 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":1579}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b0b2034fe884c5c46c6bbbdc511d197abbae3892ed3a3430ab298473ec61b0e"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::tool::browser_fast::run (cyclomatic 48): jcode_app_core::tool::browser_fast::run has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/browser_fast.rs"},"region":{"startLine":584}}}],"partialFingerprints":{"codehealthFindingId/v1":"438ba54edf74e0ff5d7ffa030e475714e64b23fc40644342bf1ecda2d74945f8"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::tool::todo_names::normalize_public_input (cyclomatic 48): jcode_app_core::tool::todo_names::normalize_public_input has cyclomatic complexity 48 (threshold 15). Of this number, 44 points are the body\u0027s own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/todo_names.rs"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e40197aca006183cb824aec7012be250d1a50e0b497a91bf90bbd0d23afd51d"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::auth_account_commands::parse_account_command (cyclomatic 48): jcode_tui::tui::app::auth_account_commands::parse_account_command has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_commands.rs"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"628699853817668c76d434a671d789816b9df651a03c6b4cf4bf26289e605097"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::commands::run_memory_command_for_dir (cyclomatic 48): jcode::cli::commands::run_memory_command_for_dir has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":1637}}}],"partialFingerprints":{"codehealthFindingId/v1":"882f9b9be5bce269f82c7543a8d2351e1a29513a766acb6381e90a8f0ce88419"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::client_session::handle_resume_session (cyclomatic 47): jcode_app_core::server::client_session::handle_resume_session has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_session.rs"},"region":{"startLine":1285}}}],"partialFingerprints":{"codehealthFindingId/v1":"55a854a93567c560f25e7f9d5e52e83c6e6f1090475adb9d4e1ec03be0c7f12a"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::proctitle::initial_title (cyclomatic 47): jcode::cli::proctitle::initial_title has cyclomatic complexity 47 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/proctitle.rs"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"9792203d062be849db0b226de15fcd690bc31aa10646fb18523c7ef10e08df30"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::remote::handle_disconnected_key_internal (cyclomatic 46): jcode_tui::tui::app::remote::handle_disconnected_key_internal has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote.rs"},"region":{"startLine":2197}}}],"partialFingerprints":{"codehealthFindingId/v1":"765a4ab9bee2b126b121cd4b5dac78f1985de56220da88b77427b965fbf89231"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui_render::swarm_gallery::render_swarm_strip (cyclomatic 46): jcode_tui_render::swarm_gallery::render_swarm_strip has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/swarm_gallery.rs"},"region":{"startLine":624}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea1d6865e891a0c489a92b6b847ad36e7176a7753acb9b5255de31555b837839"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::bin::memory_recall_bench::cmd_gate (cyclomatic 46): jcode::bin::memory_recall_bench::cmd_gate has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":2189}}}],"partialFingerprints":{"codehealthFindingId/v1":"973e2b2db38254b21406587b95f8a3a277d236b71afae809d3f00ef697f4f7b5"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_command_risk::assess_segment (cyclomatic 45): jcode_command_risk::assess_segment has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-command-risk/src/lib.rs"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4ab27049a1afbfa68d8a6d3b19a16bd758332a5724fee130306dd51d51ee523"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::tui_lifecycle_runtime::handle_dev_command (cyclomatic 45): jcode_tui::tui::app::tui_lifecycle_runtime::handle_dev_command has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tui_lifecycle_runtime.rs"},"region":{"startLine":574}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ec24f8b11e40c41f2caeb95ac25006e617c38fe7e898c9dc757136283bd3927"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::session_picker::transcript_search::search_shard (cyclomatic 45): jcode_tui::tui::session_picker::transcript_search::search_shard has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/transcript_search.rs"},"region":{"startLine":752}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ee9b3e4c69844af3f2325161ceb66b8a9d97406cc401ae6ae2631d00b61c27f"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::bin::tui_bench::main (cyclomatic 45): jcode::bin::tui_bench::main has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/tui_bench.rs"},"region":{"startLine":1212}}}],"partialFingerprints":{"codehealthFindingId/v1":"23561b04cf4b93dd34e96b98cd8e00918f4ff37d25a11467a54582ebad30eebb"}},{"ruleId":"D1","level":"warning","message":{"text":"Server::spawn_background_tasks (cyclomatic 44): Server::spawn_background_tasks has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server.rs"},"region":{"startLine":1199}}}],"partialFingerprints":{"codehealthFindingId/v1":"8903c8047279f3afb790e2dda1428f5e5772c9b101c7e539419ced57ddd4aed6"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_provider_openai::stream::parse_openai_response_event (cyclomatic 44): jcode_provider_openai::stream::parse_openai_response_event has cyclomatic complexity 44 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai/src/stream.rs"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa498fcaf6cf2d4fdd45c0e77695cdcf20173bb9e1ab709cb1dccef0a29964a4"}},{"ruleId":"D1","level":"warning","message":{"text":"App::info_widget_data (cyclomatic 44): App::info_widget_data has cyclomatic complexity 44 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tui_state.rs"},"region":{"startLine":1582}}}],"partialFingerprints":{"codehealthFindingId/v1":"81fc0f83b230e9e55c11a9ae7528e770c529a353fc43d157514f04011a2e6552"}},{"ruleId":"D1","level":"warning","message":{"text":"OpenRouterStream::parse_next_event (cyclomatic 43): OpenRouterStream::parse_next_event has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter/src/stream.rs"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"652c0c0b120cb8f61872789dd780610945a38e1b1017c4d945864b09212ff9bb"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::video_export::box_drawing_to_svg (cyclomatic 43): jcode_tui::video_export::box_drawing_to_svg has cyclomatic complexity 43 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/video_export.rs"},"region":{"startLine":933}}}],"partialFingerprints":{"codehealthFindingId/v1":"843529566c629099678d576c080192cce0136cd002c1839356bccf3c5f87b8cd"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::client_comm_message::handle_comm_message (cyclomatic 42): jcode_app_core::server::client_comm_message::handle_comm_message has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_comm_message.rs"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"81df7da5447b722d9ea8c5bf48f69a44832d12bd02b597f603446840f48e1969"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::client_lightweight_control::handle_lightweight_control_request (cyclomatic 42): jcode_app_core::server::client_lightweight_control::handle_lightweight_control_request has cyclomatic complexity 42 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_lightweight_control.rs"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5cb3094508befce7447da6e62db5f52c9d2ae6306da4dc054a4da74ff4c6214"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::comm_control::handle_comm_task_control (cyclomatic 42): jcode_app_core::server::comm_control::handle_comm_task_control has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_control.rs"},"region":{"startLine":1690}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f8d664e94a5c78b03dbd9493a684ea6aed2c88e87794dafc1ab891d9c39ce64"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::session::render::render_messages_and_images_with_compacted_history (cyclomatic 42): jcode_base::session::render::render_messages_and_images_with_compacted_history has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/render.rs"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dfaf4e48a841167ec72d38ef2dd20b6fe9205454a327e7fb61bdad1509d1418"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_provider_openai_runtime::openai_stream_runtime::stream_response_websocket_authenticated (cyclomatic 42): jcode_provider_openai_runtime::openai_stream_runtime::stream_response_websocket_authenticated has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs"},"region":{"startLine":1410}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e50cf73381b99b66c37a41b6900426dd98d572bb791387bd85a6b8523f06422"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionPicker::render_session_list_impl (cyclomatic 42): SessionPicker::render_session_list_impl has cyclomatic complexity 42 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/render.rs"},"region":{"startLine":418}}}],"partialFingerprints":{"codehealthFindingId/v1":"02424378dd043ddb3d0576452ba64275aa213e23684646965ebdac850f8edbed"}},{"ruleId":"D1","level":"warning","message":{"text":"JcodeClient.globalEvents (cyclomatic 42): JcodeClient.globalEvents has cyclomatic complexity 42 (threshold 15). Most of this is not in the body itself: 8 of the 42 points are its own statements and the rest belongs to 7 function items inside it that branch (startChild, scan, finish, \u2026). The named helpers are already separate functions; the literals\u0027 work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal\u0027s work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/typescript/src/client.ts"},"region":{"startLine":1148}}}],"partialFingerprints":{"codehealthFindingId/v1":"11ae58611ab1d37ae34f39294078a77dad64398380dfcc8292cdd74c11808a21"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::debug::handle_debug_client (cyclomatic 41): jcode_app_core::server::debug::handle_debug_client has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug.rs"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"a678176da9bc1165ba2ff6cade0973f1a68af67114832bce059afe2e531249e5"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::tool::todo::apply_todo_patch (cyclomatic 41): jcode_app_core::tool::todo::apply_todo_patch has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/todo.rs"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"6efc0ff036370bc17edd927e9763f6922813f2feee9a7b25c44241cb9505a17b"}},{"ruleId":"D1","level":"warning","message":{"text":"MultiProvider::cross_provider_pool_prompt (cyclomatic 41): MultiProvider::cross_provider_pool_prompt has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/multi_provider.rs"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"57778e2075563b60bd613610e88897783e1ec5ba92334c82ab08e18dd97b0b0c"}},{"ruleId":"D1","level":"warning","message":{"text":"OpenRouterProvider::complete (cyclomatic 41): OpenRouterProvider::complete has cyclomatic complexity 41 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/openrouter_provider_impl.rs"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ffc5ea95c2c671d8d57584efd90d7be4998aece46ec27b11e31911aa70eb331"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::input::handle_pre_control_shortcuts (cyclomatic 40): jcode_tui::tui::app::input::handle_pre_control_shortcuts has cyclomatic complexity 40 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":2359}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c3d2dd00e44087f5b4d36d7f91465682f3a81ff48195cb990c139abd509809c"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_input::draw_status (cyclomatic 40): jcode_tui::tui::ui_input::draw_status has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_input.rs"},"region":{"startLine":824}}}],"partialFingerprints":{"codehealthFindingId/v1":"9405c740d88004e870b31a8c844226f2cc172c6d2ebd5683b8ca6837c60116fa"}},{"ruleId":"D1","level":"warning","message":{"text":"concurrency.classifyConcurrency (cyclomatic 40): concurrency.classifyConcurrency has cyclomatic complexity 40 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/concurrency.js"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"e95aecc766fbee8c7be7f19cd28e86ad38c5a9c4ba0fed5f0377ed7a338f1298"}},{"ruleId":"D1","level":"warning","message":{"text":"worker.isMeaningfulLifecycleEvent (cyclomatic 40): worker.isMeaningfulLifecycleEvent has cyclomatic complexity 40 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":1751}}}],"partialFingerprints":{"codehealthFindingId/v1":"d199a60bf2e1153f932080f00db83ff3deb9fa09d56c92419625d5a615fc4403"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::tool::selfdev::status::selfdev_status_output (cyclomatic 38): jcode_app_core::tool::selfdev::status::selfdev_status_output has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/selfdev/status.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"31818baedb174a2423dd1b7d1fcdfd0b2540fdb605db43820cbb35c1d48aa75f"}},{"ruleId":"D1","level":"warning","message":{"text":"ResponsesStream::parse_event (cyclomatic 38): ResponsesStream::parse_event has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/opencode_go_responses.rs"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb1d42c48add5644491e308eefa0e386f2eceeffcf16b6dcbaa1ecb796ea7300"}},{"ruleId":"D1","level":"warning","message":{"text":"App::context_snapshot (cyclomatic 38): App::context_snapshot has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tui_state.rs"},"region":{"startLine":1302}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e9a2a458c9ce96abf426123e98add7a0fcb8cfe8d57adf1ded4d4b2c6aec046"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::state_ui::handle_info_command (cyclomatic 38): jcode_tui::tui::app::state_ui::handle_info_command has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui.rs"},"region":{"startLine":1895}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ec24bf73e96f7dff06c3787efdd9d0c34686ceea7a66515b729947190c0ed1f"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::video_export::buffer_to_svg (cyclomatic 38): jcode_tui::video_export::buffer_to_svg has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/video_export.rs"},"region":{"startLine":612}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e8de1edbd900933cf6b8e1d581649dad46626fb5beb778a56f0cd0e6e9c3bc7"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui_tool_display::parse_tool_failure (cyclomatic 38): jcode_tui_tool_display::parse_tool_failure has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-tool-display/src/lib.rs"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"616e4d357b8a663c5181ae830b45e7dc00ffc0c7bc3f744bd68b21d4ede1fb9c"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::login::run_login_provider (cyclomatic 38): jcode::cli::login::run_login_provider has cyclomatic complexity 38 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/login.rs"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cbac12f70b09a07f9e8d5c48635fd5da76ef5f869e785db3fca2034aa38d62c"}},{"ruleId":"D1","level":"warning","message":{"text":"oauth-account.oauthAccount (cyclomatic 38): oauth-account.oauthAccount has cyclomatic complexity 38 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/oauth-account.js"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"88ca3250674c8a769af41c0eebf3d37f330e01cbdf43c4e1bb8b5adf1504c4dd"}},{"ruleId":"D1","level":"warning","message":{"text":"normalizeUsageReportEvent (cyclomatic 38): normalizeUsageReportEvent has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: isMeaningfulLifecycleEvent (cyclomatic 40) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":2359}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b54048aa88a7a3c35955bfa011973fc28aebf88acd3e4bc17557644aed3b4f1"}},{"ruleId":"D1","level":"warning","message":{"text":"ApplyPatchTool::execute (cyclomatic 37): ApplyPatchTool::execute has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/apply_patch.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"6205dc0e50b27422be5e4735fe096c85f1fc25862864aad6846f3e50e74c17d9"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::group_transfer::handle_with_gate (cyclomatic 37): jcode_app_core::server::group_transfer::handle_with_gate has cyclomatic complexity 37 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/group_transfer.rs"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"6628a804001e5bc1c615bc570d0dbbaa417275977cba1a733669692e7e1b75cc"}},{"ruleId":"D1","level":"warning","message":{"text":"App::schedule_auto_poke_followup_after_response (cyclomatic 37): App::schedule_auto_poke_followup_after_response has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":1475}}}],"partialFingerprints":{"codehealthFindingId/v1":"13f7e029d1aa69e72855e4b25a4a3a8701b2cfa25c22f2cd3479c1e8e060ddc9"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_key_core (cyclomatic 37): App::handle_key_core has cyclomatic complexity 37 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":3121}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4e889aa57d96acdc3322b91a6eb49ee2bba0db31b366a664ad6789bbc787e93"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionPicker::handle_overlay_key_inner (cyclomatic 37): SessionPicker::handle_overlay_key_inner has cyclomatic complexity 37 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker.rs"},"region":{"startLine":1514}}}],"partialFingerprints":{"codehealthFindingId/v1":"10dfd62de6d2d84709e07fc224ac635fdc89d742cea5c0ce3c6620bb00518e7b"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::local::handle_bus_event (cyclomatic 37): jcode_tui::tui::app::local::handle_bus_event has cyclomatic complexity 37 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/local.rs"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"60887295a584f2209a73959b781ce7fa1c56130d622c7455a3dcc9cc8c2c883b"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::remote::reconnect::connect_with_retry (cyclomatic 37): jcode_tui::tui::app::remote::reconnect::connect_with_retry has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/reconnect.rs"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"410eb9208bb593cfd6dc831a866c138c164f02c4988d54c7d23435cb769fe4de"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::runtime_ssh_accounts::execute (cyclomatic 36): jcode_app_core::server::runtime_ssh_accounts::execute has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/runtime_ssh_accounts.rs"},"region":{"startLine":380}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e7d3d49a197f9e74a1e90591b55f1fa3b33365fae501c46f5c003debfd50d0b"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::tool::browser_fast_actions::candidates (cyclomatic 36): jcode_app_core::tool::browser_fast_actions::candidates has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/browser_fast_actions.rs"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4c69fcd611dd86ad2e0c6a339345a94516581fea7100545e97120816d4a659d"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::browser::ensure_browser_setup_for (cyclomatic 36): jcode_base::browser::ensure_browser_setup_for has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/browser.rs"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"edceca8fa2fb1bf85df7503fce41d672b217b1b2ae4baebac73b364bea987a14"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_command_risk::tokenize::tokenize (cyclomatic 36): jcode_command_risk::tokenize::tokenize has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-command-risk/src/tokenize.rs"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca88bf10ce58f6e940a61350b2a8917dc55662f1c57778fcb43417fb55a66275"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_provider_anthropic_runtime::process_sse_event (cyclomatic 36): jcode_provider_anthropic_runtime::process_sse_event has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic-runtime/src/lib.rs"},"region":{"startLine":2553}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc050042aae614d65776da1913d7ff0ec5034d520c66cf3634b35258e80e2d31"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_render_core::preprocess::escape_currency_dollars (cyclomatic 36): jcode_render_core::preprocess::escape_currency_dollars has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/preprocess.rs"},"region":{"startLine":779}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6ee13a7a6167df7766dff084a4a3c467b2a7cdf54789b91fa40da0312eefc4a"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui_mermaid::mermaid_viewport::render_image_widget_viewport_precise (cyclomatic 36): jcode_tui_mermaid::mermaid_viewport::render_image_widget_viewport_precise has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_viewport.rs"},"region":{"startLine":1355}}}],"partialFingerprints":{"codehealthFindingId/v1":"4db8a88890782ce4d3c32139279de66782aaf1d5a22f27f86728016a7086a6bd"}},{"ruleId":"D1","level":"warning","message":{"text":"BgTool::execute (cyclomatic 35): BgTool::execute has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/bg.rs"},"region":{"startLine":559}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8e851363f33aaa771240bcd328b178290cc4f610183faa03a8b4c02fb79585a"}},{"ruleId":"D1","level":"warning","message":{"text":"ProviderCard::body_lines (cyclomatic 35): ProviderCard::body_lines has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages/usage.rs"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"18fb4a6156b366d5aa2af88f53be877585729a24fdffc410a6f8878db5b1167e"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::remote::server_events::handle_server_event (cyclomatic 35): jcode_tui::tui::app::remote::server_events::handle_server_event has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/server_events.rs"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"e10063d1ee84acbec7e6f677d115bc917514e33ac2aeba2745a3f2227a1eab90"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui_mermaid::mermaid_widget::render_image_widget_fit_inner (cyclomatic 35): jcode_tui_mermaid::mermaid_widget::render_image_widget_fit_inner has cyclomatic complexity 35 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_widget.rs"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"e42ee39c68e2d5308ea76e0a9ad5f833e4589432d730e62ae7484893cd1864e1"}},{"ruleId":"D1","level":"warning","message":{"text":"Listener::poll (cyclomatic 35): Listener::poll has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-voice/src/global/hotkey.rs"},"region":{"startLine":694}}}],"partialFingerprints":{"codehealthFindingId/v1":"417d74d94d913278bd4e49f7db813c234630b2e278f7872e6c64f1f1b7dd0f14"}},{"ruleId":"D1","level":"warning","message":{"text":"cloud_directories_probe.collect (cyclomatic 35): cloud_directories_probe.collect has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/cloud_directories_probe.py"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca3b087498655ca83941c92c759974774ae8239ac6669858786c463102e67486"}},{"ruleId":"D1","level":"warning","message":{"text":"insertSessionDetails (cyclomatic 35): insertSessionDetails has cyclomatic complexity 35 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file\u0027s highest cyclomatic complexity: isMeaningfulLifecycleEvent (cyclomatic 40) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":1793}}}],"partialFingerprints":{"codehealthFindingId/v1":"c28ad7ea933401734a2c80af2fe95c135a095a8d49b468c1dd95a7c256cd5c0d"}},{"ruleId":"D1","level":"warning","message":{"text":"Server::monitor_bus (cyclomatic 34): Server::monitor_bus has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server.rs"},"region":{"startLine":1981}}}],"partialFingerprints":{"codehealthFindingId/v1":"caa948993c2cd4aa92820be43fcdc9add10ed284b0d39c56d72476c5c352347c"}},{"ruleId":"D1","level":"warning","message":{"text":"MultiProvider::complete_with_failover (cyclomatic 34): MultiProvider::complete_with_failover has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/mod.rs"},"region":{"startLine":600}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab8299f691c85d6afc4dda2450a4dc591d406eebf9e195592166f7beb8a3b20d"}},{"ruleId":"D1","level":"warning","message":{"text":"MultiProvider::handle_auth_changed (cyclomatic 34): MultiProvider::handle_auth_changed has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/mod.rs"},"region":{"startLine":1444}}}],"partialFingerprints":{"codehealthFindingId/v1":"93a585889f2caa79b7724a3ea21e53df3fb9179e1e11141a5d24160387254096"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_provider_anthropic_runtime::run_stream_with_retries (cyclomatic 34): jcode_provider_anthropic_runtime::run_stream_with_retries has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic-runtime/src/lib.rs"},"region":{"startLine":1836}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc88df904ef31b089f5249639c1bbdf3651547140108f5c0fe97c60c81dc3446"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_provider_core::pricing::openai_api_pricing_with_tier (cyclomatic 34): jcode_provider_core::pricing::openai_api_pricing_with_tier has cyclomatic complexity 34 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/pricing.rs"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"9102b1b7307bfb6ced4d082470bd6be5908e261176b9a6318c6eea315b5ccc85"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionPicker::rebuild_items_inner (cyclomatic 34): SessionPicker::rebuild_items_inner has cyclomatic complexity 34 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/filter.rs"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"234e8b875b975fb6622094fb171ba44c851e3af7489a50c1058286c017916d38"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::commands_cloud::finish_cloud_command (cyclomatic 34): jcode_tui::tui::app::commands_cloud::finish_cloud_command has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_cloud.rs"},"region":{"startLine":1177}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ba8c242f4f2b6b3a3fd739d229ebe8ef3e6086246816d83fc60bc8b0d882e98"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::info_widget::render_ambient_widget (cyclomatic 34): jcode_tui::tui::info_widget::render_ambient_widget has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget.rs"},"region":{"startLine":1857}}}],"partialFingerprints":{"codehealthFindingId/v1":"91d20d7973cf53c193a2e2b58641a1312cde235a11c13523884d31051a0a26ca"}},{"ruleId":"D1","level":"warning","message":{"text":"AuthStatus::method_detail_for_provider (cyclomatic 33): AuthStatus::method_detail_for_provider has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/status_detail.rs"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"5128ea2e9cfdd71e0c9447d8b12192340f7bc408206fa2636511c85a6bccc960"}},{"ruleId":"D1","level":"warning","message":{"text":"MultiProvider::new_with_auth_status (cyclomatic 33): MultiProvider::new_with_auth_status has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/startup.rs"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2493e1b3af5b619953ffa0cbc0ece400c4e0fd7b5e48521004011ac84265d67"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::provider::catalog_remote_routes::remote_model_routes_fallback (cyclomatic 33): jcode_base::provider::catalog_remote_routes::remote_model_routes_fallback has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/catalog_remote_routes.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5a5c5b97ed824b6859ad21098e5fec848f2bb107399a22742cc5c2741eaded7"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_plan::mermaid::swarm_plan_mermaid (cyclomatic 33): jcode_plan::mermaid::swarm_plan_mermaid has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-plan/src/mermaid.rs"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"b07ef6b1764e6f47e1efe6db881355a30c8b598483c81e7238d6181c8283f60a"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_ssh_login_key (cyclomatic 33): App::handle_ssh_login_key has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_remote.rs"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"2abab2cc84be8ca5fc5c1ddafb50b9ce9f4ea77e62daed27210a575dc196c783"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::cloud_group_run::run_migrate (cyclomatic 33): jcode::cli::cloud_group_run::run_migrate has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_group_run.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2b3bc707518d4f3bd15a2f2d17a60281474b7fa18331c37747ee4d2112af3a2"}},{"ruleId":"D1","level":"warning","message":{"text":"worker.normalizeWebEvent (cyclomatic 33): worker.normalizeWebEvent has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":2102}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c0b0443f00fa5debfbe6d5446390e2c63c7183b7c114bd32b4048be99b6b023"}},{"ruleId":"D1","level":"warning","message":{"text":"Registry::execute (cyclomatic 32): Registry::execute has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/mod.rs"},"region":{"startLine":1053}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fd99163ee166e7df301bde59e08988641e67f6595922e9898de395207f14821"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::tool::apply_patch::parse_apply_patch (cyclomatic 32): jcode_app_core::tool::apply_patch::parse_apply_patch has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/apply_patch.rs"},"region":{"startLine":661}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd54a1ead17096a06ba2c10cfc15026b487e07b9a02567906c6909fa88a0f8de"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_provider_core::models::open_weight_family_context_limit (cyclomatic 32): jcode_provider_core::models::open_weight_family_context_limit has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/models.rs"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"022891c5956923075668b6df2f2031da16b16ae1306b747bf04eab1864ff62ae"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_telemetry_core::mark_tool_feature_usage (cyclomatic 32): jcode_telemetry_core::mark_tool_feature_usage has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lib.rs"},"region":{"startLine":1075}}}],"partialFingerprints":{"codehealthFindingId/v1":"66ce329acdab5f39b804b084359ff66883a1f01fd2dbe69ce729941ec1a515e3"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::remote::server_events::cache_miss::handle_kv_cache_miss (cyclomatic 32): jcode_tui::tui::app::remote::server_events::cache_miss::handle_kv_cache_miss has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/server_events/cache_miss.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1086b12d0546f6c19a032ac7b0e3cb64565a4400141f5daa9b203fe251ec86a"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::state_ui::format_cache_stats (cyclomatic 32): jcode_tui::tui::app::state_ui::format_cache_stats has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui.rs"},"region":{"startLine":1225}}}],"partialFingerprints":{"codehealthFindingId/v1":"10836b414c9dd17bf3700746b0d1be33038b94067b7098c677054ab303138c5a"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::redraw_schedule::redraw_interval_focused_policy (cyclomatic 32): jcode_tui::tui::redraw_schedule::redraw_interval_focused_policy has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/redraw_schedule.rs"},"region":{"startLine":465}}}],"partialFingerprints":{"codehealthFindingId/v1":"442c15b5008ef358dcbb093f213426bb546d1636c194fa6ddd55ea73baedef0a"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_input::draw_input (cyclomatic 32): jcode_tui::tui::ui_input::draw_input has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_input.rs"},"region":{"startLine":2159}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d35e8ddd5839da0d0042bd25bceb0193480af8d11aded399eec24b18df94143"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::render_background_task_message (cyclomatic 32): jcode_tui::tui::ui_messages::render_background_task_message has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":2764}}}],"partialFingerprints":{"codehealthFindingId/v1":"a741bfaf5b2f198ac20343b387b711b021d4ea3a0fafb7e20de5861fba461d1a"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_tools::browser_summary (cyclomatic 32): jcode_tui::tui::ui_tools::browser_summary has cyclomatic complexity 32 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tools.rs"},"region":{"startLine":464}}}],"partialFingerprints":{"codehealthFindingId/v1":"c217464a20d3bc83a2833849242c9ca46bf577227ad8ef7fce5663f2cf1b68c7"}},{"ruleId":"D1","level":"warning","message":{"text":"pruneOldEvents (cyclomatic 32): pruneOldEvents has cyclomatic complexity 32 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file\u0027s highest cyclomatic complexity: isMeaningfulLifecycleEvent (cyclomatic 40) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":1044}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ec40a80788cf62682ecfdb4f80fd0045f772065d75cd68ed7ae236ee2b6ac19"}},{"ruleId":"D1","level":"warning","message":{"text":"MemoryTool::execute (cyclomatic 31): MemoryTool::execute has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/memory.rs"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"407428584cd337bf066b5d3dd02664a5e4eb122f0899ddad2b1a86eb0940f620"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::runtime_ssh_host::execute (cyclomatic 31): jcode_app_core::server::runtime_ssh_host::execute has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/runtime_ssh_host.rs"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"d92c3a40df3c8c11ff04168fc0cede75268741c4f8603b5fe6aaeea455d3cd03"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_command_risk::tokenize::heredoc_delimiters (cyclomatic 31): jcode_command_risk::tokenize::heredoc_delimiters has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-command-risk/src/tokenize.rs"},"region":{"startLine":397}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1effd3aaa27678e389ab22c77337ffb88aab1c7a23a9dfd502dd933193eac84"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_provider_anthropic::format_messages_with_native (cyclomatic 31): jcode_provider_anthropic::format_messages_with_native has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic/src/lib.rs"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c7d67323bbcb93e48355e81c23db65d34320788c492f5b1e01e76b505693f95"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_provider_openai_runtime::openai_stream_http::stream_response (cyclomatic 31): jcode_provider_openai_runtime::openai_stream_http::stream_response has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_stream_http.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a4d83008c2a732b205392392b6675caddd7a18919f6bef2973a73e898d1a55c"}},{"ruleId":"D1","level":"warning","message":{"text":"FollowUpPolicy::decide_after_turn (cyclomatic 31): FollowUpPolicy::decide_after_turn has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-todo-policy/src/followup.rs"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"789f431fd9f9a474d36fcd75a3de1df8b1412c8ed631b5dba9c94d8afee28b4c"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_onboarding_import_review_key (cyclomatic 31): App::handle_onboarding_import_review_key has cyclomatic complexity 31 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/onboarding_flow_control.rs"},"region":{"startLine":555}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab478e2f57b22e7bf9819caf07356288867fa4eb08c85d416d0e9fd5c6a8619d"}},{"ruleId":"D1","level":"warning","message":{"text":"InfoWidgetData::has_data_for (cyclomatic 31): InfoWidgetData::has_data_for has cyclomatic complexity 31 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget.rs"},"region":{"startLine":783}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc3f088873fa2bc6e093f02936469046d5febbcc79d32540cc7d0a1583245f5e"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::commands_cloud::start_cloud_command (cyclomatic 31): jcode_tui::tui::app::commands_cloud::start_cloud_command has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_cloud.rs"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e52bc68361c04eae6583fc0279fc5be4e46fba70c7b90a3ea6054b082915201"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::model_context_commands::handle_model_command (cyclomatic 31): jcode_tui::tui::app::model_context_commands::handle_model_command has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/model_context_commands.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"faa51a7479b59ecace20314bbac3fa02f800de82e85fd9cb7bcc1698b6136933"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui_mermaid::mermaid_cache_render::render_mermaid_sized_internal (cyclomatic 31): jcode_tui_mermaid::mermaid_cache_render::render_mermaid_sized_internal has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_cache_render.rs"},"region":{"startLine":1173}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcd92f1aa3b1e7590bddb9352f98f02d1cb796791c308aadcba6fd567a3b0ac0"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui_mermaid::mermaid_inline::dimensions_from_header (cyclomatic 31): jcode_tui_mermaid::mermaid_inline::dimensions_from_header has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_inline.rs"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad215dc88b0975698a132648805fb5ca060ccb70f31d82adfab08a62a8b700f0"}},{"ruleId":"D1","level":"warning","message":{"text":"MultiProvider::set_model_on_provider_with_credential_modes (cyclomatic 30): MultiProvider::set_model_on_provider_with_credential_modes has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/mod.rs"},"region":{"startLine":1164}}}],"partialFingerprints":{"codehealthFindingId/v1":"00af569f5fabd9927ed7e779608c42ba9b0729e6e8193760a5d407a883d63156"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::mcp::remote::streamable_post_inner (cyclomatic 30): jcode_base::mcp::remote::streamable_post_inner has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mcp/remote.rs"},"region":{"startLine":610}}}],"partialFingerprints":{"codehealthFindingId/v1":"901b8d7992df033c767ea765f77183f4517245789cde86886d4fc7a36a0b5e7f"}},{"ruleId":"D1","level":"warning","message":{"text":"App::open_account_picker (cyclomatic 30): App::open_account_picker has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker.rs"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"10227da1d8a9b4f19700b7a40b91d89b786997e2a039386a716306e261788757"}},{"ruleId":"D1","level":"warning","message":{"text":"ColorReports::push (cyclomatic 30): ColorReports::push has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/terminal_events.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"b196227751fe44897a5ee30635abbd6bee2d70c4b6d775c21b6386f8b18973f4"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::helpers::git_watch::imp::run (cyclomatic 30): jcode_tui::tui::app::helpers::git_watch::imp::run has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/helpers/git_watch.rs"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d7bf2cdfea4f6938c36e3655c4d143d550d948161ab9670fddc1816ecf56567"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::helpers_rate_limit_parse::parse_rate_limit_error (cyclomatic 30): jcode_tui::tui::app::helpers_rate_limit_parse::parse_rate_limit_error has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/helpers_rate_limit_parse.rs"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d882b2d6877d5708d84d61c6a9fa273e2ba812343e29ffb20b1eae6ca4cd59e"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_input::build_notification_spans (cyclomatic 30): jcode_tui::tui::ui_input::build_notification_spans has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_input.rs"},"region":{"startLine":1231}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1666cf76bc664719f6ac8c86797db197027219f970c1e52fe07170c76de1495"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::render_swarm_message (cyclomatic 30): jcode_tui::tui::ui_messages::render_swarm_message has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":3611}}}],"partialFingerprints":{"codehealthFindingId/v1":"c57648b9584f2b3413cc8544f9d69360623111c80242877427a0606b05194685"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::cloud_move::run_move (cyclomatic 30): jcode::cli::cloud_move::run_move has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_move.rs"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc3c815ae9dbd0c13820aad3e68b7a70dae55c65829a87f9d99231bdcd5f8675"}},{"ruleId":"D1","level":"warning","message":{"text":"launch.launchInstance (cyclomatic 30): launch.launchInstance has cyclomatic complexity 30 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 15 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/typescript/src/launch.ts"},"region":{"startLine":522}}}],"partialFingerprints":{"codehealthFindingId/v1":"1946e5526ceede3d7daafb6020214b573fd5f55e0168712939527b9bb9c27598"}},{"ruleId":"D1","level":"warning","message":{"text":"Server::recover_headless_sessions_on_startup (cyclomatic 29): Server::recover_headless_sessions_on_startup has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server.rs"},"region":{"startLine":750}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c8e2507ec2b1be5ec09730adb4259d777553caca00a6404a184814629e042ec"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::client_disconnect_cleanup::cleanup_client_connection (cyclomatic 29): jcode_app_core::server::client_disconnect_cleanup::cleanup_client_connection has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_disconnect_cleanup.rs"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f1ff81f7487b97f0ddc96445dad9c8a421a6221c7b393dbd516d533e4044051"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::swarm::update_member_status_with_report_tldr (cyclomatic 29): jcode_app_core::server::swarm::update_member_status_with_report_tldr has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/swarm.rs"},"region":{"startLine":1709}}}],"partialFingerprints":{"codehealthFindingId/v1":"c93e4410508f8c4efe20947c4e411a0273f3b1970c4a047302bc21d31a9f4565"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::auth::transfer::import_cloud_inner (cyclomatic 29): jcode_base::auth::transfer::import_cloud_inner has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/transfer.rs"},"region":{"startLine":1016}}}],"partialFingerprints":{"codehealthFindingId/v1":"539d09d36de57a29f69df134acf3136041852d7b55682dad6c62b9f62954ce30"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_protocol::comm_format::format_comm_members (cyclomatic 29): jcode_protocol::comm_format::format_comm_members has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-protocol/src/comm_format.rs"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c16631c2fa896862bcc4ca799b048f735d01abbaeb1c04673d7d6e577a5b9ee"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_provider_copilot::build_messages (cyclomatic 29): jcode_provider_copilot::build_messages has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-copilot/src/lib.rs"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"068bcd37718c871bf2f02b3898cb22e48da6ff16a062109a0ab410eaf989357f"}},{"ruleId":"D1","level":"warning","message":{"text":"CopilotApiProvider::process_sse_stream (cyclomatic 29): CopilotApiProvider::process_sse_stream has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-copilot-runtime/src/lib.rs"},"region":{"startLine":688}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a1fb77c4d7a5bacf848287add0d5574f310409ad53073a19b395595d51fe80d"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_provider_doctor::live_provider_probes::consume_native_stream (cyclomatic 29): jcode_provider_doctor::live_provider_probes::consume_native_stream has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/live_provider_probes.rs"},"region":{"startLine":595}}}],"partialFingerprints":{"codehealthFindingId/v1":"58417eb66d7a0922fc5a007ee15f8d9043f82f9fd197436a0a01bb93ffb435d8"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::auth_account_commands::execute_account_command_local (cyclomatic 29): jcode_tui::tui::app::auth_account_commands::execute_account_command_local has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_commands.rs"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbe8db7a207bbb6123576c3e361a9d694592d3c1b338aa24cf494f426d3ee9c6"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::commands::handle_config_command (cyclomatic 29): jcode_tui::tui::app::commands::handle_config_command has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":3479}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c9307b2ebc66216cc985d924ccb5a4918bb471e8bab483bfadd05e81faccf67"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::input::handle_basic_key (cyclomatic 29): jcode_tui::tui::app::input::handle_basic_key has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":2845}}}],"partialFingerprints":{"codehealthFindingId/v1":"3355a3ffe6cc20344c7c59305b9e8f35be2e744d1fa18be6d6f01187448efc38"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::remote::handle_bus_event (cyclomatic 29): jcode_tui::tui::app::remote::handle_bus_event has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote.rs"},"region":{"startLine":772}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f8ac534fa60496e9107f606638558110391fe7a3655d1ca801d6b2d01aeaa56"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::remote::reconnect::handle_post_connect (cyclomatic 29): jcode_tui::tui::app::remote::reconnect::handle_post_connect has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/reconnect.rs"},"region":{"startLine":717}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6b0089872958fe738bb1a383f5d1908fa84f36585efe37d28cc1a7b2199c4a3"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui::update_prompt_entry_animation (cyclomatic 29): jcode_tui::tui::ui::update_prompt_entry_animation has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui.rs"},"region":{"startLine":936}}}],"partialFingerprints":{"codehealthFindingId/v1":"60660cb779d76339b7d116f762ad34a6b4d55272d2b91db846a2cf7be24640dd"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui_markdown::markdown_text_preprocess::escape_currency_dollars (cyclomatic 29): jcode_tui_markdown::markdown_text_preprocess::escape_currency_dollars has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_text_preprocess.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fa845bbba221ac7db06e7b660ca6a1d5f8cbcdea0a9e0683f135ac3d0a0bfbd"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::client_session::handle_subscribe (cyclomatic 28): jcode_app_core::server::client_session::handle_subscribe has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_session.rs"},"region":{"startLine":643}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f6d645ff8ff945ff1626d3248251158fcfa9ed4b49a4b28bfc40740150bb0e6"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::headless::create_headless_session (cyclomatic 28): jcode_app_core::server::headless::create_headless_session has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/headless.rs"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d5093429a8ee01bffca0da4b340ae2b54ea04f3cad0a5c13f207db99c02e157"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_fuzzy::run_dp (cyclomatic 28): jcode_fuzzy::run_dp has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-fuzzy/src/lib.rs"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fb82671673e13e84fc2a07eeccb193a93e021380545b3432b70d74785ab5fa2"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_todo_policy::completion_report::render_completion_report (cyclomatic 28): jcode_todo_policy::completion_report::render_completion_report has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-todo-policy/src/completion_report.rs"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ca956b4271cd6be9da7a89beef503fb8298b96973520c1173ee65318fb47d1c"}},{"ruleId":"D1","level":"warning","message":{"text":"App::open_account_center (cyclomatic 28): App::open_account_center has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker/account_center.rs"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9112ea92a9b46740a09d82fb2cea15b686770175c1f2641406bb2d857d1c8a7"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::remote::ssh_sessions::handle_command (cyclomatic 28): jcode_tui::tui::app::remote::ssh_sessions::handle_command has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/ssh_sessions.rs"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ae2632baeb3791d7621c45a7442443b8f0ecad900fe2989de4b752c2118d8ca"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_inline_interactive::model_suggestion_lines (cyclomatic 28): jcode_tui::tui::ui_inline_interactive::model_suggestion_lines has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_inline_interactive.rs"},"region":{"startLine":457}}}],"partialFingerprints":{"codehealthFindingId/v1":"d00946d41e72e1c55f6c5a9a27f4b0c32f3027af553b548f6de2c24c17e75e0e"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_input::live_processing_status_line (cyclomatic 28): jcode_tui::tui::ui_input::live_processing_status_line has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_input.rs"},"region":{"startLine":679}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ce0281e2cd3d782c28aff0de51bcde7ff52ac7ca94ec2d6b2ee4495b5cc67d3"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_input::overscroll_fact_spans (cyclomatic 28): jcode_tui::tui::ui_input::overscroll_fact_spans has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_input.rs"},"region":{"startLine":1674}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac1afb6d40a579c167c3807848fdebcc8d2a4ee9a7b153b00fd19573722afde4"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::render_compact_agent_notification (cyclomatic 28): jcode_tui::tui::ui_messages::render_compact_agent_notification has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":3350}}}],"partialFingerprints":{"codehealthFindingId/v1":"05414dd5b3b6045163f819e0616e81cff443d4fc72d19a23afdbc54aba4fb2f0"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui_core::keybind::parse_keybinding (cyclomatic 28): jcode_tui_core::keybind::parse_keybinding has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-core/src/keybind.rs"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"1de611b82718a78c3ded28c8de4fc69bf5c024cc4c39bf82326a2e9ded8042b6"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui_markdown::markdown_wrap::wrap_line (cyclomatic 28): jcode_tui_markdown::markdown_wrap::wrap_line has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_wrap.rs"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"1505e251790d2114df8519f781640d7690956872d24345e5d7c66c120a75482a"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui_mermaid::mermaid_widget::render_image_widget (cyclomatic 28): jcode_tui_mermaid::mermaid_widget::render_image_widget has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_widget.rs"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"b431bd3e034b1e93dbec54910f7a4777e79b0c9d416ecf85307308d6126a24b0"}},{"ruleId":"D1","level":"warning","message":{"text":"insertTodoSessionDetails (cyclomatic 28): insertTodoSessionDetails has cyclomatic complexity 28 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file\u0027s highest cyclomatic complexity: isMeaningfulLifecycleEvent (cyclomatic 40) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":2015}}}],"partialFingerprints":{"codehealthFindingId/v1":"18c51798d8a96854ead86e92f61919c62d08e9d9fac61caca11e4bb902e9afe7"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::tool::browser_fast::scoped (cyclomatic 27): jcode_app_core::tool::browser_fast::scoped has cyclomatic complexity 27 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/browser_fast.rs"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6c8cd32de0076a7e647cfcce78f4591f3d99b183018ec82c0962ed9b194ed9f"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::provider_catalog::apply_named_provider_profile_env_from_config (cyclomatic 27): jcode_base::provider_catalog::apply_named_provider_profile_env_from_config has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: jcode_base::provider_catalog::openai_compatible_profile_static_models (cyclomatic 32) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider_catalog.rs"},"region":{"startLine":935}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa0c14938c6ecac09d3f6190745a8574b1b9f2e31494359b66baf1bc9572492d"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_harness_api::edit_stats::count_legacy_messages (cyclomatic 27): jcode_harness_api::edit_stats::count_legacy_messages has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api/src/edit_stats.rs"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2413090d69dfa5753e50d4086410765d05e27ae06ec0d6c82fcbd947c49241f"}},{"ruleId":"D1","level":"warning","message":{"text":"BedrockProvider::complete (cyclomatic 27): BedrockProvider::complete has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-bedrock/src/lib.rs"},"region":{"startLine":1179}}}],"partialFingerprints":{"codehealthFindingId/v1":"28a8954a2f17d8cc9d343fa31a1b72fdcb7694c21143b46ffd86d8703e21b1d0"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_provider_cursor_runtime::wire::decode_google_protobuf_value (cyclomatic 27): jcode_provider_cursor_runtime::wire::decode_google_protobuf_value has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/wire.rs"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"a60e4b06b7809aba3ea7f6bb7e5e9f9482fffaded76fdf30ac57fcc15b597d3b"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_provider_openai::citations::render_annotated_text (cyclomatic 27): jcode_provider_openai::citations::render_annotated_text has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai/src/citations.rs"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e55b9683378e7dcc4f330521c00c3d36fbcf4af3153d6846b61b53e9feeeebf"}},{"ruleId":"D1","level":"warning","message":{"text":"Parser::parse_command (cyclomatic 27): Parser::parse_command has cyclomatic complexity 27 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file\u0027s highest cyclomatic complexity: jcode_render_core::math::command_symbol (cyclomatic 141) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/math.rs"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c0dfad5d098795148ba5e7b4f6fd5b8f02be5dbb1554ff3c37e1f3b3bdf6a63"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_login_completed (cyclomatic 27): App::handle_login_completed has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth.rs"},"region":{"startLine":3111}}}],"partialFingerprints":{"codehealthFindingId/v1":"54c6799046d43b2d69d997b33a299d0a523a1842d78d4564d85a481d23926ecd"}},{"ruleId":"D1","level":"warning","message":{"text":"App::submit_input (cyclomatic 27): App::submit_input has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":3906}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e92b363d35601f2fd69e4dbbe0c1e9cb8f36d8658204c74f629a57b4f7e7903"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::info_widget_stability::analyze_frames_with_scroll (cyclomatic 27): jcode_tui::tui::info_widget_stability::analyze_frames_with_scroll has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_stability.rs"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e03e04bb52d9069eb0e1f2b0837c33e4650cbdcff9f764b3e7061d3a39dfed8"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_pinned::draw_side_panel_markdown (cyclomatic 27): jcode_tui::tui::ui_pinned::draw_side_panel_markdown has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_pinned.rs"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b37c3014e1df9d60966be9ccdf46c45205117593467370067adbe8b63b885df"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::dispatch::run_default_command (cyclomatic 27): jcode::cli::dispatch::run_default_command has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/dispatch.rs"},"region":{"startLine":796}}}],"partialFingerprints":{"codehealthFindingId/v1":"44b893fe8b5cf8d1636b0c6a68fbcaee98fa077544c39e2b93b13413d29c5737"}},{"ruleId":"D1","level":"warning","message":{"text":"score_shard.score (cyclomatic 27): score_shard.score has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"score_shard.py"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8ab75f86a9bfa375d087e05d020cd6f607f70d67f0c1a62d121f1e0f4e8efe5"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::debug_testers::execute_tester_subcommand (cyclomatic 26): jcode_app_core::server::debug_testers::execute_tester_subcommand has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_testers.rs"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e9009b8e92681a3eb0be87bad572b5c72ba510e05affdc3598d67b1eab94b79"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::runtime_ssh_accounts::reset (cyclomatic 26): jcode_app_core::server::runtime_ssh_accounts::reset has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/runtime_ssh_accounts.rs"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc6e9c82b83b7c746af4aaeb68abef3ca8fc6f7b3d7998216a8d51887e919fc7"}},{"ruleId":"D1","level":"warning","message":{"text":"MultiProvider::set_model (cyclomatic 26): MultiProvider::set_model has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/mod.rs"},"region":{"startLine":2165}}}],"partialFingerprints":{"codehealthFindingId/v1":"22df70c717b794a8923f255b926b33a64647097331580a42e0e095e896d34fd0"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::auth::login_diagnostics::classify_auth_failure_message (cyclomatic 26): jcode_base::auth::login_diagnostics::classify_auth_failure_message has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/login_diagnostics.rs"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc9cf2f9ed91efe4ab29bf4dd4cb6fe555bd55ab04ba12b4d7ea8b40878c5043"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::mobile_sync::sync_pass (cyclomatic 26): jcode_base::mobile_sync::sync_pass has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mobile_sync.rs"},"region":{"startLine":708}}}],"partialFingerprints":{"codehealthFindingId/v1":"715cbec9d06230cbd815ef2347f517436af789bbb2d73b3e0e8b95c260b33790"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_harness_api_server::run_bridge_stream (cyclomatic 26): jcode_harness_api_server::run_bridge_stream has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/lib.rs"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd3ce53d265d9e32578b852c2635fc6e303d8e78cec47320743472900c37f248"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_schema_dialect::dialect::walk (cyclomatic 26): jcode_schema_dialect::dialect::walk has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-schema-dialect/src/dialect.rs"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff32604740080bf39c0f34f43530744e6c8c3732176eb19b47b57dc05c52f75b"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_session_picker_selection (cyclomatic 26): App::handle_session_picker_selection has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":2850}}}],"partialFingerprints":{"codehealthFindingId/v1":"de20804549e754f84011f5895a3d782e211b431c96534aef7ed8beee5c38a0ee"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_diagram_pane::draw_pinned_diagram (cyclomatic 26): jcode_tui::tui::ui_diagram_pane::draw_pinned_diagram has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_diagram_pane.rs"},"region":{"startLine":779}}}],"partialFingerprints":{"codehealthFindingId/v1":"11201b667c7e61c986511f9ded0aa57844cdb3935661f34cba6c1fd97f0a32d3"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui_core::keybind::format_binding (cyclomatic 26): jcode_tui_core::keybind::format_binding has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file\u0027s highest cyclomatic complexity: jcode_tui_core::keybind::macos_option_char_to_ascii_key (cyclomatic 28) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-core/src/keybind.rs"},"region":{"startLine":533}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d458b5bb46173d4e6c2fad662cf64c411a9b07b10724ef8afc2eacfa113ebf4"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui_render::memory_tiles::render_memory_tiles (cyclomatic 26): jcode_tui_render::memory_tiles::render_memory_tiles has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/memory_tiles.rs"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9e4a05be55ce4a8413a31603cff38bde971d44610a8617b8350134becefbe1a"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui_style::harmony::generate::separate_confusable_pairs (cyclomatic 26): jcode_tui_style::harmony::generate::separate_confusable_pairs has cyclomatic complexity 26 (threshold 15). Of this number, 18 points are the body\u0027s own statements and 8 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-style/src/harmony/generate.rs"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8cda182a7b4d860a46f149af3ad91e40ae4f51357e8e98e35dad1e898850fd2"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui_visual_debug::write_frame (cyclomatic 26): jcode_tui_visual_debug::write_frame has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-visual-debug/src/lib.rs"},"region":{"startLine":576}}}],"partialFingerprints":{"codehealthFindingId/v1":"5acc27cfad587b286a31d23aef23ebc41ec0e054863195b22a2dc12fd10c8881"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_voice::streaming_capture::capture (cyclomatic 26): jcode_voice::streaming_capture::capture has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-voice/src/streaming_capture.rs"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae952ff0918ae8fe4c7cf0d535686e2ed632be0e319ca14b0660c16cf1277db5"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::commands::todo_followup::prepare_run_todo_follow_up (cyclomatic 26): jcode::cli::commands::todo_followup::prepare_run_todo_follow_up has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands/todo_followup.rs"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb9acecbea4899d95fd576ac128bf20383dca59c89f39c16ca862142cf48c1ff"}},{"ruleId":"D1","level":"warning","message":{"text":"AmbientRunnerHandle::run_loop (cyclomatic 25): AmbientRunnerHandle::run_loop has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/ambient/runner.rs"},"region":{"startLine":555}}}],"partialFingerprints":{"codehealthFindingId/v1":"293ce7d432482610ea528414e6e8d81f9c06d39e0c2678094eb204abe146519d"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::replay::export_timeline (cyclomatic 25): jcode_app_core::replay::export_timeline has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/replay.rs"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c0c9c7d8657d16d8d4870caee5574cd807fabd243ddfc1ea51912cc17935417"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::debug_server_state::maybe_handle_server_state_command (cyclomatic 25): jcode_app_core::server::debug_server_state::maybe_handle_server_state_command has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_server_state.rs"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"f06803e36701e3bb4ac8b7e69f09908041b75b02ddd3f87bf2023752a269c826"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_provider_anthropic_runtime::stream_response (cyclomatic 25): jcode_provider_anthropic_runtime::stream_response has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic-runtime/src/lib.rs"},"region":{"startLine":2266}}}],"partialFingerprints":{"codehealthFindingId/v1":"00e1a10b7f37b5375c2360a714e65f4663b40feb3b45b3e0b5f79e0272a997c1"}},{"ruleId":"D1","level":"warning","message":{"text":"GeminiProvider::complete (cyclomatic 25): GeminiProvider::complete has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-gemini-runtime/src/lib.rs"},"region":{"startLine":605}}}],"partialFingerprints":{"codehealthFindingId/v1":"63be42e366c666076f170995a31f1dd49187f0a97bb74897d73bcf7391ba84ce"}},{"ruleId":"D1","level":"warning","message":{"text":"App::run_scroll_test (cyclomatic 25): App::run_scroll_test has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_bench.rs"},"region":{"startLine":717}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8e4cbafbee0b422bce72d532bda3e5c9f511bd12627b6b7afdb3745930ecf72"}},{"ruleId":"D1","level":"warning","message":{"text":"App::open_model_picker_inner (cyclomatic 25): App::open_model_picker_inner has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":1161}}}],"partialFingerprints":{"codehealthFindingId/v1":"893a001ffca6519292b19a79e91a096da20b1ff48eeda6eaa858c98e0a44ea07"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::usage::activity_summary_lines (cyclomatic 25): jcode_tui::tui::ui_messages::usage::activity_summary_lines has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages/usage.rs"},"region":{"startLine":496}}}],"partialFingerprints":{"codehealthFindingId/v1":"8713eca87b89e664eeb3501573f7571ad99c67edd9b87c5aaa8f8e98b89b9744"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_voice::capture::run (cyclomatic 25): jcode_voice::capture::run has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-voice/src/lib.rs"},"region":{"startLine":452}}}],"partialFingerprints":{"codehealthFindingId/v1":"825a3e56f923e7102d12fa9da3e5f48e58435a01355a3e6b2343621ee5818d48"}},{"ruleId":"D1","level":"warning","message":{"text":"AcpRuntime::run_prompt (cyclomatic 25): AcpRuntime::run_prompt has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/acp.rs"},"region":{"startLine":1107}}}],"partialFingerprints":{"codehealthFindingId/v1":"7aa0fac25204e2989a9934a04bb8156d41dd83061f869335f6a98397095ff4e8"}},{"ruleId":"D1","level":"warning","message":{"text":"Projection::observe (cyclomatic 24): Projection::observe has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/live_status.rs"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"c411e49add083edbd5e7fb342f5291bb2e2fc7afabd93031b8d885dfe7220457"}},{"ruleId":"D1","level":"warning","message":{"text":"InitiativeTool::execute (cyclomatic 24): InitiativeTool::execute has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/goal.rs"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e4b5d932907809f0e42803b21dac67a0a4f11179c35852a01c745aa206f8a49"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::usage::provider_fetch::fetch_openai_usage_for_account (cyclomatic 24): jcode_base::usage::provider_fetch::fetch_openai_usage_for_account has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/provider_fetch.rs"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"5016bfe6207ddb098f018a4076aebd40421c191df5d4d7292a2f2bf10a134d78"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_provider_anthropic::history_repair::repair_dangling_anthropic_server_tools (cyclomatic 24): jcode_provider_anthropic::history_repair::repair_dangling_anthropic_server_tools has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic/src/history_repair.rs"},"region":{"startLine":443}}}],"partialFingerprints":{"codehealthFindingId/v1":"9753533bfead53b1d2f1328d6fa28355f944b6544584976c1314791e388b6302"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_provider_openai::stream::handle_openai_output_item (cyclomatic 24): jcode_provider_openai::stream::handle_openai_output_item has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai/src/stream.rs"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"814ed8adb1dba773262a597fa40387959342c216e6a55ebef0c4150db03d4e69"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionPicker::render_preview (cyclomatic 24): SessionPicker::render_preview has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker.rs"},"region":{"startLine":1671}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d45b1fcb3d383f7739e75dbc7fc4bc49fd5e4b3fdb5f81b634e82453d5a146d"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::commands_cloud::handle_cloud_command (cyclomatic 24): jcode_tui::tui::app::commands_cloud::handle_cloud_command has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_cloud.rs"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b3250db023107f293a3be36f06a3ad025d26132d995b33a18a97dfac0d7e416"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::state_ui_storage::compact_tool_input_for_display (cyclomatic 24): jcode_tui::tui::app::state_ui_storage::compact_tool_input_for_display has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui_storage.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a9d9eb49ec41a28e059273ba2214274d9912f236a0e33f0b67d92fd52760f11"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_file_diff::build_file_diff_cache_entry (cyclomatic 24): jcode_tui::tui::ui_file_diff::build_file_diff_cache_entry has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_file_diff.rs"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0f74b51c2d0b23621d75e9788f2899298efceea68537eac38b335f5c8365d90"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_todo_stages::push_stage_lines (cyclomatic 24): jcode_tui::tui::ui_todo_stages::push_stage_lines has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_todo_stages.rs"},"region":{"startLine":868}}}],"partialFingerprints":{"codehealthFindingId/v1":"fba50417f41129a849e67754e65ae80d086b58579f7cfe8003b88645deebf779"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui_mermaid::mermaid_cache_render::render_mermaid_deferred_inner (cyclomatic 24): jcode_tui_mermaid::mermaid_cache_render::render_mermaid_deferred_inner has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_cache_render.rs"},"region":{"startLine":1030}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c3b78055eab3e3e705191929b26d021a9a0251169a4864e72481d6022a11cb0"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui_mermaid::mermaid_kitty_classic::finish_terminal_image_frame (cyclomatic 24): jcode_tui_mermaid::mermaid_kitty_classic::finish_terminal_image_frame has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_kitty_classic.rs"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"2829774668866c73c17d04433c19ad10f4f1f3461fae41315ab1daa6ba98f05c"}},{"ruleId":"D1","level":"warning","message":{"text":"PermissionsApp::run (cyclomatic 24): PermissionsApp::run has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-permissions/src/lib.rs"},"region":{"startLine":509}}}],"partialFingerprints":{"codehealthFindingId/v1":"030b728d9ec82646605d7cb0b0d8c057bb5398fcfb64057623f3fcfed2b318ef"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::login::login_openai_compatible_flow (cyclomatic 24): jcode::cli::login::login_openai_compatible_flow has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/login.rs"},"region":{"startLine":853}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ecce964463f8ac596d0fe276e40b4ee52d9f08a119dd544115be9681f833b19"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::ambient::prompt::build_ambient_system_prompt (cyclomatic 23): jcode_app_core::ambient::prompt::build_ambient_system_prompt has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/ambient/prompt.rs"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"938ecbbd3975f5af474a3271dd8f88891c9750218c02e76dc07910ea6f7d3522"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::client_processing::start_processing_message (cyclomatic 23): jcode_app_core::server::client_processing::start_processing_message has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_processing.rs"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"07379c2a1e5c14c476e22ce87385d66718726ddae36c6786813a78916df36c0b"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::debug_ambient::maybe_handle_ambient_command (cyclomatic 23): jcode_app_core::server::debug_ambient::maybe_handle_ambient_command has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_ambient.rs"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"b49d8105b51018e2dc5b3f144872f82e353096b4ae2a0960cbfc00927787d177"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::tool::todo::normalize_todo_input (cyclomatic 23): jcode_app_core::tool::todo::normalize_todo_input has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/todo.rs"},"region":{"startLine":1240}}}],"partialFingerprints":{"codehealthFindingId/v1":"87f33c52f09b180c716fb04c501c178f7a67c89645e495a122c45ef19c5e93e1"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::mcp::oauth::www_authenticate_param (cyclomatic 23): jcode_base::mcp::oauth::www_authenticate_param has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mcp/oauth.rs"},"region":{"startLine":655}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d944f175bb58ca6f1b573b11d9c93ff3be777888b47b2705f77d1c93c616ea3"}},{"ruleId":"D1","level":"warning","message":{"text":"AntigravityProvider::complete (cyclomatic 23): AntigravityProvider::complete has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-antigravity-runtime/src/lib.rs"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"95e4aac131acf42248ef4a31392526ce1cdef5b286813f2f9fe49e3bf4c385e8"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_provider_openrouter_runtime::openrouter_sse_stream::stream_response (cyclomatic 23): jcode_provider_openrouter_runtime::openrouter_sse_stream::stream_response has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/openrouter_sse_stream.rs"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae8586109fa36dbbf923dc2e24ef666834e71ca7f704a252bec23273c8fa6bf7"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_telemetry_core::session_outcome::infer_session_stop_reason (cyclomatic 23): jcode_telemetry_core::session_outcome::infer_session_stop_reason has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/session_outcome.rs"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"c28bac25f53b032298d6b2150ba7466c5838682a7557d296b39e452560a52cb0"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_terminal_launch::detected_resume_terminal_with_client_env (cyclomatic 23): jcode_terminal_launch::detected_resume_terminal_with_client_env has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-terminal-launch/src/lib.rs"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"62349f1ec25b13bad927be5e20330f43a85a6c01fe4e078fa3b01e10cb822f7b"}},{"ruleId":"D1","level":"warning","message":{"text":"App::poll_cloud_job (cyclomatic 23): App::poll_cloud_job has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_cloud.rs"},"region":{"startLine":720}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bc4802e874706d72417c1d42e9ba9654cd95890e334a09a6d6d50eb6cccad19"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_copy_selection_mouse_with (cyclomatic 23): App::handle_copy_selection_mouse_with has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/copy_selection.rs"},"region":{"startLine":558}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c33d91ddf49ee06644bff8dd84f707a7cfe207dec9f2307ba4089fd2081acee"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_provider_failover_prompt_with_payload (cyclomatic 23): App::handle_provider_failover_prompt_with_payload has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/model_context.rs"},"region":{"startLine":418}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f4a71dcf41a0c96693935d6b97c96a3dee6f63347056bb97b4d2ec8c3ba9f81"}},{"ruleId":"D1","level":"warning","message":{"text":"App::offer_fallback_after_error_with_payload (cyclomatic 23): App::offer_fallback_after_error_with_payload has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/model_context.rs"},"region":{"startLine":717}}}],"partialFingerprints":{"codehealthFindingId/v1":"71c0fd32b4f457d3f17cec31196ed749cc314dc8b415e2350ee7ce8b1e2b3d3a"}},{"ruleId":"D1","level":"warning","message":{"text":"App::run (cyclomatic 23): App::run has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/run_shell.rs"},"region":{"startLine":759}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbfca561ecf8e6644e542af9987360ffc5197e288f4936be225cc3e86e61c299"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionPicker::run_with_session_updates (cyclomatic 23): SessionPicker::run_with_session_updates has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker.rs"},"region":{"startLine":2417}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfcb68cf5b18682db9c0d2642f7bd83bcf91218b4a3621f28841f7dacf560137"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::discovery::render_discovery_card (cyclomatic 23): jcode_tui::tui::ui_messages::discovery::render_discovery_card has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages/discovery.rs"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"e21bb8d86d67fd1df501a9c510ca444e76418ba778e228ec2aaa0ecb9578da69"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_prepare::prepare_messages_inner (cyclomatic 23): jcode_tui::tui::ui_prepare::prepare_messages_inner has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_prepare.rs"},"region":{"startLine":665}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3ef01af3ce15411f8b58ecc9425dcbebd448c6e628ae1ca168e845658999f5f"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui_markdown::markdown_links::markdown_link_target (cyclomatic 23): jcode_tui_markdown::markdown_links::markdown_link_target has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_links.rs"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"4054c8b798880b2de73ca4e988743b331344b493eeeb4fb8d19ea8bf57809261"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::cloud_env::exchange_bounded (cyclomatic 23): jcode::cli::cloud_env::exchange_bounded has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_env.rs"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b09fd41362a011493a39f23093883519fb589748bfdb6629b4e3e8681e2b364"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::cloud_group_receive::activate (cyclomatic 23): jcode::cli::cloud_group_receive::activate has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_group_receive.rs"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"17ae5898ff62e54ccabf707268f5b54a959c42fce8769b61d7a63febac025e76"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::commands::run_server_stop_command (cyclomatic 23): jcode::cli::commands::run_server_stop_command has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":2477}}}],"partialFingerprints":{"codehealthFindingId/v1":"dabfc193c6e68e56d6d5a0976591645fbf5dd0834c210a709a6fe0fe49381600"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::commands::run_single_message_command_ndjson (cyclomatic 23): jcode::cli::commands::run_single_message_command_ndjson has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":3106}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0011d6399be051928ea43ff70c0ec5eec324a8fa86b6900a667dfde0c6c96cb"}},{"ruleId":"D1","level":"warning","message":{"text":"ConversationSearchTool::execute (cyclomatic 22): ConversationSearchTool::execute has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/conversation_search.rs"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"eaf726b7a9e2f720935b0ce9468a3025f7012dd1c225474639be9ada078ced1f"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::runtime_special_commands::logout (cyclomatic 22): jcode_app_core::server::runtime_special_commands::logout has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/runtime_special_commands.rs"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4b05d827c74635d5504219fbdecae3af6f810457ad85d4ddc3b61d470cc2736"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::swarm_persistence::load_runtime_state (cyclomatic 22): jcode_app_core::server::swarm_persistence::load_runtime_state has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/swarm_persistence.rs"},"region":{"startLine":500}}}],"partialFingerprints":{"codehealthFindingId/v1":"980e8663ac69bc1461f8825d8b0fa27ee6195e64fecde524dbded32c9eca37b5"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::tool::todo::prepare_background_dependencies (cyclomatic 22): jcode_app_core::tool::todo::prepare_background_dependencies has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/todo.rs"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"97d3f60a4ef09fecc15d1b2ce1c53df8c7e4374ce0e56438cf9dc223c90a7b10"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::update::download_and_install_blocking_with_progress (cyclomatic 22): jcode_app_core::update::download_and_install_blocking_with_progress has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/update.rs"},"region":{"startLine":960}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7934051c7dc63d629a9568961d4167ef558cec798aae7469e7999b955909773"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::usage_openai::parse_openai_usage_payload (cyclomatic 22): jcode_app_core::usage_openai::parse_openai_usage_payload has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_openai.rs"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"5df23ce4d38ce8366ea4f97938a3457398d1ed00ee006ce9562c2549a2da36df"}},{"ruleId":"D1","level":"warning","message":{"text":"Walk::node (cyclomatic 22): Walk::node has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-applet-types/src/validate.rs"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a18e9eab2cf1cb0b25246e21f11ee456ad82c4bca9093c7c9316a50d6eab4d4"}},{"ruleId":"D1","level":"warning","message":{"text":"MultiProvider::compute_fresh_session_pool_route (cyclomatic 22): MultiProvider::compute_fresh_session_pool_route has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/startup.rs"},"region":{"startLine":517}}}],"partialFingerprints":{"codehealthFindingId/v1":"565513feac01612445844c6a90f35c4ee1998bcf31b5a2ec7e2987519200f3ba"}},{"ruleId":"D1","level":"warning","message":{"text":"Session::redacted_for_export (cyclomatic 22): Session::redacted_for_export has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session.rs"},"region":{"startLine":1229}}}],"partialFingerprints":{"codehealthFindingId/v1":"293307aa0094ba1dc1c54ac00964b34db6f020a9549c1fb17b1bdd5784c784e5"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::auth::assessment_for_key (cyclomatic 22): jcode_base::auth::assessment_for_key has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/mod.rs"},"region":{"startLine":1119}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e10c1b96938411eb1ce7190c1a6238387b21fb33640bca9996c78c7648e6341"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::gateway::handle_ws_connection (cyclomatic 22): jcode_base::gateway::handle_ws_connection has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/gateway.rs"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0075f56250b9676529a2bb1d166337e31bf10488eddf8b470693282964d0de9"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::import::import_codex_session_from_path (cyclomatic 22): jcode_base::import::import_codex_session_from_path has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/import.rs"},"region":{"startLine":1069}}}],"partialFingerprints":{"codehealthFindingId/v1":"d290cebc6aa815bd1bbb8b224c93ec00b33e17751421109c5d3a0ba96e9d5845"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::usage::openai_helpers::parse_openai_usage_payload (cyclomatic 22): jcode_base::usage::openai_helpers::parse_openai_usage_payload has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/openai_helpers.rs"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"944d83849489b4bd0772bf7949e167154074daacbb36547741aef67078db31c4"}},{"ruleId":"D1","level":"warning","message":{"text":"BedrockProvider::classify_error_message (cyclomatic 22): BedrockProvider::classify_error_message has cyclomatic complexity 22 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-bedrock/src/lib.rs"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"51c020b22cb40d44cdd510ed3aab3e7cc043513db25e0aa30f83a30ba895dc73"}},{"ruleId":"D1","level":"warning","message":{"text":"BedrockProvider::refresh_catalog_with_client (cyclomatic 22): BedrockProvider::refresh_catalog_with_client has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-bedrock/src/lib.rs"},"region":{"startLine":1052}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb5b6a52d5fbff629a6935cd8d810c91d0b794fe36fa431499d59c645d005b7a"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_provider_core::model_names::pretty_picker_model_name (cyclomatic 22): jcode_provider_core::model_names::pretty_picker_model_name has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/model_names.rs"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"8553fd5683fcdb365362544b5a69617f21e2608a5e2c02949aa8f9f5f7144177"}},{"ruleId":"D1","level":"warning","message":{"text":"SshConnectOptions::validate (cyclomatic 22): SshConnectOptions::validate has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-sdk/src/ssh.rs"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"fba6f382ceb5c3377e0d7ace1b972de8000a017b5f5b720fb85d2d919f2fccf9"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_sdk::launch::launch_instance (cyclomatic 22): jcode_sdk::launch::launch_instance has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-sdk/src/launch.rs"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f076b47fb9ba64597cf4deb0c570500ffabd7a5cd5d64494fba718e1e0c9e09"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_setup_hints::windows_setup::windows_native_hotkey_loop (cyclomatic 22): jcode_setup_hints::windows_setup::windows_native_hotkey_loop has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/windows_setup.rs"},"region":{"startLine":436}}}],"partialFingerprints":{"codehealthFindingId/v1":"629d85f76a06d46bc313a940c48defd50f9cb97aa256f9cc448eb972d4ccb6b6"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_telemetry_core::lifecycle::emit_lifecycle_event (cyclomatic 22): jcode_telemetry_core::lifecycle::emit_lifecycle_event has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lifecycle.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"443617c437b0d78036ab91dd3550760b19f9ac4e0e29e6c4cc1f460e8e1ab180"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_telemetry_core::oauth_account::handle_in (cyclomatic 22): jcode_telemetry_core::oauth_account::handle_in has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/oauth_account.rs"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"b662c0f9cadb1a9bf0b5a5b7290709df6a3a6990f9cb005ba21198cd3e9e0dc3"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_terminal_launch::build_spawn_command (cyclomatic 22): jcode_terminal_launch::build_spawn_command has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-terminal-launch/src/lib.rs"},"region":{"startLine":724}}}],"partialFingerprints":{"codehealthFindingId/v1":"640a7f78b7e206717255f8931f79935071c8933ac7448764066679da4f67b062"}},{"ruleId":"D1","level":"warning","message":{"text":"App::start_muse_subscription_login (cyclomatic 22): App::start_muse_subscription_login has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth/auth_muse.rs"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"d570821d000da4b42b7584ce8614c46a9f28efc945b1ee5d9eca644b32d062ae"}},{"ruleId":"D1","level":"warning","message":{"text":"App::capture_scroll_test_step (cyclomatic 22): App::capture_scroll_test_step has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_bench.rs"},"region":{"startLine":555}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6e35c1c5c3181a8e38f5cf90976152fe46c32fb85e97d5698de2699ddc65e70"}},{"ruleId":"D1","level":"warning","message":{"text":"App::execute_script_step (cyclomatic 22): App::execute_script_step has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file\u0027s highest cyclomatic complexity: App::parse_key_spec (cyclomatic 23) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_script.rs"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"57af962d8c2c088235b274791195af7c1414d95519a8d94df135344ede1f05f4"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::commands_cloud::parse_cloud_command (cyclomatic 22): jcode_tui::tui::app::commands_cloud::parse_cloud_command has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_cloud.rs"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f7bfd93cb3713c79898e32cce3c2e6dcba7306f85b5fefe5189fc63731398c2"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::handterm_native_scroll::bridge_thread (cyclomatic 22): jcode_tui::tui::app::handterm_native_scroll::bridge_thread has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/handterm_native_scroll.rs"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"19a49fb0ff35736eebe6816b992c14ee044c84a7c996f2f13096809c64b73211"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::onboarding_graph::check_invariants (cyclomatic 22): jcode_tui::tui::app::onboarding_graph::check_invariants has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/onboarding_graph.rs"},"region":{"startLine":592}}}],"partialFingerprints":{"codehealthFindingId/v1":"c54869a069ab16e04ddac12cb58e00d301cb8b42a0446431bff520b50d5de31c"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_file_diff::draw_file_diff_view (cyclomatic 22): jcode_tui::tui::ui_file_diff::draw_file_diff_view has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_file_diff.rs"},"region":{"startLine":429}}}],"partialFingerprints":{"codehealthFindingId/v1":"384dd68bcb119620b660ba24c88a4f86a7b119eeeaf566aa3fd3ac9d03928873"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_header::build_persistent_header_with_auth (cyclomatic 22): jcode_tui::tui::ui_header::build_persistent_header_with_auth has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_header.rs"},"region":{"startLine":705}}}],"partialFingerprints":{"codehealthFindingId/v1":"dff1a5ac28ce5329a552fa57796b13463937e9789568735cb3dfc22325d2c94f"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_todo_stages::agent_roster_spans (cyclomatic 22): jcode_tui::tui::ui_todo_stages::agent_roster_spans has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_todo_stages.rs"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cafdf155b0179d931c9daad6348be238a12b7600f46ee5889262910de2e8485"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_voice::command_capture::run_recorder (cyclomatic 22): jcode_voice::command_capture::run_recorder has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-voice/src/command_capture.rs"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9fdf28a300b9cf7e09f90c7a4c9f1119dcbf0ca87cd17bd066016927ea3bb3b"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::tui_launch::run_tui_client (cyclomatic 22): jcode::cli::tui_launch::run_tui_client has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/tui_launch.rs"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bed7ffb99f39566e9218afc5dbe381031df9eb0d74ae09f76e9aab59a84998a"}},{"ruleId":"D1","level":"warning","message":{"text":"remote.project (cyclomatic 22): remote.project has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/cloud_preview/remote.py"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"495caeda535cb7073a4565fc890a2fcf55d430a3d0db22a0c972abf3580b6ad2"}},{"ruleId":"D1","level":"warning","message":{"text":"Agent::extract_session_memories (cyclomatic 21): Agent::extract_session_memories has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/turn_execution.rs"},"region":{"startLine":1564}}}],"partialFingerprints":{"codehealthFindingId/v1":"44248365794ef811a98ec105c9114477fb1523e0b73d91b4b1a4546d636b6228"}},{"ruleId":"D1","level":"warning","message":{"text":"AppletTool::execute (cyclomatic 21): AppletTool::execute has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/applet.rs"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"da6e5d240a55d813b07353ecb015b71461bc01dc271badcb6bd04282082c5018"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::replay::auto_edit_timeline (cyclomatic 21): jcode_app_core::replay::auto_edit_timeline has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/replay.rs"},"region":{"startLine":732}}}],"partialFingerprints":{"codehealthFindingId/v1":"e10828901945fe3190fb4f861c65487371c943ae384a71dc9e3dbe16144a1330"}},{"ruleId":"D1","level":"warning","message":{"text":"MultiProvider::model_switch_request_for_session_route (cyclomatic 21): MultiProvider::model_switch_request_for_session_route has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file\u0027s highest cyclomatic complexity: MultiProvider::default_model_selection_from_route (cyclomatic 29) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/selection.rs"},"region":{"startLine":472}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2aebb0306e4b9341a27da510599d9aba7f8c15d2297c834bb37f530473dfdea"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::provider::catalog_routes::simplified_model_routes_for_picker (cyclomatic 21): jcode_base::provider::catalog_routes::simplified_model_routes_for_picker has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/catalog_routes.rs"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"20f8a3358a2964137f3e19bafaf211816eb0430cc1a9b46f11076684729b0d95"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::usage::api_keys::fetch_compatible_profile_report (cyclomatic 21): jcode_base::usage::api_keys::fetch_compatible_profile_report has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/api_keys.rs"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4a134a39f7812c91c4fbdd1e80cf401d487f58f2784e07aedb27ebcd79e0109"}},{"ruleId":"D1","level":"warning","message":{"text":"BridgeState::legacy_event_to_api (cyclomatic 21): BridgeState::legacy_event_to_api has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/translate.rs"},"region":{"startLine":1581}}}],"partialFingerprints":{"codehealthFindingId/v1":"3281dcc529db205747311f49cc988231f9075224ab12f8da9d422d6b896aac12"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_schema_dialect::conformance::walk (cyclomatic 21): jcode_schema_dialect::conformance::walk has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-schema-dialect/src/conformance.rs"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9430ede10d21cd92982a5711f645eedd98e53f3ffe8b2871b6e874a5d6faacf"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_terminal_image::display::get_image_dimensions (cyclomatic 21): jcode_terminal_image::display::get_image_dimensions has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-terminal-image/src/display.rs"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5234ca640ca302dd870d86faeb4a35a2f4c1aac6f53642a2de73088948ae273"}},{"ruleId":"D1","level":"warning","message":{"text":"App::trigger_provider_auth_changed (cyclomatic 21): App::trigger_provider_auth_changed has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth.rs"},"region":{"startLine":2638}}}],"partialFingerprints":{"codehealthFindingId/v1":"8662a8a27885d2f706cec5b15d381007ebfd657d670160bc06bd050d585fd542"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_inline_interactive_preview_key (cyclomatic 21): App::handle_inline_interactive_preview_key has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":2446}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fdb90026e33f897fb831944ef5b24fb5209f700ce9efbfcf499183223621715"}},{"ruleId":"D1","level":"warning","message":{"text":"App::extract_session_memories (cyclomatic 21): App::extract_session_memories has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/turn_memory.rs"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"f01473023c3e117bd1013e72f9a2457fb55e85b2cf4a714be794975cf2e30c6b"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_usage_reset_command (cyclomatic 21): App::handle_usage_reset_command has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/usage_reset.rs"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4cf516dae2547b370f8485b2dd14965aa02302ceccc9d109184adb6dcf5b528"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionPicker::handle_search_key (cyclomatic 21): SessionPicker::handle_search_key has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker.rs"},"region":{"startLine":1398}}}],"partialFingerprints":{"codehealthFindingId/v1":"667926816ad613b46105c377935359d3a17599ecad272fb8004949e7fed2d4f2"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::auth_account_commands::execute_account_command_remote (cyclomatic 21): jcode_tui::tui::app::auth_account_commands::execute_account_command_remote has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_commands.rs"},"region":{"startLine":491}}}],"partialFingerprints":{"codehealthFindingId/v1":"595838305d70351d251307a53e1dfec0ba8f3becece275a4c1d0302061e8ff07"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::input::handle_control_key (cyclomatic 21): jcode_tui::tui::app::input::handle_control_key has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":1978}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b6e7b12191138f3c710bc3268649225f596afd355cebbfcf51ce315ad244498"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::input::terminal_reports::strip_terminal_control_sequences (cyclomatic 21): jcode_tui::tui::app::input::terminal_reports::strip_terminal_control_sequences has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input/terminal_reports.rs"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"64554b7a720501e511f548590837363df2d5914d671b924c6962c963a3d00936"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::remote::apply_terminal_event (cyclomatic 21): jcode_tui::tui::app::remote::apply_terminal_event has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote.rs"},"region":{"startLine":582}}}],"partialFingerprints":{"codehealthFindingId/v1":"5baa33c64d8a97ad766b77cbcc2f8b4f3b90a2de591b98d30787e334b2c35981"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::remote_notifications::present_swarm_notification_inner (cyclomatic 21): jcode_tui::tui::app::remote_notifications::present_swarm_notification_inner has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote_notifications.rs"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"313050c4d55489fcbd216c3a0868e38495bff83d35147de53ad568db4aa92e61"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::info_widget_swarm_background::render_swarm_dock (cyclomatic 21): jcode_tui::tui::info_widget_swarm_background::render_swarm_dock has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_swarm_background.rs"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ea6b2b935bd374496cce2c2c4433bdf6642f9b202d4475998bc6af6b7a1949c"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_header::account_router::inventory_lines (cyclomatic 21): jcode_tui::tui::ui_header::account_router::inventory_lines has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_header/account_router.rs"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"940cec25581e618de0a580ab6c8697a577541f17d63ad79cd6ddbcd34403bf76"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::render_todos_message_with_cap (cyclomatic 21): jcode_tui::tui::ui_messages::render_todos_message_with_cap has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":1121}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2e592989697aa64bb4b2f8928163e852adc27a6014e64c2231d294dc2f58c08"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui_markdown::markdown_render_support::extract_copy_targets_from_rendered_lines (cyclomatic 21): jcode_tui_markdown::markdown_render_support::extract_copy_targets_from_rendered_lines has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_support.rs"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"966f03515f4a3ac527906c788cff53a44020293cc9f85286b6cc2c9c6f662e40"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui_markdown::markdown_render_support::render_table_aligned (cyclomatic 21): jcode_tui_markdown::markdown_render_support::render_table_aligned has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_support.rs"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"72b277a6d733c9f0bf202115c62be5c01bf3035701fcecfa2098ae800bfff99b"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::bin::tui_bench::reconstruct_side_panel_snapshot_from_session (cyclomatic 21): jcode::bin::tui_bench::reconstruct_side_panel_snapshot_from_session has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/tui_bench.rs"},"region":{"startLine":659}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed2ea11ea6464945164d38a8a274f94a13cfda73db54e98bc7e0f50ff564015a"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::cloud_move::run_return (cyclomatic 21): jcode::cli::cloud_move::run_return has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_move.rs"},"region":{"startLine":828}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa975d1641cdd49e88fe397e0a0650090026a4be8542e3df6e9c042f2a74e74f"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::commands::run_cloud_sessions_sync (cyclomatic 21): jcode::cli::commands::run_cloud_sessions_sync has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: jcode::cli::commands::emit_ndjson_event (cyclomatic 23) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":625}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3c6caba515f10585844d4b7c1d08ac15de7941ab723541b000432af519948a2"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::commands::provider_setup::configure_provider_profile (cyclomatic 21): jcode::cli::commands::provider_setup::configure_provider_profile has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands/provider_setup.rs"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"29b4cee51ccea5b5f2daef5455ba9b128116e01f7c89a8774c7c9ad384d100a0"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::ssh_transport::accept_connections (cyclomatic 21): jcode::cli::ssh_transport::accept_connections has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/ssh_transport.rs"},"region":{"startLine":522}}}],"partialFingerprints":{"codehealthFindingId/v1":"60606596650dc4fc7f21a87e0f533b2e5bb21fdf78d75470792c6db35ce0ac0b"}},{"ruleId":"D1","level":"warning","message":{"text":"remote.main (cyclomatic 21): remote.main has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/cloud_preview/remote.py"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"913789389418976f0a21bc1ef12c294640af3d8eaa9e8c71ceff1d7aea50356c"}},{"ruleId":"D1","level":"warning","message":{"text":"launch.inheritCredentials (cyclomatic 21): launch.inheritCredentials has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/typescript/src/launch.ts"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed436632d136a843e317e3ace67427829f09a53d0eed268367af7932179c904a"}},{"ruleId":"D1","level":"warning","message":{"text":"writeFirehose (cyclomatic 21): writeFirehose has cyclomatic complexity 21 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file\u0027s highest cyclomatic complexity: isMeaningfulLifecycleEvent (cyclomatic 40) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":374}}}],"partialFingerprints":{"codehealthFindingId/v1":"227f089e2087a21d2b1e1f15765883a7455f6da5d7fae99e9db69bba279c5369"}},{"ruleId":"D1","level":"warning","message":{"text":"insertWebDetails (cyclomatic 21): insertWebDetails has cyclomatic complexity 21 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This is NOT this file\u0027s highest cyclomatic complexity: isMeaningfulLifecycleEvent (cyclomatic 40) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":2051}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8b14650ad4d87f271abee65086144ea259cfeb2f1517f62f51a619e61b10700"}},{"ruleId":"D1","level":"warning","message":{"text":"CalendarTool::execute (cyclomatic 20): CalendarTool::execute has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/calendar.rs"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"61d4f6b6273008489df0717574a322f23fe86178ee52290d18c4b2081e997067"}},{"ruleId":"D1","level":"warning","message":{"text":"Registry::register_mcp_tools_for_dir (cyclomatic 20): Registry::register_mcp_tools_for_dir has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/mod.rs"},"region":{"startLine":1647}}}],"partialFingerprints":{"codehealthFindingId/v1":"20d01cb41ab4e21dbb043b0a769a579cf0c0f243f9b791f9839234571a9df1b8"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::comm_control::handle_comm_assign_task_with_mode (cyclomatic 20): jcode_app_core::server::comm_control::handle_comm_assign_task_with_mode has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_control.rs"},"region":{"startLine":1090}}}],"partialFingerprints":{"codehealthFindingId/v1":"27ab52266c5db35297dd9e582cb35969412404fe1ecd43b3766f37ec1560d84a"}},{"ruleId":"D1","level":"warning","message":{"text":"BackgroundTaskManager::wait (cyclomatic 20): BackgroundTaskManager::wait has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/background.rs"},"region":{"startLine":968}}}],"partialFingerprints":{"codehealthFindingId/v1":"2152f554fef5347e65b54b54d5fe00b7845d318c04a7ba254c6f8ca153ebe3b3"}},{"ruleId":"D1","level":"warning","message":{"text":"MultiProvider::is_failover_route_pool_approved (cyclomatic 20): MultiProvider::is_failover_route_pool_approved has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/multi_provider.rs"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"0aaaa8439c28ae08bc2380588a6fa764213c753d44f78b7e0aec7999074a1bb9"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::auth::doctor::recommended_actions (cyclomatic 20): jcode_base::auth::doctor::recommended_actions has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/doctor.rs"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"e33cf68aa535e165ec0438fc6aee4c677327aea75a14f9abeb05450cf0f40822"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_provider_anthropic::format_content_blocks_with_native (cyclomatic 20): jcode_provider_anthropic::format_content_blocks_with_native has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic/src/lib.rs"},"region":{"startLine":389}}}],"partialFingerprints":{"codehealthFindingId/v1":"b04547f4d1b392d7c70f5afee99d326d693626e2af0c3f3fdaac2030ad9d4b92"}},{"ruleId":"D1","level":"warning","message":{"text":"CopilotApiProvider::stream_request (cyclomatic 20): CopilotApiProvider::stream_request has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-copilot-runtime/src/lib.rs"},"region":{"startLine":417}}}],"partialFingerprints":{"codehealthFindingId/v1":"f27b4a0ff61094d64f089bab78b801a4ac8704ab963f0be49fabb7f333d71400"}},{"ruleId":"D1","level":"warning","message":{"text":"RouteSelection::routed_model_spec (cyclomatic 20): RouteSelection::routed_model_spec has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/lib.rs"},"region":{"startLine":1083}}}],"partialFingerprints":{"codehealthFindingId/v1":"d02de4ff11fbf8a31e4078dc60e26969139a16307c4711fe905d2b657985fe90"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_provider_core::openai_schema::schema_supports_strict::check_map (cyclomatic 20): jcode_provider_core::openai_schema::schema_supports_strict::check_map has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/openai_schema.rs"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"00189ca540c2ee258d34839c2aae0c80c2ddd300365d4b235e36dc5a825ef568"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_provider_cursor_runtime::agent_transport::resolve_model_id_with_catalog (cyclomatic 20): jcode_provider_cursor_runtime::agent_transport::resolve_model_id_with_catalog has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/agent_transport.rs"},"region":{"startLine":376}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1cfd7abc69f28afe90499efad01feef204f4b0a024cf4b180f3fbc4bbc63828"}},{"ruleId":"D1","level":"warning","message":{"text":"NativeSshTransport::connect (cyclomatic 20): NativeSshTransport::connect has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-sdk/src/native_ssh.rs"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"418ad93902a55c086dff16d171236526c84216fcc54d71ce546d81e64f89856f"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_todo_policy::auto_poke_display_summary (cyclomatic 20): jcode_todo_policy::auto_poke_display_summary has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-todo-policy/src/lib.rs"},"region":{"startLine":817}}}],"partialFingerprints":{"codehealthFindingId/v1":"7905ba48cd82890ef5c413b84e7305aaffcc6e8ac6f29568aef8d0add4c111fc"}},{"ruleId":"D1","level":"warning","message":{"text":"App::collect_missing_tool_outputs_since_last_scan (cyclomatic 20): App::collect_missing_tool_outputs_since_last_scan has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/conversation_state.rs"},"region":{"startLine":605}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5ad3b1638d58128687fb95e8c8de2ec8070f3d34cbcc3b16d2d202378647c5a"}},{"ruleId":"D1","level":"warning","message":{"text":"App::open_agent_model_picker (cyclomatic 20): App::open_agent_model_picker has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive/openers.rs"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"336ffe1ab53733499a4198140538505f86c24c95e0201ac40059b2695cd40f35"}},{"ruleId":"D1","level":"warning","message":{"text":"App::poll_model_picker_load (cyclomatic 20): App::poll_model_picker_load has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":1498}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7fa9332ab850279f51216d789672910a1bdece3ca852f553d5ef0a3e6f54607"}},{"ruleId":"D1","level":"warning","message":{"text":"App::widget_usage_info_inner (cyclomatic 20): App::widget_usage_info_inner has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tui_state.rs"},"region":{"startLine":520}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb075152eaab1c11b42c863a742c98e536baf989a43778850f8bbb02afb6b6c3"}},{"ruleId":"D1","level":"warning","message":{"text":"App::classify_kv_cache_miss_reason (cyclomatic 20): App::classify_kv_cache_miss_reason has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app.rs"},"region":{"startLine":2723}}}],"partialFingerprints":{"codehealthFindingId/v1":"70b64ecce678f8e181cc10fdfb7d59594f141a42aa1275110a037efc67b9c9bc"}},{"ruleId":"D1","level":"warning","message":{"text":"TranscriptSearch::poll (cyclomatic 20): TranscriptSearch::poll has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/transcript_search.rs"},"region":{"startLine":613}}}],"partialFingerprints":{"codehealthFindingId/v1":"6111934246b688d6981465730cae4012125c109bb67c18209425ba9b24e74725"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::selfdev::run_self_dev (cyclomatic 20): jcode::cli::selfdev::run_self_dev has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/selfdev.rs"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ea772b69c83e089f5dae4a919bfb84196a8c614c8243ff60f782dba0839f7e9"}},{"ruleId":"D1","level":"warning","message":{"text":"resolvePriceRows (cyclomatic 20): resolvePriceRows has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/model-pricing.js"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"5814a6c2814cb556612c3665f6668dd22c1bd86218273c8d7d6b953c07babbad"}},{"ruleId":"D1","level":"warning","message":{"text":"BashTool::execute_background (cyclomatic 19): BashTool::execute_background has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/bash.rs"},"region":{"startLine":1234}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec20eb57653a8f38702fa66def467c6a969e15761d97c4c2a893f1c19e67e8ed"}},{"ruleId":"D1","level":"warning","message":{"text":"SelfDevTool::execute (cyclomatic 19): SelfDevTool::execute has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/selfdev/mod.rs"},"region":{"startLine":589}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf137d5b89c8c2863a9d51158fb9a071ab19a0eb059301eee7acc72aedae85ab"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::replay::timeline_to_replay_events (cyclomatic 19): jcode_app_core::replay::timeline_to_replay_events has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/replay.rs"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd26c60d41ec8ec531b6d58ac56cde219f79427a69fe2f1a5e6a5ed0bd7dbf7c"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::comm_session::spawn_swarm_agent (cyclomatic 19): jcode_app_core::server::comm_session::spawn_swarm_agent has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_session.rs"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"1482cbbdc3b9cd9225ba059d2e4a8b6690ea342760dc75d9a0d615c3449b5cb4"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::provider_control::handle_notify_auth_changed (cyclomatic 19): jcode_app_core::server::provider_control::handle_notify_auth_changed has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/provider_control.rs"},"region":{"startLine":881}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dbf5727c1e89257b28d9bb43052cb977e862180d46e9b9feedb1f8ca826a99f"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::swarm::remove_session_from_swarm (cyclomatic 19): jcode_app_core::server::swarm::remove_session_from_swarm has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/swarm.rs"},"region":{"startLine":1187}}}],"partialFingerprints":{"codehealthFindingId/v1":"95b7621752bb4cabc6d833dd5ebbd104e805764f7402e78094adb211fa08b148"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::tool::agentgrep::context::collect_trace_exposure (cyclomatic 19): jcode_app_core::tool::agentgrep::context::collect_trace_exposure has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/agentgrep/context.rs"},"region":{"startLine":444}}}],"partialFingerprints":{"codehealthFindingId/v1":"75028473878a085228b6395db51cddcff6d4762ca469ef3e918c466e54231120"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::tool::batch::normalize_batch_input (cyclomatic 19): jcode_app_core::tool::batch::normalize_batch_input has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/batch.rs"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"b41826147f57667a80d402bbc4d214e9731fb184888bf13f4c0d25a12c769c89"}},{"ruleId":"D1","level":"warning","message":{"text":"BackgroundTaskManager::cleanup_filtered (cyclomatic 19): BackgroundTaskManager::cleanup_filtered has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/background/cleanup.rs"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"c537fdaa9955ca16994b941c747d1a30e07619c52d3e870477cdeb69b583585d"}},{"ruleId":"D1","level":"warning","message":{"text":"McpClient::connect_in_dir (cyclomatic 19): McpClient::connect_in_dir has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mcp/client.rs"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"094186d97df540ff2de63c0b2864fc9e4c25bac96775d2785a8af0a98e98f741"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::auth::lifecycle::route_matches_activation (cyclomatic 19): jcode_base::auth::lifecycle::route_matches_activation has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/lifecycle.rs"},"region":{"startLine":903}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c4442dfc42a72c76e16665a038cab654858e2da6b37d0157c031e1ef5a91a11"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::goal::render_goal_detail (cyclomatic 19): jcode_base::goal::render_goal_detail has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/goal.rs"},"region":{"startLine":414}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ceec6675e0de8691e526550f40ac32ac54d251d6d3b67f6676b0b31bb38b46b"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::provider_activity::source_key_for_provider_label (cyclomatic 19): jcode_base::provider_activity::source_key_for_provider_label has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider_activity.rs"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cf6f00a8c8dd192bd918ebf73e402622f7d5ca9ec58f2e8b894edc5c7e9fe2b"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::session::crash::find_crashed_legacy_scan (cyclomatic 19): jcode_base::session::crash::find_crashed_legacy_scan has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/crash.rs"},"region":{"startLine":414}}}],"partialFingerprints":{"codehealthFindingId/v1":"85ef25e5758efdf0fe8c590bf242d176606467aa06f8b4e399b4a77d888996df"}},{"ruleId":"D1","level":"warning","message":{"text":"BedrockProvider::model_info (cyclomatic 19): BedrockProvider::model_info has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-bedrock/src/lib.rs"},"region":{"startLine":853}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2c5553e933234b1aa7c7fda1d8643e1a00a59c347a3c70e9eaf25141e50a6e3"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_schema_dialect::dialect::flatten_top_level_combiners (cyclomatic 19): jcode_schema_dialect::dialect::flatten_top_level_combiners has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-schema-dialect/src/dialect.rs"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"61b24c07f89a0ccc081549c3bb33270f51dddcd509505d517f1b175d23087e69"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_setup_hints::keymap::chord::pretty_key (cyclomatic 19): jcode_setup_hints::keymap::chord::pretty_key has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file\u0027s highest cyclomatic complexity: KeyChord::normalize_key (cyclomatic 29) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/keymap/chord.rs"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"a97b4c65afe99c0c9da8dc3584dd4b52c48b861be4f0f0ddb68c611034f3710f"}},{"ruleId":"D1","level":"warning","message":{"text":"App::poll_ssh_login (cyclomatic 19): App::poll_ssh_login has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_remote.rs"},"region":{"startLine":540}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b069171d9d812a1842fc193f45c8cebf254d47a60d31b7d168df4e99c0f5456"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_test_script (cyclomatic 19): App::handle_test_script has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file\u0027s highest cyclomatic complexity: App::parse_key_spec (cyclomatic 23) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_script.rs"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"88eabd179d15d8482e6fc970b9788d57c31fbb58df0a099a0f13f76fd40cb68a"}},{"ruleId":"D1","level":"warning","message":{"text":"App::debug_model_picker_live_json (cyclomatic 19): App::debug_model_picker_live_json has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":2233}}}],"partialFingerprints":{"codehealthFindingId/v1":"88ba804d4b0d7b9ce21cd1253772fc9b556ab5cfe61e04866a1d131fd2fec2d1"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_session_picker_current_terminal_selection (cyclomatic 19): App::handle_session_picker_current_terminal_selection has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":3023}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b5761fcc4c02931c523b48a8544bec42b7cbae4c44e1ec3e0d3ea17f26f3a63"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_session_picker_action (cyclomatic 19): App::handle_session_picker_action has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":3317}}}],"partialFingerprints":{"codehealthFindingId/v1":"a43124de511841a2c3dec32cfd25d7a2b641ec135cd0072624dac789a0b86d8b"}},{"ruleId":"D1","level":"warning","message":{"text":"App::run_fix_command (cyclomatic 19): App::run_fix_command has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/model_context.rs"},"region":{"startLine":2013}}}],"partialFingerprints":{"codehealthFindingId/v1":"04ec8a21924db065db502a3611952a859c8d606aaf9e14ede766ca15e42e19c2"}},{"ruleId":"D1","level":"warning","message":{"text":"App::refresh_completed_todo_report (cyclomatic 19): App::refresh_completed_todo_report has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/todo_completion.rs"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"368e6ebba504cc99b12e67b26419a13d5afc97fbb9ac9b9ead3539ecc5ff3e95"}},{"ruleId":"D1","level":"warning","message":{"text":"SessionPicker::render_session_item_lines_at_frame (cyclomatic 19): SessionPicker::render_session_item_lines_at_frame has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/render.rs"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"23aa3eabfdd21d1dc4db16f3fe793d6121bc129530dbae95ebf4053f42efb215"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::debug::handle_debug_command (cyclomatic 19): jcode_tui::tui::app::debug::handle_debug_command has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug.rs"},"region":{"startLine":580}}}],"partialFingerprints":{"codehealthFindingId/v1":"d68a164a448ea2ba30d1445decc09bbf5705f77e1932f5d30029ab7f33c499c5"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::helpers::clipboard_image (cyclomatic 19): jcode_tui::tui::app::helpers::clipboard_image has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/helpers.rs"},"region":{"startLine":1188}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d29c8c1897656493e102efb271f1de36878a713338c8f93167f750f137b27eb"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::input::strip_osc_color_replies (cyclomatic 19): jcode_tui::tui::app::input::strip_osc_color_replies has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":684}}}],"partialFingerprints":{"codehealthFindingId/v1":"f77a0cf327dae0d19b172ab7731123507fed875c0cca3b46d80a13dce2f6b594"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::slash_command_parser::scan_slash_tokens (cyclomatic 19): jcode_tui::tui::app::slash_command_parser::scan_slash_tokens has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/slash_command_parser.rs"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbc198c04b271b3211a00128c3e437394c82e14cf90f9c88af87035d618c0c92"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui_render::swarm_gallery::hovered_detail_body (cyclomatic 19): jcode_tui_render::swarm_gallery::hovered_detail_body has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/swarm_gallery.rs"},"region":{"startLine":1705}}}],"partialFingerprints":{"codehealthFindingId/v1":"7445b681fd16911f2081ce217b2f3a1cea72f535a970ac3c35a807310ee258c4"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::commands::run_browser (cyclomatic 19): jcode::cli::commands::run_browser has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: jcode::cli::commands::emit_ndjson_event (cyclomatic 23) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":1985}}}],"partialFingerprints":{"codehealthFindingId/v1":"d314fa82d7ea4542dfaee2271cd97b85aff46eb39dac6af255479443395d8424"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::commands::run_server_reload_command_to (cyclomatic 19): jcode::cli::commands::run_server_reload_command_to has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: jcode::cli::commands::emit_ndjson_event (cyclomatic 23) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":2315}}}],"partialFingerprints":{"codehealthFindingId/v1":"be62ea0db367a27757b1fe5d09dc0976145e0cd97c5e5a8fdb6f49f9566fc3a2"}},{"ruleId":"D1","level":"warning","message":{"text":"worker.normalizeDiscoveryEvent (cyclomatic 19): worker.normalizeDiscoveryEvent has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":2243}}}],"partialFingerprints":{"codehealthFindingId/v1":"fccf164a9d0be286f0df563d46d053dca4eebac8dd3614ef7eade91db9520a18"}},{"ruleId":"D1","level":"warning","message":{"text":"DiscoverToolsTool::execute (cyclomatic 18): DiscoverToolsTool::execute has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/discover.rs"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"de1b64b0a7da64e7908440a44f43bf641837e422967d2f50882c23989534f412"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::ambient::prompt::gather_recent_sessions (cyclomatic 18): jcode_app_core::ambient::prompt::gather_recent_sessions has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/ambient/prompt.rs"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"42f799527a31f0099dcbe100d9d27976fc859c2cb5c2b6f31c1404d6d7a1613c"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::client_session::handle_clear_session (cyclomatic 18): jcode_app_core::server::client_session::handle_clear_session has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_session.rs"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"84033b53b3e0a049ac5dd6fcdfb5a3c03b62a9b124a43343d33c3ce5466a5895"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::tool::bg::wait_many_polling (cyclomatic 18): jcode_app_core::tool::bg::wait_many_polling has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/bg.rs"},"region":{"startLine":432}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e451034cb83471f1c2b88c4063a514efdf590bb8f34c3617a14de7010be8e2a"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::tool::todo::merge_goals (cyclomatic 18): jcode_app_core::tool::todo::merge_goals has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/todo.rs"},"region":{"startLine":827}}}],"partialFingerprints":{"codehealthFindingId/v1":"76e6ca3423694c057095b7731f975208155db711fc757027fae653ee0d41ed76"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::tool::todo_names::normalize_containers (cyclomatic 18): jcode_app_core::tool::todo_names::normalize_containers has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/todo_names.rs"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ad5abbed9c4fdba03acd869b3a572d170e8593b1900c54ad5c53ba78808403a"}},{"ruleId":"D1","level":"warning","message":{"text":"AuthStatus::state_for_provider (cyclomatic 18): AuthStatus::state_for_provider has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/mod.rs"},"region":{"startLine":518}}}],"partialFingerprints":{"codehealthFindingId/v1":"f13dc5e519c83563456a7e7789bd7f24d322a65d0e27111478997fff36bb8db8"}},{"ruleId":"D1","level":"warning","message":{"text":"AuthStatus::assessment_for_provider (cyclomatic 18): AuthStatus::assessment_for_provider has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/mod.rs"},"region":{"startLine":590}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab6199224c9232902810d3a46e706fa6a37ae340a99b3ba63b1d8e36fba80cfe"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::provider::catalog_routes::append_openai_routes (cyclomatic 18): jcode_base::provider::catalog_routes::append_openai_routes has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/catalog_routes.rs"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"32ceed86f69124013dac7c4e93dfa1dc0c7761e1cb778e1c25918508e9c4f9db"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::transcript_sample::recent_external_transcripts_in (cyclomatic 18): jcode_base::transcript_sample::recent_external_transcripts_in has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/transcript_sample.rs"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fbe9ab0c1a76883b12c0491899f7b53b1c5c962072ce24be94c1a6dd8933f2d"}},{"ruleId":"D1","level":"warning","message":{"text":"DeflateStream::accept_write (cyclomatic 18): DeflateStream::accept_write has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/ws_deflate.rs"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e2e5253269582d2fd88e97342cc65c1b36cc8ca0f051a76d0b4a54e41a1b46b"}},{"ruleId":"D1","level":"warning","message":{"text":"EndpointInfo::detail_string (cyclomatic 18): EndpointInfo::detail_string has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter/src/lib.rs"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"79bc3d56b5bd5e1db4491e37111d3fbdf87ce890eae23f2f76eb30e74ef809e9"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_render_core::math::split_matrix (cyclomatic 18): jcode_render_core::math::split_matrix has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file\u0027s highest cyclomatic complexity: jcode_render_core::math::command_symbol (cyclomatic 141) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/math.rs"},"region":{"startLine":661}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d958769f357b44bd94f23ff395efb8ce60a6b7ead034f88c56054a709ead38c"}},{"ruleId":"D1","level":"warning","message":{"text":"FlowInner::execute (cyclomatic 18): FlowInner::execute has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-sdk/src/auth.rs"},"region":{"startLine":518}}}],"partialFingerprints":{"codehealthFindingId/v1":"65f914d0a88e8c97dd36b3498a253e8f2b0cad8b4a077c3086ee5755bdfbb327"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_sdk::launch::inherit_credentials (cyclomatic 18): jcode_sdk::launch::inherit_credentials has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-sdk/src/launch.rs"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"68a37f4d2c4c0dd2f4f81fb6147e4d7638b5f2fd04aa75259f113bef20acc54b"}},{"ruleId":"D1","level":"warning","message":{"text":"App::extend_remote_routes_for_uncovered_models_static (cyclomatic 18): App::extend_remote_routes_for_uncovered_models_static has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":836}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a669d6e3130f4ec3baab1cd5c4050a6d60e435a6a06934e816227d0e30c208c"}},{"ruleId":"D1","level":"warning","message":{"text":"App::save_input_for_reload (cyclomatic 18): App::save_input_for_reload has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui.rs"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a9feb318673a2ccfec84c8d56399e64798a96002611f8a4f52f2dcf01038655"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::input::parse_dropped_paths (cyclomatic 18): jcode_tui::tui::app::input::parse_dropped_paths has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ca7ad4bec84a7167532bb749a66d288c09a9591fbf43ad1a73b1e790f630703"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::state_ui::build_skills_report (cyclomatic 18): jcode_tui::tui::app::state_ui::build_skills_report has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui.rs"},"region":{"startLine":1793}}}],"partialFingerprints":{"codehealthFindingId/v1":"4261f33ad72dfcc0f5ae4a4f0c536a8990ea824f8b09c71a18a6e25529fdd561"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::cloud_status::parse (cyclomatic 18): jcode_tui::tui::cloud_status::parse has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/cloud_status.rs"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fb4462cdb882c91f471155b127a7240e885a0fa2fe7b253d3dee69228ff711f"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::info_widget_git::render_dual_git (cyclomatic 18): jcode_tui::tui::info_widget_git::render_dual_git has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_git.rs"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2a2471633e2093648338bf04a6abc1e42312eaa8eb432d04e09caf945380e95"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::session_picker::loading::pi_sessions::load_pi_session_info (cyclomatic 18): jcode_tui::tui::session_picker::loading::pi_sessions::load_pi_session_info has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading/pi_sessions.rs"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c8a7e2ea84c6056e803df87e4912e50b9a1a0f46fc6d7ec5060f82b52d0fac5"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_input::wrap_input_text_with_ghost (cyclomatic 18): jcode_tui::tui::ui_input::wrap_input_text_with_ghost has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_input.rs"},"region":{"startLine":2686}}}],"partialFingerprints":{"codehealthFindingId/v1":"3975c36a669c68ba81e4bccb14409dc426baa9260b0954cdfe1a67f7c6e7e329"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::render_system_message (cyclomatic 18): jcode_tui::tui::ui_messages::render_system_message has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":382}}}],"partialFingerprints":{"codehealthFindingId/v1":"41ecce4d0240cccaf4917e38b8586818a0d9bd617066c30b35e10c0c3904996e"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_todo_stages::push_lane_status_lines_inner (cyclomatic 18): jcode_tui::tui::ui_todo_stages::push_lane_status_lines_inner has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_todo_stages.rs"},"region":{"startLine":1118}}}],"partialFingerprints":{"codehealthFindingId/v1":"14e8dd2f4028c41fbfa9530a4c55c65e348e8fca8460d988611457cc780a7908"}},{"ruleId":"D1","level":"warning","message":{"text":"IncrementalMarkdownRenderer::render_split (cyclomatic 18): IncrementalMarkdownRenderer::render_split has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_incremental.rs"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"695b866867955ee49f45fedbbd59ab398127e4afb9ec39a3ecf8e22fd5bfdb4f"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui_mermaid::mermaid_viewport::render_image_widget_fit_stable (cyclomatic 18): jcode_tui_mermaid::mermaid_viewport::render_image_widget_fit_stable has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_viewport.rs"},"region":{"startLine":1205}}}],"partialFingerprints":{"codehealthFindingId/v1":"49363167be59d42a09fb56adfbc9028a0c015a7ef0210cf668ea0b6378674e50"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::ssh::run_unix (cyclomatic 18): jcode::cli::ssh::run_unix has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/ssh.rs"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"5002611de71a8cb4896804c1aedaaa7933c16c3e3a906ede640451fe4cad9503"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::tui_launch::run_replay_command (cyclomatic 18): jcode::cli::tui_launch::run_replay_command has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/tui_launch.rs"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"28b11624af173631f50d56e24ada3caaa2b80fa260a830dc7af57963b73b44e3"}},{"ruleId":"D1","level":"warning","message":{"text":"remote.recent_messages (cyclomatic 18): remote.recent_messages has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/cloud_preview/remote.py"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"398dd7c79e5e3fdcf9b7c989bd7d5e17db17e4e85ab107a317d3f3e714134918"}},{"ruleId":"D1","level":"warning","message":{"text":"JcodeClient.run (cyclomatic 18): JcodeClient.run has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/typescript/src/client.ts"},"region":{"startLine":1357}}}],"partialFingerprints":{"codehealthFindingId/v1":"393ec4108c041248079c8bd5570cd0486a3868427f4d78a8b55b1ea3d5b770d5"}},{"ruleId":"D1","level":"warning","message":{"text":"scheduled (cyclomatic 18): scheduled has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 700). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest. This is NOT this file\u0027s highest cyclomatic complexity: isMeaningfulLifecycleEvent (cyclomatic 40) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":698}}}],"partialFingerprints":{"codehealthFindingId/v1":"519531f4706cd5b84ed3e36c26826751cf6471c33260fa7fbb159b00e94112d7"}},{"ruleId":"D1","level":"warning","message":{"text":"SelfDevTool::do_setup (cyclomatic 17): SelfDevTool::do_setup has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/selfdev/setup.rs"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb68565e202a6376e96ecc27b24275a1e161533a2e29e9682d5313a55110871c"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::client_session_rename::rename_swarm_member_session (cyclomatic 17): jcode_app_core::server::client_session_rename::rename_swarm_member_session has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_session_rename.rs"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"668a9a5cabc6c8db06c82bd78de263d26f4180aeef6daa1a7c199241f7b9890d"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::comm_control::spawn_assigned_task_run (cyclomatic 17): jcode_app_core::server::comm_control::spawn_assigned_task_run has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_control.rs"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d530b8d2a08c4f1f76adcd48a5ffce0626d8d0d8ee201bb7e6bf9b97e326658"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::comm_plan::handle_comm_propose_plan (cyclomatic 17): jcode_app_core::server::comm_plan::handle_comm_propose_plan has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_plan.rs"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"071cd86a445fdcac6269fe1005b6a7dce315c055701b6f18d1ea2a83f0854370"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::comm_session::handle_comm_stop (cyclomatic 17): jcode_app_core::server::comm_session::handle_comm_stop has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_session.rs"},"region":{"startLine":855}}}],"partialFingerprints":{"codehealthFindingId/v1":"9225c060dbafac6c8213458ab48830dfcb196b0a614923a117ceb3c7061539c5"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::reload_state::wait_for_reload_handoff_event_blocking (cyclomatic 17): jcode_app_core::server::reload_state::wait_for_reload_handoff_event_blocking has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/reload_state.rs"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"487c77dc77d0e13f3dc7dc80e056a5464d9bac2030a8d5f66169bf36983adbff"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::runtime_special_commands::overnight (cyclomatic 17): jcode_app_core::server::runtime_special_commands::overnight has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/runtime_special_commands.rs"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e42809989af389fcb7d50c713a5d40e6c23b4a8e82eda9a5a83ed3271b7bc75"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::runtime_ssh_sessions::list_sessions (cyclomatic 17): jcode_app_core::server::runtime_ssh_sessions::list_sessions has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/runtime_ssh_sessions.rs"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"37af500b98129bdde28c292f64b004e153b5fb708a53d8d9cfbacf933f99b7fd"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::tool::session_search::searchable_text::searchable_message_text (cyclomatic 17): jcode_app_core::tool::session_search::searchable_text::searchable_message_text has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/session_search/searchable_text.rs"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb18d60bd4153793f3b7b365b6e5cc15e35ad58f4190d27ee35c733746af20b0"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::tool::todo::flatten_phases (cyclomatic 17): jcode_app_core::tool::todo::flatten_phases has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/todo.rs"},"region":{"startLine":578}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9a4d57faf342d5f554eb38643cad47790b8a946b161d4470d7374ef0ad94e1a"}},{"ruleId":"D1","level":"warning","message":{"text":"MultiProvider::fresh_routes_memo_entry (cyclomatic 17): MultiProvider::fresh_routes_memo_entry has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/catalog_memo.rs"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"79341e53a713079ee740bb2395d036c6c384db4cc09f348c9c77d4635fab12a8"}},{"ruleId":"D1","level":"warning","message":{"text":"Session::save_inner (cyclomatic 17): Session::save_inner has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/persistence.rs"},"region":{"startLine":612}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c90077d6a1e480466c21a4afc53633d16f5cd0cf371f85729c93bbc0cd20ec8"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::kv_cache_monitor::reason (cyclomatic 17): jcode_base::kv_cache_monitor::reason has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/kv_cache_monitor.rs"},"region":{"startLine":559}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff3d79df36b206da41dbc91c678bf55d9f5cde4aa962eab19297400b725d35ae"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::memory::pending::take_pending_memory_inner (cyclomatic 17): jcode_base::memory::pending::take_pending_memory_inner has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory/pending.rs"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"6990ff69dfa54172add8a039452360fe29bbffb74c11706097f6f7106175f97c"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::message::notifications::strip_ansi_escape_sequences (cyclomatic 17): jcode_base::message::notifications::strip_ansi_escape_sequences has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to 3 function items inside it that branch (consume_escape, consume_string, consume_csi). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/message/notifications.rs"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fc89fbc8e7dcfa69480cb94261636ac94ec0d664aa61c4af742d2f2179d5379"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::model_usage::serving_route (cyclomatic 17): jcode_base::model_usage::serving_route has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/model_usage.rs"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f7d0838a31b00fecab62a64faebce2bb61e48cd1b879b88145843db12a173f4"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::provider::catalog_routes::expand_saved_account_routes (cyclomatic 17): jcode_base::provider::catalog_routes::expand_saved_account_routes has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/catalog_routes.rs"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"3eb38fb6f190116a3423d840250aa1d3c7eacbb5f878ec54c6c2c69d5dd471a0"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::provider::models_catalog::parse_openai_model_catalog (cyclomatic 17): jcode_base::provider::models_catalog::parse_openai_model_catalog has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/models_catalog.rs"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b221202cf140b30ddbf8b719e3f8d387df6524ec7c2a8fc5910983054112315"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::session::derive_session_provider_key (cyclomatic 17): jcode_base::session::derive_session_provider_key has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session.rs"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"63ebfd51cbbd5d9435c28010155312970ead78d0e1497ed850f3ba1d0402d5af"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::transcript_sample::codex_turns (cyclomatic 17): jcode_base::transcript_sample::codex_turns has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/transcript_sample.rs"},"region":{"startLine":575}}}],"partialFingerprints":{"codehealthFindingId/v1":"58cb4fccd20b80b1e931e752193c45b5591fb0fb3f12796b194c23c537e25030"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::usage::api_keys::parse_kimi_usage_limits (cyclomatic 17): jcode_base::usage::api_keys::parse_kimi_usage_limits has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/api_keys.rs"},"region":{"startLine":461}}}],"partialFingerprints":{"codehealthFindingId/v1":"52591ffe72185e0b32d11e965396d322a423020bf0d277c0202a46ea9aaee8b5"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_command_risk::assess_find (cyclomatic 17): jcode_command_risk::assess_find has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-command-risk/src/lib.rs"},"region":{"startLine":446}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2f027f38d5c0f5dbf71819c59694e1a4d9de09512df3c41c6c7bd4784201523"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_compaction_core::build_compaction_conversation_text (cyclomatic 17): jcode_compaction_core::build_compaction_conversation_text has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-compaction-core/src/lib.rs"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"40894534fa039cf699570e3d1b5dd1b368f8ab39b6a74a9d2ad745962b7e9cbd"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_fuzzy::prefilter (cyclomatic 17): jcode_fuzzy::prefilter has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-fuzzy/src/lib.rs"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7a5e39be8fff2c1154db1c9aa61391ff1a95eea879ab7c4d68f97436134aa06"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_import_core::ordered_claude_code_message_entries (cyclomatic 17): jcode_import_core::ordered_claude_code_message_entries has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-import-core/src/lib.rs"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"f10f9c2821da8025201730062476bf5d260df097945f99a18d92a2634e93b0de"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_import_core::extract_opencode_part_text (cyclomatic 17): jcode_import_core::extract_opencode_part_text has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-import-core/src/lib.rs"},"region":{"startLine":511}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a869ab149b440aa02ecfe731fe07c5bfe14a981a019de16391ad5882a229fe0"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_memory_types::format_entries_for_prompt_with_header (cyclomatic 17): jcode_memory_types::format_entries_for_prompt_with_header has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-memory-types/src/lib.rs"},"region":{"startLine":664}}}],"partialFingerprints":{"codehealthFindingId/v1":"9277c6b7c462412923bb8bf8fff75df7832a87e652f9438a962ee320ac6de761"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_productivity_core::aggregate::build_report (cyclomatic 17): jcode_productivity_core::aggregate::build_report has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-productivity-core/src/aggregate.rs"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb2bab3540ef99716df8c5dfb8fc8359d206ad01d3fc1075ee5709101e423776"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_productivity_core::scan::summarize (cyclomatic 17): jcode_productivity_core::scan::summarize has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-productivity-core/src/scan.rs"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"d151aa759600793ca02f483ce9ba1d07328b235ee168995c9964b865854b8ebf"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_provider_core::model_names::pretty_picker_token (cyclomatic 17): jcode_provider_core::model_names::pretty_picker_token has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/model_names.rs"},"region":{"startLine":511}}}],"partialFingerprints":{"codehealthFindingId/v1":"57324855876ee62b8c75f4fadeb83fbac085451189692a8124d9ac5b6edd343a"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_provider_core::models::context_limit_for_model_with_provider_and_cache (cyclomatic 17): jcode_provider_core::models::context_limit_for_model_with_provider_and_cache has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/models.rs"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f3e85d3a838c720316ea9c5bb075eaea4d7d8ce2716fc1a417bdf0eb88c2b9c"}},{"ruleId":"D1","level":"warning","message":{"text":"OpenRouterProvider::available_models_display (cyclomatic 17): OpenRouterProvider::available_models_display has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/openrouter_provider_impl.rs"},"region":{"startLine":547}}}],"partialFingerprints":{"codehealthFindingId/v1":"fad876a4a39861d2eb9ac05b714b985df74e8729e055161469881f54ee355466"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_storage::run_windows_hardening_worker (cyclomatic 17): jcode_storage::run_windows_hardening_worker has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-storage/src/lib.rs"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9f5d1fc9bc178d42958155de4497bd25e06b2e2fd86e14da872f56e1b9945e5"}},{"ruleId":"D1","level":"warning","message":{"text":"App::submit_ssh_login_input (cyclomatic 17): App::submit_ssh_login_input has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_remote.rs"},"region":{"startLine":465}}}],"partialFingerprints":{"codehealthFindingId/v1":"75b6d84f7dd20fa5ca4366d94a6136ee0b3edb1fac9dd62fa7f4f65e0afeced1"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_account_picker_selection (cyclomatic 17): App::handle_account_picker_selection has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":2545}}}],"partialFingerprints":{"codehealthFindingId/v1":"51d3bd1afaad511a20fe1ba47536f5171f0a07be7fd0917d9e78a013b22ccf2e"}},{"ruleId":"D1","level":"warning","message":{"text":"App::update_copy_badge_key_event (cyclomatic 17): App::update_copy_badge_key_event has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":3383}}}],"partialFingerprints":{"codehealthFindingId/v1":"8775509122ad005a76fa57e4bd7d28d53a6892798b7df3298711978703870d1c"}},{"ruleId":"D1","level":"warning","message":{"text":"App::process_queued_messages (cyclomatic 17): App::process_queued_messages has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":4207}}}],"partialFingerprints":{"codehealthFindingId/v1":"8daa74ee0c3ab2ffcd5fa4dc8034984f6c59625e6506b72942576e89f69ac380"}},{"ruleId":"D1","level":"warning","message":{"text":"App::new_for_remote_with_options (cyclomatic 17): App::new_for_remote_with_options has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tui_lifecycle.rs"},"region":{"startLine":1493}}}],"partialFingerprints":{"codehealthFindingId/v1":"31e50dc7b25c387bb4465759f62e4944e95d353c50d8f36cdc91fa2859c1ee8b"}},{"ruleId":"D1","level":"warning","message":{"text":"App::restore_session (cyclomatic 17): App::restore_session has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tui_lifecycle_runtime.rs"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"1da323cce4b00255791eddd8975ea66fb157388c771faf5df301b4785ba0cf55"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::auth_account_commands::save_openai_compat_setting (cyclomatic 17): jcode_tui::tui::app::auth_account_commands::save_openai_compat_setting has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_commands.rs"},"region":{"startLine":958}}}],"partialFingerprints":{"codehealthFindingId/v1":"436cc690480c6730c1b120ef3111a51c72d5295aee932e2cebc73ef58ccaa76f"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::input::handle_modal_key (cyclomatic 17): jcode_tui::tui::app::input::handle_modal_key has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":2656}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2294a500a186501fcd250ac0ae5d2730cd18dbfbabfbed2d20ba7284bc535c8"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::session_picker::loading::load_sessions_inner (cyclomatic 17): jcode_tui::tui::session_picker::loading::load_sessions_inner has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading.rs"},"region":{"startLine":1921}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed08bf738cd9984895d4af2a671aa73c651ba8274e323b65328f847f4da42e4e"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::push_todo_status_pips (cyclomatic 17): jcode_tui::tui::ui_messages::push_todo_status_pips has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":1483}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dbc77d96a60e21791608503162515f70eee8e1865954cc77f9ef16bc00098b9"}},{"ruleId":"D1","level":"warning","message":{"text":"AnchorStabilityRecorder::observe (cyclomatic 17): AnchorStabilityRecorder::observe has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-core/src/anchor_stability.rs"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"0229c9a43f19fd7e15a7150721ffce6e0a86a56e6f8882345aea1697345a4b2b"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui_mermaid::debug::debug_test_scroll (cyclomatic 17): jcode_tui_mermaid::debug::debug_test_scroll has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/debug.rs"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"52d4c3eb000fd14c236260f7f6f05c098786c27569fc0a152efe4d76635cea80"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui_mermaid::mermaid_viewport::render_kitty_virtual_viewport (cyclomatic 17): jcode_tui_mermaid::mermaid_viewport::render_kitty_virtual_viewport has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_viewport.rs"},"region":{"startLine":454}}}],"partialFingerprints":{"codehealthFindingId/v1":"2885c9b69c3967f9be14a82b0975ff3924c12f1f17b5575c14daea48284c9627"}},{"ruleId":"D1","level":"warning","message":{"text":"Decoder::event (cyclomatic 17): Decoder::event has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-voice/src/global/hotkey.rs"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"0dfbab53f8e61068133e5cb5537de5523e0a3dd2486745ff241b1464b09dc718"}},{"ruleId":"D1","level":"warning","message":{"text":"AcpRuntime::handle_message (cyclomatic 17): AcpRuntime::handle_message has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/acp.rs"},"region":{"startLine":441}}}],"partialFingerprints":{"codehealthFindingId/v1":"35eaa222688b42cf13568e51c01412b4d3ac5fda14a40b0e4f8cdf940edc63ef"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::account::run_mobile (cyclomatic 17): jcode::cli::account::run_mobile has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/account.rs"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f19d8f170ccc35abb5e3b8a428565e4d25b30bc833df265008d1391ed62d945"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::cloud_ephemeral::run_cli (cyclomatic 17): jcode::cli::cloud_ephemeral::run_cli has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_ephemeral.rs"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"874175fd0476d9f9b06d23823edf357bf5ba171b8652013cfdd9da5609ac705f"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::cloud_move::export_return_archive (cyclomatic 17): jcode::cli::cloud_move::export_return_archive has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_move.rs"},"region":{"startLine":1228}}}],"partialFingerprints":{"codehealthFindingId/v1":"130f00ce34fb897e775bf8768817d2e6e9276dd27ea704945b7f31774c9beb5e"}},{"ruleId":"D1","level":"warning","message":{"text":"remote.value_end (cyclomatic 17): remote.value_end has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/cloud_preview/remote.py"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"caaa37ae4cb1488ec9b787b29b7dcdaad6f0eb1baf302db1e2c1cf98b2f1c8b1"}},{"ruleId":"D1","level":"warning","message":{"text":"worker.validateTranscript (cyclomatic 17): worker.validateTranscript has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":867}}}],"partialFingerprints":{"codehealthFindingId/v1":"dafdd3e9f96583a5e4fae6dd421cfe8c719dcf5cfcb00d600db372879f6b294e"}},{"ruleId":"D1","level":"warning","message":{"text":"Agent::export_conversation_markdown (cyclomatic 16): Agent::export_conversation_markdown has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/messages.rs"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba696032e83b49f2d1addd9264ea87b68ca1371b3b57588291f86612b005f9df"}},{"ruleId":"D1","level":"warning","message":{"text":"Agent::validate_tool_allowed (cyclomatic 16): Agent::validate_tool_allowed has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/turn_execution.rs"},"region":{"startLine":1178}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d4be1ddba560729e90ab988cdeec04e8d8927929dbbffc051ded11bcb6a25ba"}},{"ruleId":"D1","level":"warning","message":{"text":"Agent::repair_missing_tool_outputs (cyclomatic 16): Agent::repair_missing_tool_outputs has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent.rs"},"region":{"startLine":1069}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7d6ed0c2ff760ab0f957f0325098fa6361a7453cc8e10e201f7e87db25f30b9"}},{"ruleId":"D1","level":"warning","message":{"text":"SelfDevTool::do_build_reload (cyclomatic 16): SelfDevTool::do_build_reload has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/selfdev/build_queue.rs"},"region":{"startLine":702}}}],"partialFingerprints":{"codehealthFindingId/v1":"d098c96c3546a3ef5b19c736229ff3ef69a23a845308bf1c139201dc4ae652d6"}},{"ruleId":"D1","level":"warning","message":{"text":"SelfDevTool::do_reload (cyclomatic 16): SelfDevTool::do_reload has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/selfdev/reload.rs"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"13ecd83f1aa7f4028cda40353482ea7c925fc998efe2a15990ffd58264418a7a"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::comm_session::ensure_spawn_coordinator_swarm (cyclomatic 16): jcode_app_core::server::comm_session::ensure_spawn_coordinator_swarm has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_session.rs"},"region":{"startLine":1116}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d6e302cd8319b4c8700e24d7d453e7e6b6b38bca55ffe0e7bed9f9a41d9269f"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::debug_events::maybe_handle_event_subscription_command (cyclomatic 16): jcode_app_core::server::debug_events::maybe_handle_event_subscription_command has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_events.rs"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"56f11f176c31cee4c0f1a9df985daafc7f43bcb73d6a4468db1d7e966650c332"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::debug_jobs::maybe_handle_job_command (cyclomatic 16): jcode_app_core::server::debug_jobs::maybe_handle_job_command has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_jobs.rs"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"aea448725d8660009f9456a1961abb8938b23ef1fc7913b9ee466883ff263f43"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::debug_session_admin::maybe_handle_session_admin_command (cyclomatic 16): jcode_app_core::server::debug_session_admin::maybe_handle_session_admin_command has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_session_admin.rs"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"533f38e27a53b13e0cbc7aca5049aa98f02a68370a66d9fde000288e3ca9b5a2"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::reload::graceful_shutdown_sessions_with_timeout (cyclomatic 16): jcode_app_core::server::reload::graceful_shutdown_sessions_with_timeout has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/reload.rs"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a376b6ef1b0354dee5c6a5c5d19cefbecaab834dd7437098022c9961770a900"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::server::swarm::refresh_swarm_task_staleness (cyclomatic 16): jcode_app_core::server::swarm::refresh_swarm_task_staleness has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/swarm.rs"},"region":{"startLine":630}}}],"partialFingerprints":{"codehealthFindingId/v1":"45115679682f999d6c61a7d1a7d03ca65339057036227be0faa35d0fca818368"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::tool::patch::render_patch (cyclomatic 16): jcode_app_core::tool::patch::render_patch has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/patch.rs"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8850214b708d2d12449388f7f0d4b3e1953b3333c37e014f98de157c034aae1"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::tool::session_search::append_session_results (cyclomatic 16): jcode_app_core::tool::session_search::append_session_results has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/session_search.rs"},"region":{"startLine":1501}}}],"partialFingerprints":{"codehealthFindingId/v1":"337ce8265525ef7e6403db9fc0a091474dae1d8876e54e87ed96d1bb74657bf3"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_app_core::update::download_asset_with_resume (cyclomatic 16): jcode_app_core::update::download_asset_with_resume has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/update.rs"},"region":{"startLine":778}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2edf18e16e999295eb771d342728364e45759bc44e7b75e4a5f5e261a46ff2f"}},{"ruleId":"D1","level":"warning","message":{"text":"MultiProvider::complete_on_provider (cyclomatic 16): MultiProvider::complete_on_provider has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (MultiProvider::complete_split_on_provider) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/dispatch.rs"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cb5f36746fa6c2dae8b1e1f7b63392aa64ce15be4c3aa42285923ef90ca861f"}},{"ruleId":"D1","level":"warning","message":{"text":"MultiProvider::complete_split_on_provider (cyclomatic 16): MultiProvider::complete_split_on_provider has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (MultiProvider::complete_on_provider) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/dispatch.rs"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2bcdd92d27a9b67c1a9965109bb06ca06d9d93dfc3ea8972fb6f8b6e52f954c"}},{"ruleId":"D1","level":"warning","message":{"text":"MultiProvider::fork_model_switch_request (cyclomatic 16): MultiProvider::fork_model_switch_request has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/mod.rs"},"region":{"startLine":1747}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f18a909a7c381eb7b74b03a2dce5c9d47579a77f2e89fa5e37091b29de8a73b"}},{"ruleId":"D1","level":"warning","message":{"text":"MultiProvider::model_switch_request_for_session_model (cyclomatic 16): MultiProvider::model_switch_request_for_session_model has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file\u0027s highest cyclomatic complexity: MultiProvider::default_model_selection_from_route (cyclomatic 29) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/selection.rs"},"region":{"startLine":371}}}],"partialFingerprints":{"codehealthFindingId/v1":"12d25ecb1049ffd0e2bbb80d8dec878b6f412ebf0c0bc5840529821431601d18"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::auth::copilot::has_copilot_credentials_fast (cyclomatic 16): jcode_base::auth::copilot::has_copilot_credentials_fast has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/copilot.rs"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1467346be080d124a35d78c19662699c0c4835d78f4deef01b4e90fee10060f"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::auth::lifecycle::parse_frontier_version_for_family (cyclomatic 16): jcode_base::auth::lifecycle::parse_frontier_version_for_family has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/lifecycle.rs"},"region":{"startLine":708}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e06a046f0e4fbb36ae7e339cc7ba63debd7ae7ec057e88475551a9bfa6a9e40"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::auth::router_transfer::import_at (cyclomatic 16): jcode_base::auth::router_transfer::import_at has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/router_transfer.rs"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddc360d7baa01167e5505defcbe82854ac04551e6088fb7542f5d83fc2ba4ebf"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::image_normalize::sniff_other_format (cyclomatic 16): jcode_base::image_normalize::sniff_other_format has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/image_normalize.rs"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f685b2d7a7dbd8e8aa9c761963047c7e3cbed811982277d2b1da4879b7c37b3"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::import::list_claude_code_sessions (cyclomatic 16): jcode_base::import::list_claude_code_sessions has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/import.rs"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7b5322247fb4c5a7333f3582ea335c5f829de741f1d877d5466b3b87b7f16b3"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::import::import_pi_session (cyclomatic 16): jcode_base::import::import_pi_session has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/import.rs"},"region":{"startLine":1194}}}],"partialFingerprints":{"codehealthFindingId/v1":"95e2e4fd4c9c9ae6afc9f44246cb56cf86cbf0972d68ad2f037ee32e7a12317a"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::kv_cache_monitor::describe_miss (cyclomatic 16): jcode_base::kv_cache_monitor::describe_miss has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/kv_cache_monitor.rs"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e8f8ae7040093d78792abfecd319a6503f7b301816dec6399c1f6f5d8a00b46"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::memory::activity::parse_injected_items (cyclomatic 16): jcode_base::memory::activity::parse_injected_items has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory/activity.rs"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"77bc06a4d33a690c09431db0e74a8f436167e91cb14506c053211e1093a9384c"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::provider::catalog_routes::append_openrouter_routes (cyclomatic 16): jcode_base::provider::catalog_routes::append_openrouter_routes has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/catalog_routes.rs"},"region":{"startLine":808}}}],"partialFingerprints":{"codehealthFindingId/v1":"a42ebc76a0cfd2e8cccba08b1278b11da361e7a3c6af1eafe0947d72f532b389"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::provider::multi_provider::saved_account_can_serve_model (cyclomatic 16): jcode_base::provider::multi_provider::saved_account_can_serve_model has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/multi_provider.rs"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"8feaa237ad52f757ccbcfaae0d8861dc044608b0c6ed49be543d4f3654340af9"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_base::usage::anthropic_fable_reset::redeem (cyclomatic 16): jcode_base::usage::anthropic_fable_reset::redeem has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/anthropic_fable_reset.rs"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"783ea5f7e6a13f3395dba6c95acd1e5fbb44632213909d5b1f455f8c5f34677e"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_command_risk::paths::classify_target (cyclomatic 16): jcode_command_risk::paths::classify_target has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-command-risk/src/paths.rs"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d8bb5fb2c5f75b1e527034812a0fb07a8ddb8d34e8efb66b1da201757085b77"}},{"ruleId":"D1","level":"warning","message":{"text":"Companion::handle (cyclomatic 16): Companion::handle has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-companion/src/server.rs"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"19c294a6867f4c135850e1c3089bd823423c85e3d5b519326771cf8f27b4ac00"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_companion::voice::run (cyclomatic 16): jcode_companion::voice::run has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-companion/src/voice.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"0281affeec20d4e1fe246eecd8bcd1999fd32557b34971490fed8dabe4b6576f"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_core::util::split_concatenated_json (cyclomatic 16): jcode_core::util::split_concatenated_json has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-core/src/util.rs"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3ad8ebbf97008ba6187b529b2c80ee0e223e63c08a6a8d08b7442a2a12784a8"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_import_core::load_codex_external_session (cyclomatic 16): jcode_import_core::load_codex_external_session has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-import-core/src/lib.rs"},"region":{"startLine":643}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ebe600211c69e8fa158323c907bd2b9ebff91d7a286fc457170993d78e88e16"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_protocol::comm_format::format_comm_status_snapshot (cyclomatic 16): jcode_protocol::comm_format::format_comm_status_snapshot has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-protocol/src/comm_format.rs"},"region":{"startLine":364}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecffa2130970a1b6e23eab6d5ebc68782f2f3e736522994b89f059eb7f8879be"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_provider_anthropic::history_repair::hoist_late_tool_results (cyclomatic 16): jcode_provider_anthropic::history_repair::hoist_late_tool_results has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic/src/history_repair.rs"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"148322596e2f2c2ed967c11354bcbb9f0b2d39aaf09817acb56e0fef5c900fad"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_provider_anthropic::history_repair::rewrite_orphaned_tool_results (cyclomatic 16): jcode_provider_anthropic::history_repair::rewrite_orphaned_tool_results has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic/src/history_repair.rs"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"07d41ef693f9261ff7f4fbf04c836dac28eb6e1377e1edced0276f229c15740d"}},{"ruleId":"D1","level":"warning","message":{"text":"AnthropicProvider::get_oauth_access_token (cyclomatic 16): AnthropicProvider::get_oauth_access_token has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic-runtime/src/lib.rs"},"region":{"startLine":1010}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcee8ace3a33e35ef6c1a99c4b90307e9ac6087276712c105844ebe53d322286"}},{"ruleId":"D1","level":"warning","message":{"text":"BedrockProvider::bedrock_input_schema (cyclomatic 16): BedrockProvider::bedrock_input_schema has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-bedrock/src/lib.rs"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d7dc0bd0fa5f480283a9c7ef63d35a37c2bed4901f83234cf52332f3452fa60"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_provider_core::reasoning::inferred_reasoning_efforts (cyclomatic 16): jcode_provider_core::reasoning::inferred_reasoning_efforts has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/reasoning.rs"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"61ba1e5c2267e1ac526b2360b089aaf689029131e97a1fc18cadbe945513844e"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_render_core::wrap::wrap_line (cyclomatic 16): jcode_render_core::wrap::wrap_line has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/wrap.rs"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"01afb2c14be8deb2189a8e9a0f05004ab2a8f21dc6c46483ed496d4753f78dc9"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_setup_hints::windows_setup::run_setup_hotkey_windows (cyclomatic 16): jcode_setup_hints::windows_setup::run_setup_hotkey_windows has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/windows_setup.rs"},"region":{"startLine":968}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb322174e1bcc3f2e7ccc481b86ac49df3b6ad8ac0250527b4f3af4226763043"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_telemetry_core::record_tool_execution (cyclomatic 16): jcode_telemetry_core::record_tool_execution has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lib.rs"},"region":{"startLine":2662}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6b5005756c99791972af91780a8481f20ab0a4cf085ccbc70517b28df606241"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_todo_policy::build_gate_digest (cyclomatic 16): jcode_todo_policy::build_gate_digest has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-todo-policy/src/lib.rs"},"region":{"startLine":405}}}],"partialFingerprints":{"codehealthFindingId/v1":"e24636861454ac9eacd30c7e565eb4a9ac307cee6f79554bafd0e2c9219ec982"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_todo_policy::stages::validate_lane_dependencies (cyclomatic 16): jcode_todo_policy::stages::validate_lane_dependencies has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-todo-policy/src/stages.rs"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"d97da0ac8e105cd3bf6b1ad57c2c8bedc3ee1a5ced091e25c6f017d225c7ba71"}},{"ruleId":"D1","level":"warning","message":{"text":"App::start_logout_all (cyclomatic 16): App::start_logout_all has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: App::start_login_provider (cyclomatic 19) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth.rs"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"41b6ce609284bd6f057673913900df5e1d0165185e8014a0966071b78e1abeb2"}},{"ruleId":"D1","level":"warning","message":{"text":"App::start_jcode_login (cyclomatic 16): App::start_jcode_login has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file\u0027s highest cyclomatic complexity: App::start_login_provider (cyclomatic 19) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth.rs"},"region":{"startLine":550}}}],"partialFingerprints":{"codehealthFindingId/v1":"c96c8eb316fd7ec28e6a1ad618787821e5635591f1438b1819fe5313d4fc0661"}},{"ruleId":"D1","level":"warning","message":{"text":"App::apply_mouse_scroll_step (cyclomatic 16): App::apply_mouse_scroll_step has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: App::handle_diff_pane_focus_key (cyclomatic 17) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/navigation.rs"},"region":{"startLine":937}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6601aec6bbddbc3999b872df0b116ff6af400516c439eaff8f315cdc8957fe0"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_onboarding_model_validated (cyclomatic 16): App::handle_onboarding_model_validated has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/onboarding_flow_control.rs"},"region":{"startLine":1540}}}],"partialFingerprints":{"codehealthFindingId/v1":"98f9dcb48d53603a3a6e64d6e29b87508a5417224fab1ec4073bf84e010dadc9"}},{"ruleId":"D1","level":"warning","message":{"text":"App::widget_auth_method (cyclomatic 16): App::widget_auth_method has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tui_state.rs"},"region":{"startLine":411}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9fa3ffd61331022e0680f5cbe5752a51e64080f6fd4064fa6b568723bef6cd8"}},{"ruleId":"D1","level":"warning","message":{"text":"Snapshot::row (cyclomatic 16): Snapshot::row has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/justrust_status.rs"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"29be3cce7e971184f153a4192cc97df5461f89cf42d75cfdf2f89dc329c4152e"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::commands::handle_selfdev_command (cyclomatic 16): jcode_tui::tui::app::commands::handle_selfdev_command has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":2478}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1eec3bff314736ae447e6e1262c11f9fdd9e788538f32092c2be9a9fb16eef8"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::commands::handle_telemetry_command (cyclomatic 16): jcode_tui::tui::app::commands::handle_telemetry_command has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":3787}}}],"partialFingerprints":{"codehealthFindingId/v1":"68fa768f4a4461fc569194ee3a4686ffaff981eaad5359ff4678949a23ad107b"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::app::input::handle_prompt_history_navigation (cyclomatic 16): jcode_tui::tui::app::input::handle_prompt_history_navigation has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":1008}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1f2d0e3a21deaadf7c9b1747a8c027adc517cc2c8e05e9d475b48d3cfd1f14a"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::info_widget::render_overview_framed (cyclomatic 16): jcode_tui::tui::info_widget::render_overview_framed has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget.rs"},"region":{"startLine":1526}}}],"partialFingerprints":{"codehealthFindingId/v1":"96ff25c02942f219f4ea1243b360ed67970128374161ebe57dac8012815720ce"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui::copy_selection::frame_chrome_for_selection (cyclomatic 16): jcode_tui::tui::ui::copy_selection::frame_chrome_for_selection has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui/copy_selection.rs"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"f05e0ac1ce836a0b950906849f58540cf3bd1264a3e87d1c15d88bb367a4848c"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui::copy_selection::copy_selection_text_from_raw_lines_base (cyclomatic 16): jcode_tui::tui::ui::copy_selection::copy_selection_text_from_raw_lines_base has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui/copy_selection.rs"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"8534d568981b5c99e5333150e3d31f5336485c4b1464142e6418150e9410d96e"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::plan_card::split_plan_segments (cyclomatic 16): jcode_tui::tui::ui_messages::plan_card::split_plan_segments has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages/plan_card.rs"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"652adecce91ae196677dbc12c265e3f9a95cd6b6b19a49d0ad07957f0f3687cc"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_overlays::draw_changelog_overlay (cyclomatic 16): jcode_tui::tui::ui_overlays::draw_changelog_overlay has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_overlays.rs"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b8d5844781ffa7056a78bff454f63d7736785a0529f9ca2db7724553907d136"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_prepare::prepare_active_batch_progress (cyclomatic 16): jcode_tui::tui::ui_prepare::prepare_active_batch_progress has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_prepare.rs"},"region":{"startLine":408}}}],"partialFingerprints":{"codehealthFindingId/v1":"f46c85118c41367690d071a99c6e79062be8343f9d4e79daf491217fa70ebb5f"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_todo_changes::compute_diff (cyclomatic 16): jcode_tui::tui::ui_todo_changes::compute_diff has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_todo_changes.rs"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"90e08bc88841a20aa9b8f6d455b5674c559f1321ea075c3cf7bb6f9af6f8ae89"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::tui::ui_tools::infer_selfdev_action_from_display_text (cyclomatic 16): jcode_tui::tui::ui_tools::infer_selfdev_action_from_display_text has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tools.rs"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"d497ee340571fcfb347d59517cdb5f6580b3f08a03fed5af3f320f589188c558"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui::video_export::find_mermaid_regions (cyclomatic 16): jcode_tui::video_export::find_mermaid_regions has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: jcode_tui::video_export::color_to_hex (cyclomatic 19) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/video_export.rs"},"region":{"startLine":518}}}],"partialFingerprints":{"codehealthFindingId/v1":"c402cc2a1c09e1eced8f47e386df6ed7c8aa41566f75e183273b9c17743f7bf0"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_tui_markdown::markdown_incremental::find_stable_split (cyclomatic 16): jcode_tui_markdown::markdown_incremental::find_stable_split has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_incremental.rs"},"region":{"startLine":448}}}],"partialFingerprints":{"codehealthFindingId/v1":"13179ec264cf73c9322e53693f0856c7830e9331763cc5cae4fa8f3a47f78521"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode_update_core::known_update_error_summary (cyclomatic 16): jcode_update_core::known_update_error_summary has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-update-core/src/lib.rs"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"56846b56392cb376c55bbe7a994a11831abe0833c5596f0694bdf5a1368bfea4"}},{"ruleId":"D1","level":"warning","message":{"text":"TranscriptState::apply (cyclomatic 16): TranscriptState::apply has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-voice/src/nari.rs"},"region":{"startLine":626}}}],"partialFingerprints":{"codehealthFindingId/v1":"e48d6e8898637e3b9962f01e5ef5f7d5dd2b886763bf202495cf9e8a977ec5c0"}},{"ruleId":"D1","level":"warning","message":{"text":"Target::preflight_uncached (cyclomatic 16): Target::preflight_uncached has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_move/transport.rs"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cb5b968e536ef6f831f19b7341510d21000f4f05128a09ca26bdfc5ebeafd08"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::bin::memory_recall_bench::cmd_queries (cyclomatic 16): jcode::bin::memory_recall_bench::cmd_queries has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"299b80c98fbe878adf4ccad20400af47304c1f0e8968557b2b88d4d74a75f365"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::commands::run_single_message_command_plain_with_auto_poke (cyclomatic 16): jcode::cli::commands::run_single_message_command_plain_with_auto_poke has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (jcode::cli::commands::run_single_message_command_capture_with_auto_poke) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file\u0027s highest cyclomatic complexity: jcode::cli::commands::emit_ndjson_event (cyclomatic 23) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":2868}}}],"partialFingerprints":{"codehealthFindingId/v1":"f026a63842ba259d93407fcb1696f3c01fe9fd23151b8a318fa0d8f26431425b"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::commands::run_single_message_command_capture_with_auto_poke (cyclomatic 16): jcode::cli::commands::run_single_message_command_capture_with_auto_poke has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (jcode::cli::commands::run_single_message_command_plain_with_auto_poke) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file\u0027s highest cyclomatic complexity: jcode::cli::commands::emit_ndjson_event (cyclomatic 23) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":2985}}}],"partialFingerprints":{"codehealthFindingId/v1":"53ec8531f4e79846980df4d3f143afce107da97459410d16c2de364fb4f77808"}},{"ruleId":"D1","level":"warning","message":{"text":"jcode::cli::dispatch::spawn_server_with_lifetime (cyclomatic 16): jcode::cli::dispatch::spawn_server_with_lifetime has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/dispatch.rs"},"region":{"startLine":1356}}}],"partialFingerprints":{"codehealthFindingId/v1":"88ad8319a1de0f1c3c1592b00a3bfa4fc3d412d9c7d350dcf01f191b3ccb9601"}},{"ruleId":"D1","level":"warning","message":{"text":"worker.normalizeInstallFunnelEvent (cyclomatic 16): worker.normalizeInstallFunnelEvent has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":2187}}}],"partialFingerprints":{"codehealthFindingId/v1":"2002e2e91bcc7e31dba7072d92e6ce796f3b16a459005607e9b71bd07e2e9921"}},{"ruleId":"D2","level":"warning","message":{"text":"App::run_turn_interactive (cognitive 763): App::run_turn_interactive has cognitive complexity 763 (threshold 15). Drivers by points: if/else 125 (625 pts), match/switch 17 (72 pts), loops 13 (52 pts), boolean chains 14 (nesting depth added 594). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/turn.rs"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bcc87f09086354eb681ac3086ade9c17a11412464c0851d7c31d0dd22739fea"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::remote::server_events::handle_server_event_inner (cognitive 717): jcode_tui::tui::app::remote::server_events::handle_server_event_inner has cognitive complexity 717 (threshold 15). Drivers by points: if/else 271 (583 pts), boolean chains 89, match/switch 14 (40 pts), loops 2 (5 pts) (nesting depth added 341). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/server_events.rs"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"969accd7d8213e1e3f4f6e6680a3410d50c7f3064fc43c0d974cdb3df05f4137"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::client_lifecycle::handle_client (cognitive 570): jcode_app_core::server::client_lifecycle::handle_client has cognitive complexity 570 (threshold 15). Drivers by points: if/else 159 (477 pts), match/switch 21 (57 pts), boolean chains 19, loops 8 (17 pts) (nesting depth added 363). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_lifecycle.rs"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ec8487e9f7ad98752b9e1cf3c57498e0fe860160e93dcc8f6040cf36ea81978"}},{"ruleId":"D2","level":"warning","message":{"text":"Agent::run_turn_streaming_mpsc (cognitive 448): Agent::run_turn_streaming_mpsc has cognitive complexity 448 (threshold 15). Drivers by points: if/else 112 (340 pts), match/switch 15 (50 pts), loops 14 (43 pts), boolean chains 15 (nesting depth added 292). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/turn_streaming_mpsc.rs"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"8069ef1a225fd27a3b958d75a32151e06c10f9fb60be551c9565bcee1958a0e2"}},{"ruleId":"D2","level":"warning","message":{"text":"Config::apply_env_overrides (cognitive 418): Config::apply_env_overrides has cognitive complexity 418 (threshold 15). Drivers by points: if/else 284 (380 pts), boolean chains 27, match/switch 4 (8 pts), loops 2 (3 pts) (nesting depth added 101). Of this number, 413 points are the body\u0027s own statements and 5 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/config/env_overrides.rs"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"ced5657b23ccef0f2d7ce5e34ad0168f5db092734773f88098d79cc5b455b3ce"}},{"ruleId":"D2","level":"warning","message":{"text":"Agent::run_turn (cognitive 417): Agent::run_turn has cognitive complexity 417 (threshold 15). Drivers by points: if/else 113 (362 pts), match/switch 7 (23 pts), loops 7 (18 pts), boolean chains 14 (nesting depth added 276). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/turn_loops.rs"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"4faaba47865d904a9d60b33bf12a979868d1154aa46afc0722f3756183b99577"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::remote::key_handling::submit_prepared_remote_enter_input (cognitive 357): jcode_tui::tui::app::remote::key_handling::submit_prepared_remote_enter_input has cognitive complexity 357 (threshold 15). Drivers by points: if/else 200 (286 pts), boolean chains 36, match/switch 15 (35 pts) (nesting depth added 106). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/key_handling.rs"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"a141396ff2426231b7cf8b30eca25eaed00b10ec3c5fb0087c2bc0eaf54c7d51"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_viewport::draw_messages (cognitive 309): jcode_tui::tui::ui_viewport::draw_messages has cognitive complexity 309 (threshold 15). Drivers by points: if/else 116 (244 pts), loops 15 (27 pts), boolean chains 26, match/switch 3 (12 pts) (nesting depth added 149). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_viewport.rs"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdc85519e5b0359e9e0f37f5debe69cc2547f98f4fa4f24bcdc28ec17696cc5c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_markdown::markdown_render_full::render_markdown_with_link_urls (cognitive 250): jcode_tui_markdown::markdown_render_full::render_markdown_with_link_urls has cognitive complexity 250 (threshold 15). Drivers by points: if/else 78 (183 pts), match/switch 10 (31 pts), loops 7 (19 pts), boolean chains 17 (nesting depth added 138). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_full.rs"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"67833216b6645fc35f3efa95f0aa67c15d8f73feafdbfaab8363752a2410533f"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_markdown::markdown_render_lazy::render_markdown_lazy_with_link_urls (cognitive 243): jcode_tui_markdown::markdown_render_lazy::render_markdown_lazy_with_link_urls has cognitive complexity 243 (threshold 15). Drivers by points: if/else 75 (179 pts), match/switch 10 (31 pts), loops 5 (18 pts), boolean chains 15 (nesting depth added 138). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_lazy.rs"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"406fc449fe2b1133f0d33796800eb6a8ffdb61f1094387ff8e701455be6c9133"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_openrouter::request::build_chat_messages (cognitive 239): jcode_provider_openrouter::request::build_chat_messages has cognitive complexity 239 (threshold 15). Drivers by points: if/else 67 (173 pts), loops 19 (43 pts), match/switch 4 (13 pts), boolean chains 10 (nesting depth added 139). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter/src/request.rs"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa5fe1622e9adc76c0a946b5028278d16b0ffdb4da62c623af42116797d4d7c6"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::remote::key_handling::key_events::handle_remote_key_internal (cognitive 226): jcode_tui::tui::app::remote::key_handling::key_events::handle_remote_key_internal has cognitive complexity 226 (threshold 15). Drivers by points: if/else 122 (180 pts), match/switch 11 (27 pts), boolean chains 19 (nesting depth added 74). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/key_handling/key_events.rs"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"c35eee1b93ce73ee5594e5dbbf5b294751de82a57f0765fd02fb522abab70568"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_inline_interactive_key (cognitive 221): App::handle_inline_interactive_key has cognitive complexity 221 (threshold 15). Drivers by points: if/else 75 (175 pts), boolean chains 21, match/switch 7 (20 pts), loops 1 (5 pts) (nesting depth added 117). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":3532}}}],"partialFingerprints":{"codehealthFindingId/v1":"584129a72a592e4ac04c46bfc4c309e588b048b26ca735594e2ac05a48f44584"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_debug_command (cognitive 219): App::handle_debug_command has cognitive complexity 219 (threshold 15). Drivers by points: if/else 131 (147 pts), match/switch 24 (45 pts), boolean chains 22, loops 2 (5 pts) (nesting depth added 40). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_cmds.rs"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1da859bb90819004b668087824c3a1d0cd88d54528188d204e44ee728b180ea"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_mouse_event (cognitive 219): App::handle_mouse_event has cognitive complexity 219 (threshold 15). Drivers by points: if/else 95 (179 pts), boolean chains 21, match/switch 12 (19 pts) (nesting depth added 91). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/navigation.rs"},"region":{"startLine":1329}}}],"partialFingerprints":{"codehealthFindingId/v1":"800dbee7f6237304a3ac9270f38cb80c15bd4234fce78ced00f83ee0c9a6991b"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::render_tool_message (cognitive 199): jcode_tui::tui::ui_messages::render_tool_message has cognitive complexity 199 (threshold 15). Drivers by points: if/else 73 (123 pts), loops 14 (45 pts), boolean chains 29, match/switch 1 (2 pts) (nesting depth added 82). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":3961}}}],"partialFingerprints":{"codehealthFindingId/v1":"daee5abbcda0f351762cefbeb257dd38b5fc595d5710d12e40da781620f61abc"}},{"ruleId":"D2","level":"warning","message":{"text":"BridgeState::legacy_event_to_api_inner (cognitive 187): BridgeState::legacy_event_to_api_inner has cognitive complexity 187 (threshold 15). Drivers by points: if/else 70 (141 pts), boolean chains 21, match/switch 10 (19 pts), loops 3 (6 pts) (nesting depth added 83). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/translate.rs"},"region":{"startLine":1692}}}],"partialFingerprints":{"codehealthFindingId/v1":"d27390289d20f4201bc32e324e32a819006a6d7f1e1788c06be24766dd0db9e2"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::debug_swarm_read::maybe_handle_swarm_read_command (cognitive 176): jcode_app_core::server::debug_swarm_read::maybe_handle_swarm_read_command has cognitive complexity 176 (threshold 15). Drivers by points: if/else 64 (119 pts), loops 21 (55 pts), boolean chains 2 (nesting depth added 89). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_swarm_read.rs"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"1920cf612c2f0498b5105a5e58c0e7c19fffecadebe40401e2b75bbd19521dcc"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::bin::memory_recall_bench::cmd_metrics (cognitive 176): jcode::bin::memory_recall_bench::cmd_metrics has cognitive complexity 176 (threshold 15). Drivers by points: if/else 51 (102 pts), loops 16 (45 pts), match/switch 9 (23 pts), boolean chains 6 (nesting depth added 94). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":1014}}}],"partialFingerprints":{"codehealthFindingId/v1":"02d5bc9b9409c3b87e1f1699f83c7b7e681f7073e39e26e1f928a8e1a41ca9e7"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_inline_interactive::draw_inline_interactive (cognitive 175): jcode_tui::tui::ui_inline_interactive::draw_inline_interactive has cognitive complexity 175 (threshold 15). Drivers by points: if/else 92 (141 pts), boolean chains 22, loops 4 (9 pts), match/switch 2 (3 pts) (nesting depth added 55). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_inline_interactive.rs"},"region":{"startLine":595}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fd2d8f2e4920375323adcc5ad05f59303ac79c909d38a834e37f81b34e7f27e"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui::draw_inner (cognitive 174): jcode_tui::tui::ui::draw_inner has cognitive complexity 174 (threshold 15). Drivers by points: if/else 99 (137 pts), boolean chains 25, loops 3 (10 pts), match/switch 1 (2 pts) (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui.rs"},"region":{"startLine":2981}}}],"partialFingerprints":{"codehealthFindingId/v1":"03505f9bda56b37147df0076a1c0a266c6071e47cdd46da26ae3a414ac7b2bbc"}},{"ruleId":"D2","level":"warning","message":{"text":"BridgeState::translate_request (cognitive 171): BridgeState::translate_request has cognitive complexity 171 (threshold 15). Drivers by points: if/else 60 (118 pts), match/switch 17 (32 pts), boolean chains 16, loops 2 (5 pts) (nesting depth added 76). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/translate.rs"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b6f5714a3740a62919dd2896400254a391ecf92adb8601538b7ff347c0f0bd6"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_cursor_runtime::agent_transport::run_agent_turn (cognitive 167): jcode_provider_cursor_runtime::agent_transport::run_agent_turn has cognitive complexity 167 (threshold 15). Drivers by points: if/else 38 (111 pts), match/switch 9 (24 pts), loops 9 (23 pts), boolean chains 9 (nesting depth added 102). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/agent_transport.rs"},"region":{"startLine":758}}}],"partialFingerprints":{"codehealthFindingId/v1":"80253bfbef9dded0a4e369dde6acc19539329d9868edddb571a8729c1eb071d6"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_openai::request::build_responses_input_with_logger (cognitive 167): jcode_provider_openai::request::build_responses_input_with_logger has cognitive complexity 167 (threshold 15). Drivers by points: if/else 51 (130 pts), loops 11 (18 pts), match/switch 4 (13 pts), boolean chains 6 (nesting depth added 95). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai/src/request.rs"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"04b6afe486bb8d2fb163e01fbb4b90416e16b7f5fcfda4a4a681017723dfdc6a"}},{"ruleId":"D2","level":"warning","message":{"text":"App::run_remote (cognitive 154): App::run_remote has cognitive complexity 154 (threshold 15). Drivers by points: if/else 36 (106 pts), match/switch 10 (35 pts), loops 3 (7 pts), boolean chains 6 (nesting depth added 99). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/run_shell.rs"},"region":{"startLine":901}}}],"partialFingerprints":{"codehealthFindingId/v1":"527b5b4a68a94b3bd86f1e0ebce3c3fea90faff2ab97556f91ccf0f8406e1954"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_openai_runtime::openai_stream_runtime::continue_persistent_ws_locked (cognitive 153): jcode_provider_openai_runtime::openai_stream_runtime::continue_persistent_ws_locked has cognitive complexity 153 (threshold 15). Drivers by points: if/else 65 (128 pts), boolean chains 12, match/switch 6 (9 pts), loops 2 (4 pts) (nesting depth added 68). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs"},"region":{"startLine":539}}}],"partialFingerprints":{"codehealthFindingId/v1":"4534a18b7003d9c194297e7c071d3e099e43ee482f7845fe5f867299d1eabf47"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_cursor_runtime::wire::decode_exec_server_message (cognitive 149): jcode_provider_cursor_runtime::wire::decode_exec_server_message has cognitive complexity 149 (threshold 15). Drivers by points: if/else 31 (77 pts), loops 15 (43 pts), boolean chains 27, match/switch 1 (2 pts) (nesting depth added 75). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/wire.rs"},"region":{"startLine":691}}}],"partialFingerprints":{"codehealthFindingId/v1":"818db4885069a0fa7adabd4a762395f55e1393386b80475b738aaaf493a17d81"}},{"ruleId":"D2","level":"warning","message":{"text":"insertEvent (cognitive 145): insertEvent has cognitive complexity 145 (threshold 15). Drivers by points: boolean chains 88, if/else 27 (36 pts), other 16, error handling 1 (3 pts), ternaries 1 (2 pts) (nesting depth added 12). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":1183}}}],"partialFingerprints":{"codehealthFindingId/v1":"b22bd6a55ab34db798dd62cefc21720af65089488aa059e5e0329fa9873608c2"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::debug_swarm_write::maybe_handle_swarm_write_command (cognitive 131): jcode_app_core::server::debug_swarm_write::maybe_handle_swarm_write_command has cognitive complexity 131 (threshold 15). Drivers by points: if/else 48 (110 pts), loops 5 (16 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 75). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_swarm_write.rs"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b0578b155ad00df2acddcbb26c83b3cc518d0215e509f8768aebd27a82a6d88"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_openai_runtime::openai_stream_runtime::stream_response_websocket_authenticated (cognitive 131): jcode_provider_openai_runtime::openai_stream_runtime::stream_response_websocket_authenticated has cognitive complexity 131 (threshold 15). Drivers by points: if/else 31 (118 pts), match/switch 3 (6 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 93). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs"},"region":{"startLine":1410}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc57dcd3576724f0057894fcf834f88ec51b0cf7fb1fb4f66290cc60ef27d87c"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_login_input (cognitive 127): App::handle_login_input has cognitive complexity 127 (threshold 15). Drivers by points: if/else 44 (88 pts), match/switch 15 (30 pts), boolean chains 6, loops 1 (3 pts) (nesting depth added 61). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth.rs"},"region":{"startLine":1841}}}],"partialFingerprints":{"codehealthFindingId/v1":"f53fb0c02e0f354e8907dee394a060a3a9f82cc57277fe6f3e1e2c051b0ed3e9"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenRouterStream::parse_next_event (cognitive 126): OpenRouterStream::parse_next_event has cognitive complexity 126 (threshold 15). Drivers by points: if/else 28 (90 pts), loops 6 (18 pts), match/switch 3 (11 pts), boolean chains 7 (nesting depth added 82). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter/src/stream.rs"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"85d94b8462e6e9e4187d6721f70dc0bc37781ef635083abef0a4aa2aa6ae6de7"}},{"ruleId":"D2","level":"warning","message":{"text":"CommunicateTool::execute (cognitive 125): CommunicateTool::execute has cognitive complexity 125 (threshold 15). Drivers by points: match/switch 34 (59 pts), if/else 25 (55 pts), loops 2 (6 pts), boolean chains 5 (nesting depth added 59). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/communicate.rs"},"region":{"startLine":810}}}],"partialFingerprints":{"codehealthFindingId/v1":"2812426da4e5bae346c67241ae86cedfe58c2d82ee3806c07a22f38743c3c3ef"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_render_core::markdown::parse_markdown_with_options (cognitive 125): jcode_render_core::markdown::parse_markdown_with_options has cognitive complexity 125 (threshold 15). Drivers by points: if/else 46 (104 pts), match/switch 4 (11 pts), loops 3 (7 pts), boolean chains 3 (nesting depth added 69). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/markdown.rs"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ef7b3c9c71d9b2b14ecee8b40e2c1f7530e0f3a018db6b9ff22272995037ca5"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_render::swarm_gallery::render_swarm_strip_vertical (cognitive 121): jcode_tui_render::swarm_gallery::render_swarm_strip_vertical has cognitive complexity 121 (threshold 15). Drivers by points: if/else 53 (97 pts), loops 6 (13 pts), boolean chains 11 (nesting depth added 51). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/swarm_gallery.rs"},"region":{"startLine":957}}}],"partialFingerprints":{"codehealthFindingId/v1":"523cc6493aae36d881389873c2eed6891190cdfa635c3d7e6b167a1d7e8af8af"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::remote::handle_tick (cognitive 119): jcode_tui::tui::app::remote::handle_tick has cognitive complexity 119 (threshold 15). Drivers by points: if/else 43 (72 pts), boolean chains 22, match/switch 8 (20 pts), loops 3 (5 pts) (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"25d6150cd4bc6da31d43edbde030a078897f3ba722bcb34630f18952110945c9"}},{"ruleId":"D2","level":"warning","message":{"text":"Server::spawn_background_tasks (cognitive 114): Server::spawn_background_tasks has cognitive complexity 114 (threshold 15). Drivers by points: if/else 34 (94 pts), loops 7 (11 pts), match/switch 3 (7 pts), boolean chains 2 (nesting depth added 68). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server.rs"},"region":{"startLine":1199}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d8fa05f70d19a331b4cfc18acae283c3b5f6919783d0420d3251829094669a0"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::commands::run_memory_command_for_dir (cognitive 114): jcode::cli::commands::run_memory_command_for_dir has cognitive complexity 114 (threshold 15). Drivers by points: if/else 28 (64 pts), loops 9 (31 pts), boolean chains 11, match/switch 4 (8 pts) (nesting depth added 62). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":1637}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ab092a6c6dc732f50bfa9afcc01f9cdec67c930ee37af468442a66944b12b8c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::todo_names::normalize_public_input (cognitive 112): jcode_app_core::tool::todo_names::normalize_public_input has cognitive complexity 112 (threshold 15). Drivers by points: if/else 28 (68 pts), loops 15 (40 pts), boolean chains 4 (nesting depth added 65). Of this number, 106 points are the body\u0027s own statements and 6 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/todo_names.rs"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa0611f1439f76dad3fdbe44a5691f5b04b0c663713a4292f17712997ff23672"}},{"ruleId":"D2","level":"warning","message":{"text":"CopilotApiProvider::process_sse_stream (cognitive 110): CopilotApiProvider::process_sse_stream has cognitive complexity 110 (threshold 15). Drivers by points: if/else 13 (73 pts), match/switch 4 (19 pts), loops 4 (15 pts), boolean chains 3 (nesting depth added 86). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-copilot-runtime/src/lib.rs"},"region":{"startLine":688}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dc660bbe3c16b88fb6351b799e181858a21478615ddbdfe0ef10cf40cd4ef1c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::bin::memory_recall_bench::cmd_gate (cognitive 108): jcode::bin::memory_recall_bench::cmd_gate has cognitive complexity 108 (threshold 15). Drivers by points: if/else 25 (60 pts), loops 9 (21 pts), match/switch 7 (20 pts), boolean chains 7 (nesting depth added 60). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":2189}}}],"partialFingerprints":{"codehealthFindingId/v1":"49d145879f9b2843c2e1fc0b642206a647dea8407d35eef55fef0e5ec64b13c2"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::remote::process_remote_followups (cognitive 107): jcode_tui::tui::app::remote::process_remote_followups has cognitive complexity 107 (threshold 15). Drivers by points: if/else 47 (77 pts), boolean chains 23, loops 2 (4 pts), match/switch 1 (3 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote.rs"},"region":{"startLine":1461}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ceeb2fa36c763202a63b750604887262d82222ebe6419f88b760ba7e928652f"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::client_session::handle_resume_session (cognitive 104): jcode_app_core::server::client_session::handle_resume_session has cognitive complexity 104 (threshold 15). Drivers by points: if/else 35 (83 pts), boolean chains 12, loops 2 (6 pts), match/switch 3 (nesting depth added 52). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_session.rs"},"region":{"startLine":1285}}}],"partialFingerprints":{"codehealthFindingId/v1":"ceb9c5e7d5b26f4da2343d3aa3ef4a4312a55fee1813fe36eea3be09cbbdc7d4"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::debug_command_exec::execute_debug_command (cognitive 104): jcode_app_core::server::debug_command_exec::execute_debug_command has cognitive complexity 104 (threshold 15). Drivers by points: if/else 65 (89 pts), match/switch 4 (7 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_command_exec.rs"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee5cf4e0bdde4dc67fd309214ab85708de37afa5303130c70c006e8ab330c506"}},{"ruleId":"D2","level":"warning","message":{"text":"App::get_suggestions_for (cognitive 104): App::get_suggestions_for has cognitive complexity 104 (threshold 15). Drivers by points: if/else 70 (86 pts), boolean chains 10, loops 3 (8 pts) (nesting depth added 21). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui_input_helpers.rs"},"region":{"startLine":478}}}],"partialFingerprints":{"codehealthFindingId/v1":"70c6727a238c9218b27c7b530d70a087c31c34da1dc9288fcc2f0865169ad325"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplyPatchTool::execute (cognitive 103): ApplyPatchTool::execute has cognitive complexity 103 (threshold 15). Drivers by points: if/else 31 (81 pts), loops 6 (10 pts), match/switch 4 (7 pts), boolean chains 5 (nesting depth added 57). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/apply_patch.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"0194c267f0f3d1eeae61f8a77255eb1f2ac2111da3e3bae825dfc2154f6c6452"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_prepare::render_message_into (cognitive 101): jcode_tui::tui::ui_prepare::render_message_into has cognitive complexity 101 (threshold 15). Drivers by points: if/else 27 (50 pts), loops 18 (43 pts), match/switch 2 (5 pts), boolean chains 3 (nesting depth added 51). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_prepare.rs"},"region":{"startLine":1428}}}],"partialFingerprints":{"codehealthFindingId/v1":"29ac5c781d85347ab20f9191946bd6ba7481d10380f701cdcd2d12e0e5687168"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::tui_launch::list_sessions (cognitive 100): jcode::cli::tui_launch::list_sessions has cognitive complexity 100 (threshold 15). Drivers by points: if/else 26 (67 pts), match/switch 8 (18 pts), boolean chains 8, loops 3 (7 pts) (nesting depth added 55). Of this number, 95 points are the body\u0027s own statements and 5 belong to 3 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/tui_launch.rs"},"region":{"startLine":606}}}],"partialFingerprints":{"codehealthFindingId/v1":"25ac83adcc7a7039327be8e7827a68074caf6495c09b0d7cc3bb489e727de6c9"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_render_core::preprocess::normalize_latex_delimiters_and_environments (cognitive 99): jcode_render_core::preprocess::normalize_latex_delimiters_and_environments has cognitive complexity 99 (threshold 15). Drivers by points: if/else 32 (78 pts), boolean chains 16, match/switch 1 (4 pts), loops 1 (nesting depth added 49). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/preprocess.rs"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fa92e76cfee2c7b7836608762c0835aadd3b35dad9ad9b6aad906321b0ed1e1"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenAIProvider::complete (cognitive 98): OpenAIProvider::complete has cognitive complexity 98 (threshold 15). Drivers by points: if/else 41 (83 pts), match/switch 6 (12 pts), boolean chains 2, loops 1 (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_provider_impl.rs"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"f094e03917bb9776a3b92f5183df1e989cae43f0e6da4c6a5a0190164f721022"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::video_export::buffer_to_svg (cognitive 98): jcode_tui::video_export::buffer_to_svg has cognitive complexity 98 (threshold 15). Drivers by points: if/else 23 (69 pts), loops 9 (20 pts), boolean chains 9 (nesting depth added 57). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/video_export.rs"},"region":{"startLine":612}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc3f127854711a7cb592b3a08c5d2930c3d948c7189fdaf74617fc29a6a92a9e"}},{"ruleId":"D2","level":"warning","message":{"text":"App::build_model_picker_entries (cognitive 97): App::build_model_picker_entries has cognitive complexity 97 (threshold 15). Drivers by points: if/else 33 (63 pts), loops 9 (21 pts), boolean chains 8, match/switch 2 (5 pts) (nesting depth added 45). Of this number, 92 points are the body\u0027s own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":1668}}}],"partialFingerprints":{"codehealthFindingId/v1":"59c54627ee5a6e9e559e5c0e65e142864ef7ab582e398bcc0cf05f0ada0cfeaa"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::commands::handle_session_command (cognitive 97): jcode_tui::tui::app::commands::handle_session_command has cognitive complexity 97 (threshold 15). Drivers by points: if/else 56 (70 pts), boolean chains 10, match/switch 5 (10 pts), loops 3 (7 pts) (nesting depth added 23). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":1698}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce0af81027dcbf809333a1668c9bec89c9b4be14a5e4267dce3e1204411bf84a"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::debug::handle_debug_client (cognitive 96): jcode_app_core::server::debug::handle_debug_client has cognitive complexity 96 (threshold 15). Drivers by points: if/else 19 (42 pts), match/switch 11 (39 pts), loops 3 (11 pts), boolean chains 4 (nesting depth added 59). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug.rs"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"03a9cc88c41a4c58bf64beeae5c03547255d6df6d696fdae358ca8c2a7c41ed2"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_render::swarm_gallery::render_swarm_strip (cognitive 93): jcode_tui_render::swarm_gallery::render_swarm_strip has cognitive complexity 93 (threshold 15). Drivers by points: if/else 41 (72 pts), loops 6 (11 pts), boolean chains 8, match/switch 1 (2 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/swarm_gallery.rs"},"region":{"startLine":624}}}],"partialFingerprints":{"codehealthFindingId/v1":"05502f6812c358da4d23d8f69756d09334ffb611666b76da75bf46cd0f38c778"}},{"ruleId":"D2","level":"warning","message":{"text":"GmailTool::execute (cognitive 91): GmailTool::execute has cognitive complexity 91 (threshold 15). Drivers by points: if/else 32 (60 pts), loops 8 (16 pts), match/switch 6 (14 pts), boolean chains 1 (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/gmail.rs"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea7a1a45b312e67dcdacef946beef713497c2658bcad2140f3159f6c98a2803d"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_harness_api::edit_stats::count_legacy_messages (cognitive 90): jcode_harness_api::edit_stats::count_legacy_messages has cognitive complexity 90 (threshold 15). Drivers by points: if/else 13 (63 pts), loops 4 (13 pts), match/switch 3 (12 pts), boolean chains 2 (nesting depth added 68). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api/src/edit_stats.rs"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"c02f28e08f67f946fdb49c718666a8cb428d504a8a3c1830674701d0dea02481"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::client_comm_message::handle_comm_message (cognitive 89): jcode_app_core::server::client_comm_message::handle_comm_message has cognitive complexity 89 (threshold 15). Drivers by points: if/else 29 (58 pts), match/switch 7 (23 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_comm_message.rs"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"38c4a4e600174958d8661a69f193d395715b1155280ded3168de08870ac1acce"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::info_widget_layout::calculate_placements_anchored (cognitive 88): jcode_tui::tui::info_widget_layout::calculate_placements_anchored has cognitive complexity 88 (threshold 15). Drivers by points: if/else 30 (56 pts), boolean chains 16, match/switch 5 (9 pts), loops 5 (7 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_layout.rs"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7b17d82fa48fd488f60754c7f1f6e4da9fd290c0773cb6edb1e697d0a04a921"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::state_ui::handle_info_command (cognitive 87): jcode_tui::tui::app::state_ui::handle_info_command has cognitive complexity 87 (threshold 15). Drivers by points: if/else 39 (71 pts), match/switch 4 (12 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui.rs"},"region":{"startLine":1895}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a901eb175fd5d04ed3e569154890656ea09bc8582cdd034df37537815871a6c"}},{"ruleId":"D2","level":"warning","message":{"text":"ProviderCard::body_lines (cognitive 86): ProviderCard::body_lines has cognitive complexity 86 (threshold 15). Drivers by points: if/else 20 (48 pts), loops 8 (24 pts), match/switch 7 (11 pts), boolean chains 3 (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages/usage.rs"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a709d1ec4e41c095812ddfcef1685e792d4cb6ed753980b3a9e320354a3af81"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::browser_fast::run (cognitive 85): jcode_app_core::tool::browser_fast::run has cognitive complexity 85 (threshold 15). Drivers by points: if/else 37 (66 pts), boolean chains 15, match/switch 2 (3 pts), loops 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/browser_fast.rs"},"region":{"startLine":584}}}],"partialFingerprints":{"codehealthFindingId/v1":"f387e860785b9a04e7c174354cceb4b691849a3bf2af21711a567060218ae403"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_copilot::build_messages (cognitive 85): jcode_provider_copilot::build_messages has cognitive complexity 85 (threshold 15). Drivers by points: if/else 18 (55 pts), loops 7 (19 pts), match/switch 3 (10 pts), boolean chains 1 (nesting depth added 56). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-copilot/src/lib.rs"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"2193ba2bd48cfd21ccb37debd69214580714170fc14b549093cd1728d60cf94b"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_tools::get_tool_summary_with_budget (cognitive 84): jcode_tui::tui::ui_tools::get_tool_summary_with_budget has cognitive complexity 84 (threshold 15). Drivers by points: if/else 31 (53 pts), match/switch 16 (31 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tools.rs"},"region":{"startLine":847}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f2717f517ed249292dfbe1cda82658adb2cf9dc90a949c643efb3d7dbf51315"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::apply_patch::parse_apply_patch (cognitive 83): jcode_app_core::tool::apply_patch::parse_apply_patch has cognitive complexity 83 (threshold 15). Drivers by points: if/else 24 (67 pts), loops 4 (11 pts), boolean chains 5 (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/apply_patch.rs"},"region":{"startLine":661}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd3c1b9c2f88cc01a34ca4f5484a242ea58b80d09ea0aed533b3e7f3273ae796"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_command_risk::tokenize::tokenize (cognitive 83): jcode_command_risk::tokenize::tokenize has cognitive complexity 83 (threshold 15). Drivers by points: if/else 22 (68 pts), loops 4 (11 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 54). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-command-risk/src/tokenize.rs"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca179c988521e9188f3bfe30c42af8d02d40614932691b3739db49fad2d8e0b9"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::session::render::render_messages_and_images_with_compacted_history (cognitive 80): jcode_base::session::render::render_messages_and_images_with_compacted_history has cognitive complexity 80 (threshold 15). Drivers by points: if/else 20 (58 pts), match/switch 4 (9 pts), loops 4 (8 pts), boolean chains 5 (nesting depth added 47). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/render.rs"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"77adcad3a839702a6e7d2d9f71fb78b5c4fe66a1150c1cb05d461eaa3b048135"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::comm_control::handle_comm_task_control (cognitive 79): jcode_app_core::server::comm_control::handle_comm_task_control has cognitive complexity 79 (threshold 15). Drivers by points: if/else 35 (67 pts), boolean chains 6, match/switch 4 (6 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_control.rs"},"region":{"startLine":1690}}}],"partialFingerprints":{"codehealthFindingId/v1":"232f59014504505806de92de36f41986c609262c937de4dc6829dc0cfa5a0c21"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::runtime_commands::execute (cognitive 79): jcode_app_core::server::runtime_commands::execute has cognitive complexity 79 (threshold 15). Drivers by points: if/else 26 (56 pts), match/switch 12 (22 pts), boolean chains 1 (nesting depth added 40). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/runtime_commands.rs"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"3326cd76fc4c33eeb5dd9a598c16484ecbd70421f1bd3049d05f763b7e15c2b8"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::session_picker::transcript_search::search_shard (cognitive 78): jcode_tui::tui::session_picker::transcript_search::search_shard has cognitive complexity 78 (threshold 15). Drivers by points: if/else 26 (60 pts), loops 8 (9 pts), boolean chains 5, match/switch 2 (4 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/transcript_search.rs"},"region":{"startLine":752}}}],"partialFingerprints":{"codehealthFindingId/v1":"64c9d2939ea7cfef1724165bfe424358656db0ce3d047ca99d2903d7cd5b347d"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_anthropic::format_messages_with_native (cognitive 76): jcode_provider_anthropic::format_messages_with_native has cognitive complexity 76 (threshold 15). Drivers by points: if/else 20 (52 pts), loops 8 (16 pts), match/switch 2 (5 pts), boolean chains 3 (nesting depth added 43). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic/src/lib.rs"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed4fb4777810bcf6f7eb1a843ba94257c05da7453af209bd0db69f84c7ad9510"}},{"ruleId":"D2","level":"warning","message":{"text":"Server::monitor_bus (cognitive 75): Server::monitor_bus has cognitive complexity 75 (threshold 15). Drivers by points: if/else 21 (63 pts), loops 3 (10 pts), match/switch 1 (2 pts) (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server.rs"},"region":{"startLine":1981}}}],"partialFingerprints":{"codehealthFindingId/v1":"24dc052318cd664907dbbe73238409edede2efbe5d61e4788a06ca93b95a42a5"}},{"ruleId":"D2","level":"warning","message":{"text":"App::info_widget_data (cognitive 75): App::info_widget_data has cognitive complexity 75 (threshold 15). Drivers by points: if/else 44 (57 pts), boolean chains 12, match/switch 3 (6 pts) (nesting depth added 16). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tui_state.rs"},"region":{"startLine":1582}}}],"partialFingerprints":{"codehealthFindingId/v1":"960b1801e4018d96e9498cebecc284fde7baaa8e79cc60e342211d923d187731"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::remote::reconnect::connect_with_retry (cognitive 75): jcode_tui::tui::app::remote::reconnect::connect_with_retry has cognitive complexity 75 (threshold 15). Drivers by points: if/else 18 (47 pts), match/switch 5 (14 pts), boolean chains 7, loops 3 (7 pts) (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/reconnect.rs"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"302dcfa98f2a5e1921f249f31c560e42db79e3ee50c33981d1353c2f8f2de62c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::bin::tui_bench::main (cognitive 75): jcode::bin::tui_bench::main has cognitive complexity 75 (threshold 15). Drivers by points: if/else 44 (71 pts), boolean chains 3, loops 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/tui_bench.rs"},"region":{"startLine":1212}}}],"partialFingerprints":{"codehealthFindingId/v1":"64588016bed9f8f1d3330e2ea89c232f43dc2411a553d014e12f9c1658eaeb66"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::browser_fast_actions::candidates (cognitive 74): jcode_app_core::tool::browser_fast_actions::candidates has cognitive complexity 74 (threshold 15). Drivers by points: if/else 19 (48 pts), loops 6 (16 pts), boolean chains 10 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/browser_fast_actions.rs"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"228dafd50a3accb5a690ae7d222f6f41360a34e851b204404b87ef2c738bcf8a"}},{"ruleId":"D2","level":"warning","message":{"text":"MultiProvider::complete_with_failover (cognitive 74): MultiProvider::complete_with_failover has cognitive complexity 74 (threshold 15). Drivers by points: if/else 27 (62 pts), match/switch 3 (6 pts), boolean chains 5, loops 1 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/mod.rs"},"region":{"startLine":600}}}],"partialFingerprints":{"codehealthFindingId/v1":"014b100c1c320ae9f4ba07caf18245e42316ad1aeb3b17ca09ef6026e547bb13"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_anthropic_runtime::run_stream_with_retries (cognitive 74): jcode_provider_anthropic_runtime::run_stream_with_retries has cognitive complexity 74 (threshold 15). Drivers by points: if/else 21 (55 pts), boolean chains 12, match/switch 2 (6 pts), loops 1 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic-runtime/src/lib.rs"},"region":{"startLine":1836}}}],"partialFingerprints":{"codehealthFindingId/v1":"237532f44fd37ac9883366e64d4f69aba9eb29f692a7ba2a71765cf6e8958777"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::provider_init::init_provider_with_model_policy (cognitive 74): jcode::cli::provider_init::init_provider_with_model_policy has cognitive complexity 74 (threshold 15). Drivers by points: if/else 32 (58 pts), boolean chains 15, match/switch 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/provider_init.rs"},"region":{"startLine":1525}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b33e887053420abbdd886aaafa7779b7106ce56faf41e6e605ea7fc53a1b560"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_anim::shape_char_3x3 (cognitive 73): jcode_tui_anim::shape_char_3x3 has cognitive complexity 73 (threshold 15). Drivers by points: if/else 27 (29 pts), match/switch 24 (27 pts), boolean chains 17 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-anim/src/lib.rs"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"299caa3dabd8cf6bcfd67533dc0347ccbcfe9b4a7547e1500f8364c78ce6b489"}},{"ruleId":"D2","level":"warning","message":{"text":"fetch (cognitive 73): fetch has cognitive complexity 73 (threshold 15). Drivers by points: if/else 30 (39 pts), boolean chains 18, ternaries 7 (12 pts), error handling 3 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":510}}}],"partialFingerprints":{"codehealthFindingId/v1":"2665876ee5f8cbafcb528572b5e697918f940a7950d5c06ea790bcf40a0fa85a"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::group_transfer::handle_with_gate (cognitive 72): jcode_app_core::server::group_transfer::handle_with_gate has cognitive complexity 72 (threshold 15). Drivers by points: if/else 13 (34 pts), loops 12 (31 pts), match/switch 4 (6 pts), boolean chains 1 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/group_transfer.rs"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba1dfbed2c14926225eb90026dd31be335ffeb8a7863a12ed37fe5e8b2ba1154"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_render_core::preprocess::escape_currency_dollars (cognitive 72): jcode_render_core::preprocess::escape_currency_dollars has cognitive complexity 72 (threshold 15). Drivers by points: if/else 23 (49 pts), loops 6 (13 pts), boolean chains 10 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/preprocess.rs"},"region":{"startLine":779}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb6392a4c64581251fa8677bc6763c13d060d192af116e7932fb27d556ac4eb1"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_command_risk::assess_segment (cognitive 71): jcode_command_risk::assess_segment has cognitive complexity 71 (threshold 15). Drivers by points: if/else 23 (45 pts), boolean chains 15, loops 7 (11 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-command-risk/src/lib.rs"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0976632491fb15255fd6fe77c6a8cc473964d597a5caf51a4de500a7472cf3e"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::remote::server_events::handle_server_event (cognitive 71): jcode_tui::tui::app::remote::server_events::handle_server_event has cognitive complexity 71 (threshold 15). Drivers by points: if/else 24 (62 pts), boolean chains 8, match/switch 1 (nesting depth added 38). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/server_events.rs"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"19744a8bd32680229aa4696ed25250c7e4cd5002eafc0f1d08536b7406dd7629"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_input::draw_status (cognitive 70): jcode_tui::tui::ui_input::draw_status has cognitive complexity 70 (threshold 15). Drivers by points: if/else 38 (64 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_input.rs"},"region":{"startLine":824}}}],"partialFingerprints":{"codehealthFindingId/v1":"900c75e0a605428755c9fa926d8ce5c788ac656202f4508eb05680d9de65aa28"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_harness_api_server::run_bridge_stream (cognitive 69): jcode_harness_api_server::run_bridge_stream has cognitive complexity 69 (threshold 15). Drivers by points: if/else 15 (40 pts), match/switch 7 (20 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/lib.rs"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"3652c18bd5c6e5dc8e7b2ac7a972d68aa88dfaae111fc030e7c9db27b196d8b9"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::client_session::handle_subscribe (cognitive 68): jcode_app_core::server::client_session::handle_subscribe has cognitive complexity 68 (threshold 15). Drivers by points: if/else 27 (64 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 38). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_session.rs"},"region":{"startLine":643}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcc15290a49aec158cea133f285588d42e350da83dae45d0d1bdd70f38cd227f"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::provider::catalog_remote_routes::remote_model_routes_fallback (cognitive 66): jcode_base::provider::catalog_remote_routes::remote_model_routes_fallback has cognitive complexity 66 (threshold 15). Drivers by points: if/else 21 (42 pts), match/switch 3 (10 pts), loops 3 (9 pts), boolean chains 5 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/catalog_remote_routes.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"54e235a5d6a5f8b0db081acda800361143c4bc501a27df76cbe2038ffcbeca87"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_input::build_notification_spans (cognitive 66): jcode_tui::tui::ui_input::build_notification_spans has cognitive complexity 66 (threshold 15). Drivers by points: if/else 39 (65 pts), boolean chains 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_input.rs"},"region":{"startLine":1231}}}],"partialFingerprints":{"codehealthFindingId/v1":"74ca0dc34b05a05237f692f74ac676e1a5ecbe916abb7e0c87bef8e83ad22065"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::helpers::git_watch::imp::run (cognitive 65): jcode_tui::tui::app::helpers::git_watch::imp::run has cognitive complexity 65 (threshold 15). Drivers by points: if/else 21 (54 pts), boolean chains 6, loops 3 (5 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/helpers/git_watch.rs"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"f58772f85c19235aedfce87cf9e106715d795847a75b746a553f0798ce3255a8"}},{"ruleId":"D2","level":"warning","message":{"text":"MemoryTool::execute (cognitive 64): MemoryTool::execute has cognitive complexity 64 (threshold 15). Drivers by points: if/else 22 (40 pts), loops 5 (15 pts), match/switch 4 (9 pts) (nesting depth added 33). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/memory.rs"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"5729114cb4cf96d1920d2b68bf158d07445f54f114f94483030046b52a21dae7"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_plan::mermaid::swarm_plan_mermaid (cognitive 64): jcode_plan::mermaid::swarm_plan_mermaid has cognitive complexity 64 (threshold 15). Drivers by points: if/else 25 (48 pts), loops 7 (12 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-plan/src/mermaid.rs"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ba677cc4725323af41ac3bd6c954f4f7482464b4af86ca4c52b5318485be27b"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_protocol::comm_format::format_comm_members (cognitive 64): jcode_protocol::comm_format::format_comm_members has cognitive complexity 64 (threshold 15). Drivers by points: if/else 16 (33 pts), match/switch 8 (25 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-protocol/src/comm_format.rs"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1951f14ad7216bfbaf2e98a2017a94f32e22b7bf717f49cfdd556ae4260b729"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::batch::normalize_batch_input (cognitive 62): jcode_app_core::tool::batch::normalize_batch_input has cognitive complexity 62 (threshold 15). Drivers by points: if/else 11 (46 pts), loops 3 (12 pts), boolean chains 4 (nesting depth added 44). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/batch.rs"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c6adee06c27e9dac17493f2aefe5ca24e338f3618aaecb251f92d04b0126a2c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_anthropic_runtime::process_sse_event (cognitive 62): jcode_provider_anthropic_runtime::process_sse_event has cognitive complexity 62 (threshold 15). Drivers by points: if/else 18 (50 pts), match/switch 4 (11 pts), boolean chains 1 (nesting depth added 39). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic-runtime/src/lib.rs"},"region":{"startLine":2553}}}],"partialFingerprints":{"codehealthFindingId/v1":"981bf260777364ab9b98a16550dc1c299fec8f982dddc466e8928624aaff5cce"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::commands_cloud::finish_cloud_command (cognitive 62): jcode_tui::tui::app::commands_cloud::finish_cloud_command has cognitive complexity 62 (threshold 15). Drivers by points: if/else 27 (46 pts), match/switch 5 (13 pts), boolean chains 3 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_cloud.rs"},"region":{"startLine":1177}}}],"partialFingerprints":{"codehealthFindingId/v1":"196a20685808fe702e2d62ee7632919baf11a8f7ae12e506d5077d24e094856c"}},{"ruleId":"D2","level":"warning","message":{"text":"App::context_snapshot (cognitive 61): App::context_snapshot has cognitive complexity 61 (threshold 15). Drivers by points: if/else 25 (38 pts), match/switch 5 (13 pts), loops 3 (7 pts), boolean chains 3 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tui_state.rs"},"region":{"startLine":1302}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a81d51740cc6ae9d496405365404d0c2616e233a914ef550f1355c698b989c9"}},{"ruleId":"D2","level":"warning","message":{"text":"AuthStatus::method_detail_for_provider (cognitive 60): AuthStatus::method_detail_for_provider has cognitive complexity 60 (threshold 15). Drivers by points: if/else 32 (51 pts), match/switch 4 (9 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/status_detail.rs"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"a91c0948ea97b82b33e83e62bcd55beb9a9b9c1f5ec7a0beb50b495d22c64b76"}},{"ruleId":"D2","level":"warning","message":{"text":"pruneOldEvents (cognitive 60): pruneOldEvents has cognitive complexity 60 (threshold 15). Drivers by points: error handling 6 (21 pts), if/else 7 (21 pts), boolean chains 8, loops 4 (6 pts), other 4 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":1044}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b271c1dcd44fabd1f642b50e9d44b9d739089050e8badc3fa7604aa30c0f93c"}},{"ruleId":"D2","level":"warning","message":{"text":"BgTool::execute (cognitive 59): BgTool::execute has cognitive complexity 59 (threshold 15). Drivers by points: if/else 13 (34 pts), match/switch 7 (15 pts), loops 3 (7 pts), boolean chains 3 (nesting depth added 33). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/bg.rs"},"region":{"startLine":559}}}],"partialFingerprints":{"codehealthFindingId/v1":"0be12bae3c3a21663dcf8e4289e0c1d6e399260eac0f8d744365e9790aa0941f"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::todo::apply_todo_patch (cognitive 59): jcode_app_core::tool::todo::apply_todo_patch has cognitive complexity 59 (threshold 15). Drivers by points: if/else 20 (36 pts), match/switch 5 (10 pts), loops 5 (8 pts), boolean chains 5 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/todo.rs"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0674d2cf492ab95bfd78959f3acac83884589e0e4664160e1b0ddfe81408f99"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_openai_runtime::openai_stream_http::stream_response (cognitive 59): jcode_provider_openai_runtime::openai_stream_http::stream_response has cognitive complexity 59 (threshold 15). Drivers by points: if/else 23 (48 pts), match/switch 3 (7 pts), boolean chains 3, loops 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_stream_http.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"49f46169f925a4fdee819b1f7446985cf0eb95420b03488677c831b5b8804a22"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::tui_lifecycle_runtime::handle_dev_command (cognitive 59): jcode_tui::tui::app::tui_lifecycle_runtime::handle_dev_command has cognitive complexity 59 (threshold 15). Drivers by points: if/else 25 (37 pts), match/switch 7 (18 pts), boolean chains 4 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tui_lifecycle_runtime.rs"},"region":{"startLine":574}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f55ae61e4b0238389ae3f704b9f5691799b1c44fc97b2fe6f9663e5cf66abff"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::render_background_task_message (cognitive 59): jcode_tui::tui::ui_messages::render_background_task_message has cognitive complexity 59 (threshold 15). Drivers by points: if/else 35 (50 pts), loops 3 (7 pts), boolean chains 1, match/switch 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":2764}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b3dd3df80ac556b6919959a7906f0bdbc88b1838a106467168468b3380ebdfa"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_render::memory_tiles::render_memory_tiles (cognitive 59): jcode_tui_render::memory_tiles::render_memory_tiles has cognitive complexity 59 (threshold 15). Drivers by points: if/else 14 (35 pts), loops 8 (19 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/memory_tiles.rs"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"85f0cee2a2d68a68392e750117b5c71eb8d5267bc0160280b1c8daaa9a711289"}},{"ruleId":"D2","level":"warning","message":{"text":"MultiProvider::new_with_auth_status (cognitive 58): MultiProvider::new_with_auth_status has cognitive complexity 58 (threshold 15). Drivers by points: if/else 36 (45 pts), match/switch 3 (7 pts), boolean chains 6 (nesting depth added 13). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/startup.rs"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bb813e856ac86304acde643b714edb4280652b4ca5821d5250970af7c074ad3"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionPicker::rebuild_items_inner (cognitive 58): SessionPicker::rebuild_items_inner has cognitive complexity 58 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 10 (21 pts), boolean chains 9, match/switch 2 (4 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/filter.rs"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"31c2325593cd9ec8ae21204f90c0ffaafcc5575cda1a5170042d4f077ecb8a43"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::browser::ensure_browser_setup_for (cognitive 57): jcode_base::browser::ensure_browser_setup_for has cognitive complexity 57 (threshold 15). Drivers by points: if/else 26 (36 pts), match/switch 7 (15 pts), boolean chains 6 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/browser.rs"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d0ccf278295b343566060a5f413b02f09a3185410b3884cb257cbfa68f59c24"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_markdown::markdown_render_support::extract_copy_targets_from_rendered_lines (cognitive 57): jcode_tui_markdown::markdown_render_support::extract_copy_targets_from_rendered_lines has cognitive complexity 57 (threshold 15). Drivers by points: if/else 11 (34 pts), loops 5 (18 pts), boolean chains 5 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_support.rs"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"e24f899dc649309fb513dd69f74f62fbb232d9ac74309e6da1d13d7e57415f2c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_mermaid::mermaid_widget::render_image_widget_fit_inner (cognitive 57): jcode_tui_mermaid::mermaid_widget::render_image_widget_fit_inner has cognitive complexity 57 (threshold 15). Drivers by points: if/else 38 (50 pts), boolean chains 7 (nesting depth added 12). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_widget.rs"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbc1b2cab3df13763c5582fb4ee451e3c9a9fcdd1765c8e29f54555f6e2834cb"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::replay::export_timeline (cognitive 56): jcode_app_core::replay::export_timeline has cognitive complexity 56 (threshold 15). Drivers by points: if/else 15 (39 pts), loops 6 (12 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/replay.rs"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcb7aa08c07f6ee08248ed2dc24e777b8eaaf3618b10b46f6afb66d829dfe1cc"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::selfdev::status::selfdev_status_output (cognitive 56): jcode_app_core::tool::selfdev::status::selfdev_status_output has cognitive complexity 56 (threshold 15). Drivers by points: if/else 33 (47 pts), match/switch 2 (5 pts), loops 2 (4 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/selfdev/status.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa99178eacc32d20665ca8e8737872a329d6ee55a1f521ab98978c240340ad01"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_command_risk::tokenize::heredoc_delimiters (cognitive 56): jcode_command_risk::tokenize::heredoc_delimiters has cognitive complexity 56 (threshold 15). Drivers by points: if/else 21 (43 pts), boolean chains 8, loops 3 (5 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-command-risk/src/tokenize.rs"},"region":{"startLine":397}}}],"partialFingerprints":{"codehealthFindingId/v1":"fec3f2f7e52931ae057fb317d7aa8355d9762469355a31af1c19830a93e44637"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_openai::stream::parse_openai_response_event (cognitive 56): jcode_provider_openai::stream::parse_openai_response_event has cognitive complexity 56 (threshold 15). Drivers by points: if/else 24 (47 pts), boolean chains 7, match/switch 2 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai/src/stream.rs"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"079758f95c4e21162acea8090f286a552c48c2dc01f64745f3bf4eef75b42349"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_input::draw_input (cognitive 56): jcode_tui::tui::ui_input::draw_input has cognitive complexity 56 (threshold 15). Drivers by points: if/else 34 (50 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_input.rs"},"region":{"startLine":2159}}}],"partialFingerprints":{"codehealthFindingId/v1":"00ef5dddfce8f6f36142007d002195ac1a6c1bd5a8cb6d544f437a2dc81d9e0d"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::bin::tui_bench::reconstruct_side_panel_snapshot_from_session (cognitive 56): jcode::bin::tui_bench::reconstruct_side_panel_snapshot_from_session has cognitive complexity 56 (threshold 15). Drivers by points: if/else 14 (49 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 38). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/tui_bench.rs"},"region":{"startLine":659}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f68a14cf01eb4788b9b0a78b012044365e43186970a670fa43d1c5836031d93"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::browser_request::bridge_request (cognitive 55): jcode_app_core::tool::browser_request::bridge_request has cognitive complexity 55 (threshold 15). Drivers by points: if/else 27 (48 pts), boolean chains 5, match/switch 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/browser_request.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdf2f7fd929b75788d1eb178f51065cbb15f5cbb16c62ffca9bbb6e6d47ccd90"}},{"ruleId":"D2","level":"warning","message":{"text":"App::trigger_provider_auth_changed (cognitive 55): App::trigger_provider_auth_changed has cognitive complexity 55 (threshold 15). Drivers by points: if/else 18 (50 pts), boolean chains 5 (nesting depth added 32). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth.rs"},"region":{"startLine":2638}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bed0f9a872daed0c3a643aeeebe5126d6dfc2ef545a08fd9a86ea29558d3b27"}},{"ruleId":"D2","level":"warning","message":{"text":"App::collect_missing_tool_outputs_since_last_scan (cognitive 55): App::collect_missing_tool_outputs_since_last_scan has cognitive complexity 55 (threshold 15). Drivers by points: if/else 10 (29 pts), loops 6 (15 pts), match/switch 4 (11 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/conversation_state.rs"},"region":{"startLine":605}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e4b110f419f2b19ecd700633cd9eaf9e9b31c8908ef1fa616d408021e215b82"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::info_widget_stability::analyze_frames_with_scroll (cognitive 55): jcode_tui::tui::info_widget_stability::analyze_frames_with_scroll has cognitive complexity 55 (threshold 15). Drivers by points: if/else 13 (32 pts), loops 10 (18 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_stability.rs"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6a100071a043f61b6234bd73cf1a4a76ef968a59c9feb1fb6aeae5f05881bb1"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::usage::activity_summary_lines (cognitive 55): jcode_tui::tui::ui_messages::usage::activity_summary_lines has cognitive complexity 55 (threshold 15). Drivers by points: if/else 16 (36 pts), loops 8 (15 pts), boolean chains 4 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages/usage.rs"},"region":{"startLine":496}}}],"partialFingerprints":{"codehealthFindingId/v1":"92fbf6267c275c01e22a6cc1c958c41511a2cf916bffbdba7b2c81d415b59450"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_markdown::markdown_wrap::wrap_line (cognitive 55): jcode_tui_markdown::markdown_wrap::wrap_line has cognitive complexity 55 (threshold 15). Drivers by points: if/else 21 (43 pts), loops 3 (7 pts), boolean chains 5 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_wrap.rs"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"968704bee3f876cb63edc35fdaac2db30d327a7e1b13510a115d11ea0d217af7"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::commands::todo_followup::prepare_run_todo_follow_up (cognitive 55): jcode::cli::commands::todo_followup::prepare_run_todo_follow_up has cognitive complexity 55 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 7 (15 pts), boolean chains 7, match/switch 2 (6 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands/todo_followup.rs"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd5c98ea722ec8b76bcf8faaaf397c10f39349fa95e86059abe6a97829660ef4"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::swarm::update_member_status_with_report_tldr (cognitive 54): jcode_app_core::server::swarm::update_member_status_with_report_tldr has cognitive complexity 54 (threshold 15). Drivers by points: if/else 20 (43 pts), boolean chains 11 (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/swarm.rs"},"region":{"startLine":1709}}}],"partialFingerprints":{"codehealthFindingId/v1":"085e8c207ced43b62cba65f767209856f31bf62f9ce59fd0cb41b2f263ce4cde"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::todo::normalize_todo_input (cognitive 54): jcode_app_core::tool::todo::normalize_todo_input has cognitive complexity 54 (threshold 15). Drivers by points: if/else 16 (41 pts), loops 4 (11 pts), boolean chains 2 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/todo.rs"},"region":{"startLine":1240}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfdfcb85124d5a4359f5e088088656955e1630420ad00bef1f6308d4c56f0b5f"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_anthropic::history_repair::repair_dangling_anthropic_server_tools (cognitive 54): jcode_provider_anthropic::history_repair::repair_dangling_anthropic_server_tools has cognitive complexity 54 (threshold 15). Drivers by points: if/else 14 (41 pts), loops 4 (6 pts), match/switch 2 (6 pts), boolean chains 1 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic/src/history_repair.rs"},"region":{"startLine":443}}}],"partialFingerprints":{"codehealthFindingId/v1":"62a0a36ca8399575d9b465c72ccbc782229aa99e969847dfcee97b3878d40901"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionPicker::render_session_list_impl (cognitive 54): SessionPicker::render_session_list_impl has cognitive complexity 54 (threshold 15). Drivers by points: if/else 38 (41 pts), boolean chains 9, match/switch 2 (4 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/render.rs"},"region":{"startLine":418}}}],"partialFingerprints":{"codehealthFindingId/v1":"192be37eb96285a809dbb824e7978d4aacbb3ce97679c3147917badfe1740884"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::info_widget::render_ambient_widget (cognitive 54): jcode_tui::tui::info_widget::render_ambient_widget has cognitive complexity 54 (threshold 15). Drivers by points: if/else 32 (47 pts), boolean chains 6, match/switch 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget.rs"},"region":{"startLine":1857}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b0b666131de812d3c4c0a418d57e0ffb9f77f734e75f1a668dbacfdf8d14ba0"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_inline_interactive::model_suggestion_lines (cognitive 54): jcode_tui::tui::ui_inline_interactive::model_suggestion_lines has cognitive complexity 54 (threshold 15). Drivers by points: if/else 27 (45 pts), boolean chains 7, loops 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_inline_interactive.rs"},"region":{"startLine":457}}}],"partialFingerprints":{"codehealthFindingId/v1":"39e1c0080ccd4c5bc7d0a7634b020a1ab3e8c59cbe66a7c224b17200c3d59521"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_markdown::markdown_links::markdown_link_target (cognitive 54): jcode_tui_markdown::markdown_links::markdown_link_target has cognitive complexity 54 (threshold 15). Drivers by points: if/else 9 (43 pts), loops 4 (7 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 38). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_links.rs"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c47cae80a1cf76777672100784a66d5e4c11ffd1909647be54dd9dd8e334849"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::session_search::searchable_text::searchable_message_text (cognitive 53): jcode_app_core::tool::session_search::searchable_text::searchable_message_text has cognitive complexity 53 (threshold 15). Drivers by points: if/else 8 (26 pts), loops 5 (26 pts), match/switch 1 (nesting depth added 39). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/session_search/searchable_text.rs"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"1974c85ef7797362d78a51232ab33b7f3e2ec8f844998845bcbd6983612bf41b"}},{"ruleId":"D2","level":"warning","message":{"text":"BedrockProvider::complete (cognitive 53): BedrockProvider::complete has cognitive complexity 53 (threshold 15). Drivers by points: if/else 17 (40 pts), match/switch 4 (11 pts), boolean chains 1, loops 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-bedrock/src/lib.rs"},"region":{"startLine":1179}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5bc795af81670502720e775ba7edb6fadc7abd144bc1b52bb04f5723a12448e"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_cursor_runtime::wire::decode_google_protobuf_value (cognitive 53): jcode_provider_cursor_runtime::wire::decode_google_protobuf_value has cognitive complexity 53 (threshold 15). Drivers by points: if/else 10 (33 pts), loops 4 (12 pts), boolean chains 6, match/switch 1 (2 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/wire.rs"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a7e4dcc2ef0e1b08a15d806e9c0872d4b57d8f48f11acb48bf9bbd62966f293"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_todo_policy::completion_report::render_completion_report (cognitive 53): jcode_todo_policy::completion_report::render_completion_report has cognitive complexity 53 (threshold 15). Drivers by points: if/else 14 (31 pts), loops 14 (22 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-todo-policy/src/completion_report.rs"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6d718810c178756250f4a10022298e8c090cda98fafef01305b230550c14352"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_markdown::markdown_text_preprocess::escape_currency_dollars (cognitive 53): jcode_tui_markdown::markdown_text_preprocess::escape_currency_dollars has cognitive complexity 53 (threshold 15). Drivers by points: if/else 14 (31 pts), loops 6 (13 pts), boolean chains 9 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_text_preprocess.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"890ed2312033079bb2411139f0d700443576e35e54712a3750447d4d36776eb4"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_tool_display::parse_tool_failure (cognitive 53): jcode_tui_tool_display::parse_tool_failure has cognitive complexity 53 (threshold 15). Drivers by points: if/else 18 (32 pts), boolean chains 20, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-tool-display/src/lib.rs"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"33e9369cbe0226e0a24a36f8e49350bb5086f11673b07f01346076557e3f134b"}},{"ruleId":"D2","level":"warning","message":{"text":"Server::recover_headless_sessions_on_startup (cognitive 52): Server::recover_headless_sessions_on_startup has cognitive complexity 52 (threshold 15). Drivers by points: if/else 18 (37 pts), match/switch 5 (10 pts), boolean chains 3, loops 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server.rs"},"region":{"startLine":750}}}],"partialFingerprints":{"codehealthFindingId/v1":"63bbda37d8b809c1334207e5e1464bf430e97a175fc2f07d5b5e5a1e9329e121"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_openai::citations::render_annotated_text (cognitive 52): jcode_provider_openai::citations::render_annotated_text has cognitive complexity 52 (threshold 15). Drivers by points: if/else 17 (37 pts), loops 5 (8 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai/src/citations.rs"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"aaa6795001c01f157fa705df9a4dbd260fe15280518b632db03064f64367835e"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenRouterProvider::complete (cognitive 52): OpenRouterProvider::complete has cognitive complexity 52 (threshold 15). Drivers by points: if/else 30 (35 pts), boolean chains 12, loops 2 (5 pts) (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/openrouter_provider_impl.rs"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"2275d7a38636492882bc19b0d62ed4c53affdb8e46fb7c48fc19152b3c4bbd9f"}},{"ruleId":"D2","level":"warning","message":{"text":"App::schedule_auto_poke_followup_after_response (cognitive 52): App::schedule_auto_poke_followup_after_response has cognitive complexity 52 (threshold 15). Drivers by points: if/else 24 (39 pts), boolean chains 13 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":1475}}}],"partialFingerprints":{"codehealthFindingId/v1":"db99d638f6f9f09f7ed96e7caf658a6b93e342243562e9b50f6fc2521e9efcd6"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_pinned::draw_side_panel_markdown (cognitive 52): jcode_tui::tui::ui_pinned::draw_side_panel_markdown has cognitive complexity 52 (threshold 15). Drivers by points: if/else 20 (36 pts), match/switch 2 (9 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_pinned.rs"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"00c1d8bf4d9f11044093d896f63a85b0e07c55e88e723855f566f42a9924f739"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_markdown::markdown_render_support::render_table_aligned (cognitive 52): jcode_tui_markdown::markdown_render_support::render_table_aligned has cognitive complexity 52 (threshold 15). Drivers by points: if/else 13 (30 pts), loops 7 (17 pts), match/switch 1 (4 pts), boolean chains 1 (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_support.rs"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"c32ddc4a4ffd3550b422b930236893f63bcc1fa5d1df1652a615737c9194e46d"}},{"ruleId":"D2","level":"warning","message":{"text":"Listener::poll (cognitive 52): Listener::poll has cognitive complexity 52 (threshold 15). Drivers by points: if/else 17 (28 pts), match/switch 5 (16 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-voice/src/global/hotkey.rs"},"region":{"startLine":694}}}],"partialFingerprints":{"codehealthFindingId/v1":"3400e13b2d56521e22013c228ed26eb6949502c68b979508a4f31d01763d0163"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::commands::run_single_message_command_ndjson (cognitive 52): jcode::cli::commands::run_single_message_command_ndjson has cognitive complexity 52 (threshold 15). Drivers by points: if/else 12 (34 pts), match/switch 4 (10 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":3106}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcba6175fe0040a2c81fa2f5f6dbe16379f8c2c2f6867a1f165515086d405a03"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::dispatch::run_main (cognitive 52): jcode::cli::dispatch::run_main has cognitive complexity 52 (threshold 15). Drivers by points: if/else 26 (35 pts), match/switch 8 (15 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/dispatch.rs"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"50b0364023da56605b432e0596d47a0d34a6fc8ba4847a8a5ff55de9bd9f3afb"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::ssh_transport::accept_connections (cognitive 52): jcode::cli::ssh_transport::accept_connections has cognitive complexity 52 (threshold 15). Drivers by points: if/else 13 (39 pts), match/switch 4 (11 pts), loops 2 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/ssh_transport.rs"},"region":{"startLine":522}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d5a6bc3f8f18bdd450bb873e7e6a126a34b7b4137f4e4f73165d40cd9648bf3"}},{"ruleId":"D2","level":"warning","message":{"text":"ConversationSearchTool::execute (cognitive 51): ConversationSearchTool::execute has cognitive complexity 51 (threshold 15). Drivers by points: if/else 14 (28 pts), match/switch 3 (13 pts), loops 3 (10 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/conversation_search.rs"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"14d45743c88ed6c67f44e3a134252984dbe3ff05b0349b8cfdb88d735b90f026"}},{"ruleId":"D2","level":"warning","message":{"text":"ResponsesStream::parse_event (cognitive 51): ResponsesStream::parse_event has cognitive complexity 51 (threshold 15). Drivers by points: if/else 23 (45 pts), boolean chains 5, match/switch 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/opencode_go_responses.rs"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d918b132251e83448f82757ae24f903f214e8bb7b85634fe678ae6252fe5ac7"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_style::harmony::generate::separate_confusable_pairs (cognitive 51): jcode_tui_style::harmony::generate::separate_confusable_pairs has cognitive complexity 51 (threshold 15). Drivers by points: if/else 13 (24 pts), loops 10 (20 pts), match/switch 3 (6 pts), boolean chains 1 (nesting depth added 24). Of this number, 37 points are the body\u0027s own statements and 14 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-style/src/harmony/generate.rs"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecc7fffe31a4db427107b6e85f6e59ec957ac0de04675f33d73c810cd2bd7a40"}},{"ruleId":"D2","level":"warning","message":{"text":"cloud_directories_probe.collect (cognitive 51): cloud_directories_probe.collect has cognitive complexity 51 (threshold 15). Drivers by points: if/else 16 (29 pts), boolean chains 9, loops 6 (7 pts), error handling 2 (4 pts), ternaries 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/cloud_directories_probe.py"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"01030f424363b8f9328b462e278e5a9922c64bccefb36f22c522673392d5c2d7"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::mobile_sync::sync_pass (cognitive 50): jcode_base::mobile_sync::sync_pass has cognitive complexity 50 (threshold 15). Drivers by points: if/else 22 (37 pts), loops 4 (7 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mobile_sync.rs"},"region":{"startLine":708}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac8a37850e016876ba6faa8d8b61a26d58e0edbf51f660194f8dabf10098dcff"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_schema_dialect::dialect::walk (cognitive 50): jcode_schema_dialect::dialect::walk has cognitive complexity 50 (threshold 15). Drivers by points: if/else 11 (27 pts), match/switch 5 (15 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-schema-dialect/src/dialect.rs"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"c001b516a1123f7a55dae8a4e1bce5041716d375ce3ecbb2113c6d6ff4e2e69b"}},{"ruleId":"D2","level":"warning","message":{"text":"App::run (cognitive 50): App::run has cognitive complexity 50 (threshold 15). Drivers by points: if/else 19 (41 pts), match/switch 2 (6 pts), boolean chains 2, loops 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/run_shell.rs"},"region":{"startLine":759}}}],"partialFingerprints":{"codehealthFindingId/v1":"815a65cdff9e9f158a088e74fb0f2d60fb8024a1efb55465eacfbcbf9bca9307"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::auth_account_commands::parse_account_command (cognitive 50): jcode_tui::tui::app::auth_account_commands::parse_account_command has cognitive complexity 50 (threshold 15). Drivers by points: if/else 18 (43 pts), match/switch 3 (6 pts), boolean chains 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_commands.rs"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"8624e6f6cae41c7d234eccc47ff45f6092bab4c4da86aab64c0d087f4214a7fe"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_todo_stages::push_stage_lines (cognitive 50): jcode_tui::tui::ui_todo_stages::push_stage_lines has cognitive complexity 50 (threshold 15). Drivers by points: if/else 17 (37 pts), loops 3 (7 pts), boolean chains 6 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_todo_stages.rs"},"region":{"startLine":868}}}],"partialFingerprints":{"codehealthFindingId/v1":"921db8f57596bd20cc0b9db2de13b7565a783d6b9b02fbb27eeb231d72583790"}},{"ruleId":"D2","level":"warning","message":{"text":"JcodeClient.globalEvents (cognitive 50): JcodeClient.globalEvents has cognitive complexity 50 (threshold 15). Drivers by points: if/else 29 (33 pts), boolean chains 7, ternaries 2 (6 pts), error handling 2, loops 2 (nesting depth added 8). Most of this is not in the body itself: 8 of the 50 points are its own statements and the rest belongs to 7 function items inside it that branch (startChild, scan, finish, \u2026). The named helpers are already separate functions; the literals\u0027 work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal\u0027s work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/typescript/src/client.ts"},"region":{"startLine":1148}}}],"partialFingerprints":{"codehealthFindingId/v1":"49b8248cbc731fb10b03be10c7d6cdfb414561f03420e19cc8f098c866f694b9"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::provider_catalog::apply_named_provider_profile_env_from_config (cognitive 49): jcode_base::provider_catalog::apply_named_provider_profile_env_from_config has cognitive complexity 49 (threshold 15). Drivers by points: if/else 25 (42 pts), match/switch 3 (5 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider_catalog.rs"},"region":{"startLine":935}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ffa9aa392ceb24769acb2c1899413f445457e1fe119a84bc106ddb3c24a203f"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_fuzzy::run_dp (cognitive 49): jcode_fuzzy::run_dp has cognitive complexity 49 (threshold 15). Drivers by points: if/else 12 (32 pts), boolean chains 10, loops 5 (7 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-fuzzy/src/lib.rs"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f6a528661a851265d6c6b406cfd59004e30017fb9b0ba881ee21491a4e4993a"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::state_ui::format_cache_stats (cognitive 49): jcode_tui::tui::app::state_ui::format_cache_stats has cognitive complexity 49 (threshold 15). Drivers by points: if/else 34 (37 pts), boolean chains 8, loops 1 (2 pts), match/switch 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui.rs"},"region":{"startLine":1225}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad2cc88765ed2aae98fc684951f620818d9c1b4c4cfa50f15826f217cbf5702b"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::render_compact_agent_notification (cognitive 49): jcode_tui::tui::ui_messages::render_compact_agent_notification has cognitive complexity 49 (threshold 15). Drivers by points: if/else 26 (40 pts), loops 3 (5 pts), boolean chains 3, match/switch 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":3350}}}],"partialFingerprints":{"codehealthFindingId/v1":"d25839810114697ea939db270a35681d7c6c9318369f8ddbc4f1e7f41ec0b2a8"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_render::swarm_gallery::hovered_detail_body (cognitive 49): jcode_tui_render::swarm_gallery::hovered_detail_body has cognitive complexity 49 (threshold 15). Drivers by points: if/else 15 (33 pts), loops 3 (8 pts), match/switch 2 (8 pts) (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/swarm_gallery.rs"},"region":{"startLine":1705}}}],"partialFingerprints":{"codehealthFindingId/v1":"812f3b7ed541ed02c399611529b41953c57db9d24a12cfbea5274cfd947a3923"}},{"ruleId":"D2","level":"warning","message":{"text":"Registry::register_mcp_tools_for_dir (cognitive 48): Registry::register_mcp_tools_for_dir has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (37 pts), loops 4 (10 pts), boolean chains 1 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/mod.rs"},"region":{"startLine":1647}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9db35da352524f750a754cdac122c8e70403e143f0acddf270dd996e0dd6a3a"}},{"ruleId":"D2","level":"warning","message":{"text":"MultiProvider::set_model_on_provider_with_credential_modes (cognitive 48): MultiProvider::set_model_on_provider_with_credential_modes has cognitive complexity 48 (threshold 15). Drivers by points: if/else 18 (36 pts), match/switch 4 (10 pts), boolean chains 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/mod.rs"},"region":{"startLine":1164}}}],"partialFingerprints":{"codehealthFindingId/v1":"76620221c0c78b429b6fe385b93e804322ab6e280bea979a049c74c6bd1da68c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::provider::models_catalog::parse_openai_model_catalog (cognitive 48): jcode_base::provider::models_catalog::parse_openai_model_catalog has cognitive complexity 48 (threshold 15). Drivers by points: if/else 14 (41 pts), loops 3 (7 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/models_catalog.rs"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"b53e1f15b3d2bfc3c90742787d54e219e2b3781128bf49bca8507bd1cc2291a7"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::handterm_native_scroll::bridge_thread (cognitive 48): jcode_tui::tui::app::handterm_native_scroll::bridge_thread has cognitive complexity 48 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 7 (16 pts), match/switch 2 (8 pts), boolean chains 2 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/handterm_native_scroll.rs"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"f859b1b021018342d3c0190dd57a2ea5bcc81645ba6fb434e46914b39359f537"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_file_diff::build_file_diff_cache_entry (cognitive 48): jcode_tui::tui::ui_file_diff::build_file_diff_cache_entry has cognitive complexity 48 (threshold 15). Drivers by points: if/else 15 (32 pts), loops 7 (12 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_file_diff.rs"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2a81f741e753602deb26f665217e362caec054af7b91563c7827cfb4430740d"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_mermaid::mermaid_inline::dimensions_from_header (cognitive 48): jcode_tui_mermaid::mermaid_inline::dimensions_from_header has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (32 pts), boolean chains 14, loops 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_inline.rs"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"3504ba086c0755c21fbd0f6af04cbeccd456bda36246b61151b19810e1d3a076"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_mermaid::mermaid_viewport::render_image_widget_viewport_precise (cognitive 48): jcode_tui_mermaid::mermaid_viewport::render_image_widget_viewport_precise has cognitive complexity 48 (threshold 15). Drivers by points: if/else 26 (36 pts), boolean chains 9, match/switch 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_viewport.rs"},"region":{"startLine":1355}}}],"partialFingerprints":{"codehealthFindingId/v1":"95e880895adf2961fc5587e1ad8a5e93f32f424c7c7e5a28981b1ea4ea05e2c6"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::cloud_group_run::run_migrate (cognitive 48): jcode::cli::cloud_group_run::run_migrate has cognitive complexity 48 (threshold 15). Drivers by points: if/else 23 (37 pts), loops 5 (6 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_group_run.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d8afc3ff9db97777fd14efc374d6415155cf98d1e7bb39fcdaf9566d60e1df2"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::swarm_persistence::load_runtime_state (cognitive 47): jcode_app_core::server::swarm_persistence::load_runtime_state has cognitive complexity 47 (threshold 15). Drivers by points: if/else 17 (41 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/swarm_persistence.rs"},"region":{"startLine":500}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cb2bc2dc204e31adaa2518c9e35e8cdd80aefa30fccee239a0db218040ab1b5"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::usage_openai::parse_openai_usage_payload (cognitive 47): jcode_app_core::usage_openai::parse_openai_usage_payload has cognitive complexity 47 (threshold 15). Drivers by points: if/else 12 (31 pts), loops 4 (11 pts), boolean chains 5 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_openai.rs"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"0839691cdf2e02c48503ae6d48fc029dec03301a0dda21d7a70cf3c0d242f779"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::usage::openai_helpers::parse_openai_usage_payload (cognitive 47): jcode_base::usage::openai_helpers::parse_openai_usage_payload has cognitive complexity 47 (threshold 15). Drivers by points: if/else 12 (31 pts), loops 4 (11 pts), boolean chains 5 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/openai_helpers.rs"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"36e8ac2e57da130a7446218ca820b8a7ebf3f202efa95312e3fa01a32377ddac"}},{"ruleId":"D2","level":"warning","message":{"text":"GeminiProvider::complete (cognitive 47): GeminiProvider::complete has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (31 pts), match/switch 5 (9 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 25). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-gemini-runtime/src/lib.rs"},"region":{"startLine":605}}}],"partialFingerprints":{"codehealthFindingId/v1":"889c64592f6ef219f4da047a3b4be6cb8d8b4ba48f4472b25a0fcb2bf6328253"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::helpers_rate_limit_parse::parse_rate_limit_error (cognitive 47): jcode_tui::tui::app::helpers_rate_limit_parse::parse_rate_limit_error has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (26 pts), loops 4 (8 pts), boolean chains 7, match/switch 2 (6 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/helpers_rate_limit_parse.rs"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"c44a6358adc360851fde52dcf7a8959bc267c6bd5f43afdbda9ada1dbb868ed2"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::model_context_commands::handle_model_command (cognitive 47): jcode_tui::tui::app::model_context_commands::handle_model_command has cognitive complexity 47 (threshold 15). Drivers by points: if/else 23 (31 pts), match/switch 7 (15 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/model_context_commands.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"b846b18bb1ef6109229d8a6b487a08596adb71c978d9824d6a1c3c81d5343b95"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_prepare::prepare_messages_inner (cognitive 47): jcode_tui::tui::ui_prepare::prepare_messages_inner has cognitive complexity 47 (threshold 15). Drivers by points: if/else 24 (37 pts), boolean chains 7, loops 1 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_prepare.rs"},"region":{"startLine":665}}}],"partialFingerprints":{"codehealthFindingId/v1":"29159dc9ce9e3e63e531407ba98cbf1c23553a32b35596fc2605f4fb29e70f93"}},{"ruleId":"D2","level":"warning","message":{"text":"AmbientRunnerHandle::run_loop (cognitive 46): AmbientRunnerHandle::run_loop has cognitive complexity 46 (threshold 15). Drivers by points: if/else 10 (21 pts), match/switch 8 (21 pts), boolean chains 3, loops 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/ambient/runner.rs"},"region":{"startLine":555}}}],"partialFingerprints":{"codehealthFindingId/v1":"38d962317014a0b1ae7f4605529a337b47d41757f65c853c56979232f06e4f94"}},{"ruleId":"D2","level":"warning","message":{"text":"InitiativeTool::execute (cognitive 46): InitiativeTool::execute has cognitive complexity 46 (threshold 15). Drivers by points: if/else 21 (41 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 22). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/goal.rs"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e5152f008fd9d640b10a15b249a382b2f6c367dd63cd2a4c0c1d7c108f3c91c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::replay::auto_edit_timeline (cognitive 46): jcode_app_core::replay::auto_edit_timeline has cognitive complexity 46 (threshold 15). Drivers by points: if/else 13 (42 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/replay.rs"},"region":{"startLine":732}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d7853455ae6d0e563f463d9cd5daae96900aeb993cd89c7e29f8a893f874fed"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::client_disconnect_cleanup::cleanup_client_connection (cognitive 46): jcode_app_core::server::client_disconnect_cleanup::cleanup_client_connection has cognitive complexity 46 (threshold 15). Drivers by points: if/else 19 (31 pts), match/switch 4 (9 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_disconnect_cleanup.rs"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"35a72e565ae5ef3536628478058af117bb0b745e3ccb1b4984fc3a0183c87b79"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::update::download_and_install_blocking_with_progress (cognitive 46): jcode_app_core::update::download_and_install_blocking_with_progress has cognitive complexity 46 (threshold 15). Drivers by points: if/else 18 (36 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/update.rs"},"region":{"startLine":960}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b0b38006a3fb09d54106eb37962786f6927594f38219b335331e7c7c2497199"}},{"ruleId":"D2","level":"warning","message":{"text":"App::open_model_picker_inner (cognitive 46): App::open_model_picker_inner has cognitive complexity 46 (threshold 15). Drivers by points: if/else 29 (42 pts), boolean chains 4 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":1161}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e6cb343b274dd97a244eb148b4e909b4a263c5aeba0304cf3474a3686eff536"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::render_swarm_message (cognitive 46): jcode_tui::tui::ui_messages::render_swarm_message has cognitive complexity 46 (threshold 15). Drivers by points: if/else 28 (39 pts), loops 3 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":3611}}}],"partialFingerprints":{"codehealthFindingId/v1":"58dbbcdedc9caa2ffb1b95971b474467318e85fd511674ee43810be658ffdff1"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_mermaid::mermaid_cache_render::render_mermaid_deferred_inner (cognitive 46): jcode_tui_mermaid::mermaid_cache_render::render_mermaid_deferred_inner has cognitive complexity 46 (threshold 15). Drivers by points: if/else 16 (36 pts), boolean chains 6, match/switch 2 (4 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_cache_render.rs"},"region":{"startLine":1030}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ff3772ee65f6a2915a69bee96478ebc9a094dc61e7585849468796e2e6cc821"}},{"ruleId":"D2","level":"warning","message":{"text":"insertTurnDetails (cognitive 46): insertTurnDetails has cognitive complexity 46 (threshold 15). Drivers by points: boolean chains 34, other 10, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":1579}}}],"partialFingerprints":{"codehealthFindingId/v1":"9869422c14ad9cda0bcf7fdb17e1e33fec7021c5eb9b7da4913a3416075efd86"}},{"ruleId":"D2","level":"warning","message":{"text":"Registry::execute (cognitive 45): Registry::execute has cognitive complexity 45 (threshold 15). Drivers by points: if/else 19 (28 pts), boolean chains 10, loops 2 (4 pts), match/switch 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/mod.rs"},"region":{"startLine":1053}}}],"partialFingerprints":{"codehealthFindingId/v1":"c985f9288d1a61831d05fcaa9bc3ab4a1f4da30e90a00a614ade29d90a3d7f25"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::debug_ambient::maybe_handle_ambient_command (cognitive 45): jcode_app_core::server::debug_ambient::maybe_handle_ambient_command has cognitive complexity 45 (threshold 15). Drivers by points: if/else 32 (45 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_ambient.rs"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f153bb36904cbec6da1dc16e481b774774ed09bac9a63ee28cafdd90e4e0178"}},{"ruleId":"D2","level":"warning","message":{"text":"MultiProvider::cross_provider_pool_prompt (cognitive 45): MultiProvider::cross_provider_pool_prompt has cognitive complexity 45 (threshold 15). Drivers by points: if/else 19 (27 pts), boolean chains 9, match/switch 3 (5 pts), loops 3 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/multi_provider.rs"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"b74bc5d7f3e74ebbb578f367245d1367acf8b00a016ca651fe7c00e32656ba0e"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::mobile_runner_events::spawn_with (cognitive 45): jcode_base::mobile_runner_events::spawn_with has cognitive complexity 45 (threshold 15). Drivers by points: if/else 5 (23 pts), match/switch 3 (14 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mobile_runner_events.rs"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc60a3982388f9a284de7de3b4bc61afa6a7abf30ee7da0e4724f9c9c0970082"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionPicker::run_with_session_updates (cognitive 45): SessionPicker::run_with_session_updates has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (24 pts), match/switch 5 (18 pts), boolean chains 2, loops 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker.rs"},"region":{"startLine":2417}}}],"partialFingerprints":{"codehealthFindingId/v1":"d60e94437971223c67cc566fa5f54ac0d42810c16bcf81e0b05bf834a017381a"}},{"ruleId":"D2","level":"warning","message":{"text":"remote.recent_messages (cognitive 45): remote.recent_messages has cognitive complexity 45 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 5 (14 pts), ternaries 1 (7 pts), boolean chains 4 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/cloud_preview/remote.py"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2ec5859eaa35ef047c721959e8c4584405192f19f19d14c0a4997857f7b7efb"}},{"ruleId":"D2","level":"warning","message":{"text":"MultiProvider::handle_auth_changed (cognitive 44): MultiProvider::handle_auth_changed has cognitive complexity 44 (threshold 15). Drivers by points: if/else 24 (32 pts), boolean chains 10, match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/mod.rs"},"region":{"startLine":1444}}}],"partialFingerprints":{"codehealthFindingId/v1":"f546a2eb3813632b364b51c0609a89708c82eea0f50049ee1c18427bf89bb097"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::import::import_codex_session_from_path (cognitive 44): jcode_base::import::import_codex_session_from_path has cognitive complexity 44 (threshold 15). Drivers by points: if/else 19 (40 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/import.rs"},"region":{"startLine":1069}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0bf937b984aa1d60c19c796f09c6610ff2d8ee88152e83fa3e66649a332f10d"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_login_completed (cognitive 44): App::handle_login_completed has cognitive complexity 44 (threshold 15). Drivers by points: if/else 21 (34 pts), boolean chains 8, match/switch 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth.rs"},"region":{"startLine":3111}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb3540891f29f74213d5ff5f77b04a4f2060986235d7b0c90fc58a90478d4fe5"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::remote::apply_terminal_event (cognitive 44): jcode_tui::tui::app::remote::apply_terminal_event has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (34 pts), match/switch 3 (9 pts), boolean chains 1 (nesting depth added 28). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote.rs"},"region":{"startLine":582}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb557742c78486f0a5b7c6c396ca354985eaed2cf7da654e1b08e7a32dd89f72"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::info_widget_swarm_background::render_swarm_dock (cognitive 44): jcode_tui::tui::info_widget_swarm_background::render_swarm_dock has cognitive complexity 44 (threshold 15). Drivers by points: if/else 30 (42 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_swarm_background.rs"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fe62b4568f85c8ce39e2cf714c493a7c7c571839a6b104134bba52571191422"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_mermaid::mermaid_cache_render::render_mermaid_sized_internal (cognitive 44): jcode_tui_mermaid::mermaid_cache_render::render_mermaid_sized_internal has cognitive complexity 44 (threshold 15). Drivers by points: if/else 29 (42 pts), boolean chains 1, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_cache_render.rs"},"region":{"startLine":1173}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9975a2e282b66e8902eeb2fb806a5eb705fe232243f4ab26eaa79600f567059"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::runtime_ssh_accounts::execute (cognitive 43): jcode_app_core::server::runtime_ssh_accounts::execute has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (28 pts), match/switch 4 (8 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/runtime_ssh_accounts.rs"},"region":{"startLine":380}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f0491a97f4570f418a4b8c29be67634fcd15ca6165bcf756013c82c0488643e"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::auth::transfer::import_cloud_inner (cognitive 43): jcode_base::auth::transfer::import_cloud_inner has cognitive complexity 43 (threshold 15). Drivers by points: if/else 16 (26 pts), match/switch 6 (11 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/transfer.rs"},"region":{"startLine":1016}}}],"partialFingerprints":{"codehealthFindingId/v1":"286251aca4059cb66e2173abb25a543420a22eb78969b507ecfa7f656479f711"}},{"ruleId":"D2","level":"warning","message":{"text":"BedrockProvider::refresh_catalog_with_client (cognitive 43): BedrockProvider::refresh_catalog_with_client has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (30 pts), loops 4 (8 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-bedrock/src/lib.rs"},"region":{"startLine":1052}}}],"partialFingerprints":{"codehealthFindingId/v1":"5da3ea28286bec049ea629039300abd9501ec0b6668db2d11007b3e0008e9b57"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_schema_dialect::dialect::flatten_top_level_combiners (cognitive 43): jcode_schema_dialect::dialect::flatten_top_level_combiners has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 5 (14 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-schema-dialect/src/dialect.rs"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"1097dc667dabbe4dd730aba73a17b8327bc29902958824a0cea6a6fe8b534c0e"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::input::handle_pre_control_shortcuts (cognitive 43): jcode_tui::tui::app::input::handle_pre_control_shortcuts has cognitive complexity 43 (threshold 15). Drivers by points: if/else 31 (34 pts), boolean chains 7, match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":2359}}}],"partialFingerprints":{"codehealthFindingId/v1":"96169016030203bd3d09bc79d0ed4d449da141eb6f9903a446b82aba94fc4f0b"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::remote::reconnect::handle_post_connect (cognitive 43): jcode_tui::tui::app::remote::reconnect::handle_post_connect has cognitive complexity 43 (threshold 15). Drivers by points: if/else 21 (32 pts), boolean chains 11 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/reconnect.rs"},"region":{"startLine":717}}}],"partialFingerprints":{"codehealthFindingId/v1":"b79075a520261ef2335bc4df65e7b90101108e0f9cc987ac98be63d0adcb911f"}},{"ruleId":"D2","level":"warning","message":{"text":"launch.launchInstance (cognitive 43): launch.launchInstance has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (23 pts), error handling 5 (10 pts), ternaries 4 (6 pts), loops 3 (4 pts) (nesting depth added 17). Of this number, 17 points are the body\u0027s own statements and 26 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/typescript/src/launch.ts"},"region":{"startLine":522}}}],"partialFingerprints":{"codehealthFindingId/v1":"da4b4f372e2a7729455a02f04a973f578d0091ba9286add0132f8e6e9509dc24"}},{"ruleId":"D2","level":"warning","message":{"text":"TelegramChannel::reply_loop (cognitive 42): TelegramChannel::reply_loop has cognitive complexity 42 (threshold 15). Drivers by points: if/else 9 (28 pts), match/switch 3 (10 pts), loops 2 (4 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/channel.rs"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0bd2022b736fedb940c288594a4572b51eb3e19a895de594f5ded1089c30a98"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::ambient::prompt::build_ambient_system_prompt (cognitive 42): jcode_app_core::ambient::prompt::build_ambient_system_prompt has cognitive complexity 42 (threshold 15). Drivers by points: if/else 20 (24 pts), loops 5 (12 pts), match/switch 2 (6 pts) (nesting depth added 15). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/ambient/prompt.rs"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc3a349a8904a48e96af79c82fbc93e429d83bc0819407fd911c8ea67ddce5be"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::mcp::remote::streamable_post_inner (cognitive 42): jcode_base::mcp::remote::streamable_post_inner has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 10, loops 2 (5 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mcp/remote.rs"},"region":{"startLine":610}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bcadca8a552bb4388cf77dcde724e8b9dac47c50774aecbcae4bbbd7d90a9f3"}},{"ruleId":"D2","level":"warning","message":{"text":"App::submit_input (cognitive 42): App::submit_input has cognitive complexity 42 (threshold 15). Drivers by points: if/else 27 (37 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":3906}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf23dcacf7c887392440999b77892c9cec39b4eae6dfa59f10410eaf518ee7c1"}},{"ruleId":"D2","level":"warning","message":{"text":"TranscriptSearch::poll (cognitive 42): TranscriptSearch::poll has cognitive complexity 42 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 5 (10 pts), match/switch 3 (7 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/transcript_search.rs"},"region":{"startLine":613}}}],"partialFingerprints":{"codehealthFindingId/v1":"e11d85baf16191fd84fd47c266bb279d3b7509ce0a7e6fc970f3efac1c5e97b5"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::commands::handle_config_command (cognitive 42): jcode_tui::tui::app::commands::handle_config_command has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17 (22 pts), match/switch 6 (16 pts), boolean chains 4 (nesting depth added 15). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":3479}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab59fda2ce404e0fa0f6113f2778f616f839516805950938317cc55433562e19"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::commands_cloud::start_cloud_command (cognitive 42): jcode_tui::tui::app::commands_cloud::start_cloud_command has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (28 pts), match/switch 5 (6 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_cloud.rs"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d78bc3676ba4ca28bb357e23249f1cd996dcd64c95c0d2f5958f57896e0c956"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_diagram_pane::draw_pinned_diagram (cognitive 42): jcode_tui::tui::ui_diagram_pane::draw_pinned_diagram has cognitive complexity 42 (threshold 15). Drivers by points: if/else 24 (31 pts), match/switch 2 (6 pts), boolean chains 5 (nesting depth added 11). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_diagram_pane.rs"},"region":{"startLine":779}}}],"partialFingerprints":{"codehealthFindingId/v1":"3226485000680deb4e76847791ea144223e4bff7d8ab2b9c2eda4354d0571150"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_input::overscroll_fact_spans (cognitive 42): jcode_tui::tui::ui_input::overscroll_fact_spans has cognitive complexity 42 (threshold 15). Drivers by points: if/else 23 (35 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_input.rs"},"region":{"startLine":1674}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b784fffd06c3c39b63e78e0814951a9620ffecaf315f3664a072f8813cd2e68"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::agentgrep::context::collect_trace_exposure (cognitive 41): jcode_app_core::tool::agentgrep::context::collect_trace_exposure has cognitive complexity 41 (threshold 15). Drivers by points: if/else 14 (36 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/agentgrep/context.rs"},"region":{"startLine":444}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4957b6414a9ed0ff8084ac26cbe23e1cdb7ed744eb9c4fcc89fb9498619d008"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::mcp::oauth::www_authenticate_param (cognitive 41): jcode_base::mcp::oauth::www_authenticate_param has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (30 pts), boolean chains 6, loops 3 (5 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mcp/oauth.rs"},"region":{"startLine":655}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb79e3e068e68916cb386fbbed37dc506374775efc9ce765a0c278d8f043fdda"}},{"ruleId":"D2","level":"warning","message":{"text":"ChannelIndex::remove_session (cognitive 41): ChannelIndex::remove_session has cognitive complexity 41 (threshold 15). Drivers by points: if/else 9 (31 pts), loops 4 (10 pts) (nesting depth added 28). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-swarm-core/src/lib.rs"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"908a02762926bd1138b11540b6ae7190877ef14e96610aa1672dcdb9003262c3"}},{"ruleId":"D2","level":"warning","message":{"text":"App::run_scroll_test (cognitive 41): App::run_scroll_test has cognitive complexity 41 (threshold 15). Drivers by points: if/else 16 (23 pts), match/switch 4 (9 pts), loops 6 (8 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_bench.rs"},"region":{"startLine":717}}}],"partialFingerprints":{"codehealthFindingId/v1":"94c01d14c0fe7d210986c1f5e968135ea6af497d33691410f10b60aae2ece722"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::info_widget_git::render_dual_git (cognitive 41): jcode_tui::tui::info_widget_git::render_dual_git has cognitive complexity 41 (threshold 15). Drivers by points: if/else 16 (32 pts), loops 2 (4 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_git.rs"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d3aa68aa1f7249cfd2a0b613c13e642be251d31eb086a9face3ae4a3cf9d016"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::video_export::find_mermaid_regions (cognitive 41): jcode_tui::video_export::find_mermaid_regions has cognitive complexity 41 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 6 (16 pts), boolean chains 2 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/video_export.rs"},"region":{"startLine":518}}}],"partialFingerprints":{"codehealthFindingId/v1":"dba4070e6b97e38c11a92b4104df80da4b4271a5388e59282283471abf03f1f2"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_mermaid::mermaid_widget::render_image_widget (cognitive 41): jcode_tui_mermaid::mermaid_widget::render_image_widget has cognitive complexity 41 (threshold 15). Drivers by points: if/else 24 (34 pts), boolean chains 7 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_widget.rs"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8620a7fb8b9d5e053eb9fb0e33efe96a1a91e9b2a43e3cd157ae937d3355435"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::cloud_group_receive::activate (cognitive 41): jcode::cli::cloud_group_receive::activate has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (32 pts), loops 4 (6 pts), boolean chains 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_group_receive.rs"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f7569e6f3078e940ac71d9e508f82876d1653a214e8e76f0809ec1a33059d1f"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::commands::run_server_stop_command (cognitive 41): jcode::cli::commands::run_server_stop_command has cognitive complexity 41 (threshold 15). Drivers by points: if/else 20 (31 pts), boolean chains 5, match/switch 1 (3 pts), loops 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":2477}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4f3faeeb05bdebd0d96491292e111b0f72169de940fc45e5207901909af0a77"}},{"ruleId":"D2","level":"warning","message":{"text":"remote.main (cognitive 41): remote.main has cognitive complexity 41 (threshold 15). Drivers by points: if/else 8 (20 pts), ternaries 4 (10 pts), boolean chains 5, loops 2 (4 pts), error handling 1 (2 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/cloud_preview/remote.py"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"f31f4461e9f809d134edd8ca9d53217a9ebe90e75782b8b539468ab7ec0e6074"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::headless::create_headless_session (cognitive 40): jcode_app_core::server::headless::create_headless_session has cognitive complexity 40 (threshold 15). Drivers by points: if/else 28 (36 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/headless.rs"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"0976445f9ec4656f0928d2a206565fcc8789b55ffe84da0f5101b09bf7a899e6"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::todo::flatten_phases (cognitive 40): jcode_app_core::tool::todo::flatten_phases has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (33 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/todo.rs"},"region":{"startLine":578}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f18db1ca648aeab4bf6379dbebb212a4aae5463aa1e82bb5d62f2467af94e6b"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::auth::assessment_for_key (cognitive 40): jcode_base::auth::assessment_for_key has cognitive complexity 40 (threshold 15). Drivers by points: if/else 26 (39 pts), match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/mod.rs"},"region":{"startLine":1119}}}],"partialFingerprints":{"codehealthFindingId/v1":"d02e6ba8d801cadb8037ae43fae950fff523ad63ba3fe9a7eccabf6ea8ac0b0e"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_anthropic_runtime::stream_response (cognitive 40): jcode_provider_anthropic_runtime::stream_response has cognitive complexity 40 (threshold 15). Drivers by points: if/else 17 (26 pts), loops 3 (6 pts), boolean chains 4, match/switch 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic-runtime/src/lib.rs"},"region":{"startLine":2266}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8bd5ae7425c5ea18b4e29129d04974b8cbc1d7ee602fbd71d81cd13dbb53157"}},{"ruleId":"D2","level":"warning","message":{"text":"AntigravityProvider::complete (cognitive 40): AntigravityProvider::complete has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (26 pts), match/switch 5 (10 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-antigravity-runtime/src/lib.rs"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa6fbf12492369b3d0558f9636eff908fa8d9b4ab64af5797a0f1b65f514587f"}},{"ruleId":"D2","level":"warning","message":{"text":"CopilotApiProvider::stream_request (cognitive 40): CopilotApiProvider::stream_request has cognitive complexity 40 (threshold 15). Drivers by points: if/else 15 (29 pts), match/switch 3 (6 pts), boolean chains 4, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-copilot-runtime/src/lib.rs"},"region":{"startLine":417}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a46999013db21a695467c896f9c439b12b7fa10caac4cb69bf436f8141eecd7"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_key_core (cognitive 40): App::handle_key_core has cognitive complexity 40 (threshold 15). Drivers by points: if/else 29 (32 pts), boolean chains 6, match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":3121}}}],"partialFingerprints":{"codehealthFindingId/v1":"02be24604edb5d218a04cc206058f2f1772617789d1efd305339f8f1ff78a34d"}},{"ruleId":"D2","level":"warning","message":{"text":"remote.project (cognitive 40): remote.project has cognitive complexity 40 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 4 (9 pts), boolean chains 6, ternaries 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/cloud_preview/remote.py"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"0908fb33ab845f5c3a23a1bcfd32cbb47ab7e97ca26ebd6857712be4f3f0fe56"}},{"ruleId":"D2","level":"warning","message":{"text":"DiscordChannel::reply_loop (cognitive 39): DiscordChannel::reply_loop has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (31 pts), loops 2 (4 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/channel.rs"},"region":{"startLine":397}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9a050a0e4389ec58b3480906014ab1778d27ba8e11acfee9a0e61f44efeeb19"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::import::list_claude_code_sessions (cognitive 39): jcode_base::import::list_claude_code_sessions has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (29 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/import.rs"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"a82c88e96c90d366c930f1460d4899c1bbf419f6b6a0ac9c4c1ecac5e2a484d3"}},{"ruleId":"D2","level":"warning","message":{"text":"BedrockProvider::bedrock_input_schema (cognitive 39): BedrockProvider::bedrock_input_schema has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 5 (14 pts), boolean chains 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-bedrock/src/lib.rs"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"6766d11ef54206015ba72eafcd24d78c8f52919a94a82ccbb46c85766cb5032a"}},{"ruleId":"D2","level":"warning","message":{"text":"App::open_agent_model_picker (cognitive 39): App::open_agent_model_picker has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (21 pts), loops 6 (15 pts), boolean chains 3 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive/openers.rs"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"c58717f5869a1d6fc68e8c6509f8a985ea87e0c879a39a3f0c5693494a9bc1d9"}},{"ruleId":"D2","level":"warning","message":{"text":"App::run_fix_command (cognitive 39): App::run_fix_command has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (19 pts), match/switch 4 (15 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/model_context.rs"},"region":{"startLine":2013}}}],"partialFingerprints":{"codehealthFindingId/v1":"259cd5c69bc3af50e3d715c3a97d290b39c2c0e56fb57d4f7ae5e22cea1e2b42"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::remote::handle_disconnected_key_internal (cognitive 39): jcode_tui::tui::app::remote::handle_disconnected_key_internal has cognitive complexity 39 (threshold 15). Drivers by points: if/else 24 (32 pts), match/switch 3 (5 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote.rs"},"region":{"startLine":2197}}}],"partialFingerprints":{"codehealthFindingId/v1":"945fde151dfb99e3c0a7a3b0cfbaef21702dac750dd35cd84e89b1c9eed3e952"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::session_picker::loading::load_sessions_inner (cognitive 39): jcode_tui::tui::session_picker::loading::load_sessions_inner has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (31 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading.rs"},"region":{"startLine":1921}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcc29dedeeb88021b5f342f54c239fa2d399d6a84c40253f3f98c4f5aeb2e30c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_mermaid::mermaid_kitty_classic::finish_terminal_image_frame (cognitive 39): jcode_tui_mermaid::mermaid_kitty_classic::finish_terminal_image_frame has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (20 pts), loops 7 (11 pts), boolean chains 4, match/switch 1 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_kitty_classic.rs"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"f52df30cbde414af0302707da238bd6fb1352f74d076c02d1aac6b0b9e2ad6d6"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_voice::command_capture::run_recorder (cognitive 39): jcode_voice::command_capture::run_recorder has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 5 (8 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-voice/src/command_capture.rs"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"47e5432c8539587adb1f2e37f7f51e3b975b2a87bfe9fe91e4f6fc41113859aa"}},{"ruleId":"D2","level":"warning","message":{"text":"BackgroundTaskManager::cleanup_filtered (cognitive 38): BackgroundTaskManager::cleanup_filtered has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (30 pts), match/switch 1 (4 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/background/cleanup.rs"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2d18477e7975f51e1fbeff5195f18128e0f6225d305da0b68f896032fe42fb3"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::gateway::handle_ws_connection (cognitive 38): jcode_base::gateway::handle_ws_connection has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (30 pts), match/switch 3 (5 pts), loops 3 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/gateway.rs"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9dc07ed4fe685211c170e3ce6c54d19588553c0f8b5479b8a84d284f25c45ee"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_anthropic::history_repair::rewrite_orphaned_tool_results (cognitive 38): jcode_provider_anthropic::history_repair::rewrite_orphaned_tool_results has cognitive complexity 38 (threshold 15). Drivers by points: match/switch 4 (16 pts), if/else 7 (13 pts), loops 3 (8 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic/src/history_repair.rs"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"b714ba969a8f285786eb242c07bdc609715d4418cc17eddc2c7101f784b21dac"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_render_core::wrap::wrap_line (cognitive 38): jcode_render_core::wrap::wrap_line has cognitive complexity 38 (threshold 15). Drivers by points: if/else 12 (30 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/wrap.rs"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"203516c544fcc7bb5ff6bd7ee02b3f0336bb3b6fdb5279f20002a68fb103f2ba"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_schema_dialect::conformance::walk (cognitive 38): jcode_schema_dialect::conformance::walk has cognitive complexity 38 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 4 (14 pts), boolean chains 4, match/switch 2 (4 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-schema-dialect/src/conformance.rs"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3dbb894d188b7a1d6baba843b75e330ade43f0d7a7fbe19ff36fc9531c5c0da"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_schema_dialect::dialect::flatten_all_combiners (cognitive 38): jcode_schema_dialect::dialect::flatten_all_combiners has cognitive complexity 38 (threshold 15). Drivers by points: match/switch 4 (17 pts), loops 3 (12 pts), if/else 2 (8 pts), boolean chains 1 (nesting depth added 28). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-schema-dialect/src/dialect.rs"},"region":{"startLine":424}}}],"partialFingerprints":{"codehealthFindingId/v1":"e37d1984db364ed82b29c39ee62ec623b7ed7d31575c6162c4afc1cdf4812c83"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_telemetry_core::mark_tool_feature_usage (cognitive 38): jcode_telemetry_core::mark_tool_feature_usage has cognitive complexity 38 (threshold 15). Drivers by points: if/else 19 (35 pts), boolean chains 2, match/switch 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lib.rs"},"region":{"startLine":1075}}}],"partialFingerprints":{"codehealthFindingId/v1":"708587da0519f97e9c3283fdeb8b3816b8b71fb0342ae7d78b87cf5ea75932f4"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_telemetry_core::oauth_account::handle_in (cognitive 38): jcode_telemetry_core::oauth_account::handle_in has cognitive complexity 38 (threshold 15). Drivers by points: if/else 16 (33 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/oauth_account.rs"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"075609f41de1d037d1d9513549bad3ac2af599d46f6fc42268643167bb9923f6"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_session_picker_selection (cognitive 38): App::handle_session_picker_selection has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (25 pts), match/switch 3 (6 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":2850}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b9ae6131ddc6be0c4219d0e55d9d0883d41bda1cc5646f6362c7104854267a5"}},{"ruleId":"D2","level":"warning","message":{"text":"ColorReports::push (cognitive 38): ColorReports::push has cognitive complexity 38 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 15 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/terminal_events.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8ca32088f065c4bd8121b895b1de1ef88f4c44b662505d0919454a86deb1c87"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::input::handle_basic_key (cognitive 38): jcode_tui::tui::app::input::handle_basic_key has cognitive complexity 38 (threshold 15). Drivers by points: if/else 20 (34 pts), boolean chains 3, match/switch 1 (nesting depth added 14). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":2845}}}],"partialFingerprints":{"codehealthFindingId/v1":"5aec6ed758ab2b8ed826beb5a4d459fd92e01da9cf140c9fa9f55e5d4c637427"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::state_ui::build_skills_report (cognitive 38): jcode_tui::tui::app::state_ui::build_skills_report has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (25 pts), loops 5 (9 pts), boolean chains 4 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui.rs"},"region":{"startLine":1793}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cf2c3cd13c0d2540e511c00a271938e20b4f08db55d936ae412a406d0e9b27e"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui::copy_selection::frame_chrome_for_selection (cognitive 38): jcode_tui::tui::ui::copy_selection::frame_chrome_for_selection has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (27 pts), loops 3 (7 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui/copy_selection.rs"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"cefa43d4d9aa80491db5570407a0da6c6726954674ea7a86006d884b0f278de0"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_render::memory_tiles::memory_tile_content_lines (cognitive 38): jcode_tui_render::memory_tiles::memory_tile_content_lines has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (31 pts), loops 3 (7 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/memory_tiles.rs"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e5e5d8dbd84c41135064d3165e513a8c432a62ccb65a04cfa75702ae5b92172"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::cloud_move::run_cli (cognitive 38): jcode::cli::cloud_move::run_cli has cognitive complexity 38 (threshold 15). Drivers by points: if/else 17 (27 pts), match/switch 3 (6 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 15). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_move.rs"},"region":{"startLine":2111}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6d7d7128fd071e84ed772353f36dee3afcaf448e56b051d3ac7c62a414f13da"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::login::login_openai_compatible_flow (cognitive 38): jcode::cli::login::login_openai_compatible_flow has cognitive complexity 38 (threshold 15). Drivers by points: if/else 18 (29 pts), match/switch 4 (7 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/login.rs"},"region":{"startLine":853}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1b7e73b58695c6e662f1cf4cc18759c4db1b061044ecc140a4bcf61d91b8c26"}},{"ruleId":"D2","level":"warning","message":{"text":"concurrency.classifyConcurrency (cognitive 38): concurrency.classifyConcurrency has cognitive complexity 38 (threshold 15). Drivers by points: if/else 23 (26 pts), boolean chains 9, loops 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/concurrency.js"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4b19efc12035d468313da3234609af50203ad8d1e48940aebe84ae9b3b8a5aa"}},{"ruleId":"D2","level":"warning","message":{"text":"worker.normalizeWebEvent (cognitive 38): worker.normalizeWebEvent has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 13, loops 3 (4 pts), ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":2102}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9f63e481a11b926d4cc7a8f0898012376b0d223dd2fa7ed100e5e42b438c4a9"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::runtime_ssh_host::execute (cognitive 37): jcode_app_core::server::runtime_ssh_host::execute has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (27 pts), match/switch 4 (7 pts), boolean chains 3 (nesting depth added 16). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/runtime_ssh_host.rs"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"0016203d203be755004dc64af817f54c7ae79b7b76ea9c4e4edc407531cbd109"}},{"ruleId":"D2","level":"warning","message":{"text":"BackgroundTaskManager::wait (cognitive 37): BackgroundTaskManager::wait has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (29 pts), match/switch 2 (5 pts), boolean chains 2, loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/background.rs"},"region":{"startLine":968}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bfaaf6aec320bdc4af25284b2ffb12f6b3d57ffd4acea30eaeb8d52b9f88e45"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_command_risk::assess_find (cognitive 37): jcode_command_risk::assess_find has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (26 pts), loops 3 (7 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-command-risk/src/lib.rs"},"region":{"startLine":446}}}],"partialFingerprints":{"codehealthFindingId/v1":"69379310c11dadfe7c905517becdf6a5d7ebcd2124bcd024e0da4d81d4d20111"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_compaction_core::build_compaction_conversation_text (cognitive 37): jcode_compaction_core::build_compaction_conversation_text has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (29 pts), match/switch 2 (5 pts), loops 2 (3 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-compaction-core/src/lib.rs"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"e32551f127e953dd51f2ad363c0fb46bc9370f9538cc22b41c9a106f5e122d9f"}},{"ruleId":"D2","level":"warning","message":{"text":"MemoryGraph::cascade_retrieve (cognitive 37): MemoryGraph::cascade_retrieve has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (28 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-memory-types/src/graph.rs"},"region":{"startLine":546}}}],"partialFingerprints":{"codehealthFindingId/v1":"21bca6f53434ef6a1c060314fd7c37e60aa8f91de5be4a408f3bc4b2fbba4fb5"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_cursor_runtime::wire::decode_cursor_args_map (cognitive 37): jcode_provider_cursor_runtime::wire::decode_cursor_args_map has cognitive complexity 37 (threshold 15). Drivers by points: match/switch 3 (15 pts), if/else 5 (14 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/wire.rs"},"region":{"startLine":506}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d89f9b7c3172b4ef3ab6f4434223700ef3de15ea8f02e15d24e8b35a1337fb1"}},{"ruleId":"D2","level":"warning","message":{"text":"NativeSshTransport::connect (cognitive 37): NativeSshTransport::connect has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (21 pts), match/switch 7 (15 pts), loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-sdk/src/native_ssh.rs"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2495ed13f9050688311e1c2c712126c6aff3dfea1de38a6c0d87a84e731abc6"}},{"ruleId":"D2","level":"warning","message":{"text":"App::process_queued_messages (cognitive 37): App::process_queued_messages has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 3 (5 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":4207}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ab0fb05f4152a9fb34a43428dd26e49eb75802d81d8d1e2f9827bae2f2c6bb7"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_overlays::draw_changelog_overlay (cognitive 37): jcode_tui::tui::ui_overlays::draw_changelog_overlay has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (25 pts), loops 3 (7 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_overlays.rs"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"d154f5f32fe512aa246359791fb505b8dee216ca5660750d39f26ef9313db7bd"}},{"ruleId":"D2","level":"warning","message":{"text":"AcpRuntime::run_prompt (cognitive 37): AcpRuntime::run_prompt has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (23 pts), match/switch 5 (9 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/acp.rs"},"region":{"startLine":1107}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc8473234324e1306e2846670e3647b8c8c8605513306afa099feabb597b9e3e"}},{"ruleId":"D2","level":"warning","message":{"text":"normalizeUsageReportEvent (cognitive 37): normalizeUsageReportEvent has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 13, loops 2, other 2, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":2359}}}],"partialFingerprints":{"codehealthFindingId/v1":"66e471f47f96b2c12fb1d8dcc5c21ee91b88eb218881dd2a9d1539a72b032e8a"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::debug_session_admin::maybe_handle_session_admin_command (cognitive 36): jcode_app_core::server::debug_session_admin::maybe_handle_session_admin_command has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (33 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 20). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_session_admin.rs"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"09230ed79597f35d4b57974268cd60b4aafc392eb1311fa4d7feb624bfe9c3ff"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::runtime_ssh_accounts::reset (cognitive 36): jcode_app_core::server::runtime_ssh_accounts::reset has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (21 pts), match/switch 6 (10 pts), boolean chains 5 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/runtime_ssh_accounts.rs"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bc0a7654c7882ae24272840f58ace3e3073285d610fb4077968f0995b76a060"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::session_search::search_sessions_blocking (cognitive 36): jcode_app_core::tool::session_search::search_sessions_blocking has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (30 pts), match/switch 1 (5 pts), boolean chains 1 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/session_search.rs"},"region":{"startLine":609}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e3c36dd169297adc070f45fb9b4d96a0f35f52b22586cded6853772c20570e3"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::todo::prepare_background_dependencies (cognitive 36): jcode_app_core::tool::todo::prepare_background_dependencies has cognitive complexity 36 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 5 (6 pts), boolean chains 5, match/switch 1 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/todo.rs"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"b30697a16c760c60ca396e34b8b64e8e55a6efb6a1f081c8b6e716ff6a692df4"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_openai::stream::handle_openai_output_item (cognitive 36): jcode_provider_openai::stream::handle_openai_output_item has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 6, loops 2 (6 pts), match/switch 1 (nesting depth added 17). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai/src/stream.rs"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c6c801d005f9a098c7a3b33888a81bc6731f6803a4f77af49f0f54d2f55d084"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_setup_hints::windows_setup::windows_native_hotkey_loop (cognitive 36): jcode_setup_hints::windows_setup::windows_native_hotkey_loop has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (31 pts), loops 4, boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/windows_setup.rs"},"region":{"startLine":436}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbbd17f0633e22668518234414bd5b2b6c5abb3cfc3635b20185f9a6c7babc06"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_copy_selection_mouse_with (cognitive 36): App::handle_copy_selection_mouse_with has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (32 pts), boolean chains 3, match/switch 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/copy_selection.rs"},"region":{"startLine":558}}}],"partialFingerprints":{"codehealthFindingId/v1":"2146e6022fa6e34841440f768b9ed3fd4c955db44dd2419b1857c06e736dd30c"}},{"ruleId":"D2","level":"warning","message":{"text":"App::restore_session (cognitive 36): App::restore_session has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (29 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tui_lifecycle_runtime.rs"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"74249512450ecbe546e2a84cabeb337f6d9785b0930d04ff16a92a340c3d78e4"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::session_picker::session_view::highlight_buffer_matches (cognitive 36): jcode_tui::tui::session_picker::session_view::highlight_buffer_matches has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 5 (13 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/session_view.rs"},"region":{"startLine":436}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec9cee4afd47898e53200f591e699a0990d4db04c5a76ae28530e42a801e8d19"}},{"ruleId":"D2","level":"warning","message":{"text":"IncrementalMarkdownRenderer::find_last_complete_block_checkpoint (cognitive 36): IncrementalMarkdownRenderer::find_last_complete_block_checkpoint has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (30 pts), match/switch 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_incremental.rs"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"e710f8bceb5a596e617f3756120ebc13c9c7677bd05f77b39b906bf4b59c26a1"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::cloud_env::exchange_bounded (cognitive 36): jcode::cli::cloud_env::exchange_bounded has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (24 pts), match/switch 3 (9 pts), loops 2, boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_env.rs"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0c4faaccb075176f3b08516e999538e33868279f7668170c0d0f3e867b53922"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::commands::run_cloud_sessions_sync (cognitive 36): jcode::cli::commands::run_cloud_sessions_sync has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (24 pts), match/switch 3 (7 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":625}}}],"partialFingerprints":{"codehealthFindingId/v1":"630b4756a448c24aa0308ca3e00fbfaaec3d2e69b17257a4cbe4f1b2d93f8f40"}},{"ruleId":"D2","level":"warning","message":{"text":"McpClient::connect_in_dir (cognitive 35): McpClient::connect_in_dir has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (28 pts), match/switch 2 (4 pts), loops 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mcp/client.rs"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"88da20beacbed71184142067a385f6eb75411ae2c53539f127313fb457376bbc"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_companion::voice::run (cognitive 35): jcode_companion::voice::run has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (24 pts), match/switch 2 (6 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-companion/src/voice.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcb6e005d239231c2f68c9224cc56ac069b33923e6440aac50948d16cf34637d"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_fuzzy::prefilter (cognitive 35): jcode_fuzzy::prefilter has cognitive complexity 35 (threshold 15). Drivers by points: if/else 17 (31 pts), loops 4 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-fuzzy/src/lib.rs"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"e53e0c28fd0136c8515b0d8278320502c8b32a6f5d12b7e5710db378fd707a79"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_openrouter_runtime::openrouter_sse_stream::stream_response (cognitive 35): jcode_provider_openrouter_runtime::openrouter_sse_stream::stream_response has cognitive complexity 35 (threshold 15). Drivers by points: if/else 19 (27 pts), match/switch 2 (5 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/openrouter_sse_stream.rs"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"082bafedd93718540d9b327a8497ffc843b7836fc4543a41b1e28266640c984c"}},{"ruleId":"D2","level":"warning","message":{"text":"App::open_account_picker (cognitive 35): App::open_account_picker has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 7, match/switch 4 (7 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker.rs"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"35eae52b9731c33fad4aa8e179d2b3807b918ac82fe63130fed2e5c59b713a44"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_ssh_login_key (cognitive 35): App::handle_ssh_login_key has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 10, match/switch 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_remote.rs"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"9045bd3ce2383cb656f46414334ba32fef8ecb95cd783f2a17bc2166fbc0d6cd"}},{"ruleId":"D2","level":"warning","message":{"text":"App::eval_assertions (cognitive 35): App::eval_assertions has cognitive complexity 35 (threshold 15). Drivers by points: match/switch 16 (31 pts), if/else 2 (3 pts), loops 1 (nesting depth added 16). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_script.rs"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"7eecd4d955028e4ec34c6660d4f6be53a74f915ff31f13089e5f90a8c56cbc6e"}},{"ruleId":"D2","level":"warning","message":{"text":"App::new_for_remote_with_options (cognitive 35): App::new_for_remote_with_options has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (29 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tui_lifecycle.rs"},"region":{"startLine":1493}}}],"partialFingerprints":{"codehealthFindingId/v1":"634987797434c16d218b30333df15d3012630bd6c2ded97001c7f3c303f300a4"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::dictation::wait_for_dictation_exit (cognitive 35): jcode_tui::tui::app::dictation::wait_for_dictation_exit has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (24 pts), match/switch 2 (6 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/dictation.rs"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"8adbd7c4dbb0e73f365f004ecc9243a48e841a395b4c1d9a2e8f37a391b53e49"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::render_plaintext_lines (cognitive 35): jcode_tui::tui::ui_messages::render_plaintext_lines has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"445515917575265759c8b54921b5f4381162c665e11ca592deef3679c074845b"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::ambient::prompt::gather_recent_sessions (cognitive 34): jcode_app_core::ambient::prompt::gather_recent_sessions has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (25 pts), match/switch 2 (5 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/ambient/prompt.rs"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9d2c99edbfad61529a3b398a250bcca3a76b270a026e3c51634d8c4e8dd9edb"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::session_launch::find_wezterm_gui_binary (cognitive 34): jcode_app_core::session_launch::find_wezterm_gui_binary has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (32 pts), loops 2 (nesting depth added 23). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/session_launch.rs"},"region":{"startLine":555}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebba7d4f685e83d525c938ee9ace4dfdd64b0f42e91eb8849cea9747baef4d49"}},{"ruleId":"D2","level":"warning","message":{"text":"MultiProvider::compute_fresh_session_pool_route (cognitive 34): MultiProvider::compute_fresh_session_pool_route has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 4 (7 pts), boolean chains 6, match/switch 2 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/startup.rs"},"region":{"startLine":517}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c38936d1b28f4e5bc38c916291c314136cb1b9d19bfcdfb9547e6b69f8fa3a0"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::goal::render_goal_detail (cognitive 34): jcode_base::goal::render_goal_detail has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (21 pts), loops 6 (13 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/goal.rs"},"region":{"startLine":414}}}],"partialFingerprints":{"codehealthFindingId/v1":"01945ddbaa25d7a7bb38f306349057298608f4b164c9060b0f5df2c278672997"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_anthropic::format_content_blocks_with_native (cognitive 34): jcode_provider_anthropic::format_content_blocks_with_native has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (23 pts), match/switch 2 (6 pts), boolean chains 4, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic/src/lib.rs"},"region":{"startLine":389}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d89e37c2daf81c91130aa887fb41622545b6c7cc242d79d6288c330e403f1cc"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_core::models::open_weight_family_context_limit (cognitive 34): jcode_provider_core::models::open_weight_family_context_limit has cognitive complexity 34 (threshold 15). Drivers by points: if/else 24 (27 pts), boolean chains 7 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/models.rs"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fae7c844d37733063115abcf3c7f99ea04b13aa31eab068bc62529ba3c9d130"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_sdk::launch::launch_instance (cognitive 34): jcode_sdk::launch::launch_instance has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (22 pts), loops 4 (7 pts), match/switch 3 (4 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-sdk/src/launch.rs"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"a31a3163e77858e4e160b8a51198f5cc18c7442f02981284e19c1cdd6924785a"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_setup_hints::windows_setup::copilot_keyboard_hook (cognitive 34): jcode_setup_hints::windows_setup::copilot_keyboard_hook has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (29 pts), boolean chains 5 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/windows_setup.rs"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c89e41709eb8e54864eb812a39cda1709a105c627ae83774b2c8cddc7d57b79"}},{"ruleId":"D2","level":"warning","message":{"text":"FollowUpPolicy::decide_after_turn (cognitive 34): FollowUpPolicy::decide_after_turn has cognitive complexity 34 (threshold 15). Drivers by points: if/else 17 (20 pts), boolean chains 14 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-todo-policy/src/followup.rs"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"4351c190a54fbbb7268b6eebd8ad20417099246efc46bb836fdaafefecf5a680"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_todo_policy::stages::validate_lane_dependencies (cognitive 34): jcode_todo_policy::stages::validate_lane_dependencies has cognitive complexity 34 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 5 (9 pts), match/switch 1 (4 pts), boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-todo-policy/src/stages.rs"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"1313222aaf3f0ea59383d007a4719a7a584a9881f100d3596b0ee8be601336e5"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_provider_failover_prompt_with_payload (cognitive 34): App::handle_provider_failover_prompt_with_payload has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 8, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/model_context.rs"},"region":{"startLine":418}}}],"partialFingerprints":{"codehealthFindingId/v1":"b59bb11885c81da188c1db48e9ed3183667310624a94f5e69cd0bc7c08c238d1"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::redraw_schedule::redraw_interval_focused_policy (cognitive 34): jcode_tui::tui::redraw_schedule::redraw_interval_focused_policy has cognitive complexity 34 (threshold 15). Drivers by points: if/else 17 (18 pts), boolean chains 8, match/switch 7 (8 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/redraw_schedule.rs"},"region":{"startLine":465}}}],"partialFingerprints":{"codehealthFindingId/v1":"a688d4fc299d911af2e96fa5051a9e7827b4b97d86bc672781d79ee53294b4d8"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui::update_prompt_entry_animation (cognitive 34): jcode_tui::tui::ui::update_prompt_entry_animation has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 14, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui.rs"},"region":{"startLine":936}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2491885f9e35adbc455c17b01d22d5f5625a587b8fdef4a4ba84622efe1527d"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::render_todos_message_with_cap (cognitive 34): jcode_tui::tui::ui_messages::render_todos_message_with_cap has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (21 pts), loops 4 (9 pts), boolean chains 3, match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":1121}}}],"partialFingerprints":{"codehealthFindingId/v1":"216c9522801000073968fc4f03a10c3c93b0aee8dcfa8c651cfe693fbaf510de"}},{"ruleId":"D2","level":"warning","message":{"text":"PermissionsApp::run (cognitive 34): PermissionsApp::run has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (23 pts), match/switch 2 (7 pts), boolean chains 3, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-permissions/src/lib.rs"},"region":{"startLine":509}}}],"partialFingerprints":{"codehealthFindingId/v1":"393bbe7c827f3a1e3d552f43407f01bbde72e40c93cfeac81c8929251bddca36"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::tui_launch::run_replay_command (cognitive 34): jcode::cli::tui_launch::run_replay_command has cognitive complexity 34 (threshold 15). Drivers by points: if/else 20 (32 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/tui_launch.rs"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9c59aff647578c99a65b330c632236b67f2506701de86661273cb07d84ba861"}},{"ruleId":"D2","level":"warning","message":{"text":"score_shard.score (cognitive 34): score_shard.score has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 9, ternaries 2 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"score_shard.py"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a4fbdc09a1de17f98f0540f371e20ce8796d8b5e319c4e67498be8d6373bbf9"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::swarm::remove_session_from_swarm (cognitive 33): jcode_app_core::server::swarm::remove_session_from_swarm has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (29 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/swarm.rs"},"region":{"startLine":1187}}}],"partialFingerprints":{"codehealthFindingId/v1":"15a59848dd0269a7d1a99db7ad68073d130393ad518b3bf93db049adeab41530"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_import_core::extract_opencode_part_text (cognitive 33): jcode_import_core::extract_opencode_part_text has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (27 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-import-core/src/lib.rs"},"region":{"startLine":511}}}],"partialFingerprints":{"codehealthFindingId/v1":"c183ee720f934b680306d027266b67b4691dd460a037fb622f8227d1734eaec9"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_anthropic::history_repair::hoist_late_tool_results (cognitive 33): jcode_provider_anthropic::history_repair::hoist_late_tool_results has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 6 (12 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic/src/history_repair.rs"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"e60ffff274b145120a79c87d4cfda8787f467f7a6960f4cca22a62726574b890"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_cursor_runtime::agent_transport::resolve_model_id_with_catalog (cognitive 33): jcode_provider_cursor_runtime::agent_transport::resolve_model_id_with_catalog has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 5, loops 1 (2 pts), match/switch 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/agent_transport.rs"},"region":{"startLine":376}}}],"partialFingerprints":{"codehealthFindingId/v1":"31386db7af623bff7bf88d9dc1a3a733b91b99be4417053e44028cb70a7da08c"}},{"ruleId":"D2","level":"warning","message":{"text":"App::poll_model_picker_load (cognitive 33): App::poll_model_picker_load has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (26 pts), match/switch 3 (5 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":1498}}}],"partialFingerprints":{"codehealthFindingId/v1":"7449a8b7ad78c3ab1c2a65b662e795532a989e29506a909a02c75a800588e2c1"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::commands_cloud::handle_cloud_command (cognitive 33): jcode_tui::tui::app::commands_cloud::handle_cloud_command has cognitive complexity 33 (threshold 15). Drivers by points: if/else 22 (29 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_cloud.rs"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ca86c91eb87cb71a89b5658696a963d0bf7412f53553386d4ad144000bc7d38"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::remote::server_events::cache_miss::handle_kv_cache_miss (cognitive 33): jcode_tui::tui::app::remote::server_events::cache_miss::handle_kv_cache_miss has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (23 pts), boolean chains 5, match/switch 2 (5 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/server_events/cache_miss.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"e31e79646c8cff22db751a68897b1112c5aa4cb9b5cc606190c6bbe69c7f0923"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_input::wrap_input_text_with_ghost (cognitive 33): jcode_tui::tui::ui_input::wrap_input_text_with_ghost has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 4, loops 2 (3 pts), match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_input.rs"},"region":{"startLine":2686}}}],"partialFingerprints":{"codehealthFindingId/v1":"27c8e4b087ca36587bcdccad323486ad31d723b9498ddf20ef87091917ff099b"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::cloud_move::run_move (cognitive 33): jcode::cli::cloud_move::run_move has cognitive complexity 33 (threshold 15). Drivers by points: if/else 21 (23 pts), boolean chains 7, match/switch 2 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_move.rs"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbf817bdfa66251724de41f9ce6534d46540fe87201801ba1b70631f4555e013"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::commands::run_single_message_command_plain_with_auto_poke (cognitive 33): jcode::cli::commands::run_single_message_command_plain_with_auto_poke has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (29 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (jcode::cli::commands::run_single_message_command_capture_with_auto_poke) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":2868}}}],"partialFingerprints":{"codehealthFindingId/v1":"6143e7f8059b8bd8019bfdcef676e380d2b606446ccbdf81b37bca9cc85e4625"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::commands::run_single_message_command_capture_with_auto_poke (cognitive 33): jcode::cli::commands::run_single_message_command_capture_with_auto_poke has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (29 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (jcode::cli::commands::run_single_message_command_plain_with_auto_poke) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":2985}}}],"partialFingerprints":{"codehealthFindingId/v1":"433c8f601bf4e4e5ced9177a31d127c9fa229b76aeb9371d3566b88fa980e347"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::dispatch::run_default_command (cognitive 33): jcode::cli::dispatch::run_default_command has cognitive complexity 33 (threshold 15). Drivers by points: if/else 19 (24 pts), boolean chains 9 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/dispatch.rs"},"region":{"startLine":796}}}],"partialFingerprints":{"codehealthFindingId/v1":"17ae8ceb222e85d673d82d610e65be58a68f81db1ed414a74213e3db6f6c6038"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::login::run_login_provider (cognitive 33): jcode::cli::login::run_login_provider has cognitive complexity 33 (threshold 15). Drivers by points: if/else 20 (24 pts), boolean chains 6, match/switch 2 (3 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/login.rs"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff7b913010bccc32d6d3417b4e1a47eba3a602481b734e5c32cdbe32099fb421"}},{"ruleId":"D2","level":"warning","message":{"text":"oauthAccount (cognitive 33): oauthAccount has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 11, error handling 2, loops 2, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/oauth-account.js"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab07fa506f605ede45f808f51a134ba04b003f115eb0300ab5a389ebe070e28e"}},{"ruleId":"D2","level":"warning","message":{"text":"Agent::repair_missing_tool_outputs (cognitive 32): Agent::repair_missing_tool_outputs has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 6 (10 pts), match/switch 2 (5 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent.rs"},"region":{"startLine":1069}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e2a28186718d3ff38c73904c87940a82d582409e41d39e7f98d9d7a585c82e7"}},{"ruleId":"D2","level":"warning","message":{"text":"JadeRelayChannel::reply_loop (cognitive 32): JadeRelayChannel::reply_loop has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (25 pts), loops 2 (4 pts), match/switch 2 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/channel.rs"},"region":{"startLine":667}}}],"partialFingerprints":{"codehealthFindingId/v1":"73dbab66fe2a06b8945338665cf3b322395d582bf34817e2dc8b0e507df4060c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::debug_jobs::maybe_handle_job_command (cognitive 32): jcode_app_core::server::debug_jobs::maybe_handle_job_command has cognitive complexity 32 (threshold 15). Drivers by points: if/else 17 (30 pts), loops 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_jobs.rs"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"d52093379c7d5816c53f63595c5558288d3b1d2b761f734325d29330cf01348a"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::browser_jev::request_body_for_model (cognitive 32): jcode_app_core::tool::browser_jev::request_body_for_model has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 5 (10 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/browser_jev.rs"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"a27708c82a895cfc9e365958ca700f833af295b01bf1c6570d85eb31b45e3c50"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::todo_names::normalize_containers (cognitive 32): jcode_app_core::tool::todo_names::normalize_containers has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/todo_names.rs"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"403b1e16589fa67b24b603ed6e48e50f66b4405bb5add7ffa66f5592941bf15d"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::update::download_asset_with_resume (cognitive 32): jcode_app_core::update::download_asset_with_resume has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (24 pts), match/switch 2 (4 pts), boolean chains 3, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/update.rs"},"region":{"startLine":778}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f260bafa30c883b0d9f0629bdd1606100aff3c15115040d07e08ba3feaa0044"}},{"ruleId":"D2","level":"warning","message":{"text":"MultiProvider::set_model (cognitive 32): MultiProvider::set_model has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (21 pts), boolean chains 6, match/switch 3 (5 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/mod.rs"},"region":{"startLine":2165}}}],"partialFingerprints":{"codehealthFindingId/v1":"7505f2058921eddf501b354056bed39207d414b72e2a5e11398ebd4968bdb2f9"}},{"ruleId":"D2","level":"warning","message":{"text":"Session::redacted_for_export (cognitive 32): Session::redacted_for_export has cognitive complexity 32 (threshold 15). Drivers by points: loops 6 (14 pts), if/else 6 (13 pts), match/switch 2 (5 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session.rs"},"region":{"startLine":1229}}}],"partialFingerprints":{"codehealthFindingId/v1":"22dca1be527e46d34a265d091a5df7436baf31a3832af6ef25d62d8624783427"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::provider::catalog_routes::simplified_model_routes_for_picker (cognitive 32): jcode_base::provider::catalog_routes::simplified_model_routes_for_picker has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (26 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/catalog_routes.rs"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad7a08d77e1548a186d4d08d4bc699d881794ff8899be7a1b899979cae9d229d"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::provider::catalog_routes::expand_saved_account_routes (cognitive 32): jcode_base::provider::catalog_routes::expand_saved_account_routes has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 4 (10 pts), boolean chains 4, match/switch 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/catalog_routes.rs"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"935668f994a779642f007f8b2d00e8acfc8c7baa1de2b8224dd4d41a603b44b2"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_doctor::live_provider_probes::consume_native_stream (cognitive 32): jcode_provider_doctor::live_provider_probes::consume_native_stream has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (26 pts), match/switch 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/live_provider_probes.rs"},"region":{"startLine":595}}}],"partialFingerprints":{"codehealthFindingId/v1":"e187ade260fbb5ade84d544f528d51e519d63a47ce669f6af0502410cde2a779"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_storage::run_windows_hardening_worker (cognitive 32): jcode_storage::run_windows_hardening_worker has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 7 (13 pts), boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-storage/src/lib.rs"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"90c6d8d2737e966e299fd93a8f42e04593316a88c4de21bbf53a6d34a0b6f718"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_terminal_image::display::get_image_dimensions (cognitive 32): jcode_terminal_image::display::get_image_dimensions has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 9, loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-terminal-image/src/display.rs"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b87ceb1d0dfde4b361fd00c3864fe0248a87572a63db2c1b1b7850e64e11071"}},{"ruleId":"D2","level":"warning","message":{"text":"App::open_account_center (cognitive 32): App::open_account_center has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 10 (15 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker/account_center.rs"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"9deef5fd0bb68bbc3e7b712c94ba48a934c7bcbefef30061264b784803881481"}},{"ruleId":"D2","level":"warning","message":{"text":"App::save_input_for_reload (cognitive 32): App::save_input_for_reload has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 7 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui.rs"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fc0f5b9fefc3cc2fcaa81e1743714fd587a0143bfcbe7427d183ac25abe94c5"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionPicker::render_preview (cognitive 32): SessionPicker::render_preview has cognitive complexity 32 (threshold 15). Drivers by points: if/else 22 (25 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker.rs"},"region":{"startLine":1671}}}],"partialFingerprints":{"codehealthFindingId/v1":"9be0f9858d5e4690b28912bfd6e59edf8a92e8ca5caf9bd92d28421465aa2472"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_header::build_persistent_header_with_auth (cognitive 32): jcode_tui::tui::ui_header::build_persistent_header_with_auth has cognitive complexity 32 (threshold 15). Drivers by points: if/else 23 (30 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_header.rs"},"region":{"startLine":705}}}],"partialFingerprints":{"codehealthFindingId/v1":"50d17c903cebcde530a107f46c20950c9d346b1fc806d8353620fc5c69c1c8e5"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_tools::browser_summary (cognitive 32): jcode_tui::tui::ui_tools::browser_summary has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (22 pts), match/switch 5 (10 pts) (nesting depth added 12). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tools.rs"},"region":{"startLine":464}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a06def60d69ca2be898cce010e21ca69fc7c29885a606d0c25db44c8372d233"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_mermaid::mermaid_viewport::render_kitty_virtual_viewport (cognitive 32): jcode_tui_mermaid::mermaid_viewport::render_kitty_virtual_viewport has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 3 (6 pts), boolean chains 2, match/switch 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_viewport.rs"},"region":{"startLine":454}}}],"partialFingerprints":{"codehealthFindingId/v1":"678ace4c564efb895ffac5b4af41b576191f484e3693032c2c540860a1b4d727"}},{"ruleId":"D2","level":"warning","message":{"text":"insertSessionDetails (cognitive 32): insertSessionDetails has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 25, other 5, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":1793}}}],"partialFingerprints":{"codehealthFindingId/v1":"729518a5557123da7b8c7a68f5a84f931973aa20920d3d17451624e4ca3b180c"}},{"ruleId":"D2","level":"warning","message":{"text":"Agent::extract_session_memories (cognitive 31): Agent::extract_session_memories has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (17 pts), match/switch 4 (9 pts), loops 3 (5 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/turn_execution.rs"},"region":{"startLine":1564}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8b49ad3fb4314961c333cf50e2b7e426f9029ee758a0cef88c6a33300b16c7a"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::client_actions::handle_set_feature (cognitive 31): jcode_app_core::server::client_actions::handle_set_feature has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (26 pts), match/switch 3 (5 pts) (nesting depth added 15). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_actions.rs"},"region":{"startLine":447}}}],"partialFingerprints":{"codehealthFindingId/v1":"16f82f630a5bbd9bf83bef8e5143b7331772f7f00074538b2f8392a52b3bd2df"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::client_session_rename::rename_swarm_member_session (cognitive 31): jcode_app_core::server::client_session_rename::rename_swarm_member_session has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (29 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_session_rename.rs"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"43d8c8d82eb44135227404fa08f65fff63d8f26048f006bd20d975cd96fba56b"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::bg::wait_many_polling (cognitive 31): jcode_app_core::tool::bg::wait_many_polling has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 5 (9 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/bg.rs"},"region":{"startLine":432}}}],"partialFingerprints":{"codehealthFindingId/v1":"717f784d72d6b95f4ec0fcccf8a5a3343bae8f385e65b4584b286e6dfe355ad9"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::browser_fast::scoped (cognitive 31): jcode_app_core::tool::browser_fast::scoped has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 3 (8 pts), match/switch 2 (5 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/browser_fast.rs"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"68b6cea3f7dc2ea32e86bf7114728c1fa64a7959f003821b4cbc347f29781ba4"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::usage::api_keys::fetch_compatible_profile_report (cognitive 31): jcode_base::usage::api_keys::fetch_compatible_profile_report has cognitive complexity 31 (threshold 15). Drivers by points: match/switch 6 (15 pts), if/else 7 (14 pts), boolean chains 2 (nesting depth added 16). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/api_keys.rs"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"7558522e346c4d490737e8b3ab44ff3111f5bd64364506a29edc70ae29041865"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::usage::provider_fetch::fetch_openai_usage_for_account (cognitive 31): jcode_base::usage::provider_fetch::fetch_openai_usage_for_account has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (13 pts), match/switch 6 (11 pts), boolean chains 6, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/provider_fetch.rs"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e1d4a38f1924ca78f56ea1565264c5f27a0467b2a31d1b5bfec889ee260bc51"}},{"ruleId":"D2","level":"warning","message":{"text":"DeflateStream::accept_write (cognitive 31): DeflateStream::accept_write has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 5, match/switch 1 (2 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/ws_deflate.rs"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"012c69759fdd99393ec9ee7b2ab2fa4f02b6643bd7d3331f4beab8c9e21d5b97"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_setup_hints::windows_setup::run_setup_hotkey_windows (cognitive 31): jcode_setup_hints::windows_setup::run_setup_hotkey_windows has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (20 pts), match/switch 2 (5 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/windows_setup.rs"},"region":{"startLine":968}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddbc23c61e4f19197035fdc0c7742253e54c237d5289a08e48fdba51a814ef8c"}},{"ruleId":"D2","level":"warning","message":{"text":"App::run_scroll_suite (cognitive 31): App::run_scroll_suite has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (18 pts), match/switch 2 (7 pts), loops 3 (6 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_bench.rs"},"region":{"startLine":1010}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2fd6e5b85bce7891d787cf26cfd04cdd151cbb6a24cae8309ae013365493e53"}},{"ruleId":"D2","level":"warning","message":{"text":"App::try_auto_compact_and_retry (cognitive 31): App::try_auto_compact_and_retry has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (19 pts), match/switch 4 (10 pts), boolean chains 1, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/model_context.rs"},"region":{"startLine":1620}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6ea48180f2a9d661850cca12a693ea30d7648a9429226f290445cc4c1f82378"}},{"ruleId":"D2","level":"warning","message":{"text":"App::extract_session_memories (cognitive 31): App::extract_session_memories has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 4 (9 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/turn_memory.rs"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"07241d74428b571cda2a498b236897c3bf31f131da2711518fab0b30c15c185a"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::input::terminal_reports::strip_terminal_control_sequences (cognitive 31): jcode_tui::tui::app::input::terminal_reports::strip_terminal_control_sequences has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 9, match/switch 2 (5 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input/terminal_reports.rs"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed38906696ae646aedf6bd473679c0c3e6716e7746887f956f5021e5151f9c86"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::plan_card::split_plan_segments (cognitive 31): jcode_tui::tui::ui_messages::plan_card::split_plan_segments has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (27 pts), boolean chains 3, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages/plan_card.rs"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"03986b8ca3f38cd5d0fd654cb573d76bff515955cd7c462c11c17e0b376bdfd8"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_todo_stages::agent_roster_spans (cognitive 31): jcode_tui::tui::ui_todo_stages::agent_roster_spans has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 10, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_todo_stages.rs"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"6894a6c4dd0e4a98056c862edff5f479dfafb256b402607e626e7f8cbd1559cc"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_visual_debug::write_frame (cognitive 31): jcode_tui_visual_debug::write_frame has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19, loops 6 (12 pts) (nesting depth added 6). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-visual-debug/src/lib.rs"},"region":{"startLine":576}}}],"partialFingerprints":{"codehealthFindingId/v1":"927c579ef0e0f433ea1472439bbd82b4cee012bc3d1ca60586b6f13d9825a867"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::comm_plan::handle_comm_propose_plan (cognitive 30): jcode_app_core::server::comm_plan::handle_comm_propose_plan has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 4 (9 pts), boolean chains 1, match/switch 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_plan.rs"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"b97eb49ca9739ff7b65270e762b61f7cd3a2d2f424b5d345d9c67d2aba736cf5"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::comm_session::handle_comm_stop (cognitive 30): jcode_app_core::server::comm_session::handle_comm_stop has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 3, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_session.rs"},"region":{"startLine":855}}}],"partialFingerprints":{"codehealthFindingId/v1":"31d18c2dfe80ede1657ef01fa45c4308fe8abf72de803afe20a2f5a570e28aab"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::debug_server_state::maybe_handle_server_state_command (cognitive 30): jcode_app_core::server::debug_server_state::maybe_handle_server_state_command has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 8, loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_server_state.rs"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cf67e5f4ac889abe717c326859761c2202c8ddd6b4ddc5a05d9f1d6767ee63e"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::mcp::remote::sse_reader (cognitive 30): jcode_base::mcp::remote::sse_reader has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (24 pts), loops 2 (3 pts), boolean chains 2, match/switch 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mcp/remote.rs"},"region":{"startLine":850}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d0f573f94229762bc02274b1699408497b2fae76792f551b3d8f97e2e74419d"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::memory::activity::parse_injected_items (cognitive 30): jcode_base::memory::activity::parse_injected_items has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 3, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory/activity.rs"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c6a4b85f944fc2e273a5d857e31c30830cac9990011b3c8dda1119fb7440b5c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::session::crash::find_crashed_legacy_scan (cognitive 30): jcode_base::session::crash::find_crashed_legacy_scan has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (19 pts), match/switch 4 (6 pts), boolean chains 4, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/crash.rs"},"region":{"startLine":414}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4680b2d680929af8987caf9b00efe75b55d1a8cf6503b84d36f8870a4c41f46"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::transcript_sample::codex_turns (cognitive 30): jcode_base::transcript_sample::codex_turns has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (23 pts), match/switch 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/transcript_sample.rs"},"region":{"startLine":575}}}],"partialFingerprints":{"codehealthFindingId/v1":"720ab80dc225ab301bca6f462b03793c608efaecbe48a8d8e388122770990cfa"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_import_core::load_codex_external_session (cognitive 30): jcode_import_core::load_codex_external_session has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (28 pts), boolean chains 1, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-import-core/src/lib.rs"},"region":{"startLine":643}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ba5cf5f5ff1ca1b476512299d1f45c444b381131aff819630d95929e2dadd85"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_sdk::launch::inherit_credentials (cognitive 30): jcode_sdk::launch::inherit_credentials has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 5 (9 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-sdk/src/launch.rs"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"42fbbbcf44105a159d9f3cefad05cb861ba673fd83898487127147190b48dbae"}},{"ruleId":"D2","level":"warning","message":{"text":"App::poll_ssh_login (cognitive 30): App::poll_ssh_login has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (26 pts), match/switch 3 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_remote.rs"},"region":{"startLine":540}}}],"partialFingerprints":{"codehealthFindingId/v1":"e672722c8a29e040cd255002f3d19ca7090ac0fd2ae2ffe3276192781e92275e"}},{"ruleId":"D2","level":"warning","message":{"text":"App::run_side_panel_latency_bench (cognitive 30): App::run_side_panel_latency_bench has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (25 pts), match/switch 2 (4 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_bench.rs"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e204006c91e064cc4e4dc43bb36d3a5f94ae1464efacf220e887cb2c6f79dda"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::helpers::clipboard_image (cognitive 30): jcode_tui::tui::app::helpers::clipboard_image has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 5 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/helpers.rs"},"region":{"startLine":1188}}}],"partialFingerprints":{"codehealthFindingId/v1":"a46615ab333fed1ff861bb48899c8e5f3360c332ca004c2d931eb18648af6f9b"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::slash_command_parser::scan_slash_tokens (cognitive 30): jcode_tui::tui::app::slash_command_parser::scan_slash_tokens has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 7, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/slash_command_parser.rs"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"c274cf0beb5d2b02abc0173343af97e9fc4fb35a7b338081c4d632c2637f7f2b"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::cloud_status::parse (cognitive 30): jcode_tui::tui::cloud_status::parse has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 2 (4 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/cloud_status.rs"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"f71b690c0a2bace99c919fc2ef89edb9999837e03e8bd47e4848ef482bf96824"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_header::account_router::inventory_lines (cognitive 30): jcode_tui::tui::ui_header::account_router::inventory_lines has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 8, loops 3, match/switch 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_header/account_router.rs"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"d72a5cc47930cb73c1a03c06ab0431082d957ca18ad9a4953081872d4e13f810"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::discovery::render_discovery_card (cognitive 30): jcode_tui::tui::ui_messages::discovery::render_discovery_card has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (22 pts), match/switch 4 (7 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages/discovery.rs"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"8807552f05fd4f6140f05761c3ccd1aeab9cc1cf6152dd2af53af80ce96a15f1"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_style::theme_mode::adapt_buffer_impl (cognitive 30): jcode_tui_style::theme_mode::adapt_buffer_impl has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (28 pts), boolean chains 1, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-style/src/theme_mode.rs"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb58f1826fc02d2ec58650b064a721fe3471b54087dedd7abcdf02a241e3928e"}},{"ruleId":"D2","level":"warning","message":{"text":"launch.inheritCredentials (cognitive 30): launch.inheritCredentials has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 5 (6 pts), boolean chains 4, error handling 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/typescript/src/launch.ts"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a40fe1ccf74a1f1b430b4ecc55dd7885d19ebb2b92f43070d57eb4436043133"}},{"ruleId":"D2","level":"warning","message":{"text":"resolvePriceRows (cognitive 30): resolvePriceRows has cognitive complexity 30 (threshold 15). Drivers by points: if/else 5 (12 pts), other 8, ternaries 3 (6 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/model-pricing.js"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"349f0f3f0042c07021f631d7b1ce036a27260e4b3c614a53c41bf759e5713a9f"}},{"ruleId":"D2","level":"warning","message":{"text":"BashTool::execute_background (cognitive 29): BashTool::execute_background has cognitive complexity 29 (threshold 15). Drivers by points: match/switch 8 (15 pts), if/else 9 (11 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/bash.rs"},"region":{"startLine":1234}}}],"partialFingerprints":{"codehealthFindingId/v1":"af2504119540fbd88f84fccfc4e319253175e1a8ccb0de6e5ca0b48f988bb3b7"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::comm_session::spawn_swarm_agent (cognitive 29): jcode_app_core::server::comm_session::spawn_swarm_agent has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (17 pts), match/switch 4 (8 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_session.rs"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc3f396947a2f55b769c74ab365f8f0ce71e5d395c4363040e071d3844f25f03"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::swarm::refresh_swarm_task_staleness (cognitive 29): jcode_app_core::server::swarm::refresh_swarm_task_staleness has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 6 (8 pts), match/switch 2 (6 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/swarm.rs"},"region":{"startLine":630}}}],"partialFingerprints":{"codehealthFindingId/v1":"30f1b6b89251d36b8ab16ea578cf7510c2e7a6997f304b0d3992a2d2a6f1494d"}},{"ruleId":"D2","level":"warning","message":{"text":"FlowInner::execute (cognitive 29): FlowInner::execute has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (23 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-sdk/src/auth.rs"},"region":{"startLine":518}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a8d53be8253e6e80abdc12a192b54f95c22c0e5adb888d5ab2b17376dbf2c2d"}},{"ruleId":"D2","level":"warning","message":{"text":"App::capture_scroll_test_step (cognitive 29): App::capture_scroll_test_step has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 4, loops 1 (2 pts), match/switch 2 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_bench.rs"},"region":{"startLine":555}}}],"partialFingerprints":{"codehealthFindingId/v1":"21a5e0b090cce1a17e162ed5fd20185e7fbbfa8ce789379ed027fd6638ca8309"}},{"ruleId":"D2","level":"warning","message":{"text":"App::debug_model_picker_live_json (cognitive 29): App::debug_model_picker_live_json has cognitive complexity 29 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":2233}}}],"partialFingerprints":{"codehealthFindingId/v1":"57e4b66819f569a3085fd629f9a12ab107941e486844e2bb85df4291140332f0"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionPicker::render_session_item_lines_at_frame (cognitive 29): SessionPicker::render_session_item_lines_at_frame has cognitive complexity 29 (threshold 15). Drivers by points: if/else 26 (28 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/render.rs"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"74364623659eaa56925dacd66bbbc25e1d6455837962e0cb4d94c70f74d8f9d1"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_core::graph_topology::collect_edges (cognitive 29): jcode_tui_core::graph_topology::collect_edges has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (23 pts), loops 3 (6 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-core/src/graph_topology.rs"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d8e26879df311599b4cd18308b85538844554eae05c8c9752fb949be79188c9"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_mermaid::debug::debug_test_scroll (cognitive 29): jcode_tui_mermaid::debug::debug_test_scroll has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (20 pts), match/switch 2 (5 pts), boolean chains 3, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/debug.rs"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad6d970ae5eae3122b8868687e44f0e88f13fa0251fe0139a698982d4dcfa993"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::dispatch::run_server_keepalive (cognitive 29): jcode::cli::dispatch::run_server_keepalive has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (22 pts), match/switch 2 (4 pts), loops 2, boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/dispatch.rs"},"region":{"startLine":1495}}}],"partialFingerprints":{"codehealthFindingId/v1":"e83121165991462297b99d7c530624e874be8a81c0737601249fa874cf9afc91"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::auth::lifecycle::parse_frontier_version_for_family (cognitive 28): jcode_base::auth::lifecycle::parse_frontier_version_for_family has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (4 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/lifecycle.rs"},"region":{"startLine":708}}}],"partialFingerprints":{"codehealthFindingId/v1":"56ad204a7ecbfa64d1451c0ac072a2565dc3ac1b602c166fbb0cf20ac2ed4547"}},{"ruleId":"D2","level":"warning","message":{"text":"BridgeState::legacy_event_to_api (cognitive 28): BridgeState::legacy_event_to_api has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 4, match/switch 1 (nesting depth added 12). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/translate.rs"},"region":{"startLine":1581}}}],"partialFingerprints":{"codehealthFindingId/v1":"99fd0df38574a9ea78796547b180898f4c71dffdd01036f3cb40e29f6c6f8ea0"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_productivity_core::scan::summarize (cognitive 28): jcode_productivity_core::scan::summarize has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (19 pts), match/switch 2 (5 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-productivity-core/src/scan.rs"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f38d4131107470269bdb0fbf54f6bae4a508e24ade86e40b7786bb9d4fe2284"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_telemetry_core::record_tool_execution (cognitive 28): jcode_telemetry_core::record_tool_execution has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lib.rs"},"region":{"startLine":2662}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccfb31fd9054c779b8100e3d9a1c2ab0bf464fb4c25736fea7d2602e4eee253a"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionPicker::handle_overlay_key_inner (cognitive 28): SessionPicker::handle_overlay_key_inner has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (21 pts), match/switch 3 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker.rs"},"region":{"startLine":1514}}}],"partialFingerprints":{"codehealthFindingId/v1":"6636781302a3daf1627e7f22cae250276202bdf5062afd99b0d6af54896b46f3"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::commands_cloud::parse_cloud_command (cognitive 28): jcode_tui::tui::app::commands_cloud::parse_cloud_command has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 5 (12 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 16). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_cloud.rs"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c5c1643f7b60ee586f74cfab69e74afe72b71ffcef1b20faa971d1f48b26872"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::onboarding_graph::check_invariants (cognitive 28): jcode_tui::tui::app::onboarding_graph::check_invariants has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 6, loops 3, match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/onboarding_graph.rs"},"region":{"startLine":592}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e762b3317f04f8d208bd8b83fe5cff419e8d347893238a38dcfe805d6fb1751"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::remote::ssh_sessions::handle_command (cognitive 28): jcode_tui::tui::app::remote::ssh_sessions::handle_command has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 7, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/ssh_sessions.rs"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ccb51a6b2ca0cf2b9b9e6fa804993e30a7632dcf10dfc7bf53e672f241436ee"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_file_diff::draw_file_diff_view (cognitive 28): jcode_tui::tui::ui_file_diff::draw_file_diff_view has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (21 pts), match/switch 4, boolean chains 3 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_file_diff.rs"},"region":{"startLine":429}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0edaea650290ac26354014f4475585b5a6abb94f2ebc9d3de13438cca82318b"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::selfdev::run_self_dev (cognitive 28): jcode::cli::selfdev::run_self_dev has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 4, match/switch 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/selfdev.rs"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"599b8947f04611a9424112cc0596b41069c1b5ee41c3eaca231d551d75d094d3"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::startup::spawn_background_update_check (cognitive 28): jcode::cli::startup::spawn_background_update_check has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (23 pts), match/switch 2 (5 pts) (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/startup.rs"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"30c371f7430f2b93d286e0b24b2cbe1a1fd381223f90df0c03d33dd6bb66eef8"}},{"ruleId":"D2","level":"warning","message":{"text":"scheduled (cognitive 28): scheduled has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 4 (8 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 11). None of this is in the body itself: all 28 points belong to one function literal inside it that branches (line 700). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":698}}}],"partialFingerprints":{"codehealthFindingId/v1":"314b139d1529bf57b27db7e9224eff828b840b9b1a661368520f71f7cebbbd98"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::notifications::imap_reply_loop (cognitive 27): jcode_app_core::notifications::imap_reply_loop has cognitive complexity 27 (threshold 15). Drivers by points: if/else 4 (14 pts), match/switch 5 (9 pts), loops 2 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/notifications.rs"},"region":{"startLine":880}}}],"partialFingerprints":{"codehealthFindingId/v1":"5726e23686118773a716bed366dd367498ef906ad12555a1fb5ec31edaab3554"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::comm_await::handle_comm_await_members (cognitive 27): jcode_app_core::server::comm_await::handle_comm_await_members has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 2 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_await.rs"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"a64ca261bbac30c750dc4aee895c85ae328419380d420e867c7a3930e042748d"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::provider_control::handle_notify_auth_changed (cognitive 27): jcode_app_core::server::provider_control::handle_notify_auth_changed has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (20 pts), loops 4, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/provider_control.rs"},"region":{"startLine":881}}}],"partialFingerprints":{"codehealthFindingId/v1":"85261dd0dd1178ca0e3b95d07d704cd5d3a056adf716a17dcf7a988b930401dc"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::provider::catalog_routes::append_openrouter_routes (cognitive 27): jcode_base::provider::catalog_routes::append_openrouter_routes has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/catalog_routes.rs"},"region":{"startLine":808}}}],"partialFingerprints":{"codehealthFindingId/v1":"32d707af38a5c176ccedfdd499b49ee65f6ff5b9b6488016a66522e85eff8f59"}},{"ruleId":"D2","level":"warning","message":{"text":"BridgeState::walk_files (cognitive 27): BridgeState::walk_files has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 2 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/translate/session_files.rs"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"c07d0c045f02f1c6e4dc68fd0d6e5b18a47cdc4bb2843a14f04c0bed8345bc82"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_anthropic::history_repair::apply_tool_references (cognitive 27): jcode_provider_anthropic::history_repair::apply_tool_references has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 2 (5 pts), loops 3 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic/src/history_repair.rs"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2cc53a93420d8fed7db5c4dd1a8b7f0ada62fbf2c7a4068e29d0b03ca7ca2ad"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionPicker::maybe_refresh_cloud_presence (cognitive 27): SessionPicker::maybe_refresh_cloud_presence has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 1 (3 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/cloud_presence.rs"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bdd6d276dc4bb94b60e8c05cecd89b8329eebc73e409988a50fcaf2faaa72e7"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::session_picker::loading::pi_sessions::load_pi_session_info (cognitive 27): jcode_tui::tui::session_picker::loading::pi_sessions::load_pi_session_info has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (19 pts), match/switch 2 (5 pts), boolean chains 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading/pi_sessions.rs"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bd844bfd4b4c926700c67c187e13d9738ccfa441c71513a3482bcdb975650ee"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_todo_changes::todos_from_tool_input (cognitive 27): jcode_tui::tui::ui_todo_changes::todos_from_tool_input has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (9 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_todo_changes.rs"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"212525ea4f7299d97f2cc01a656e258b27f5b50a13b20a1712e99a0a6d0c66e1"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::bin::memory_recall_bench::cmd_queries (cognitive 27): jcode::bin::memory_recall_bench::cmd_queries has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 3 (4 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cef6728575baf11088c9a5d9dcc84e69fc8275fd8cab7a99ef1f290deb7b74c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::debug::debug_list_servers (cognitive 27): jcode::cli::debug::debug_list_servers has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/debug.rs"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"75d5f196cba6e1d0072cdead1d8d069d4a28f4d2f15de709571cd11995a4b2ef"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::tui_launch::run_tui_client (cognitive 27): jcode::cli::tui_launch::run_tui_client has cognitive complexity 27 (threshold 15). Drivers by points: if/else 21 (25 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/tui_launch.rs"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"d21856f61b8cedecb13226231246b00481fa4abc292e5ae81705ddcce4a9221c"}},{"ruleId":"D2","level":"warning","message":{"text":"Agent::repl (cognitive 26): Agent::repl has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (24 pts), boolean chains 1, loops 1 (nesting depth added 14). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/turn_execution.rs"},"region":{"startLine":1476}}}],"partialFingerprints":{"codehealthFindingId/v1":"a26a4829a69a66d5d8049b53fd5582201d334b3f31486f530ef2cd2206b58e7a"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::catchup::collect_touched_files (cognitive 26): jcode_app_core::catchup::collect_touched_files has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (18 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/catchup.rs"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"12be3ba45c6452128b59214794ff01d767dd67357167696362fe947503d2fd9c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::replay::timeline_to_replay_events (cognitive 26): jcode_app_core::replay::timeline_to_replay_events has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/replay.rs"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"f599a2826162e0e6a8f09ec1b29c668df8940cb6218cec3fe706a8d306cb83e5"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::client_processing::start_processing_message (cognitive 26): jcode_app_core::server::client_processing::start_processing_message has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (15 pts), match/switch 7 (9 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_processing.rs"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e4acacfda74009bf3b1ff0d83282df56fda922bfdb36ad33685f9ea2cf726eb"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::client_processing::cancel_processing_message (cognitive 26): jcode_app_core::server::client_processing::cancel_processing_message has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (20 pts), match/switch 3 (6 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_processing.rs"},"region":{"startLine":501}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c540df421e37de335a5967d3c5c3db08b7209a1126dbf6b62a6623634ed3c5f"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::todo::normalize_item_pauses (cognitive 26): jcode_app_core::tool::todo::normalize_item_pauses has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (6 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/todo.rs"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"8db1f31deab571da42435d16a01d31ba68af02227f8cc3ee08dbee7fb75f19b7"}},{"ruleId":"D2","level":"warning","message":{"text":"MessagePayload::extract_text (cognitive 26): MessagePayload::extract_text has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 1 (2 pts) (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/gmail.rs"},"region":{"startLine":1063}}}],"partialFingerprints":{"codehealthFindingId/v1":"6af27cf7c755f57aef063fa29a54680626185ea2ac754cc9f7381435ac6d3d3a"}},{"ruleId":"D2","level":"warning","message":{"text":"MemoryManager::backfill_embeddings (cognitive 26): MemoryManager::backfill_embeddings has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory.rs"},"region":{"startLine":811}}}],"partialFingerprints":{"codehealthFindingId/v1":"6664f005af704c55d4dd77c67c04c99620e49a27d97f661c7c2c1d0e8381c81f"}},{"ruleId":"D2","level":"warning","message":{"text":"MultiProvider::fresh_routes_memo_entry (cognitive 26): MultiProvider::fresh_routes_memo_entry has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 5, match/switch 1 (2 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/catalog_memo.rs"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ac744662f8220bee518f9e1325fdead58ff526505bdd18d20e19f478ad76429"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::auth::login_diagnostics::classify_auth_failure_message (cognitive 26): jcode_base::auth::login_diagnostics::classify_auth_failure_message has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 13, if/else 13. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/login_diagnostics.rs"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcdac6d69f32b4ac0173d5621d11fcd099d27285b95044a8bfac84bb769d9036"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::import::list_claude_code_sessions_lazy (cognitive 26): jcode_base::import::list_claude_code_sessions_lazy has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 3 (6 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/import.rs"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"778399556f458f7e23ee6f48b6ae727c5d689b9f22f61a0d37be52102d6d3adb"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::import::import_pi_session (cognitive 26): jcode_base::import::import_pi_session has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (19 pts), match/switch 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/import.rs"},"region":{"startLine":1194}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d74960d6f112bf77f37b624393f70129806147fd99189c757bb19e928558e69"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::provider::catalog_routes::append_openai_routes (cognitive 26): jcode_base::provider::catalog_routes::append_openai_routes has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 4, loops 2, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/catalog_routes.rs"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"fca9177a0e39f011d4ef347177f47dbe05e4b08f852d4e130840cfd856f2ddd6"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::transcript_sample::recent_external_transcripts_in (cognitive 26): jcode_base::transcript_sample::recent_external_transcripts_in has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 4, loops 3 (4 pts), match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/transcript_sample.rs"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b596db245c57469c666514d5c84bf2e5f0a9e4035ec19b782fc174648024e11"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_openai_runtime::chatgpt_web::poll_for_response (cognitive 26): jcode_provider_openai_runtime::chatgpt_web::poll_for_response has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 4, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/chatgpt_web.rs"},"region":{"startLine":407}}}],"partialFingerprints":{"codehealthFindingId/v1":"74bfc3123e148aa664ee7e84f3d954274072893c5d8c096c359a7647cfc211e4"}},{"ruleId":"D2","level":"warning","message":{"text":"ResponsesStream::poll_next (cognitive 26): ResponsesStream::poll_next has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (23 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/opencode_go_responses.rs"},"region":{"startLine":464}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1f6899cdcf71117bd66ee251d1ff5920988a542b7123810c78f0497535e61bf"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_openrouter_runtime::opencode_go_responses::build_input (cognitive 26): jcode_provider_openrouter_runtime::opencode_go_responses::build_input has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 3 (10 pts), if/else 3 (9 pts), loops 3 (7 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/opencode_go_responses.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ea7cc88c26f70913c55e4642b6410838b12acff5b849d12ba927c1f642dadaa"}},{"ruleId":"D2","level":"warning","message":{"text":"SshConnectOptions::validate (cognitive 26): SshConnectOptions::validate has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 9, match/switch 2 (5 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-sdk/src/ssh.rs"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"eae48197900871bfed0e93dd4e88c6eee1cbef77f51da7d6eb3aef2c5104f6d2"}},{"ruleId":"D2","level":"warning","message":{"text":"App::execute_script_step (cognitive 26): App::execute_script_step has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (18 pts), match/switch 2 (5 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_script.rs"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"fde2a1f0bc0aabf55eae42048990194fccb2a4c34f7e4cba9aed23ba904c2407"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_inline_interactive_preview_key (cognitive 26): App::handle_inline_interactive_preview_key has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 1, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":2446}}}],"partialFingerprints":{"codehealthFindingId/v1":"679fc24767fdbb507c51be3381a408f0b1cd4a59f5dcb6bd0f987a1eab43f9f5"}},{"ruleId":"D2","level":"warning","message":{"text":"App::offer_fallback_after_error_with_payload (cognitive 26): App::offer_fallback_after_error_with_payload has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 8, match/switch 3 (5 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/model_context.rs"},"region":{"startLine":717}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdb52fabbbef3defd32cee50cda449c23d85f8f844be2c4b9189cbf97319c814"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_onboarding_model_validated (cognitive 26): App::handle_onboarding_model_validated has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (20 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/onboarding_flow_control.rs"},"region":{"startLine":1540}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb207cfbb015aead7b17d005bb1783348023a93ee9e013423b4dd7a875fc685e"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::dictation::strip_ansi (cognitive 26): jcode_tui::tui::app::dictation::strip_ansi has cognitive complexity 26 (threshold 15). Drivers by points: if/else 3 (12 pts), loops 3 (9 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/dictation.rs"},"region":{"startLine":461}}}],"partialFingerprints":{"codehealthFindingId/v1":"4dad207c45508d04caa5fe5563ff054c29b3ae799d6cf4e22781b2bf3b7a9cff"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::helpers::gather_git_info_in (cognitive 26): jcode_tui::tui::app::helpers::gather_git_info_in has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/helpers.rs"},"region":{"startLine":1850}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf2bb91dd3d64b617ff82f80a64bc68838f104882a2baabf30663efbe2ea1c79"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::input::strip_osc_color_replies (cognitive 26): jcode_tui::tui::app::input::strip_osc_color_replies has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":684}}}],"partialFingerprints":{"codehealthFindingId/v1":"632c2ffa8f3ce4942d4c07b4aa9a4727063848b02aa7ae9cc63d6a95175faf73"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::remote::detect_and_cancel_stall (cognitive 26): jcode_tui::tui::app::remote::detect_and_cancel_stall has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (21 pts), match/switch 1 (4 pts), boolean chains 1 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote.rs"},"region":{"startLine":1946}}}],"partialFingerprints":{"codehealthFindingId/v1":"a94738c33995c205cec1c9e6957ebe3a06d5bb51a4a90b12f07eaa13bb2db011"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::remote_notifications::present_swarm_notification_inner (cognitive 26): jcode_tui::tui::app::remote_notifications::present_swarm_notification_inner has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 10). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote_notifications.rs"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8c5d00c3dfeed3cf0d46433d3cb57d414436a36848552b345b980065815e7bc"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::split_view::build_split_view_markdown (cognitive 26): jcode_tui::tui::app::split_view::build_split_view_markdown has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (22 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/split_view.rs"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"7efe320f6b2f46ee4a81f29cc6deca033344b1ee62d1590e831d376f1d96b473"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::session_picker::transcript_search::scan_file_streaming (cognitive 26): jcode_tui::tui::session_picker::transcript_search::scan_file_streaming has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (17 pts), match/switch 3 (6 pts), loops 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/transcript_search.rs"},"region":{"startLine":1398}}}],"partialFingerprints":{"codehealthFindingId/v1":"274ed2ad1023d292531360df4600000c86500925e6e44588c37b114e33435af7"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_prepare::wrap_lines_with_map (cognitive 26): jcode_tui::tui::ui_prepare::wrap_lines_with_map has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 6 (9 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_prepare.rs"},"region":{"startLine":2760}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fc4f12d107d858ff00a21a24545865da48001c738288dac2b2172e6a035a284"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_todo_stages::push_stage_pips (cognitive 26): jcode_tui::tui::ui_todo_stages::push_stage_pips has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 2, match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_todo_stages.rs"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"f49ebc02e7a12929842491bd365cd19d75d4a5707b8169cc1ff4aa6a20bc5ba9"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::commands::run_browser (cognitive 26): jcode::cli::commands::run_browser has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 9). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":1985}}}],"partialFingerprints":{"codehealthFindingId/v1":"bddf07221b233710068c233890d2425d996815b78aaf4a615a3f59905cc94791"}},{"ruleId":"D2","level":"warning","message":{"text":"structured.firstJsonContainer (cognitive 26): structured.firstJsonContainer has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (20 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/typescript/src/structured.ts"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cb5f8ba91706bae3428ca9973b57336026677d1e683702c41d3a7a0e562fa1b"}},{"ruleId":"D2","level":"warning","message":{"text":"DiscoverToolsTool::execute (cognitive 25): DiscoverToolsTool::execute has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 9 (13 pts), if/else 8 (12 pts) (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/discover.rs"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"416a2b80c7da18690c52c767c7988f30102c41777ac971e146fde73febd487c0"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::client_session::handle_clear_session (cognitive 25): jcode_app_core::server::client_session::handle_clear_session has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (22 pts), match/switch 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_session.rs"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"12f46d3bf77dd2ed2a9da22bbeba8cb01c3880cf95c2fc7103a33d7cfb357f14"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::comm_control::spawn_assigned_task_run (cognitive 25): jcode_app_core::server::comm_control::spawn_assigned_task_run has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4, match/switch 3 (4 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_control.rs"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"174400130a86acd52cf08d303b6e5b8533206ecf8168d61b1659b20aecb11c47"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::comm_control::handle_comm_assign_task_with_mode (cognitive 25): jcode_app_core::server::comm_control::handle_comm_assign_task_with_mode has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17 (19 pts), match/switch 3, boolean chains 2, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_control.rs"},"region":{"startLine":1090}}}],"partialFingerprints":{"codehealthFindingId/v1":"d86be1ccce390f0e8b74049946c75d88cd7c3a85856850f541eafaebe0bd234c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::runtime_special_commands::overnight (cognitive 25): jcode_app_core::server::runtime_special_commands::overnight has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (8 pts), boolean chains 1, match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/runtime_special_commands.rs"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb8bebedc512a69dd178dffa5494ed05d5dcaadfd816c8677fcd10e6d7a94fbe"}},{"ruleId":"D2","level":"warning","message":{"text":"Walk::node (cognitive 25): Walk::node has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 4 (7 pts), boolean chains 2, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-applet-types/src/validate.rs"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc8a3e977890e54cdf00d1193bc359b371cca893777f7df8ed297178ccc6bc70"}},{"ruleId":"D2","level":"warning","message":{"text":"MemoryManager::load_project_graph (cognitive 25): MemoryManager::load_project_graph has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (23 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory.rs"},"region":{"startLine":1226}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7ea71a329932c7ac4fff92f68f10aef9ed8f26793c7cfa98b29ceb5c051cbdd"}},{"ruleId":"D2","level":"warning","message":{"text":"MultiProvider::complete_on_provider (cognitive 25): MultiProvider::complete_on_provider has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (24 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This shape REPEATS in the file: one other method here (MultiProvider::complete_split_on_provider) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/dispatch.rs"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"49539e24db1610e58a886eb7f5d3d90aaa1436b76f3899004c060a10ba985be3"}},{"ruleId":"D2","level":"warning","message":{"text":"MultiProvider::complete_split_on_provider (cognitive 25): MultiProvider::complete_split_on_provider has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (24 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This shape REPEATS in the file: one other method here (MultiProvider::complete_on_provider) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/dispatch.rs"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab74e8d7823ac3ffde0ff9012de50ad8b10a21bce450f65ca7dc97136b249157"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::sidecar::collect_openai_sse_text (cognitive 25): jcode_base::sidecar::collect_openai_sse_text has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (17 pts), match/switch 1 (5 pts), loops 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/sidecar.rs"},"region":{"startLine":999}}}],"partialFingerprints":{"codehealthFindingId/v1":"4605b5b1843ea96d12a98e885ed1b196593bd3ae2a02191e523021d7b397f091"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_harness_api::swarm_metadata::enrich_sessions_from_swarm_state (cognitive 25): jcode_harness_api::swarm_metadata::enrich_sessions_from_swarm_state has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api/src/swarm_metadata.rs"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"8684b6fd10e4520364b0158fca1a3ccd1d53f76fc82ac991b1788cd12161e427"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_render_core::preprocess::normalize_math_fences (cognitive 25): jcode_render_core::preprocess::normalize_math_fences has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/preprocess.rs"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"522e4c0e2f405ba893665a405712800b49eb55e1606dc8e8cadda77b7774e47e"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_schema_dialect::dialect::merge_all_of_branches (cognitive 25): jcode_schema_dialect::dialect::merge_all_of_branches has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 3 (7 pts), boolean chains 1, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-schema-dialect/src/dialect.rs"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"d85fc4a285a7cd091502b097cce7aebbb016d52dd05e432eaffcca1b6521cc9c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_setup_hints::keymap::conflicts::jcode_bindings (cognitive 25): jcode_setup_hints::keymap::conflicts::jcode_bindings has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 5 (6 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/keymap/conflicts.rs"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ddb61c2034d0f8b4e1a0993c9b554d3c4fc4544d59950564a0bcf303e8a6223"}},{"ruleId":"D2","level":"warning","message":{"text":"SessionPicker::highlight_spans (cognitive 25): SessionPicker::highlight_spans has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 5 (10 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/render.rs"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e48eeffe80574b9d7598060c8b363a9c8ffb9d4954e16a3a77909fa11b122ea"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::input::parse_dropped_paths (cognitive 25): jcode_tui::tui::app::input::parse_dropped_paths has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"db66c5a65ded33025eab1bbaaffcff435865240b821c09660a3f2e69c498f3bd"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::cloud_git::parse (cognitive 25): jcode_tui::tui::cloud_git::parse has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 3, boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/cloud_git.rs"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"7afedb835121f37ae89026e662d15b5e73dcec5876b3ac83c95ffdf23a4a1198"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui::copy_selection::copy_selection_text_from_raw_lines_base (cognitive 25): jcode_tui::tui::ui::copy_selection::copy_selection_text_from_raw_lines_base has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui/copy_selection.rs"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"b244af4197ed7a3b18bc4de3e17964d33c34a3353ba6dfc53cccbaeb72e8a361"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_todo_stages::push_lane_status_lines_inner (cognitive 25): jcode_tui::tui::ui_todo_stages::push_lane_status_lines_inner has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 4, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_todo_stages.rs"},"region":{"startLine":1118}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ecaf3a04f274154d4598eb20ed5bbdb02cdbfe03980aa86afb00d589ec11397"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_workspace::workspace_map_widget::tile_color (cognitive 25): jcode_tui_workspace::workspace_map_widget::tile_color has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (24 pts), match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-workspace/src/workspace_map_widget.rs"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"d27776b0bf73c797a711ea87a61af0411ce5535f8a1436f64d3bcae5b46dadab"}},{"ruleId":"D2","level":"warning","message":{"text":"NariSession::run_inner (cognitive 25): NariSession::run_inner has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (19 pts), boolean chains 2, loops 2, match/switch 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-voice/src/nari.rs"},"region":{"startLine":460}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f90fa27ba5937dd34a2d4e6d527fac0d944b337b3a21e5098cc6c7c78c8d1bc"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::cloud_move::restore_repo (cognitive 25): jcode::cli::cloud_move::restore_repo has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (18 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_move.rs"},"region":{"startLine":1710}}}],"partialFingerprints":{"codehealthFindingId/v1":"07ecccb322ffb1c89c8701572882746785b32978121bd413ae5ab3ab97e87d37"}},{"ruleId":"D2","level":"warning","message":{"text":"insertTodoSessionDetails (cognitive 25): insertTodoSessionDetails has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 13, other 10, if/else 2. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":2015}}}],"partialFingerprints":{"codehealthFindingId/v1":"b30a10a317c40e7f1b3618ef0f2b2df797428f0ce3c5ba08244f5fbb7438fa65"}},{"ruleId":"D2","level":"warning","message":{"text":"SelfDevTool::do_setup (cognitive 24): SelfDevTool::do_setup has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 6 (9 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/selfdev/setup.rs"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"b37f5c5a7492f7f680e5fd0f16d3ae7c980eaeb2ee6b21367b77fa71b41396c4"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::reload_state::wait_for_reload_handoff_event_blocking (cognitive 24): jcode_app_core::server::reload_state::wait_for_reload_handoff_event_blocking has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (21 pts), loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/reload_state.rs"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6306a52bbed8eeb06a6de0b5df0f99ba74d2f167a2802ad34ba4196dad2e0ca"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::apply_patch::seek_sequence (cognitive 24): jcode_app_core::tool::apply_patch::seek_sequence has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 5 (7 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/apply_patch.rs"},"region":{"startLine":611}}}],"partialFingerprints":{"codehealthFindingId/v1":"5289055a89dda627866c0e9a41eb4c65d052258211b92a2de0b6650ef29c9ce4"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::bash::spawn_detached_progress_follower (cognitive 24): jcode_app_core::tool::bash::spawn_detached_progress_follower has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/bash.rs"},"region":{"startLine":570}}}],"partialFingerprints":{"codehealthFindingId/v1":"66aaa41e5442a2a79ee9d798caed48219604b80bdb3bb1381fd9bbecdf89d0c2"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::patch::render_patch (cognitive 24): jcode_app_core::tool::patch::render_patch has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 4, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/patch.rs"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"848d02d343f7d9f9c5583116843fc4494f38f7b68fe2a9f9f530e19ac60a091e"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::todo_names::public_todos (cognitive 24): jcode_app_core::tool::todo_names::public_todos has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (18 pts), loops 2 (6 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/todo_names.rs"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab872ed520fdb49555860c470eb95a55e77dc9dc1730a5b108e03739a60d5962"}},{"ruleId":"D2","level":"warning","message":{"text":"Session::save_inner (cognitive 24): Session::save_inner has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 6, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/persistence.rs"},"region":{"startLine":612}}}],"partialFingerprints":{"codehealthFindingId/v1":"5214262457d3abf7a957f8eba53bb52b330741f6e77f7ecd0153ef2d8b8ce0e4"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::memory::pending::take_pending_memory_inner (cognitive 24): jcode_base::memory::pending::take_pending_memory_inner has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory/pending.rs"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad9f289a9e22f0410f5700812f9da08ce4a1d258a5b1c0499baffb3259a853a9"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::provider::image_clamp::clamp_outbound_images (cognitive 24): jcode_base::provider::image_clamp::clamp_outbound_images has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 2 (5 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/image_clamp.rs"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a3b53438c22e7622268198815302029fcee13f66cdbdaa87eed384c0bbd3975"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_import_core::ordered_claude_code_message_entries (cognitive 24): jcode_import_core::ordered_claude_code_message_entries has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 4 (5 pts), boolean chains 4, match/switch 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-import-core/src/lib.rs"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba65ea28961052394953533f7c2043a5d8977470be89fce801dc44a483e73a36"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_anthropic::add_message_cache_breakpoint (cognitive 24): jcode_provider_anthropic::add_message_cache_breakpoint has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 3 (5 pts), match/switch 1 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic/src/lib.rs"},"region":{"startLine":777}}}],"partialFingerprints":{"codehealthFindingId/v1":"7eb0f912364d381af254dc77da0cbae1cd38f143e997cafe19fb9a0e39b62052"}},{"ruleId":"D2","level":"warning","message":{"text":"AnthropicProvider::get_oauth_access_token (cognitive 24): AnthropicProvider::get_oauth_access_token has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (17 pts), match/switch 2 (4 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic-runtime/src/lib.rs"},"region":{"startLine":1010}}}],"partialFingerprints":{"codehealthFindingId/v1":"779020bab35dc29879a8aeab9788599871887700f6bc9c02745729027bdea9a3"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_core::model_names::pretty_picker_model_name (cognitive 24): jcode_provider_core::model_names::pretty_picker_model_name has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 6, match/switch 3 (4 pts), loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/model_names.rs"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"31f3de7e4a34807bafb5f71810b6dfadfd8999f7cb9667310f71d61dcc4496db"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_cursor_runtime::wire::extract_checkpoint_used_tokens (cognitive 24): jcode_provider_cursor_runtime::wire::extract_checkpoint_used_tokens has cognitive complexity 24 (threshold 15). Drivers by points: if/else 3 (12 pts), loops 3 (9 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/wire.rs"},"region":{"startLine":1106}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a98e7462410605058aae72aa7e6b8af5da88cec32407059b9d04627e7f25f3c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_gemini::build_contents_with_signature_policy (cognitive 24): jcode_provider_gemini::build_contents_with_signature_policy has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (20 pts), match/switch 2 (3 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-gemini/src/lib.rs"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"db737c9d74756b784a628a6295d77d5fe08c9eed68414bb5ead23b95bcd9243b"}},{"ruleId":"D2","level":"warning","message":{"text":"App::start_muse_subscription_login (cognitive 24): App::start_muse_subscription_login has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (18 pts), match/switch 4 (5 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth/auth_muse.rs"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"e87c5a3b0c515753da86ee875c1779b939e89e932aeb531ecb85a11b8aed137a"}},{"ruleId":"D2","level":"warning","message":{"text":"App::cycle_account (cognitive 24): App::cycle_account has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker.rs"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"501f798befe805b9e6d6340baab8f9a4175bcd37808941895bea73064a423bb2"}},{"ruleId":"D2","level":"warning","message":{"text":"App::poll_cloud_job (cognitive 24): App::poll_cloud_job has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 5, match/switch 3 (5 pts), loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_cloud.rs"},"region":{"startLine":720}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9f4071b573628cb092ef10d8a11f00fb5f1123f2ce1adefcd89621cbd8f4ce7"}},{"ruleId":"D2","level":"warning","message":{"text":"App::apply_mouse_scroll_step (cognitive 24): App::apply_mouse_scroll_step has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (23 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/navigation.rs"},"region":{"startLine":937}}}],"partialFingerprints":{"codehealthFindingId/v1":"366e3a2a203f7ca8d2376435685795174163e9ef32ca8749bc29f42b2ff734d4"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::auth_account_commands::execute_account_command_remote (cognitive 24): jcode_tui::tui::app::auth_account_commands::execute_account_command_remote has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), match/switch 4 (7 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_commands.rs"},"region":{"startLine":491}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca5f92bad7c7890409c4c295d7884283cf17690c0c5e466e2b1ac6e82093aa2f"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::commands::handle_selfdev_command (cognitive 24): jcode_tui::tui::app::commands::handle_selfdev_command has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (19 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":2478}}}],"partialFingerprints":{"codehealthFindingId/v1":"25287dc712a155f7a00e0d8587915ecdf51af6a1ee51246c38b544699a524d61"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::replay::run_replay (cognitive 24): jcode_tui::tui::app::replay::run_replay has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/replay.rs"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e4e0dd0bc1309b7b0b804cee99fb8bd27d215454ab67b16532e0fcbd3689f1e"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::info_widget::render_overview_framed (cognitive 24): jcode_tui::tui::info_widget::render_overview_framed has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 2, loops 1 (2 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget.rs"},"region":{"startLine":1526}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e5609f8936cc9ab3d045da3c60fea494ad8d44278aabfaf9e53b8b6af24a01c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::session_picker::loading::load_opencode_session_info (cognitive 24): jcode_tui::tui::session_picker::loading::load_opencode_session_info has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (4 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading.rs"},"region":{"startLine":2591}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b1693dfc5f1ef99e78cf578dc97d71780b2526a56c477189ce5d013a29e41a7"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_animations::blit_idle (cognitive 24): jcode_tui::tui::ui_animations::blit_idle has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 4 (10 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_animations.rs"},"region":{"startLine":381}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cf05c71b1a9d5dde69355ff05c5708f28e244c86d5c4406eb2ed4a3e320940a"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_header::build_header_lines_with_auth (cognitive 24): jcode_tui::tui::ui_header::build_header_lines_with_auth has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (21 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_header.rs"},"region":{"startLine":878}}}],"partialFingerprints":{"codehealthFindingId/v1":"c27d39a35f5a3109c3d56d44771ac53aa0469cef22bd263b181d7097f2e224f9"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::render_system_message (cognitive 24): jcode_tui::tui::ui_messages::render_system_message has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (16 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":382}}}],"partialFingerprints":{"codehealthFindingId/v1":"435805b8ef98c6c1ad432bbc36e74179194b8a6cbe14671950ea658cfba8a727"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_todo_changes::compute_diff (cognitive 24): jcode_tui::tui::ui_todo_changes::compute_diff has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (6 pts), boolean chains 4, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_todo_changes.rs"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"d380b2a937115c7769203361c47be1d0f7454de887154c573531a0ffa814aa73"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_viewport::compute_visible_margins (cognitive 24): jcode_tui::tui::ui_viewport::compute_visible_margins has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_viewport.rs"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"88180396d4f36942306a1639edb76a16b9bd13e94a27c99653d89efbf39ae49b"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_markdown::markdown_incremental::find_stable_split (cognitive 24): jcode_tui_markdown::markdown_incremental::find_stable_split has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 5, loops 1, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_incremental.rs"},"region":{"startLine":448}}}],"partialFingerprints":{"codehealthFindingId/v1":"d600a1899aa526deca4ea26a65d32a28b9eec416945f3dc8407c24662204fd39"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_voice::streaming_capture::capture (cognitive 24): jcode_voice::streaming_capture::capture has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 2, loops 2, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-voice/src/streaming_capture.rs"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"958b439ddbd84b5f02485c0e9f94b691d4b4873f71ba93714c082197d5aa242b"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_anim::sample_gyroscope (cognitive 24): jcode_tui_anim::sample_gyroscope has cognitive complexity 24 (threshold 15). Drivers by points: if/else 3 (13 pts), loops 3 (6 pts), match/switch 1 (4 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (jcode_tui_anim::sample_orbit_rings) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-anim/src/lib.rs"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2dbebcbaceecebd64bf792022db7db4fc45760e6e4585ae21981b189dfb0132"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_anim::sample_orbit_rings (cognitive 24): jcode_tui_anim::sample_orbit_rings has cognitive complexity 24 (threshold 15). Drivers by points: if/else 3 (13 pts), loops 3 (6 pts), match/switch 1 (4 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (jcode_tui_anim::sample_gyroscope) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-anim/src/lib.rs"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0da5325674eeeab82b098c7e04b51de83825112fe6f44214ef650718b868e44"}},{"ruleId":"D2","level":"warning","message":{"text":"RelayClient::run_from_after (cognitive 23): RelayClient::run_from_after has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (13 pts), match/switch 2 (6 pts), loops 2 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/jade_relay.rs"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"1292f3f3b25525ea580e9744ae7fa342f17a929f682348b0a481191ff17d6030"}},{"ruleId":"D2","level":"warning","message":{"text":"AppletTool::execute (cognitive 23): AppletTool::execute has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 7 (10 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/applet.rs"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"900d9d951c305524d79178a0a0fd6d45368df6fc155c6057be888147978868cb"}},{"ruleId":"D2","level":"warning","message":{"text":"CalendarTool::execute (cognitive 23): CalendarTool::execute has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 4 (8 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/calendar.rs"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"285c549732ca8f4641d9075436b2a98e31149b24a5ff2ced22a5eaa3f9485a26"}},{"ruleId":"D2","level":"warning","message":{"text":"TodoTool::execute (cognitive 23): TodoTool::execute has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (4 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/todo.rs"},"region":{"startLine":1607}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d925e7d6f9a66c0d68e3468ab93e8eda4caf9a617fbcc4f9d2eaa29b98559fa"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::catchup::render_markdown (cognitive 23): jcode_app_core::catchup::render_markdown has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16, loops 3 (6 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/catchup.rs"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"97752d91896e80a140c938e15419f009e952274d55a10e0dd543a94697f4d1ed"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::comm_session::ensure_spawn_coordinator_swarm (cognitive 23): jcode_app_core::server::comm_session::ensure_spawn_coordinator_swarm has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 4, match/switch 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_session.rs"},"region":{"startLine":1116}}}],"partialFingerprints":{"codehealthFindingId/v1":"66353157b7560b007aa5d97982cc09345957791b6fa07c572e5b1022c7628936"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::reload::await_reload_signal (cognitive 23): jcode_app_core::server::reload::await_reload_signal has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (19 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/reload.rs"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"93ca05362da6b3f957b04d58afc8491d5f69ec6b58a0ab402b4ab042b68d6269"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::reload_recovery::collect_garbage_at (cognitive 23): jcode_app_core::server::reload_recovery::collect_garbage_at has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 4 (10 pts), boolean chains 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/reload_recovery.rs"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"369bc6cf62a89276af652f350c09ff8c60d2eddab206361d3a5c86287083ba0d"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::swarm_todo_link::plan_items_from_todos (cognitive 23): jcode_app_core::server::swarm_todo_link::plan_items_from_todos has cognitive complexity 23 (threshold 15). Drivers by points: if/else 2 (10 pts), loops 3 (7 pts), match/switch 2 (6 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/swarm_todo_link.rs"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ba1f09f079f7f24f8daff67e69a6c3bd7e40f01d540e60f106be15cdb1d2e92"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::todo::merge_goals (cognitive 23): jcode_app_core::tool::todo::merge_goals has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (21 pts), loops 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/todo.rs"},"region":{"startLine":827}}}],"partialFingerprints":{"codehealthFindingId/v1":"69eab1cb7f44d32eada5532d2f484d22a810cc2469249df261a6f8b6ed16225f"}},{"ruleId":"D2","level":"warning","message":{"text":"McpConfig::load_for_dir (cognitive 23): McpConfig::load_for_dir has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mcp/protocol.rs"},"region":{"startLine":716}}}],"partialFingerprints":{"codehealthFindingId/v1":"b64e5ec41116d9d6bc89f91f10519a4f7ad23321709daf4aae7d93fa7b1a3ced"}},{"ruleId":"D2","level":"warning","message":{"text":"MultiProvider::is_failover_route_pool_approved (cognitive 23): MultiProvider::is_failover_route_pool_approved has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (15 pts), match/switch 3 (5 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/multi_provider.rs"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"d343c9ad63e5c757b50ca324167ed661d99511e111a945d22358edfb45517c55"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::auth::oauth::login_claude (cognitive 23): jcode_base::auth::oauth::login_claude has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (20 pts), match/switch 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/oauth.rs"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cee77f9e56fcef6893bc5f2ca64f58f7661f09e7fabab577153dab1992dd1b1"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::auth::router_transfer::import_at (cognitive 23): jcode_base::auth::router_transfer::import_at has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 4, match/switch 2 (4 pts), loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/router_transfer.rs"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"658548327df6ada13cd0221e248241d9c8c1f6ea1940f900dc8d8a1fdc687b0b"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::memory_prompt::focus_query_text (cognitive 23): jcode_base::memory_prompt::focus_query_text has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory_prompt.rs"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"49c0c7bbdc9a619069a02d6d938606cb9153a31d107a8dc2874a355f5c72128a"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::provider_activity::source_key_for_provider_label (cognitive 23): jcode_base::provider_activity::source_key_for_provider_label has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 3, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider_activity.rs"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"69c7cd2a78b9bc744c0e15c0d1bc67cd05ee642780884885d5fd4c901a773ade"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::session::crash::find_session_by_name_or_id (cognitive 23): jcode_base::session::crash::find_session_by_name_or_id has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/crash.rs"},"region":{"startLine":592}}}],"partialFingerprints":{"codehealthFindingId/v1":"9305d3e1f78eab40bbaf5d1eb8ea2a5507fa5538ae67ec841b68d7ae456457e0"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::usage::api_keys::parse_kimi_usage_limits (cognitive 23): jcode_base::usage::api_keys::parse_kimi_usage_limits has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (4 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/api_keys.rs"},"region":{"startLine":461}}}],"partialFingerprints":{"codehealthFindingId/v1":"b46b98ec55ba1b109599c1aab2e9541c03d0a232cb4bef9248bf05c93bee68c9"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenRouterProvider::available_models_display (cognitive 23): OpenRouterProvider::available_models_display has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/openrouter_provider_impl.rs"},"region":{"startLine":547}}}],"partialFingerprints":{"codehealthFindingId/v1":"dedd6739a60d780fce7063e4ca2bb20d6fe25519e01fa180ecde3110f8673057"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::session_picker::loading::include_cloud_sessions (cognitive 23): jcode_tui::tui::session_picker::loading::include_cloud_sessions has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading.rs"},"region":{"startLine":2946}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd106649640956f72152cdbda2ab0fb6dc6d77f022599036c655083c371054a9"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui::selection_highlight::highlight_line_selection (cognitive 23): jcode_tui::tui::ui::selection_highlight::highlight_line_selection has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 2 (3 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui/selection_highlight.rs"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c707ecb2f437ecb156313495deb4917c4db335e0bd8736a7cc980e9d13cb060"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_input::wrap_input_segments (cognitive 23): jcode_tui::tui::ui_input::wrap_input_segments has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (6 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_input.rs"},"region":{"startLine":2453}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdb57a158fb277cf0afc6fb7c0bc60c583d6aa17a6b2b6ce97aee3639cba31ec"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::usage::usage_styled_line (cognitive 23): jcode_tui::tui::ui_messages::usage::usage_styled_line has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 3, loops 2, match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages/usage.rs"},"region":{"startLine":862}}}],"partialFingerprints":{"codehealthFindingId/v1":"a754bdc7ceaa58a4354e4bed516055c9142ff61025e019f244f5ca15beaf7a7d"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_core::anchor_stability::align_frames (cognitive 23): jcode_tui_core::anchor_stability::align_frames has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 4, loops 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-core/src/anchor_stability.rs"},"region":{"startLine":408}}}],"partialFingerprints":{"codehealthFindingId/v1":"84dbddfb1b67adafaefb9b39c0fa929282bd0bad5728a35aa4bb7cf3a07bfe4a"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_markdown::markdown_text_preprocess::preserve_line_oriented_softbreaks (cognitive 23): jcode_tui_markdown::markdown_text_preprocess::preserve_line_oriented_softbreaks has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 6, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_text_preprocess.rs"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"211207d0bb7993e09195ad7a3d64168552008a92742347ab28aab397ac4d3220"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_render::memory_tiles::parse_memory_display_entries (cognitive 23): jcode_tui_render::memory_tiles::parse_memory_display_entries has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/memory_tiles.rs"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"945e21ddf1eb3f65de3224be2cdd53d97de9666aeaf22f282ed015f08d268aa1"}},{"ruleId":"D2","level":"warning","message":{"text":"TranscriptState::apply (cognitive 23): TranscriptState::apply has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-voice/src/nari.rs"},"region":{"startLine":626}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d5a4d1f7702c1eb7a54472540510ae29436e161e4686580e7675207b83ce8e0"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::commands::run_pair_command (cognitive 23): jcode::cli::commands::run_pair_command has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 2 (5 pts), boolean chains 1, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":1886}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc3e01c45b571d4d993f2d9b4b3565c9171660add0632a407b5ced43c8502037"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::commands::provider_setup::configure_provider_profile (cognitive 23): jcode::cli::commands::provider_setup::configure_provider_profile has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15, boolean chains 7, match/switch 1. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands/provider_setup.rs"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"eae89491f1bf065adf54dd8147839e6baf761200b1fe1337b1d24f008fe51382"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::commands::report_info::run_usage_command (cognitive 23): jcode::cli::commands::report_info::run_usage_command has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (6 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands/report_info.rs"},"region":{"startLine":465}}}],"partialFingerprints":{"codehealthFindingId/v1":"6810969478a38b360ba483e985b0ac53a85d2c40348b7ca67a8cf0ea9f9ce0e4"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::terminal::init_tui_runtime (cognitive 23): jcode::cli::terminal::init_tui_runtime has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (23 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/terminal.rs"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"78c600e64e11dc321ada95c30990f594971b37d147fe72f0307a2ac23972ec69"}},{"ruleId":"D2","level":"warning","message":{"text":"worker.isMeaningfulLifecycleEvent (cognitive 23): worker.isMeaningfulLifecycleEvent has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 20, if/else 3. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":1751}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bfb2958bf8095001dfad985a99bac444e2a3d3035665576aceff048a713cd53"}},{"ruleId":"D2","level":"warning","message":{"text":"Agent::export_conversation_markdown (cognitive 22): Agent::export_conversation_markdown has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 2 (5 pts), loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/messages.rs"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbe001c6b0ae4a9b3de2a28e26b7065c05b3f2233964ff04c0dca14b06c245c0"}},{"ruleId":"D2","level":"warning","message":{"text":"ReadTool::execute (cognitive 22): ReadTool::execute has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (18 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/read.rs"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"cacabb29ee615b31bbf74d3aa174d166aa1281c74c67334fd1d621c544ac676b"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::comm_control::task_progress_event_sender (cognitive 22): jcode_app_core::server::comm_control::task_progress_event_sender has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_control.rs"},"region":{"startLine":767}}}],"partialFingerprints":{"codehealthFindingId/v1":"78efaac534afcf489dda957eda06a64e003050c4a8f234cb17ef5e8f11feb9ef"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::comm_plan::handle_comm_approve_plan (cognitive 22): jcode_app_core::server::comm_plan::handle_comm_approve_plan has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (6 pts), match/switch 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_plan.rs"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7847e0a65d7b7b96f2f856335b6c380436e9dd195aae1feaac4d32f54f6d32f"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::runtime_ssh_loops::execute (cognitive 22): jcode_app_core::server::runtime_ssh_loops::execute has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/runtime_ssh_loops.rs"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"59fcbf3fee9f1523b0b2f519572b402b52f469bc66a2174cd69658185c8e8ab8"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::apply_patch::compute_replacements (cognitive 22): jcode_app_core::tool::apply_patch::compute_replacements has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/apply_patch.rs"},"region":{"startLine":524}}}],"partialFingerprints":{"codehealthFindingId/v1":"40afb0ffef7e2173aa810d989df2c09fa85250407a05dd3f732caa2be67bd1a3"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::discover::render_details (cognitive 22): jcode_app_core::tool::discover::render_details has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/discover.rs"},"region":{"startLine":1618}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f6b02531aff095f7dae8be4163fa26bc395aacc278d17618b7d125d943aaac6"}},{"ruleId":"D2","level":"warning","message":{"text":"AuthStatus::state_for_provider (cognitive 22): AuthStatus::state_for_provider has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (21 pts), match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/mod.rs"},"region":{"startLine":518}}}],"partialFingerprints":{"codehealthFindingId/v1":"e49a85ae388e51a2d6d1b9cb5914fb2f0198c9a48de9a4cd74cf93adeb1b68b0"}},{"ruleId":"D2","level":"warning","message":{"text":"AuthStatus::assessment_for_provider (cognitive 22): AuthStatus::assessment_for_provider has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (21 pts), match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/mod.rs"},"region":{"startLine":590}}}],"partialFingerprints":{"codehealthFindingId/v1":"517f3d16538a86b84c3e9e2c1827944289c326edfa7baedfe175fb0322500277"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::auth::transfer::secure_directory (cognitive 22): jcode_base::auth::transfer::secure_directory has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/transfer.rs"},"region":{"startLine":479}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cebbcbfac04a521fa1fd3366adf343801acd041801dc7a5abc624d20fa304b2"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::session::render::compacted_history_render_window (cognitive 22): jcode_base::session::render::compacted_history_render_window has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/render.rs"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"abf13fb5cee80599d945e77fc811a258bfadc0f8c15a1cc550057864c8108dfe"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::transcript_sample::pi_turns (cognitive 22): jcode_base::transcript_sample::pi_turns has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/transcript_sample.rs"},"region":{"startLine":447}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd3e10b8cbe67803cbbe5458df8682c65d30a272348a8e1f0cc76ba3660fbd49"}},{"ruleId":"D2","level":"warning","message":{"text":"BridgeState::search_session_text (cognitive 22): BridgeState::search_session_text has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (6 pts), boolean chains 1, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/translate/session_files.rs"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"7019394e36aac10bd215fa3693f01b36dbd4c00e7b57bcb60822006afd68f3cc"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_plan::cycle_item_ids (cognitive 22): jcode_plan::cycle_item_ids has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 5 (8 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-plan/src/lib.rs"},"region":{"startLine":410}}}],"partialFingerprints":{"codehealthFindingId/v1":"d58a292d74e09f22c7507bbe468d72408b20c60e898ea1c3379b288af210f6d3"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_productivity_core::aggregate::build_report (cognitive 22): jcode_productivity_core::aggregate::build_report has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (9 pts), loops 5 (9 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-productivity-core/src/aggregate.rs"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"17c5ae4d0167f0b49082fc8a62c964d7158ee09765d9d9c918adfc9641169f54"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_antigravity::flatten_schema_combiners (cognitive 22): jcode_provider_antigravity::flatten_schema_combiners has cognitive complexity 22 (threshold 15). Drivers by points: if/else 2 (8 pts), loops 3 (8 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 14). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-antigravity/src/lib.rs"},"region":{"startLine":627}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7fdf0bf452c735eeac2464a750c57fc120105ad355861a082649bc4e8fd2739"}},{"ruleId":"D2","level":"warning","message":{"text":"BedrockProvider::classify_error_message (cognitive 22): BedrockProvider::classify_error_message has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 13, if/else 9. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-bedrock/src/lib.rs"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"d44176f4b5a0ce1e0ad20719ae54908fe6a9c584c453b26ff71aee86a34267be"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenRouterStream::poll_next (cognitive 22): OpenRouterStream::poll_next has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (18 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter/src/stream.rs"},"region":{"startLine":541}}}],"partialFingerprints":{"codehealthFindingId/v1":"70bb0a34a19741a2794bc42c58046f51612d14d0b9f8ac1e314f6510cdfbb904"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_setup_hints::run_setup_hotkey (cognitive 22): jcode_setup_hints::run_setup_hotkey has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 1 (3 pts), match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/lib.rs"},"region":{"startLine":689}}}],"partialFingerprints":{"codehealthFindingId/v1":"557821c90a59fab97066978e7f1f091a8e84262aa77a09ab2232b7c4852ff74b"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_telemetry_core::lifecycle::emit_lifecycle_event (cognitive 22): jcode_telemetry_core::lifecycle::emit_lifecycle_event has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10, boolean chains 9, match/switch 3. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lifecycle.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"1472a45aff53ed1b24a3bc090010b722d56ad13a05f74782e5a3ba86d94aac33"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_telemetry_core::session_outcome::infer_session_stop_reason (cognitive 22): jcode_telemetry_core::session_outcome::infer_session_stop_reason has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14, boolean chains 8. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/session_outcome.rs"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"eab1b74766d91da19988e8df9433d9ebb1c7c919aeddfc8bee3c90f5e306d1f6"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_onboarding_import_review_key (cognitive 22): App::handle_onboarding_import_review_key has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (13 pts), match/switch 4 (9 pts) (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/onboarding_flow_control.rs"},"region":{"startLine":555}}}],"partialFingerprints":{"codehealthFindingId/v1":"e17c11cf2ed92a559594eec38be507a118ba58b3a76987b98ea0e91258ec0c26"}},{"ruleId":"D2","level":"warning","message":{"text":"App::model_provider_suggestion_candidates (cognitive 22): App::model_provider_suggestion_candidates has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 8). Of this number, 20 points are the body\u0027s own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui_input_helpers.rs"},"region":{"startLine":412}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5a827de0a9312500cc78fe6a6b294e5f56245141b4adec89d369f63f8a035ac"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::helpers::extract_image_url (cognitive 22): jcode_tui::tui::app::helpers::extract_image_url has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 2 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/helpers.rs"},"region":{"startLine":1353}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe5e19336295ac75df5db99cbda3808463c7fab9407cdbbc8566e7c0a96386ea"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::input::is_scroll_only_key (cognitive 22): jcode_tui::tui::app::input::is_scroll_only_key has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 4 (10 pts), if/else 7 (9 pts), boolean chains 3 (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":2274}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9475b9111f29790655b3b8accea17cedb916962a4853cb0e9f97b6ef0e80704"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::input::handle_modal_key (cognitive 22): jcode_tui::tui::app::input::handle_modal_key has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":2656}}}],"partialFingerprints":{"codehealthFindingId/v1":"611ee8f6e4e7fe4d075dd47ae5504d69b6f9014afb48342f98f3545ccd9d659f"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::cloud_git_stderr::drain (cognitive 22): jcode_tui::tui::cloud_git_stderr::drain has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/cloud_git_stderr.rs"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"42a4f682144edef1fcc09b7e939709c0d9dbb04c810ab810a1384b8bffa2b0a1"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::info_widget_memory_render::render_memory_widget (cognitive 22): jcode_tui::tui::info_widget_memory_render::render_memory_widget has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_memory_render.rs"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa55b25a7ebd50507e36dd59a1b351802c39f04c8517b7dae4ad52f45eb6b94b"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::usage::usage_wrap_lines (cognitive 22): jcode_tui::tui::ui_messages::usage::usage_wrap_lines has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages/usage.rs"},"region":{"startLine":947}}}],"partialFingerprints":{"codehealthFindingId/v1":"398346b93f3851dde3dcdd3e628e0aa938b23f1a735d545dee1b4e092d03db7d"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_tools::parse_agentgrep_smart_subject_relation (cognitive 22): jcode_tui::tui::ui_tools::parse_agentgrep_smart_subject_relation has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tools.rs"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b57defa3598d6c2682717a78d71e42c414d95a9d305107feb93a204edde421f"}},{"ruleId":"D2","level":"warning","message":{"text":"Registration::capture (cognitive 22): Registration::capture has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-voice/src/global/hotkey.rs"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"e52b76ab2bca27bd22d537907aa47f0b2c4d36db9c63a886b97df70d8e821cd4"}},{"ruleId":"D2","level":"warning","message":{"text":"Target::preflight_uncached (cognitive 22): Target::preflight_uncached has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (3 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_move/transport.rs"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"60854602b6b1543d0ed86a278a861c411b55fbaff8bc4f9638c7f1f26104e9fe"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::account::run_mobile (cognitive 22): jcode::cli::account::run_mobile has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 3 (6 pts), loops 1 (2 pts) (nesting depth added 11). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/account.rs"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"76f4ef0db87018c5d7e1ad9ffae7a6b47d7d5d0c32d42dd3f17cdb0b38cbd8fc"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::cloud_move::run_return (cognitive 22): jcode::cli::cloud_move::run_return has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 3, match/switch 3, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_move.rs"},"region":{"startLine":828}}}],"partialFingerprints":{"codehealthFindingId/v1":"db0d98add3c81ab68a92c5bb747978562595d1f441026504240b5a290996c38c"}},{"ruleId":"D2","level":"warning","message":{"text":"cloud_directories_probe.session_fields (cognitive 22): cloud_directories_probe.session_fields has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 2 (4 pts), loops 2 (4 pts), ternaries 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/cloud_directories_probe.py"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7ae04666921857e82aaf2b638be43b39373e771d613a41b551eb255109a5a7e"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::overnight::run_supervisor (cognitive 21): jcode_app_core::overnight::run_supervisor has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/overnight.rs"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"91714e8eedf8b85963aecaecba47eb2cce7ce10ac299e886b5989ace3c19ff80"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::comm_control::handle_comm_assign_role (cognitive 21): jcode_app_core::server::comm_control::handle_comm_assign_role has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 3, match/switch 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_control.rs"},"region":{"startLine":867}}}],"partialFingerprints":{"codehealthFindingId/v1":"9876aabaed50e820eff487348d5cd373936ba6b1b6312157cbd045db68cc674c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::runtime_ssh_sessions::list_sessions (cognitive 21): jcode_app_core::server::runtime_ssh_sessions::list_sessions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 6, loops 3 (4 pts), match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/runtime_ssh_sessions.rs"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1b6703b6bc45096cbaffd25c9c9f67b271b727b172762fbff51f31e57a38ba6"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::patch::parse_patch (cognitive 21): jcode_app_core::tool::patch::parse_patch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/patch.rs"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee99a83b1cb0bf45e89c61e7a4deafb67568fc1b26d3f14e1a1a12811bb8a6e7"}},{"ruleId":"D2","level":"warning","message":{"text":"McpManager::connect_all (cognitive 21): McpManager::connect_all has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (5 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mcp/manager.rs"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"08c180d81975eda7d5d527b34f6555fe66fd02cad83ab40dc07d026548737e04"}},{"ruleId":"D2","level":"warning","message":{"text":"SseParser::push (cognitive 21): SseParser::push has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mcp/remote.rs"},"region":{"startLine":977}}}],"partialFingerprints":{"codehealthFindingId/v1":"d502a0aa1c826cf7a16a9a1bf4e2a2f115bb4d6d3cee712bfd0205867497539b"}},{"ruleId":"D2","level":"warning","message":{"text":"MemoryManager::load_global_graph (cognitive 21): MemoryManager::load_global_graph has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory.rs"},"region":{"startLine":1291}}}],"partialFingerprints":{"codehealthFindingId/v1":"c09146962819666696f141c95e02088e0c0d48ddd716601e76afc3eeb763bc2c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::auth::copilot::has_copilot_credentials_fast (cognitive 21): jcode_base::auth::copilot::has_copilot_credentials_fast has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 5, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/copilot.rs"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb13d482d6fca74419eabb2839e546354efeadccf588c6bce9b8bec70b62d503"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::auth::doctor::recommended_actions (cognitive 21): jcode_base::auth::doctor::recommended_actions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 5, match/switch 2 (3 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/doctor.rs"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"afb91604dfa5c480c9480504fb95604d993d6a8bf5f6a58b5e8e897a89bcee58"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::import::import_session_from_file_with_target (cognitive 21): jcode_base::import::import_session_from_file_with_target has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (4 pts), match/switch 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/import.rs"},"region":{"startLine":754}}}],"partialFingerprints":{"codehealthFindingId/v1":"1aa0c14250f1e2ea0f582d08a276a0727d1408c798d0725c7b727d7278ef9f8f"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::usage::provider_fetch::fetch_copilot_usage_report (cognitive 21): jcode_base::usage::provider_fetch::fetch_copilot_usage_report has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/provider_fetch.rs"},"region":{"startLine":792}}}],"partialFingerprints":{"codehealthFindingId/v1":"b345705f6f899af93a1772cbe627fbb621f4acd92433353471dba3afbba47e99"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_core::util::split_concatenated_json (cognitive 21): jcode_core::util::split_concatenated_json has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-core/src/util.rs"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"a48c94da8c75ef3b216e52ba306b6dcd393de18b15ce28005c6710677beee34c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_notify_email::poll_imap_once (cognitive 21): jcode_notify_email::poll_imap_once has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-notify-email/src/lib.rs"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"370a6b38e10dc0a53e2814c907cc95d9437018b91cf816f2c85d04f7db59c280"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_plan::assignment_affinities_for_task (cognitive 21): jcode_plan::assignment_affinities_for_task has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 3, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-plan/src/lib.rs"},"region":{"startLine":713}}}],"partialFingerprints":{"codehealthFindingId/v1":"20a290150fe9f20c8c1abf199db44b0c71b0b6e9efc560ac6ba2743c1a3ee3f2"}},{"ruleId":"D2","level":"warning","message":{"text":"BedrockProvider::to_bedrock_messages (cognitive 21): BedrockProvider::to_bedrock_messages has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 5 (12 pts), if/else 4 (8 pts), loops 1 (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-bedrock/src/lib.rs"},"region":{"startLine":479}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d45f94769875b7364ec46d5ec79b303faa79aa2ad97c525f75b94f03cfe6c6e"}},{"ruleId":"D2","level":"warning","message":{"text":"BedrockProvider::all_display_models (cognitive 21): BedrockProvider::all_display_models has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-bedrock/src/lib.rs"},"region":{"startLine":1007}}}],"partialFingerprints":{"codehealthFindingId/v1":"24c6586a47f66b638e26d3a8bd8e3116c13f435c08a1bd2e12f3198bbb0f28a2"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenRouterProvider::set_model (cognitive 21): OpenRouterProvider::set_model has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/openrouter_provider_impl.rs"},"region":{"startLine":397}}}],"partialFingerprints":{"codehealthFindingId/v1":"c10ab05903f857f64695aaa83be4758d175c2ced28626899058547432198ae33"}},{"ruleId":"D2","level":"warning","message":{"text":"SharedSshTransport::connect_with (cognitive 21): SharedSshTransport::connect_with has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-sdk/src/ssh.rs"},"region":{"startLine":420}}}],"partialFingerprints":{"codehealthFindingId/v1":"96324080f491f305e1fcf807f59730acd0025f549f4c7f825ee9e3606744808e"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_sdk::client::spawn_reader (cognitive 21): jcode_sdk::client::spawn_reader has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-sdk/src/client.rs"},"region":{"startLine":1727}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f76c87d079a526fee7a6c1c564cb4246ec1953ae430b286593e6e429f6b353c"}},{"ruleId":"D2","level":"warning","message":{"text":"App::widget_usage_info_inner (cognitive 21): App::widget_usage_info_inner has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 3 (5 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tui_state.rs"},"region":{"startLine":520}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a8603c6d57408b0ff121f8075c6ed62f1fa5f7f4a23f238940564e38bf74e6f"}},{"ruleId":"D2","level":"warning","message":{"text":"App::classify_kv_cache_miss_reason (cognitive 21): App::classify_kv_cache_miss_reason has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 6 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app.rs"},"region":{"startLine":2723}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc1d183000c9dd51c185ad43aa5dca509ac544df84e86add717f87c0d68fd4e6"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::commands_improve::handle_improve_command_local (cognitive 21): jcode_tui::tui::app::commands_improve::handle_improve_command_local has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 3, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This shape REPEATS in the file: one other method here (jcode_tui::tui::app::commands_improve::handle_refactor_command_local) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_improve.rs"},"region":{"startLine":601}}}],"partialFingerprints":{"codehealthFindingId/v1":"5295ac8d8971203ae6f9d9f9a9c274b0b721e4a738679fdfc8c296974b2d5ffd"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::commands_improve::handle_refactor_command_local (cognitive 21): jcode_tui::tui::app::commands_improve::handle_refactor_command_local has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 3, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This shape REPEATS in the file: one other method here (jcode_tui::tui::app::commands_improve::handle_improve_command_local) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_improve.rs"},"region":{"startLine":698}}}],"partialFingerprints":{"codehealthFindingId/v1":"a88426e0135f206f9825cc917ef8a16eabfe109bb97bf76be2e2b474ea9cc21c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::debug::handle_debug_command (cognitive 21): jcode_tui::tui::app::debug::handle_debug_command has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug.rs"},"region":{"startLine":580}}}],"partialFingerprints":{"codehealthFindingId/v1":"61cf455bb44e29960edc305a965a2788f2b916f5d40b06e215d41682eb787504"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::input::handle_prompt_history_navigation (cognitive 21): jcode_tui::tui::app::input::handle_prompt_history_navigation has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":1008}}}],"partialFingerprints":{"codehealthFindingId/v1":"17ff17d36ea7e95b676904c55d8c3805789ba42c325b841c3a82c54b1e1f7070"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::remote::reconnect::finalize_reload_reconnect (cognitive 21): jcode_tui::tui::app::remote::reconnect::finalize_reload_reconnect has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/reconnect.rs"},"region":{"startLine":996}}}],"partialFingerprints":{"codehealthFindingId/v1":"d80f19874b510b611f359ce78b58c6aa2af469315c38f2377a23dff194a6f239"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::replay_export::normalize_todo_snapshot (cognitive 21): jcode_tui::tui::app::replay_export::normalize_todo_snapshot has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (5 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/replay_export.rs"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d7d5152dd462edc92c7626d9ef9344acf9a5fcd63fa14b533efdeead0bc8cc2"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui::copy_selection::copy_selection_metrics_from_raw_lines (cognitive 21): jcode_tui::tui::ui::copy_selection::copy_selection_metrics_from_raw_lines has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui/copy_selection.rs"},"region":{"startLine":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"829c89bccbeab8bb6ac23a2c42ef770d0400906049c48691c5240cddc99db7cd"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_input::draw_prompt_history_search_overlay (cognitive 21): jcode_tui::tui::ui_input::draw_prompt_history_search_overlay has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_input.rs"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"365d0e41b89653547f7e3a30a1cdde61f7a36ff87a2a9c7591bc75cac8ee94dd"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::push_todo_status_pips (cognitive 21): jcode_tui::tui::ui_messages::push_todo_status_pips has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, loops 5 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":1483}}}],"partialFingerprints":{"codehealthFindingId/v1":"536b5aa1d95ce2870630608fddafb1d7efb1ceac73bbcd65e9519ebbbdf25592"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::expanded_diff_row (cognitive 21): jcode_tui::tui::ui_messages::expanded_diff_row has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 3 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":3875}}}],"partialFingerprints":{"codehealthFindingId/v1":"478bf600ef7146af17e008f02ac9a1c0964bba5250c8721c3d4182d8cb886367"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_onboarding::welcome_body_lines (cognitive 21): jcode_tui::tui::ui_onboarding::welcome_body_lines has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 2 (3 pts), loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_onboarding.rs"},"region":{"startLine":440}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcf4f9e989d3605db6e91c755608184375e8745c92f73ad9985ab613489c0231"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_prepare::prepare_active_batch_progress (cognitive 21): jcode_tui::tui::ui_prepare::prepare_active_batch_progress has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (17 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_prepare.rs"},"region":{"startLine":408}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7917a09bd5c26f9306370ab46d943011e4fd7432f5e4e2bd2a602f80fa1d411"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_prepare::wrap_lines (cognitive 21): jcode_tui::tui::ui_prepare::wrap_lines has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 4 (7 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_prepare.rs"},"region":{"startLine":2644}}}],"partialFingerprints":{"codehealthFindingId/v1":"b92afd83144b86bf892cc6dd9f24ff60d76fda3338f284320cfd17ff476c13d5"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_todo_stages::item_rows::render_todo_item_line (cognitive 21): jcode_tui::tui::ui_todo_stages::item_rows::render_todo_item_line has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_todo_stages/item_rows.rs"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"d82a314906ef4c8cba0011f7b32d2cdacd17a0234b815ed2aa80fe394ce6f5f1"}},{"ruleId":"D2","level":"warning","message":{"text":"StreamBuffer::drain_ops (cognitive 21): StreamBuffer::drain_ops has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (15 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-core/src/stream_buffer.rs"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f28551fcdf4ad6f1b7e8f4c8c14a0f6a47a5cf397848dc1c325d99fbab69a15"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_markdown::markdown_render_support::wrap_table_cell (cognitive 21): jcode_tui_markdown::markdown_render_support::wrap_table_cell has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_support.rs"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"86ef755784667c0cabcc767d148d156a7d656891b5212e63a31b8368d9415335"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_markdown::markdown_wrap::balanced_wrap_breaks (cognitive 21): jcode_tui_markdown::markdown_wrap::balanced_wrap_breaks has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_wrap.rs"},"region":{"startLine":459}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f01367287c3d9be59bd36bf50bcbb9e7a76ee2985fd6bccfc60071e486a14c4"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_render::swarm_tiles::render_swarm_gallery (cognitive 21): jcode_tui_render::swarm_tiles::render_swarm_gallery has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (6 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/swarm_tiles.rs"},"region":{"startLine":353}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9c30607366d7b99c8ac88cef9ebbe3949abe0de64c21a3df322398f4f19c960"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_tool_display::without_ansi (cognitive 21): jcode_tui_tool_display::without_ansi has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 3 (7 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-tool-display/src/lib.rs"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"71b58196c362e1eed198268615d6cb95bb85c9e58de07f506cb9448289c1fcca"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::bin::memory_recall_bench::focus_query (cognitive 21): jcode::bin::memory_recall_bench::focus_query has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"3021e5ce65be10fc2da7ab970440182e630e8263df5b785a83b5cb9bbb30f834"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::cloud_move::export_return_archive (cognitive 21): jcode::cli::cloud_move::export_return_archive has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 4, match/switch 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_move.rs"},"region":{"startLine":1228}}}],"partialFingerprints":{"codehealthFindingId/v1":"167946095ac2523fafd410c04b2a177037f7401f2b735adc9bbafaaf727396ce"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::dispatch::spawn_server_with_lifetime (cognitive 21): jcode::cli::dispatch::spawn_server_with_lifetime has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 2, loops 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/dispatch.rs"},"region":{"startLine":1356}}}],"partialFingerprints":{"codehealthFindingId/v1":"72c044c0a69c12b99cdd576bcf5169f84a0b53524adcbffd039954248d220946"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::tui_launch::run_client (cognitive 21): jcode::cli::tui_launch::run_client has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 2 (6 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/tui_launch.rs"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"872354eedc616782a398035157b21527740bd00ceb7f83f80165a6d5cb4be3ba"}},{"ruleId":"D2","level":"warning","message":{"text":"remote.value_end (cognitive 21): remote.value_end has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 2 (4 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/cloud_preview/remote.py"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"abcc9fb58bec385868e96449c7562ffe6d832838ec479d4c233839d3981d5064"}},{"ruleId":"D2","level":"warning","message":{"text":"buildPriceIndex (cognitive 21): buildPriceIndex has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (8 pts), ternaries 2 (6 pts), loops 3 (4 pts), other 2, boolean chains 1 (nesting depth added 10). Of this number, 13 points are the body\u0027s own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/model-pricing.js"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae86d03ca9f15ec1efb597fa2337b6796a3e95ada00381696ebd20eaf56a70c4"}},{"ruleId":"D2","level":"warning","message":{"text":"normalizeDiscoveryEvent (cognitive 21): normalizeDiscoveryEvent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, ternaries 3, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":2243}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d2a469d1d10c8aea29e950759ef88763310f0fb7ead42a164a71384028cfef9"}},{"ruleId":"D2","level":"warning","message":{"text":"RelayLauncherClient::run (cognitive 20): RelayLauncherClient::run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (4 pts), match/switch 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/jade_relay.rs"},"region":{"startLine":605}}}],"partialFingerprints":{"codehealthFindingId/v1":"935faf12b7970014ec8804caad052bdb437af213c790c94a4ffcd59b877fa3e6"}},{"ruleId":"D2","level":"warning","message":{"text":"McpCallTool::execute (cognitive 20): McpCallTool::execute has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (16 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/mcp.rs"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"2eb779077fdf8d108253a0bdf8a907bc5986e5714392907db0792f0dc9beff8e"}},{"ruleId":"D2","level":"warning","message":{"text":"SelfDevTool::do_reload (cognitive 20): SelfDevTool::do_reload has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (15 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/selfdev/reload.rs"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"de69f77962e75606acadf2e581e9fe1db2c82fee941383bfbbed24f2d071bdc2"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::client_comm_context::handle_comm_share (cognitive 20): jcode_app_core::server::client_comm_context::handle_comm_share has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_comm_context.rs"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"679fcad1e72a34541e195e8c9bf7bf8e4f9db4f5cae460c6f2d12285e14a0fe8"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::discover::validate_discovery_text (cognitive 20): jcode_app_core::tool::discover::validate_discovery_text has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (20 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/discover.rs"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cf218dbda5dda477417ad59867416d318096afb6f87f267b050efc69d51c0ac"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::read::get_image_dimensions_from_data (cognitive 20): jcode_app_core::tool::read::get_image_dimensions_from_data has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/read.rs"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"94101460b186d75bb28603ce1a12a2af0ea7fc5d0004ba58672f770265ee9db2"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::remote_exec::run_worker (cognitive 20): jcode_app_core::tool::remote_exec::run_worker has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 2 (5 pts), loops 3, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/remote_exec.rs"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"94929d71fabd480b212b778e9833c9cdba7b9282bc5a1a9187881bf6610b28ce"}},{"ruleId":"D2","level":"warning","message":{"text":"BackgroundTaskManager::arm_stall_watchdog (cognitive 20): BackgroundTaskManager::arm_stall_watchdog has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/background.rs"},"region":{"startLine":1216}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0e73aa6b0d5322180a83064cc7077a0b15ccb62dfe107498bfda7821987e5b1"}},{"ruleId":"D2","level":"warning","message":{"text":"BackgroundTaskManager::persisted_detached_running_tasks_for_session (cognitive 20): BackgroundTaskManager::persisted_detached_running_tasks_for_session has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/background.rs"},"region":{"startLine":1624}}}],"partialFingerprints":{"codehealthFindingId/v1":"15799231760612837a2b5cf751c721e39688838790360809d4f6efe02dda2a20"}},{"ruleId":"D2","level":"warning","message":{"text":"MultiProvider::refresh_catalogs (cognitive 20): MultiProvider::refresh_catalogs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/catalog_refresh.rs"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e4b1123b0a86eac0ec0e1526427d815bdad13be2338d5f85869aae14aa92254"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::gateway::handle_http (cognitive 20): jcode_base::gateway::handle_http has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 2, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/gateway.rs"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e04bc006ec4edf1fae09503735effe596fbbad5fc9d1fb10659b213e14da760"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::import::import_opencode_session_from_path (cognitive 20): jcode_base::import::import_opencode_session_from_path has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/import.rs"},"region":{"startLine":1309}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7a8ae5e6a171f6f6bec52541f7dae81ac15496507f3592428c4854da91a6cc2"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::prompt::get_git_info_uncached (cognitive 20): jcode_base::prompt::get_git_info_uncached has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/prompt.rs"},"region":{"startLine":743}}}],"partialFingerprints":{"codehealthFindingId/v1":"7aa95ac792a729a0fabafd6276fc35faef9b8114ca5788daa3f90ed9ae026ed0"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::provider::image_clamp::probe_dimensions (cognitive 20): jcode_base::provider::image_clamp::probe_dimensions has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/image_clamp.rs"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"003c11edc0d50cf027c467c7ca3102c1a17f54d9fc2dd494c6004a7c3e1c9596"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_import_core::load_pi_external_session (cognitive 20): jcode_import_core::load_pi_external_session has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-import-core/src/lib.rs"},"region":{"startLine":734}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc0bd5e3f47d0add38936de43fff4f76ca289b10892c434ac47cb7a31f083f5b"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_import_core::load_opencode_external_session (cognitive 20): jcode_import_core::load_opencode_external_session has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-import-core/src/lib.rs"},"region":{"startLine":826}}}],"partialFingerprints":{"codehealthFindingId/v1":"07cbe0d4e581fbcf36c3b2127e6f98855dbe9c68ffa661b96482ca090d8b2628"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_anthropic::history_repair::answer_unpaired_tool_uses (cognitive 20): jcode_provider_anthropic::history_repair::answer_unpaired_tool_uses has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic/src/history_repair.rs"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b5396468689e4129d037fd30d05e27a7dc48e924cf52b3196ed193abe49e65a"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_core::openai_schema::schema_supports_strict::check_map (cognitive 20): jcode_provider_core::openai_schema::schema_supports_strict::check_map has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5, match/switch 2, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/openai_schema.rs"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e5e75dc7c2b679171ffe019e1ad9dca570b75e474efc6b374d0be1d5674719c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_core::reasoning::inferred_reasoning_efforts (cognitive 20): jcode_provider_core::reasoning::inferred_reasoning_efforts has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 5 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/reasoning.rs"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bca0bc5ca778e6e952cb546005ef8c7fbd4292b0259299f65107f25f5cea344"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_openai::request::insert_additional_tools (cognitive 20): jcode_provider_openai::request::insert_additional_tools has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (4 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai/src/request.rs"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e4db66aef73cef3b45af4f93031a0898b3cd00e32591cd0c301806f2c18234c"}},{"ruleId":"D2","level":"warning","message":{"text":"GlobalEventStream::next (cognitive 20): GlobalEventStream::next has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (17 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-sdk/src/client.rs"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"2047e36b49470071ef2bd7eeea4752fa99f48c92fd74ae1038bd2cd56e245787"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_sdk::client::global_session_workers::start_global_child (cognitive 20): jcode_sdk::client::global_session_workers::start_global_child has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (16 pts), match/switch 2 (3 pts), loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-sdk/src/client/global_session_workers.rs"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee7646a2fbfbed18e4f03aeac9ecb385a6c03019a82825329f4293b4bd839c66"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_terminal_launch::parse_hook_command (cognitive 20): jcode_terminal_launch::parse_hook_command has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-terminal-launch/src/lib.rs"},"region":{"startLine":531}}}],"partialFingerprints":{"codehealthFindingId/v1":"3571e0d42a7c2b62d3a73a3f11b23452b1e69bcbb7f0f202e887d64557965a51"}},{"ruleId":"D2","level":"warning","message":{"text":"App::run_mermaid_ui_bench (cognitive 20): App::run_mermaid_ui_bench has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_bench.rs"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ef716f98b8eaba13973598aaed60281e9d72db2cbdec7d8585a891cc0517a88"}},{"ruleId":"D2","level":"warning","message":{"text":"App::run_widget_stability (cognitive 20): App::run_widget_stability has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 4 (6 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_bench.rs"},"region":{"startLine":1137}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d72696bf75a2cc899ff4cf73463a5d9ad1e92fff9b2be93017f6615eb3707d1"}},{"ruleId":"D2","level":"warning","message":{"text":"App::extend_remote_routes_for_uncovered_models_static (cognitive 20): App::extend_remote_routes_for_uncovered_models_static has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (7 pts), loops 2 (3 pts), match/switch 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":836}}}],"partialFingerprints":{"codehealthFindingId/v1":"7593d1692b649c8748a69a052b244f6fdd07942cceb84aede5f0f1b5005cbb6d"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_session_picker_action (cognitive 20): App::handle_session_picker_action has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 2 (3 pts) (nesting depth added 9). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":3317}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d487eb6073b5fe4d8cd83e5048062cd6c70985bcf1962b91cd1e86bdbfb4a79"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::auth_account_commands::handle_auth_command (cognitive 20): jcode_tui::tui::app::auth_account_commands::handle_auth_command has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (17 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_commands.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2e18b1e668d20b9462e80561f8c096f9626a8d75f868491766859233eef05a4"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::commands_improve::format_improve_status (cognitive 20): jcode_tui::tui::app::commands_improve::format_improve_status has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (jcode_tui::tui::app::commands_improve::format_refactor_status) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_improve.rs"},"region":{"startLine":456}}}],"partialFingerprints":{"codehealthFindingId/v1":"de0080ca61550f5b7aa6bfce34014065d8694c110f36e773e3812022dcfb8373"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::commands_improve::format_refactor_status (cognitive 20): jcode_tui::tui::app::commands_improve::format_refactor_status has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (jcode_tui::tui::app::commands_improve::format_improve_status) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_improve.rs"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b14e996beccb79e6692028fb88ff6613bbb313a535508911b887b2298261e56"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::remote::handle_debug_command (cognitive 20): jcode_tui::tui::app::remote::handle_debug_command has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (14 pts), match/switch 1 (3 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote.rs"},"region":{"startLine":2031}}}],"partialFingerprints":{"codehealthFindingId/v1":"99a705deae0db77a2d80e884c7a0a70c5aae4e30a840dfc0e51197ac217dd81b"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::info_widget_model::runtime_rows (cognitive 20): jcode_tui::tui::info_widget_model::runtime_rows has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_model.rs"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"91a1f6fde11dffc885993f7efbc233208f41d76cfe50edf291bf8c843353846d"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::info_widget_swarm_background::render_swarm_widget (cognitive 20): jcode_tui::tui::info_widget_swarm_background::render_swarm_widget has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (14 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_swarm_background.rs"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffe71be4f56b68db64b0479bcb76bbf03d9d73c939a494a1db2d266cdd282e0b"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::session_picker::loading::mobile_inventory::register (cognitive 20): jcode_tui::tui::session_picker::loading::mobile_inventory::register has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading/mobile_inventory.rs"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8b456bab951537739b12ff6fd533e40b69b6ee0955e98fddac1b6efdccdd18b"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::session_picker::transcript_search::text_cache::decode (cognitive 20): jcode_tui::tui::session_picker::transcript_search::text_cache::decode has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/transcript_search/text_cache.rs"},"region":{"startLine":419}}}],"partialFingerprints":{"codehealthFindingId/v1":"225375bf10e66ab2b9de7345e292f48b0261b4a8c4c3d9d913495decdc8f45b7"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_input::command_suggestions::command_suggestion_lines (cognitive 20): jcode_tui::tui::ui_input::command_suggestions::command_suggestion_lines has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_input/command_suggestions.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"132165ff9b2a28adc412a278e6ef766586bc793a1c643045320e83b15682a200"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_smoothness::hash_row (cognitive 20): jcode_tui::tui::ui_smoothness::hash_row has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_smoothness.rs"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"84d76b91be080155767fd6e343f3c4f0c77265ac7cd01004f3a3292a3da5516a"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_todo_stages::lane_agent_chip (cognitive 20): jcode_tui::tui::ui_todo_stages::lane_agent_chip has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_todo_stages.rs"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"42dbf13daf6af24b286b72fe9325e5c851de36cedaac28de1ac6bc775f4ff1e2"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::video_export::render_svg_pipeline (cognitive 20): jcode_tui::video_export::render_svg_pipeline has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 5 (7 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/video_export.rs"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"d258ea00972f682dfc7d98cd37ddb90cfbf3bd686ac14305cb1c38f015a8feb4"}},{"ruleId":"D2","level":"warning","message":{"text":"AccountPicker::provider_overview_line (cognitive 20): AccountPicker::provider_overview_line has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay.rs"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"f782a2039512004fe0783217830a2b570a09709043262dd3a671f30dbf2164bd"}},{"ruleId":"D2","level":"warning","message":{"text":"AnchorStabilityRecorder::observe (cognitive 20): AnchorStabilityRecorder::observe has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 3, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-core/src/anchor_stability.rs"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"c478443be53bed457c7d88244d331e067439804eeb0fafb7a0ded3f8e7608244"}},{"ruleId":"D2","level":"warning","message":{"text":"IncrementalMarkdownRenderer::render_split (cognitive 20): IncrementalMarkdownRenderer::render_split has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 5, match/switch 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_incremental.rs"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcb736e43518c6761c0a11864c5aec25d2c42dfaf3947a65c1a43ba0ade299c0"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_style::harmony::generate::generate_from_seed (cognitive 20): jcode_tui_style::harmony::generate::generate_from_seed has cognitive complexity 20 (threshold 15). Drivers by points: if/else 18 (19 pts), loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-style/src/harmony/generate.rs"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cd0ba3c8ed8736d40270a4665f6f4c918ea06a5d941a81019941640e0449ca0"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_voice::validate_wav (cognitive 20): jcode_voice::validate_wav has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, match/switch 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-voice/src/lib.rs"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9def38eb93ed4bd21cfe6d67ec2c40c4634e2bf2493b5cdbbe18601a4901cf7"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::auth_import::read_private_stdin (cognitive 20): jcode::cli::auth_import::read_private_stdin has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/auth_import.rs"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e1e408195204e0b7e476df2fc4118fa6244d7ae131de0242f7ad2488a443dbe"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::cloud_ephemeral::run_cli (cognitive 20): jcode::cli::cloud_ephemeral::run_cli has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 1 (3 pts), match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_ephemeral.rs"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"32b75154cbce04b545e033f4536de617bd1012ac815aa95907addc85eea12dd2"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::hot_exec::hot_reload (cognitive 20): jcode::cli::hot_exec::hot_reload has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/hot_exec.rs"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f91d2dcb4c89da3183822f2739828ae38bfdf8ece9c2a8f0b46bab5ae28ca10"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::login::google::prepare_project (cognitive 20): jcode::cli::login::google::prepare_project has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 3 (8 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/login/google.rs"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cc7f7e33e396566f3bc3300cfcbb87cb695eb557ec8f1b313f950fa4d07151e"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::ssh::run_unix (cognitive 20): jcode::cli::ssh::run_unix has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 2, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/ssh.rs"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff7fad7ceed238c2ab2d40f53b3670ddd5750b317fdf1836698e2b1408c10732"}},{"ruleId":"D2","level":"warning","message":{"text":"writeFirehose (cognitive 20): writeFirehose has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 8, if/else 8, ternaries 2, error handling 1, other 1. Of this number, 14 points are the body\u0027s own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":374}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3772cb541ad885d01fe0aad693a501d78aeb3480739821a018aa7292f734a62"}},{"ruleId":"D2","level":"warning","message":{"text":"SelfDevTool::execute (cognitive 19): SelfDevTool::execute has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 2 (4 pts) (nesting depth added 7). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/selfdev/mod.rs"},"region":{"startLine":589}}}],"partialFingerprints":{"codehealthFindingId/v1":"af64354406db73a05cfa64d2c934220a4a948f460b6472a2a55515505679d938"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::ambient::prompt::gather_feedback_memories (cognitive 19): jcode_app_core::ambient::prompt::gather_feedback_memories has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (5 pts), boolean chains 3, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/ambient/prompt.rs"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"da9ad89be6b37282fa1accd70b6f352809005c72dfc4c041ccdab08c1873f412"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::mobile_push::plain_lines (cognitive 19): jcode_app_core::mobile_push::plain_lines has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/mobile_push.rs"},"region":{"startLine":418}}}],"partialFingerprints":{"codehealthFindingId/v1":"7450070606488d000fca0fc74ef453bf700dc27aeeb7397136b3b8a29ac23415"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::debug_testers::spawn_tester (cognitive 19): jcode_app_core::server::debug_testers::spawn_tester has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (16 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_testers.rs"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bf3b63bc08ed77f28c16ed70db39a81ca91807dca192cd265abf245dadfbdee"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::runtime_ssh_loops::run_reserved_followups (cognitive 19): jcode_app_core::server::runtime_ssh_loops::run_reserved_followups has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/runtime_ssh_loops.rs"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"e14624a78421b17fac25978732088bd23dd6ae2ac68e5416d6f1984735878fa8"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::mcp::connection_config (cognitive 19): jcode_app_core::tool::mcp::connection_config has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 5 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/mcp.rs"},"region":{"startLine":502}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b364b741a92ca735e13dfd63b5a54a55016b858a09f952da12d33969a4f96d0"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::read::normalize_read_range (cognitive 19): jcode_app_core::tool::read::normalize_read_range has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 2, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/read.rs"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"a866010ff2dac716a01e277ea31f18addcc96c1a0236e5302914afe1af63f6b2"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::session_search::append_session_results (cognitive 19): jcode_app_core::tool::session_search::append_session_results has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/session_search.rs"},"region":{"startLine":1501}}}],"partialFingerprints":{"codehealthFindingId/v1":"15cbd52fa3e88ad7c50ef9fe88c42703659a0804c9a6dd3d071644774e8a5a73"}},{"ruleId":"D2","level":"warning","message":{"text":"MultiProvider::native_compact (cognitive 19): MultiProvider::native_compact has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (18 pts), match/switch 1 (nesting depth added 6). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/mod.rs"},"region":{"startLine":2742}}}],"partialFingerprints":{"codehealthFindingId/v1":"44dc9477d976cb6056e02e4e3149557b2fc43eee772ba537bbda25e322cd1fe3"}},{"ruleId":"D2","level":"warning","message":{"text":"MultiProvider::explicit_session_provider_key_for_model_request (cognitive 19): MultiProvider::explicit_session_provider_key_for_model_request has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/selection.rs"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"0283a08daa813fb85db7f6b6c95223014611009fdc100270361db3dbf99a9a10"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::auth::external::load_oauth_tokens_for_candidates (cognitive 19): jcode_base::auth::external::load_oauth_tokens_for_candidates has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/external.rs"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea46f9666aeac63bd02504880673f6897a950088d08330e7f8266ae307dfeb10"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::mcp::oauth::discover (cognitive 19): jcode_base::mcp::oauth::discover has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mcp/oauth.rs"},"region":{"startLine":807}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b982d7b6a1fec2248bab7a260694f6a30c87bb012aa068eb0cab0ddf711b792"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::memory::ranking::bm25_rank (cognitive 19): jcode_base::memory::ranking::bm25_rank has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 5 (8 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory/ranking.rs"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8e5a712147d9271ab956f6dfde814e73de7c2faf45e3ad6c4d399dc51513f6f"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::mobile_sync::wire_messages (cognitive 19): jcode_base::mobile_sync::wire_messages has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mobile_sync.rs"},"region":{"startLine":461}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c9bab23ed2b4d10368840f2be4adefbd9e9d4cb76d3f257df20cf2c5a88dacb"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::session::crash::find_crashed_via_pid_files (cognitive 19): jcode_base::session::crash::find_crashed_via_pid_files has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 4 (8 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/crash.rs"},"region":{"startLine":318}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0cc8581029119c8fc9fd58a6a77b39d41bb76f2c4a09c9f780d74aa354280fd"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::session::crash::find_session_by_metadata_impl (cognitive 19): jcode_base::session::crash::find_session_by_metadata_impl has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/crash.rs"},"region":{"startLine":665}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f21db0cb1dc599b2df4e1f0d463faea6e3da5c61ac7b4013003cea5faabece9"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::transcript_sample::anthropic_blocks (cognitive 19): jcode_base::transcript_sample::anthropic_blocks has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 2 (3 pts), loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/transcript_sample.rs"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"783aaec4b267c60db5e490fd77873cf9f429e4a120650f4cad624fd719ee91d3"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::usage::openai_helpers::classify_openai_limits (cognitive 19): jcode_base::usage::openai_helpers::classify_openai_limits has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 6, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/openai_helpers.rs"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2a95d236065b3a0ff06f6853e8dd65f18b47d522bd707d896ddadca209fdd07"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_command_risk::paths::classify_target (cognitive 19): jcode_command_risk::paths::classify_target has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 6 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-command-risk/src/paths.rs"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"9481dbaaa3943be2f4265f094a9fa047150c7a5a58f4a2643246c11b493a5ecd"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_core::stdin_detect::linux::direct_children (cognitive 19): jcode_core::stdin_detect::linux::direct_children has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (6 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-core/src/stdin_detect.rs"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"20992736593533d65535b2b3795e37ce331f5d9d0b51b732f0161b88e281b66b"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_memory_types::format_entries_for_prompt_with_header (cognitive 19): jcode_memory_types::format_entries_for_prompt_with_header has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 5, match/switch 2 (5 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-memory-types/src/lib.rs"},"region":{"startLine":664}}}],"partialFingerprints":{"codehealthFindingId/v1":"e14bbd893641d430699df4e04b19d1fba51796bbda3f23067b44301cc1f59a44"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_message_types::ends_with_fresh_user_turn (cognitive 19): jcode_message_types::ends_with_fresh_user_turn has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-message-types/src/lib.rs"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"f17295327d4fb623407468ba6d22660f802519d4cdb4306d11ce3c74ac30d86d"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_productivity_core::scan::scan_all (cognitive 19): jcode_productivity_core::scan::scan_all has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (7 pts), match/switch 3 (7 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-productivity-core/src/scan.rs"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"23932fb9e07b4f6ec289605ba8a682c0d4513d47843c574626630950100c87e4"}},{"ruleId":"D2","level":"warning","message":{"text":"BedrockProvider::model_info (cognitive 19): BedrockProvider::model_info has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, boolean chains 7. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-bedrock/src/lib.rs"},"region":{"startLine":853}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdfd743d4edc0e1c483ad8d7c7e718410814a188f1fb594784ef45bbe31dc797"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_core::model_names::pretty_picker_token (cognitive 19): jcode_provider_core::model_names::pretty_picker_token has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 7 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/model_names.rs"},"region":{"startLine":511}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecac1b7e6a6897fe451fa4bb20d543538390324d5f290233d044c352d3e6cf3d"}},{"ruleId":"D2","level":"warning","message":{"text":"EndpointInfo::detail_string (cognitive 19): EndpointInfo::detail_string has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 7 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter/src/lib.rs"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e6d9cdf5ed44e0986265b369625da056800580709d8417a907ef3b59e96f9cf"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenRouterProvider::apply_resolved_reasoning_effort (cognitive 19): OpenRouterProvider::apply_resolved_reasoning_effort has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/lib.rs"},"region":{"startLine":867}}}],"partialFingerprints":{"codehealthFindingId/v1":"73e32609bdd7b6489361a67a7195e50d3b619f52ded84a74e8dcd75d415d0a5e"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_todo_policy::auto_poke_display_summary (cognitive 19): jcode_todo_policy::auto_poke_display_summary has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, boolean chains 9. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-todo-policy/src/lib.rs"},"region":{"startLine":817}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfe282ab56a555f3ae36a1d6bd13781a60e6d888b357557b1ede6144c7106f87"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_todo_policy::store::running_dependencies (cognitive 19): jcode_todo_policy::store::running_dependencies has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-todo-policy/src/store.rs"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a07ce85f1a311f55aa816c3faee7b7a835bbbd84a12e0e29d4efcea003e2efa"}},{"ruleId":"D2","level":"warning","message":{"text":"SyncPipeOperation::complete (cognitive 19): SyncPipeOperation::complete has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 2 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-transport/src/windows.rs"},"region":{"startLine":474}}}],"partialFingerprints":{"codehealthFindingId/v1":"6927e1f624ca2048a24aa8935941cebbd22598bcc069571eabbca5ef68743b80"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_session_update_status (cognitive 19): App::handle_session_update_status has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui_maintenance.rs"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfe77033fd948c5d940d65ca4e55952755cb9bd275012bf8f0ba43a66e4c7e63"}},{"ruleId":"D2","level":"warning","message":{"text":"App::refresh_completed_todo_report (cognitive 19): App::refresh_completed_todo_report has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 4, match/switch 4, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/todo_completion.rs"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"d46a2c52588e30573dfd943f0e89913684033a3807991c2dd7e371da025a1af1"}},{"ruleId":"D2","level":"warning","message":{"text":"Scan::normalized_text (cognitive 19): Scan::normalized_text has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/transcript_search.rs"},"region":{"startLine":1133}}}],"partialFingerprints":{"codehealthFindingId/v1":"b16deb46be1a9107e578de79104fc100a0b820cdf4d16cecc6320adf1223e7a9"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::binary_watch::imp::run (cognitive 19): jcode_tui::tui::app::binary_watch::imp::run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/binary_watch.rs"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"009829816c1fb3ff01fb0278ee7c0dd7dfa00a425c061b0f41def6d9386f144d"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::remote::handle_bus_event (cognitive 19): jcode_tui::tui::app::remote::handle_bus_event has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 3 (5 pts), boolean chains 3 (nesting depth added 8). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote.rs"},"region":{"startLine":772}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b4e229c8604fc2b3067756e62e3932f24dadf86050cf7b6ada436da500fb17c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::remote::reconnect::wait_for_reload_handoff_before_reconnect (cognitive 19): jcode_tui::tui::app::remote::reconnect::wait_for_reload_handoff_before_reconnect has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 2 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/reconnect.rs"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"6618018bd2d47e85925db2a6faabdb197930ff97919c2dd3647775ece28c1f29"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::state_ui_messages::display_message_from_stored_message (cognitive 19): jcode_tui::tui::app::state_ui_messages::display_message_from_stored_message has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 3 (7 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui_messages.rs"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3fde0616dfb63886053feecda7adf9b4ebc83967515cb5e2097f8da48e6b5d2"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::cloud_git::gather (cognitive 19): jcode_tui::tui::cloud_git::gather has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/cloud_git.rs"},"region":{"startLine":414}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7c5527f5b9414ebf005cda4b4e4b4734e7942da757c7b9c16d7ea8c2050d461"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::info_widget_usage::render_usage_widget (cognitive 19): jcode_tui::tui::info_widget_usage::render_usage_widget has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (18 pts), match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_usage.rs"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"e11cc093a0f3e570e58bc94c4bc5a5b48923a0c49b38c26c9c6e8074ab5f893d"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_header::header_model_display_name (cognitive 19): jcode_tui::tui::ui_header::header_model_display_name has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (4 pts), match/switch 1 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_header.rs"},"region":{"startLine":393}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f706d121ca9bafb941f5e00f114bc045f023f052c84e650462893f0ab3e3576"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_inline_image::build_section (cognitive 19): jcode_tui::tui::ui_inline_image::build_section has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (4 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_inline_image.rs"},"region":{"startLine":1014}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1b3c2ca0e740565ab2a822026de9b2ec41e3a463ff41b21fc89decd287e359c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_input::live_processing_status_line (cognitive 19): jcode_tui::tui::ui_input::live_processing_status_line has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), match/switch 5 (9 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_input.rs"},"region":{"startLine":679}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9e501b74259e8da9a9d9b150da154771a0edea7e1de5e64ce572653428a6026"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_pinned::render_side_panel_markdown_cached_with_zoom_and_profile_area (cognitive 19): jcode_tui::tui::ui_pinned::render_side_panel_markdown_cached_with_zoom_and_profile_area has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_pinned.rs"},"region":{"startLine":975}}}],"partialFingerprints":{"codehealthFindingId/v1":"92e5ed744efc675cdfdf8c122b4707b54c42ff6756e451bb88f1b2dc87e7c00d"}},{"ruleId":"D2","level":"warning","message":{"text":"AccountPicker::render_detail_pane (cognitive 19): AccountPicker::render_detail_pane has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 3 (6 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay.rs"},"region":{"startLine":579}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b442bd94d5a45d9a7c5b2225592b5ebaa62e67473250dc9dadbe5f0c39ac644"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_render::truncate_line_to_width (cognitive 19): jcode_tui_render::truncate_line_to_width has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/lib.rs"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"3409aeedf18e6122b34a7f020b7110211208c2e81f73f328bfe0196be763f925"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_render::truncate_line_with_ellipsis_to_width (cognitive 19): jcode_tui_render::truncate_line_with_ellipsis_to_width has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/lib.rs"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"979afedb0d9324ee3342fce9940daaff874155a571ac750d3189a96757a22e3c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::bin::memory_recall_bench::cmd_judge (cognitive 19): jcode::bin::memory_recall_bench::cmd_judge has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), loops 2, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":867}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b4776d5f3c98538ec3f61c09201f4d14842c1d3c419662795c7e45687666ea9"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_env::load_api_key_from_env_or_config (cognitive 19): jcode_provider_env::load_api_key_from_env_or_config has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-env/src/lib.rs"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"91833fafc98ac04bb6e532268195bfdf44f5c9dd487f4e8f0cdc0ff86c41a406"}},{"ruleId":"D2","level":"warning","message":{"text":"JcodeClient.ingest (cognitive 19): JcodeClient.ingest has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, ternaries 1 (2 pts), error handling 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/typescript/src/client.ts"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"0594497dcbe1dbf2c15771bde2133a43879ab04c273b14b99a588030e1093674"}},{"ruleId":"D2","level":"warning","message":{"text":"move-bulk-events.q (cognitive 19): move-bulk-events.q has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 1 (3 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/scripts/move-bulk-events.mjs"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf8d084d41ae94b445af9094a73e1fcbc7020598368789b0d98da7e38f60e845"}},{"ruleId":"D2","level":"warning","message":{"text":"Agent::validate_tool_allowed (cognitive 18): Agent::validate_tool_allowed has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/turn_execution.rs"},"region":{"startLine":1178}}}],"partialFingerprints":{"codehealthFindingId/v1":"c00f03a5876e9a5c2c8eceed73eb8709a2efa120d9fde413e56e0bf231147c83"}},{"ruleId":"D2","level":"warning","message":{"text":"Agent::messages_for_provider (cognitive 18): Agent::messages_for_provider has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 2 (6 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent.rs"},"region":{"startLine":947}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d69e30f35cb14f69febd0ecf91eb27a0beaeb253320eb1029b998327831b757"}},{"ruleId":"D2","level":"warning","message":{"text":"Projection::observe (cognitive 18): Projection::observe has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 3 (4 pts), boolean chains 1 (nesting depth added 7). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/live_status.rs"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"65bcbfcb6359affaf53e9ec17d979bc8b61ecc235de11936f7c4b5e9de50489a"}},{"ruleId":"D2","level":"warning","message":{"text":"BuildRequest::reconcile_pending_state (cognitive 18): BuildRequest::reconcile_pending_state has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/selfdev/mod.rs"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"067265e03b3ed98084a2fdf755ab34ec417dbefaa91abb5857e564827964a523"}},{"ruleId":"D2","level":"warning","message":{"text":"WebFetchTool::execute (cognitive 18): WebFetchTool::execute has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 2, loops 1, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/webfetch.rs"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"cce4458adf8c9f85d75c7e0875e46fd22a1fa1323b47e0309ef779e5195a873c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::mobile_push::notify_turn (cognitive 18): jcode_app_core::mobile_push::notify_turn has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/mobile_push.rs"},"region":{"startLine":865}}}],"partialFingerprints":{"codehealthFindingId/v1":"216e781747d7151c87c3cef5a85a4fa56ea05fc0587f26b9b5174475e668ee27"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::replay::load_swarm_sessions (cognitive 18): jcode_app_core::replay::load_swarm_sessions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 6, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/replay.rs"},"region":{"startLine":619}}}],"partialFingerprints":{"codehealthFindingId/v1":"060752e3ff3765f548fecd341120ffbc81da1a0a7e79c86ed441233beadf0fb3"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::comm_control::handle_comm_assign_next (cognitive 18): jcode_app_core::server::comm_control::handle_comm_assign_next has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), match/switch 3 (7 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_control.rs"},"region":{"startLine":1494}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb7812166018edcb6b2d3516749d3ab25a72803b44a79cebf85bfc85657213d3"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::debug_events::maybe_handle_event_subscription_command (cognitive 18): jcode_app_core::server::debug_events::maybe_handle_event_subscription_command has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 2 (5 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_events.rs"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a782e0cf3ca4e411891294c6a68ce54baf02d5a62d889477893789ae19901f8"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::reload::graceful_shutdown_sessions_with_timeout (cognitive 18): jcode_app_core::server::reload::graceful_shutdown_sessions_with_timeout has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 2 (5 pts), loops 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/reload.rs"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a6f850afbb50a9a7a6d2f7f35b10656b2fe5dc781ff066ba5ee8e6074ef53fe"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::todo::merge_confidence_history (cognitive 18): jcode_app_core::tool::todo::merge_confidence_history has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/todo.rs"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"02a0f840712d90a3c55d6dc7a4c0afaea2db80edd46f97e02768f232fc35fcd5"}},{"ruleId":"D2","level":"warning","message":{"text":"MultiProvider::model_switch_request_for_session_model (cognitive 18): MultiProvider::model_switch_request_for_session_model has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 3, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/selection.rs"},"region":{"startLine":371}}}],"partialFingerprints":{"codehealthFindingId/v1":"84b5788c2a5a49acfccd8e2bd39c2e0874128ccacd857899524fa3140c212c67"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::import::normalize_imported_history (cognitive 18): jcode_base::import::normalize_imported_history has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 3, loops 2 (3 pts), match/switch 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/import.rs"},"region":{"startLine":518}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b9ad686f773ddae16ee8c5ade9048c2322353788cd5936e4ead46868861faac"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::memory_jev::select_with_transport (cognitive 18): jcode_base::memory_jev::select_with_transport has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory_jev.rs"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"4eddbd78e22369d8be197f07c183b9f921bf1a4c06a6786435b2d1854d8a8654"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::provider::pricing::cheapness_for_route (cognitive 18): jcode_base::provider::pricing::cheapness_for_route has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/pricing.rs"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f2509a2d9533f33c0ba285d325bf52a640dfef55934bf68c7afe57810be99c0"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::provider_catalog::resolve_openai_compatible_profile_endpoint (cognitive 18): jcode_base::provider_catalog::resolve_openai_compatible_profile_endpoint has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider_catalog.rs"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"d08b662b18765e3418ef27426d1b14b4c391024951273a306d6d7f44b906e308"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::session::render::summarize_tool_calls (cognitive 18): jcode_base::session::render::summarize_tool_calls has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/render.rs"},"region":{"startLine":305}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ab763cf6c53b3814577107e699c13f463b2d79f0ccce1c2fd893db15b2cc4da"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::sidecar::extract_openai_response_text (cognitive 18): jcode_base::sidecar::extract_openai_response_text has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/sidecar.rs"},"region":{"startLine":1092}}}],"partialFingerprints":{"codehealthFindingId/v1":"21535865958f12cac511efe902345c8d0d201cf8d1eb1173b663550976313959"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::usage::api_keys::parse_zai_coding_plan_limits (cognitive 18): jcode_base::usage::api_keys::parse_zai_coding_plan_limits has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 3 (6 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/api_keys.rs"},"region":{"startLine":629}}}],"partialFingerprints":{"codehealthFindingId/v1":"92c5ea6a4c1540441eb27eefab40af66aba086a4237029ffaa3488fae4e59269"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_command_risk::tokenize::embedded_substitutions (cognitive 18): jcode_command_risk::tokenize::embedded_substitutions has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-command-risk/src/tokenize.rs"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"3baa3d4cbc88e0ad069c3e9fe9a2d5df7c63d1fc32520096ed888ac6eb1b5a42"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_companion::voice::wait_final (cognitive 18): jcode_companion::voice::wait_final has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (6 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-companion/src/voice.rs"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"90d58d44e041077ea24ba3ea45ba0067bf43bb96ce72f76fef1022488c683c26"}},{"ruleId":"D2","level":"warning","message":{"text":"Embedder::embed (cognitive 18): Embedder::embed has cognitive complexity 18 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 3 (4 pts), match/switch 1 (2 pts) (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-embedding/src/lib.rs"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5bcf8ffd5d19b455eebb8ab41f842fff3acad8af14478e4e5cb4ce8b4751daa"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_import_core::tool_result_content_to_text (cognitive 18): jcode_import_core::tool_result_content_to_text has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), match/switch 2 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 10). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-import-core/src/lib.rs"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef532fba9a4c33529c9c34c6d97150c76eeb680cf960237baf7744e966c32ba5"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_import_core::extract_external_text_from_json::visit (cognitive 18): jcode_import_core::extract_external_text_from_json::visit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-import-core/src/lib.rs"},"region":{"startLine":462}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d42a561a40c21e1f53a3ced82244bbbe31f62e79d6df551f21cdeb681cab7f2"}},{"ruleId":"D2","level":"warning","message":{"text":"AnthropicProvider::refresh_catalogs (cognitive 18): AnthropicProvider::refresh_catalogs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic-runtime/src/catalog.rs"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"10049189c0a6dea8d8e0126de8d918ea180a7c460c4681a882b85d9478bb45f9"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_core::ws_deflate::parse_extension_response (cognitive 18): jcode_provider_core::ws_deflate::parse_extension_response has cognitive complexity 18 (threshold 15). Drivers by points: if/else 2 (7 pts), loops 3 (6 pts), match/switch 1 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/ws_deflate.rs"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8fd06d68bb6a0001a8f26f1f88eea53373025225b4c8083dd4d6ae09370c6bb"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_cursor_runtime::agent_transport::extract_answer_text (cognitive 18): jcode_provider_cursor_runtime::agent_transport::extract_answer_text has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (jcode_provider_cursor_runtime::agent_transport::extract_thinking_text) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/agent_transport.rs"},"region":{"startLine":657}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a53b45c0a527c4ed8d65b1025f48828d62b3abf9744de8649a558a2247e33a5"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_cursor_runtime::agent_transport::extract_thinking_text (cognitive 18): jcode_provider_cursor_runtime::agent_transport::extract_thinking_text has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 3 (6 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (jcode_provider_cursor_runtime::agent_transport::extract_answer_text) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/agent_transport.rs"},"region":{"startLine":682}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e2fa78f865a5991fa6684f1e97e9ce01d867950522174fdb4a1fb03afa4da9e"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_openai_runtime::openai_stream_runtime::recover_opaque_ws_rejection (cognitive 18): jcode_provider_openai_runtime::openai_stream_runtime::recover_opaque_ws_rejection has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 3 (9 pts), if/else 3 (8 pts), loops 1 (nesting depth added 11). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8ed6324a4cf28e72cf8a397babb8888a21e73ab0cb244e9cca3ed0d50fcd731"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_openrouter_runtime::openrouter_sse_stream::run_stream_with_retries (cognitive 18): jcode_provider_openrouter_runtime::openrouter_sse_stream::run_stream_with_retries has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/openrouter_sse_stream.rs"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"d45dc44262f153162e089f16568a94e6bd66cf5032717d15ae6e22938253dd76"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_render_core::math::split_matrix (cognitive 18): jcode_render_core::math::split_matrix has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), boolean chains 5, match/switch 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/math.rs"},"region":{"startLine":661}}}],"partialFingerprints":{"codehealthFindingId/v1":"2acd9797ffa74b2256c234666cc12ee6f81ec8515c3499b0a046ffbd049a235b"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_render_core::preprocess::stabilize_display_math (cognitive 18): jcode_render_core::preprocess::stabilize_display_math has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/preprocess.rs"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"08d3557f19114a35b282c623269496d99295c5ef848e5dbd457dae5749ecee67"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_telemetry_core::mark_tool_success_side_effects (cognitive 18): jcode_telemetry_core::mark_tool_success_side_effects has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lib.rs"},"region":{"startLine":1179}}}],"partialFingerprints":{"codehealthFindingId/v1":"621c94a6a00f37116e0c5979d2218ec46ab375b37a11a1c7a8f0f13a6851f935"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_terminal_launch::detected_resume_terminal_with_client_env (cognitive 18): jcode_terminal_launch::detected_resume_terminal_with_client_env has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, boolean chains 6, match/switch 2. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-terminal-launch/src/lib.rs"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"54d8264d14d744593aa31fe3635e21fd73e0b951da61ef642734dd2b9f8278f6"}},{"ruleId":"D2","level":"warning","message":{"text":"App::build_all_inline_account_picker (cognitive 18): App::build_all_inline_account_picker has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, loops 2, match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker.rs"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"66532f8f97a776e09e12c2461bee9dab5ca51555d5e35f81025ee4daede5f5e8"}},{"ruleId":"D2","level":"warning","message":{"text":"App::submit_ssh_login_input (cognitive 18): App::submit_ssh_login_input has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_remote.rs"},"region":{"startLine":465}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bb2440b812523bdcdf479f96dc77f3e416e2d4dbd825c64ed7f6fd253c3e688"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_account_picker_selection (cognitive 18): App::handle_account_picker_selection has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 6 (12 pts), if/else 3 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":2545}}}],"partialFingerprints":{"codehealthFindingId/v1":"13306e914eb642f63fa86c782c67883dec1a6f6b68e3d1fa646239871eef822e"}},{"ruleId":"D2","level":"warning","message":{"text":"App::format_usage_provider_card (cognitive 18): App::format_usage_provider_card has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (16 pts), loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/model_context.rs"},"region":{"startLine":1917}}}],"partialFingerprints":{"codehealthFindingId/v1":"72b8ab6ff0019ac122a22c324277faa128450e508f375b157a8165749fa72092"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_usage_reset_command (cognitive 18): App::handle_usage_reset_command has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, match/switch 3 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/usage_reset.rs"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"515ace949132d91ccdd45d253c52983f290d93dcf31df1962bcb016e3e7cbfcb"}},{"ruleId":"D2","level":"warning","message":{"text":"InfoWidgetData::effective_priority (cognitive 18): InfoWidgetData::effective_priority has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 1, match/switch 1 (nesting depth added 5). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget.rs"},"region":{"startLine":887}}}],"partialFingerprints":{"codehealthFindingId/v1":"82b9bec732af90516906b24518fbb1ce1c799197cfd334f0317f0cf93e23ec8f"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::commands_cloud::parse_move_options (cognitive 18): jcode_tui::tui::app::commands_cloud::parse_move_options has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_cloud.rs"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0322e17816280583d07d4c8bea5b71968b18dc593a4ae91d231ef28b68e4d6c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::debug::summarize_mermaid_ui_bench (cognitive 18): jcode_tui::tui::app::debug::summarize_mermaid_ui_bench has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug.rs"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"13f7ad9168ffc9e1629fd4cf159b593d09bad9390132a91a9003d0e6bfe88019"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::helpers::gather_ambient_info (cognitive 18): jcode_tui::tui::app::helpers::gather_ambient_info has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/helpers.rs"},"region":{"startLine":1665}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a6a8f834b5a2a32c35083f027a0c5f1eeb539fca30c3113c2fa25aae0715e91"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::hotkey_feedback::nearest_hotkey (cognitive 18): jcode_tui::tui::app::hotkey_feedback::nearest_hotkey has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 3 (9 pts), if/else 5 (8 pts), loops 1 (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/hotkey_feedback.rs"},"region":{"startLine":562}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d20c3a81890882110fa5e571fc27407f46505de5a666c8c63b4d8d0234c59f3"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::input::read_clipboard_for_paste_with (cognitive 18): jcode_tui::tui::app::input::read_clipboard_for_paste_with has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 1, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fe30df65008043cc86648e9d2c7d6d471c0ea8f7d9ccf155fc5fb77bd48781e"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::replay::run_swarm_replay (cognitive 18): jcode_tui::tui::app::replay::run_swarm_replay has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/replay.rs"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b945f0015d69271ceb11ebd7c47a9c8f9418872601ae4c1cf00d12ecbe6732e"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::replay::apply_replay_event (cognitive 18): jcode_tui::tui::app::replay::apply_replay_event has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 1, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/replay.rs"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"b801630f65e964ca4f56878b97da830616da18f82c48ca3e3a24f48ab0c65f35"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::todos_view::handle_todos_view_command (cognitive 18): jcode_tui::tui::app::todos_view::handle_todos_view_command has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 3 (5 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/todos_view.rs"},"region":{"startLine":491}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b835dab0966cc1476ad11c748e7498e64ce6a15b9c8b37a432f9208637f9643"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::session_picker::transcript_search::text_cache::decode_and_publish (cognitive 18): jcode_tui::tui::session_picker::transcript_search::text_cache::decode_and_publish has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 4, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/transcript_search/text_cache.rs"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbb8290b73bdd3b3b47d61c87a912ea8b5d6a4933415bb352119f94d7663e7f4"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_inline_interactive::picker_render_width (cognitive 18): jcode_tui::tui::ui_inline_interactive::picker_render_width has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_inline_interactive.rs"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c8a2c31cc78bdd291c6af72695f8e227eab00a8c3f346175a4dc519010ca27c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::render_finished_todo_summary (cognitive 18): jcode_tui::tui::ui_messages::render_finished_todo_summary has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":1302}}}],"partialFingerprints":{"codehealthFindingId/v1":"62202d216cb56f702d48ba0ca841e82928fbc130747a3799681b61f044759418"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::todo_goal_score_segments (cognitive 18): jcode_tui::tui::ui_messages::todo_goal_score_segments has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (17 pts), loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":1403}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5618b71dd7d84e6dfe607350ad54ed23123cd0fc161a62047d0dce29c981dc6"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::wrap_todo_detail (cognitive 18): jcode_tui::tui::ui_messages::wrap_todo_detail has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":1611}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e0e84fc5c9974f5ac3952a52d05dd0d30e693281d888f17ccf9c038e7197f52"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::compact_swarm_await_summary (cognitive 18): jcode_tui::tui::ui_messages::compact_swarm_await_summary has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":3244}}}],"partialFingerprints":{"codehealthFindingId/v1":"8350b707498ff4d858fba66d4de484c6605f0904b9554644424d965b83894d09"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::gmail_drafts::render_gmail_draft_card (cognitive 18): jcode_tui::tui::ui_messages::gmail_drafts::render_gmail_draft_card has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (12 pts), loops 2 (3 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages/gmail_drafts.rs"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3321d8e95cb3ac306bae82eeba08f8ea2d65b02e8194cde4e7add375bd01833"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_overlays::draw_help_overlay (cognitive 18): jcode_tui::tui::ui_overlays::draw_help_overlay has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (14 pts), loops 2 (4 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_overlays.rs"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f4e050b9ed626f5677cb2c4431c084f4ee70806bfdae660579e04aa00a90fce"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_markdown::recenter_structured_blocks_for_display (cognitive 18): jcode_tui_markdown::recenter_structured_blocks_for_display has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (9 pts), if/else 4 (7 pts), boolean chains 2 (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/lib.rs"},"region":{"startLine":925}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a6095288cd1fdf2f980d542bf792a091c86b072412e0e070180ef97fa010260"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_mermaid::mermaid_viewport::render_image_widget_fit_stable (cognitive 18): jcode_tui_mermaid::mermaid_viewport::render_image_widget_fit_stable has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, boolean chains 4, match/switch 2. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_viewport.rs"},"region":{"startLine":1205}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c5f389f296140dd919417ccbfd1483a80da0cbf7282035d708ce24a27e4b94c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_style::harmony::chroma_coherence (cognitive 18): jcode_tui_style::harmony::chroma_coherence has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-style/src/harmony.rs"},"region":{"startLine":539}}}],"partialFingerprints":{"codehealthFindingId/v1":"27be50935a1467c8968d2bbbc7bbc4e5f425029b69d42d4ed1a8c74809f97f73"}},{"ruleId":"D2","level":"warning","message":{"text":"UsageOverlay::render_item_list (cognitive 18): UsageOverlay::render_item_list has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (17 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-usage-overlay/src/lib.rs"},"region":{"startLine":507}}}],"partialFingerprints":{"codehealthFindingId/v1":"c253df9e18b6767a3dad65bf445aef5111ab03ed8829db020ff60658ce2a90b4"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::bin::tui_bench::summarize_mermaid_ui (cognitive 18): jcode::bin::tui_bench::summarize_mermaid_ui has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/tui_bench.rs"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"88b55357868b519840e40ccfcf6c4fffda8acd29f225eea0e4930ff608b92957"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::cloud_move::describe_local_only_state (cognitive 18): jcode::cli::cloud_move::describe_local_only_state has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_move.rs"},"region":{"startLine":2560}}}],"partialFingerprints":{"codehealthFindingId/v1":"da3cfa3e99b0e95102d517b97016fc96c6dd186c4bf71a377e4477bacc28e5d2"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_terminal_prompt::secret::read_secret_line (cognitive 18): jcode_terminal_prompt::secret::read_secret_line has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-terminal-prompt/src/secret.rs"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9da9f58f0ea5dd4bb2c3a07e55744337b63f795c665bab260c57ac723966dea"}},{"ruleId":"D2","level":"warning","message":{"text":"insertWebDetails (cognitive 18): insertWebDetails has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 15, if/else 2, other 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":2051}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2800d1660415ff8ec85cd904773c5925b5daeca9f556366e3c416a224f09410"}},{"ruleId":"D2","level":"warning","message":{"text":"SelfDevTool::wait_for_turn (cognitive 17): SelfDevTool::wait_for_turn has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/selfdev/build_queue.rs"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"b818220687a3ad3a9fa204a6810efa6c8e1807cb944803471b2d5c8ba4571996"}},{"ruleId":"D2","level":"warning","message":{"text":"WriteTool::execute (cognitive 17): WriteTool::execute has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/write.rs"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"3be754558a5ae05f9a2cb154b7ab798f8a127ccccaf92ee5af1a950d1140b82a"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::ambient::prompt::gather_memory_graph_health (cognitive 17): jcode_app_core::ambient::prompt::gather_memory_graph_health has cognitive complexity 17 (threshold 15). Drivers by points: if/else 2 (6 pts), loops 3 (6 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/ambient/prompt.rs"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"95ebfc20e5092b2430899d4e5a0adc062beea998aa27cffd52bfc71ab04dcc8d"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::mobile_push::send_inner (cognitive 17): jcode_app_core::mobile_push::send_inner has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 4 (7 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/mobile_push.rs"},"region":{"startLine":1146}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c53ed97eccc77dd655f2b509451ac6c1c825b7dfbdf33efc563f31dab51aac7"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::comm_await::spawn_or_resume_await_members (cognitive 17): jcode_app_core::server::comm_await::spawn_or_resume_await_members has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_await.rs"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcaddc06b9e47382f2453f3f1f821648f018b5817013718f8c8e134f59ef7f5c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::lifecycle::spawn_temporary_lifecycle_monitor (cognitive 17): jcode_app_core::server::lifecycle::spawn_temporary_lifecycle_monitor has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/lifecycle.rs"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a6b6efa7bf9b70b38513a6f8e335d4223368bc87fca828649cc1a16ec2b81db"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::swarm::notify_owner_of_unrestored_idle_workers (cognitive 17): jcode_app_core::server::swarm::notify_owner_of_unrestored_idle_workers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, loops 3 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/swarm.rs"},"region":{"startLine":1443}}}],"partialFingerprints":{"codehealthFindingId/v1":"52b449ebfc0b0463ec876ad6377632a8d960368e6504ead9820213b5189c18b9"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::session_launch::spawn_resume_in_new_terminal_with_context (cognitive 17): jcode_app_core::session_launch::spawn_resume_in_new_terminal_with_context has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (jcode_app_core::session_launch::spawn_selfdev_in_new_terminal_with_context) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/session_launch.rs"},"region":{"startLine":654}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e579c328d127abeb517dce3ccab564cc63b4c066560c0c4eb6333b7af53d9c2"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::session_launch::spawn_selfdev_in_new_terminal_with_context (cognitive 17): jcode_app_core::session_launch::spawn_selfdev_in_new_terminal_with_context has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (jcode_app_core::session_launch::spawn_resume_in_new_terminal_with_context) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/session_launch.rs"},"region":{"startLine":779}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dd9ed1e661409606257fc6c8fd2a68b3aead5af9e62176b9142cf5570f30b46"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::edit::apply_edits (cognitive 17): jcode_app_core::tool::edit::apply_edits has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/edit.rs"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d5c21e43f86354e03d0e0882106e68518326c16212153d3db6701d68cff5b66"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::session_search_index::build_or_update (cognitive 17): jcode_app_core::tool::session_search_index::build_or_update has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (6 pts), boolean chains 4, match/switch 2 (4 pts), loops 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/session_search_index.rs"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"9df45fb64668dc1e941668788288b3bc9627c685e9fa935b10703d873fa46c69"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::usage_openai::classify_openai_limits (cognitive 17): jcode_app_core::usage_openai::classify_openai_limits has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_openai.rs"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"b31485c776a15085d48e68894583077bbf51d850c5004530480f1e0a5419656b"}},{"ruleId":"D2","level":"warning","message":{"text":"McpTool::execute (cognitive 17): McpTool::execute has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mcp/tool.rs"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"0926934b4f2292d470d5bad8b485c4eaf698424a2d7015a4d66de959de32020f"}},{"ruleId":"D2","level":"warning","message":{"text":"MultiProvider::fork_model_switch_request (cognitive 17): MultiProvider::fork_model_switch_request has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/mod.rs"},"region":{"startLine":1747}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea7ef5389beac90d54629a36070d3ce6b602e35748a30e0754e0b4f5cfcc7567"}},{"ruleId":"D2","level":"warning","message":{"text":"ServerRegistry::cleanup_stale (cognitive 17): ServerRegistry::cleanup_stale has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/registry.rs"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"e04c201f6505dec1d07b89c41a78c32316b486f3b5c3df88d02a88596655bef0"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::auth::claude::load_credentials (cognitive 17): jcode_base::auth::claude::load_credentials has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/claude.rs"},"region":{"startLine":571}}}],"partialFingerprints":{"codehealthFindingId/v1":"9315f84c1f801df9894eff3c1ab6239110d1bf815dab300519e204c34ba04934"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::auth::lifecycle::newest_frontier_release (cognitive 17): jcode_base::auth::lifecycle::newest_frontier_release has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/lifecycle.rs"},"region":{"startLine":814}}}],"partialFingerprints":{"codehealthFindingId/v1":"25a932b1bfdd4ad4dcc075866c3a5404b4e3a6b4ac7a7e1b548922dbeddd278b"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::auth::oauth_callback_io::wait_for_callback (cognitive 17): jcode_base::auth::oauth_callback_io::wait_for_callback has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 3 (6 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (jcode_base::auth::oauth_callback_io::wait_for_callback_async_on_listener) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/oauth_callback_io.rs"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f55c553368403de586795b6c62a4e44bdda29dcdcee630124e0e8410e9a2f94"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::auth::oauth_callback_io::wait_for_callback_async_on_listener (cognitive 17): jcode_base::auth::oauth_callback_io::wait_for_callback_async_on_listener has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 3 (6 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (jcode_base::auth::oauth_callback_io::wait_for_callback) has the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/oauth_callback_io.rs"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c14951a0287ba5eba6246741b3843c672384f919ddc0a6e8b1152c2ec073ba0"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::image_normalize::sniff_other_format (cognitive 17): jcode_base::image_normalize::sniff_other_format has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 8 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/image_normalize.rs"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"629473df675ffdafaac23e1fe3b2cf4b0f8079cb95868788f972d26af866c067"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::memory_agent::build_transcript_for_extraction (cognitive 17): jcode_base::memory_agent::build_transcript_for_extraction has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), match/switch 2 (5 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory_agent.rs"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"a39fddeb9c478a3961c69a2a51c40eb30b80cc65009dfadd931fb5786cb88cac"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::provider::catalog_routes::append_anthropic_routes (cognitive 17): jcode_base::provider::catalog_routes::append_anthropic_routes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/catalog_routes.rs"},"region":{"startLine":479}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c877c0f5097c7418fbab324cb3b9150a176d779d68d1ca68c662606c5e20a9a"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::provider::multi_provider::saved_account_can_serve_model (cognitive 17): jcode_base::provider::multi_provider::saved_account_can_serve_model has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 4 (6 pts), match/switch 1 (nesting depth added 2). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/multi_provider.rs"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bd12c135418daae52f9bd5646dea69f33053162ef742add26161dd8fe78255f"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::todo::sync_lanes_after_save (cognitive 17): jcode_base::todo::sync_lanes_after_save has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (4 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/todo.rs"},"region":{"startLine":470}}}],"partialFingerprints":{"codehealthFindingId/v1":"95c03cd257cf930afcf736f9f752ca2d917771ee3091cb4be8bfac9f14262553"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::usage::fetch_all_provider_usage_progressive (cognitive 17): jcode_base::usage::fetch_all_provider_usage_progressive has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage.rs"},"region":{"startLine":291}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ff6b07bf7e2025ddb691ed58d8ddec56b0d90d3a218c084c082606f4dd7c2d7"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::usage::anthropic_fable_reset::redeem (cognitive 17): jcode_base::usage::anthropic_fable_reset::redeem has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, match/switch 1 (2 pts), loops 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/anthropic_fable_reset.rs"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"77d2fac26eac86d5248477f0b4adf5e2f3bd77e0549313598ae832cb6de0014d"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_command_risk::tokenize::scan_substitutions (cognitive 17): jcode_command_risk::tokenize::scan_substitutions has cognitive complexity 17 (threshold 15). Drivers by points: loops 3 (7 pts), boolean chains 4, if/else 1 (4 pts), match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-command-risk/src/tokenize.rs"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"17f12ba060155c5682372b2770eed6faffbafad88b1cde8d1e4cf8116bb9be0e"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_command_risk::tokenize::matching_paren_body (cognitive 17): jcode_command_risk::tokenize::matching_paren_body has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-command-risk/src/tokenize.rs"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec022d3263494fdcec2671a34250834bc6340b4414cb44bdfd8b88643c6877fd"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_compaction_core::decay_old_tool_images_in_contents (cognitive 17): jcode_compaction_core::decay_old_tool_images_in_contents has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-compaction-core/src/lib.rs"},"region":{"startLine":845}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3037952377519c0bac193f6060d69e4946d7f0d6d74f14ade1bc7a4cca10690"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_core::stdin_detect::linux::check_process_tree (cognitive 17): jcode_core::stdin_detect::linux::check_process_tree has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-core/src/stdin_detect.rs"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"bea52cb1f4c4d4051e216a61852c89f820edfb6c43ae381593fb237a27934892"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_core::stdin_detect::linux::children_via_proc_scan (cognitive 17): jcode_core::stdin_detect::linux::children_via_proc_scan has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-core/src/stdin_detect.rs"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"d62f964329941868b01085622e61026c7637eaca852e173e7e40838537917219"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_fuzzy::fuzzy_match_impl (cognitive 17): jcode_fuzzy::fuzzy_match_impl has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, boolean chains 2, match/switch 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-fuzzy/src/lib.rs"},"region":{"startLine":388}}}],"partialFingerprints":{"codehealthFindingId/v1":"701d0a1f3f5abcfa9ff115276ea6ce1ddb387624e3aa833510f086fd954cca1c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_import_core::extract_text_from_json_value::visit (cognitive 17): jcode_import_core::extract_text_from_json_value::visit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-import-core/src/lib.rs"},"region":{"startLine":1120}}}],"partialFingerprints":{"codehealthFindingId/v1":"65fe9329081773a82c65c5733a37e80d6d6de10e780c6d90f1a9c85570eb68df"}},{"ruleId":"D2","level":"warning","message":{"text":"DeflateStream::process_read (cognitive 17): DeflateStream::process_read has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/ws_deflate.rs"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5f8e42ea0379b03a1a1143c5ce5b255aab9b2b318ef362cb5502d1d01723546"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_core::anthropic::anthropic_reasoning_caps (cognitive 17): jcode_provider_core::anthropic::anthropic_reasoning_caps has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (16 pts), match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/anthropic.rs"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffb757b2e09876e53d29a96159530e6b540b3679aaa9b06b0d8986d8c96862c7"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_core::models::context_limit_for_model_with_provider_and_cache (cognitive 17): jcode_provider_core::models::context_limit_for_model_with_provider_and_cache has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, boolean chains 5, match/switch 1. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/models.rs"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"8315f439558671f0968ecc905e9f354b43b4bd5b1cc2862891d0c6063beae1cc"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_schema_dialect::conformance::untyped_properties::walk (cognitive 17): jcode_schema_dialect::conformance::untyped_properties::walk has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (6 pts), match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-schema-dialect/src/conformance.rs"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"377ec8b37531fafdbcd087c6691d8f1c0146626638da3cb503fc9ec01350571e"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_session_types::format_session_search_results (cognitive 17): jcode_session_types::format_session_search_results has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-session-types/src/lib.rs"},"region":{"startLine":754}}}],"partialFingerprints":{"codehealthFindingId/v1":"57e22dffadf601cd7fc69b078778e581431601c074cd1682f9a512618c5da736"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_setup_hints::keymap::terminal::split_trigger_tokens (cognitive 17): jcode_setup_hints::keymap::terminal::split_trigger_tokens has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/keymap/terminal.rs"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"310e38662b749f83e40adb5bba1ca84e8a5ed28aef938528f02ea772b5e460d4"}},{"ruleId":"D2","level":"warning","message":{"text":"App::start_logout_all (cognitive 17): App::start_logout_all has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 4, loops 2 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth.rs"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"b16438ba199a990d1c13599e5e956997408c3be9b146c8c06d9f4793e533a620"}},{"ruleId":"D2","level":"warning","message":{"text":"App::start_gemini_login (cognitive 17): App::start_gemini_login has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 3 (6 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth.rs"},"region":{"startLine":1249}}}],"partialFingerprints":{"codehealthFindingId/v1":"758b466cf8c98fb163b4243d86340ef636c2a52a0d760f084310e87b7994c6f4"}},{"ruleId":"D2","level":"warning","message":{"text":"App::show_jcode_subscription_status (cognitive 17): App::show_jcode_subscription_status has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 1 (3 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_subscription_status.rs"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffd99ff8b38acdd0a4dcc3e75d6fc5b7c03863ad00ff73a26664aaa88fd7ca93"}},{"ruleId":"D2","level":"warning","message":{"text":"App::prepare_cloud_environment (cognitive 17): App::prepare_cloud_environment has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 1 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/cloud_environment.rs"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"46adf7fba32806070be4c71a0867a5874f23161a567898ca7858eeb55051c763"}},{"ruleId":"D2","level":"warning","message":{"text":"App::step_copy_selection_scroll (cognitive 17): App::step_copy_selection_scroll has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (17 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/copy_selection.rs"},"region":{"startLine":500}}}],"partialFingerprints":{"codehealthFindingId/v1":"294e6d44a25a65f85fcc5b27e1867bd59c930ff1b17bd5f3fb50ac886f0d4caa"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_test_script (cognitive 17): App::handle_test_script has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 3 (9 pts), if/else 2 (4 pts), loops 2 (4 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_script.rs"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"3497f29bf8453cf0a613d40f26b8e90950ae8841ec489ca6a09cab2e1e984f2f"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_session_picker_current_terminal_selection (cognitive 17): App::handle_session_picker_current_terminal_selection has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 2, match/switch 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":3023}}}],"partialFingerprints":{"codehealthFindingId/v1":"f07e45015985f6d161e12c2afdbfb7cbd381e93f0eca28609563974ec674c5cc"}},{"ruleId":"D2","level":"warning","message":{"text":"InfoWidgetData::has_data_for (cognitive 17): InfoWidgetData::has_data_for has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget.rs"},"region":{"startLine":783}}}],"partialFingerprints":{"codehealthFindingId/v1":"f30a2c223c31ac0eac9b0a80de85029cbbceb28f87353742192837bff6a36a7c"}},{"ruleId":"D2","level":"warning","message":{"text":"AnchoredInlineImages::unplaced_items (cognitive 17): AnchoredInlineImages::unplaced_items has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_inline_image.rs"},"region":{"startLine":728}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c4576ee904e5a8d6d3ac133c2235b0722bb305b4affdaea5c3065995ef3b84c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::auth_account_commands::save_openai_compat_setting (cognitive 17): jcode_tui::tui::app::auth_account_commands::save_openai_compat_setting has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 4 (7 pts), if/else 4 (6 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_commands.rs"},"region":{"startLine":958}}}],"partialFingerprints":{"codehealthFindingId/v1":"c64ab4d9741af5215407da0f35efb003f3d010204732c5785bd6ea1bcb7ff1bf"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::auth_account_commands::diagnostics::render_auth_doctor_markdown (cognitive 17): jcode_tui::tui::app::auth_account_commands::diagnostics::render_auth_doctor_markdown has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 3 (7 pts), match/switch 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_commands/diagnostics.rs"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad1305f14d1a714b66ed96540b6226317b08422ca71301004bf2e65887a12d74"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::dictation::transcript_from_command_output (cognitive 17): jcode_tui::tui::app::dictation::transcript_from_command_output has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/dictation.rs"},"region":{"startLine":393}}}],"partialFingerprints":{"codehealthFindingId/v1":"72a6a8db103dc7aa87ef8eeb51f46ca54140b53bf32c3b8e9db75e8ab5491ec2"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::helpers::gather_git_info (cognitive 17): jcode_tui::tui::app::helpers::gather_git_info has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/helpers.rs"},"region":{"startLine":1449}}}],"partialFingerprints":{"codehealthFindingId/v1":"2af0183d39311f28b231c0cfa66199c801fcfb623223477cf928a8e49c617d8f"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::local::process_turn_with_input (cognitive 17): jcode_tui::tui::app::local::process_turn_with_input has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/local.rs"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea14dc38fbeddbf77e213a23c6f5170a02781947c1131c295728bd071485bfd6"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::local::handle_bus_event (cognitive 17): jcode_tui::tui::app::local::handle_bus_event has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (16 pts), match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/local.rs"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"c97449961e0a2000c933ed63d9c994b790cada23b22fd9e99144f0051060dc4f"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::info_widget_commits::commit_line (cognitive 17): jcode_tui::tui::info_widget_commits::commit_line has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 1, match/switch 1. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_commits.rs"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"f98728e4347b5aa3cec7fd8a0304d24063c800c2a5aeaaaf4d4ec06e14ffcac8"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::session_picker::loading::extract_block_text_from_value::extract (cognitive 17): jcode_tui::tui::session_picker::loading::extract_block_text_from_value::extract has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading.rs"},"region":{"startLine":946}}}],"partialFingerprints":{"codehealthFindingId/v1":"81818249516b5d3e517e3410cbf56d47151911bcc87e6496fbb828db633a7015"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::session_picker::transcript_search::token_cache::literal_in_segments (cognitive 17): jcode_tui::tui::session_picker::transcript_search::token_cache::literal_in_segments has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/transcript_search/token_cache.rs"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"496028abb7ba66a8c8a18d18f05b409a7bd45b045b84eb6ea0113079ce50d8f5"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_frame_metrics::maybe_record_flicker_event (cognitive 17): jcode_tui::tui::ui_frame_metrics::maybe_record_flicker_event has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_frame_metrics.rs"},"region":{"startLine":1005}}}],"partialFingerprints":{"codehealthFindingId/v1":"daa9d4273dc444ce8d122ad68c3de38cde6a1a7e280a4eb0d433f4ee3a1903ef"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_header::account_router::fit_account_row (cognitive 17): jcode_tui::tui::ui_header::account_router::fit_account_row has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (8 pts), if/else 5 (7 pts), boolean chains 2 (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_header/account_router.rs"},"region":{"startLine":424}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f2a36cbe9aa1d7cc38cb6f5069d965c406aa8e2fd3ed82133f254b059f7ee4d"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_input::overscroll_truncate_spans (cognitive 17): jcode_tui::tui::ui_input::overscroll_truncate_spans has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_input.rs"},"region":{"startLine":1846}}}],"partialFingerprints":{"codehealthFindingId/v1":"37e1795c7c0205a701538dc42ec2b022b128c510c3f71c547eec6c2547b396b0"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::render_single_line_system_notice (cognitive 17): jcode_tui::tui::ui_messages::render_single_line_system_notice has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, boolean chains 3, loops 1. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bd0c1a45bf09c99554bf9327cb76421385a12b5e3ac1fd04cb08269979dd392"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_prepare::prepare_body (cognitive 17): jcode_tui::tui::ui_prepare::prepare_body has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_prepare.rs"},"region":{"startLine":2516}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0657754e0a849050622428100d7b3cab8bcd924591d5b9dee3fbfef63284800"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_todo_stages::lane_note_spans (cognitive 17): jcode_tui::tui::ui_todo_stages::lane_note_spans has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_todo_stages.rs"},"region":{"startLine":622}}}],"partialFingerprints":{"codehealthFindingId/v1":"3eb0c9744d63482b5e1d2e435c5431e7b552095cdf1a665ef153a3de16659df2"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_todo_stages::lane_titles_spans (cognitive 17): jcode_tui::tui::ui_todo_stages::lane_titles_spans has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_todo_stages.rs"},"region":{"startLine":771}}}],"partialFingerprints":{"codehealthFindingId/v1":"75f27df75873282692e70f9188683555cbf71c9a9bcb730dda12532af4383afc"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_tools::codemode_preview (cognitive 17): jcode_tui::tui::ui_tools::codemode_preview has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tools.rs"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"d21e2d0e4959733ea181576315244e3134b3c105674c6a810a067c770c6715dd"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_tools::truncate_path_display (cognitive 17): jcode_tui::tui::ui_tools::truncate_path_display has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14 (16 pts), loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tools.rs"},"region":{"startLine":376}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ff08c97edac8cf425de918a06d614e1f0c47752c2df5ec50775aeb5c855d477"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_tools::best_search_token_range (cognitive 17): jcode_tui::tui::ui_tools::best_search_token_range has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 2 (7 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tools.rs"},"region":{"startLine":629}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8d0df5cd706de1e5af950a42da54f94637869ba9696799879d4f68701e8ae67"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_markdown::normalize_block_separators (cognitive 17): jcode_tui_markdown::normalize_block_separators has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/lib.rs"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2a9477b19a55e698b760aaec4f54014271a677f75796036106abe1302bf2fc1"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_markdown::markdown_wrap::tokenize_balanced_wrap (cognitive 17): jcode_tui_markdown::markdown_wrap::tokenize_balanced_wrap has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_wrap.rs"},"region":{"startLine":381}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecbb6d413f228c42526e3323a0f99259a40d6fbf9277ffd9731b6317bad63906"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_mermaid::mermaid_viewport::render_non_kitty_fit_stable (cognitive 17): jcode_tui_mermaid::mermaid_viewport::render_non_kitty_fit_stable has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_viewport.rs"},"region":{"startLine":1062}}}],"partialFingerprints":{"codehealthFindingId/v1":"f25470e1050c482477ef2ec674af3cabf45541e9af5343702e1f1fdab0e62ddb"}},{"ruleId":"D2","level":"warning","message":{"text":"PermissionsApp::render_list (cognitive 17): PermissionsApp::render_list has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 2 (3 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-permissions/src/lib.rs"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"de83ecfb3dba556ae6c1a11cfc7d4a9bb58891807a2a18d6781d111c699d6833"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_usage_types::sanitize_telemetry_label (cognitive 17): jcode_usage_types::sanitize_telemetry_label has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 2 (5 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-usage-types/src/lib.rs"},"region":{"startLine":834}}}],"partialFingerprints":{"codehealthFindingId/v1":"c367043d495d171482dd18eb4f34616951d0fb801db7999e3c785d10a78fec1d"}},{"ruleId":"D2","level":"warning","message":{"text":"Chunker::push (cognitive 17): Chunker::push has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-voice/src/streaming_capture.rs"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"ada3622c6d8b13dcb0c11b0cb08ebc1fb322c599b37e75afbabfe1304fe90b48"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_voice::capture::run (cognitive 17): jcode_voice::capture::run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 3, match/switch 2 (3 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-voice/src/lib.rs"},"region":{"startLine":452}}}],"partialFingerprints":{"codehealthFindingId/v1":"a121a538fdd50b2e840fc4f8280ad9d33bbeae538d1df8ccd21e6416b206246b"}},{"ruleId":"D2","level":"warning","message":{"text":"Target::prepare_development_binary (cognitive 17): Target::prepare_development_binary has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_move/transport.rs"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"62bf2edd2107a618c5c9a380a6da55306af57c093811fa6c5a4d37420aaaf72c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::cloud_diagnostics::read_problems (cognitive 17): jcode::cli::cloud_diagnostics::read_problems has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 3 (6 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_diagnostics.rs"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"39fa9f0ebe41e07f7c84472fa2149f705e13372a5c3844c176a7e6c63c8ccab3"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::cloud_group::validate (cognitive 17): jcode::cli::cloud_group::validate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 6, match/switch 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_group.rs"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"63f579ddf1b6863fb7540b37a202e417945d25f16059b53c554f8b1511b2c6eb"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::cloud_group_daemon::standalone_without_daemon (cognitive 17): jcode::cli::cloud_group_daemon::standalone_without_daemon has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_group_daemon.rs"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba3a9038007562daa331409edfd9e86a23c062215ccf62e0c8e8cb3f3a121296"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::commands::run_cloud_sessions_dashboard (cognitive 17): jcode::cli::commands::run_cloud_sessions_dashboard has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 2 (4 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":1003}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d9f8c4628d82def5d092a7693331e3eea12996759c776cfffccf3d58a095f39"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::commands::run_server_reload_command_to (cognitive 17): jcode::cli::commands::run_server_reload_command_to has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":2315}}}],"partialFingerprints":{"codehealthFindingId/v1":"64f70dd18c85cac28b754ef1fd9214cfda3903f51cd468669ce5ce611e2b022f"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::commands::menubar::macos::run_status_item_app (cognitive 17): jcode::cli::commands::menubar::macos::run_status_item_app has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands/menubar.rs"},"region":{"startLine":545}}}],"partialFingerprints":{"codehealthFindingId/v1":"560c1b9241314fbb8bd5f63fd706644722457b9539a0bff3ac4b2947af97d276"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::proctitle::initial_title (cognitive 17): jcode::cli::proctitle::initial_title has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 5). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/proctitle.rs"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8c6eeb668513275f016e526dce958f288d04b1f698eed4ddfd3102835a73181"}},{"ruleId":"D2","level":"warning","message":{"text":"remote.fields (cognitive 17): remote.fields has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/cloud_preview/remote.py"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2a32c068423bb6c8699d738692b2e33ed961b41f91a966dad9b372ab464b97a"}},{"ruleId":"D2","level":"warning","message":{"text":"Agent::seed_announced_skills_from_transcript (cognitive 16): Agent::seed_announced_skills_from_transcript has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (8 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/turn_execution.rs"},"region":{"startLine":950}}}],"partialFingerprints":{"codehealthFindingId/v1":"24672ab678fb0a11a0548e37937811ac4ecdf95482a91eabcba549a0e1e07b5c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::group_transfer::import_bundle (cognitive 16): jcode_app_core::server::group_transfer::import_bundle has cognitive complexity 16 (threshold 15). Drivers by points: loops 7 (9 pts), if/else 3 (7 pts) (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/group_transfer.rs"},"region":{"startLine":696}}}],"partialFingerprints":{"codehealthFindingId/v1":"1032ca91308547f1f8c266ffe41071cc93c219f8f279edf16245f823d3002a3e"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::idle_hibernation::reclaim_idle_caches (cognitive 16): jcode_app_core::server::idle_hibernation::reclaim_idle_caches has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/idle_hibernation.rs"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a5761b03fbed350d3e627d8925754f04b197ea143469c83f0ef8aa4754b7d1c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::server::util::git_common_dir_for (cognitive 16): jcode_app_core::server::util::git_common_dir_for has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/util.rs"},"region":{"startLine":441}}}],"partialFingerprints":{"codehealthFindingId/v1":"369f5b3a10048a597f7984adeff3339dbca03e8bbda9f5c340603d7d74fb1a40"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::browser::ensure_firefox_ready (cognitive 16): jcode_app_core::tool::browser::ensure_firefox_ready has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/browser.rs"},"region":{"startLine":611}}}],"partialFingerprints":{"codehealthFindingId/v1":"9449e9d42f328d90ef05a6f84d44f74ad7f1bfa3de7cbce134cb358db679c23c"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::read::find_similar_files (cognitive 16): jcode_app_core::tool::read::find_similar_files has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/read.rs"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"93209d69c0a4cd55d64f9d35a61bad7fcfe2b7216bd6bcc7baeea4115646ba2a"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_app_core::tool::remote_exec::client (cognitive 16): jcode_app_core::tool::remote_exec::client has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 1 (3 pts), boolean chains 2, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/remote_exec.rs"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"9487301f5d21d77acc411433edf9c2a144ecef9ab8133fe6d5342110249b6521"}},{"ruleId":"D2","level":"warning","message":{"text":"CompactionManager::ensure_context_fits (cognitive 16): CompactionManager::ensure_context_fits has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/compaction.rs"},"region":{"startLine":981}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b713543e062f23e81c5e283dc5f3bdbbbbd54ad94b8715e4a1773be28ce833a"}},{"ruleId":"D2","level":"warning","message":{"text":"MultiProvider::auto_select_multi_account_for_provider (cognitive 16): MultiProvider::auto_select_multi_account_for_provider has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/startup.rs"},"region":{"startLine":724}}}],"partialFingerprints":{"codehealthFindingId/v1":"11164e3429c70f99b5cf2a04e3c0b75ea5b6f33694567ea4960755e153494f42"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::hooks::transform_tool_input (cognitive 16): jcode_base::hooks::transform_tool_input has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 4 (8 pts), if/else 5 (7 pts), loops 1 (nesting depth added 6). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/hooks.rs"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"36c395cb1a680de9806edcb2c4d129ba770f2c1ba1653641a3add3baf75306de"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::kv_cache_monitor::reason (cognitive 16): jcode_base::kv_cache_monitor::reason has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 5. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/kv_cache_monitor.rs"},"region":{"startLine":559}}}],"partialFingerprints":{"codehealthFindingId/v1":"acbf4acfba4036ec3b967a6135b6291f34a6d037b15952c3f4f963c01022ed5e"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::mcp::remote::outbound_worker (cognitive 16): jcode_base::mcp::remote::outbound_worker has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 2 (6 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mcp/remote.rs"},"region":{"startLine":522}}}],"partialFingerprints":{"codehealthFindingId/v1":"b156f159bec4ba35eaab88179da977f2eebcf2beb6e9edc4d1abecc7d89f34f0"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_base::message::notifications::strip_ansi_escape_sequences (cognitive 16): jcode_base::message::notifications::strip_ansi_escape_sequences has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), loops 4 (5 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 5). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 3 function items inside it that branch (consume_string, consume_escape, consume_csi). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/message/notifications.rs"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"93788887616b229b49f8bc7782534d88f7ce506ac176b683d4ab4bc310896fff"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_build_support::version_gc::prune_old_versions_in (cognitive 16): jcode_build_support::version_gc::prune_old_versions_in has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-build-support/src/version_gc.rs"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"12f0eb798786e8b7fa2b38f5b1d7101ebb25bb2a2f36e9bcb5e172af93b1b1ea"}},{"ruleId":"D2","level":"warning","message":{"text":"Companion::handle (cognitive 16): Companion::handle has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 5 (8 pts), if/else 5 (7 pts), boolean chains 1 (nesting depth added 5). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-companion/src/server.rs"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"31640f943d46e0e83ffee92ad54ffa090fabd369828c5463686692a2dae37016"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_harness_api::edit_stats::enrich_sessions_from_edit_stats (cognitive 16): jcode_harness_api::edit_stats::enrich_sessions_from_edit_stats has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api/src/edit_stats.rs"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ef4e5ede8951b77c8d8d830f5873aa80985c74448f5bb161f4399281e095506"}},{"ruleId":"D2","level":"warning","message":{"text":"MemoryGraph::remove_memory (cognitive 16): MemoryGraph::remove_memory has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-memory-types/src/graph.rs"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"485ff7b4ca792140bc2f8031e8d4567e31872808ac354324f61fbe87fe94cf4d"}},{"ruleId":"D2","level":"warning","message":{"text":"DeflateStream::poll_drain (cognitive 16): DeflateStream::poll_drain has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (14 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/ws_deflate.rs"},"region":{"startLine":508}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb201e0ec3d80c1dc7a6f47e9318added3f478b847ba780e17007d6b027d916f"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_provider_core::openai_schema::make_schema_nullable (cognitive 16): jcode_provider_core::openai_schema::make_schema_nullable has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (15 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/openai_schema.rs"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6e0a6b5ad509190bb9a92ae715f984759b63d982f661254927e2785bf15454c"}},{"ruleId":"D2","level":"warning","message":{"text":"GeminiProvider::setup_runtime_state (cognitive 16): GeminiProvider::setup_runtime_state has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-gemini-runtime/src/lib.rs"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"90bde8fa2ff56b62c483fc2ac5d203a34d61890dfcd6a55a05941d28d6389558"}},{"ruleId":"D2","level":"warning","message":{"text":"AuthRetryStream::poll_next (cognitive 16): AuthRetryStream::poll_next has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), match/switch 2 (5 pts), boolean chains 2, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-grok-build-runtime/src/lib.rs"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"1382e020eb9ddd11c978d3bfdc692e407f5e4f3078aec3ed06ad4593388a9ad0"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenRouterProvider::effective_routing (cognitive 16): OpenRouterProvider::effective_routing has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), match/switch 2 (5 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/lib.rs"},"region":{"startLine":2185}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3b4e2089b5c3e25f15e3171096aaf0b70670e6f2878a84d17437004aee350b8"}},{"ruleId":"D2","level":"warning","message":{"text":"Expr::layout (cognitive 16): Expr::layout has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 3 (6 pts), boolean chains 1 (nesting depth added 8). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/math.rs"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"00dc15e31ee0a892aceeef3d4436a2a5616c3dabcf2f86ce211ac7a2429fa490"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_sdk::client::global_session_workers::discover_global_sessions (cognitive 16): jcode_sdk::client::global_session_workers::discover_global_sessions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 2 (4 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-sdk/src/client/global_session_workers.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"546f08938232db7e38fbe2408fd1d4c459c2d40cafb8b07004489b516e9de8fe"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_sdk::structured::first_json_container (cognitive 16): jcode_sdk::structured::first_json_container has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-sdk/src/structured.rs"},"region":{"startLine":420}}}],"partialFingerprints":{"codehealthFindingId/v1":"765ca5a06060e62e8f15378850e99e930f9d3a2ecd7894a4a0e038a8eafacb32"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_setup_hints::install_xfce_launch_hotkeys (cognitive 16): jcode_setup_hints::install_xfce_launch_hotkeys has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3, boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/lib.rs"},"region":{"startLine":2000}}}],"partialFingerprints":{"codehealthFindingId/v1":"4355eb06299444a25f1f6a481f75123a88e8aac0ce5a41c665fdfd9c7044f569"}},{"ruleId":"D2","level":"warning","message":{"text":"ResolvedTokenPricing::cost_for_usage (cognitive 16): ResolvedTokenPricing::cost_for_usage has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, match/switch 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/misc_ui.rs"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0d88b06beb4adc175a29a966376fe917a518c05eb4b5f9cb4da38f55e1e1d4e"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_ssh_login_with_label (cognitive 16): App::handle_ssh_login_with_label has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, boolean chains 5, match/switch 2 (3 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_remote.rs"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e121947a570d89be6c23a43c08298c92581c1ec4bf56919c3fa6361c199ded8"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_turn_error (cognitive 16): App::handle_turn_error has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/model_context.rs"},"region":{"startLine":1392}}}],"partialFingerprints":{"codehealthFindingId/v1":"2879d3c6bbfd7dccbd2f2a803550b7e2898d773aaec3720bf717a12383e80bbe"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_onboarding_continue_prompt_key (cognitive 16): App::handle_onboarding_continue_prompt_key has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), match/switch 3 (6 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/onboarding_flow_control.rs"},"region":{"startLine":380}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3c1cc97d6a3d3ff606795f04decdb68c896a6338a050f773f53d72202fd8402"}},{"ruleId":"D2","level":"warning","message":{"text":"App::apply_restored_reload_input (cognitive 16): App::apply_restored_reload_input has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tui_lifecycle_reload_input.rs"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"71ed6bd3ea451249b610b1c7ccf8dc9d8664af944dcde1baa9f9bba1de3d735e"}},{"ruleId":"D2","level":"warning","message":{"text":"RemoteConnection::next_event (cognitive 16): RemoteConnection::next_event has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/backend.rs"},"region":{"startLine":1460}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3da2cff07d7d2d5d5688020f6d9887abd830ff87ea7413b068f954c980f87c2"}},{"ruleId":"D2","level":"warning","message":{"text":"Snapshot::row (cognitive 16): Snapshot::row has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/justrust_status.rs"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf50ded46c3170de0856b20e4158e459bf5ba21bc307a610c01c764d646a853d"}},{"ruleId":"D2","level":"warning","message":{"text":"Poller::refresh (cognitive 16): Poller::refresh has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 6, match/switch 1 (2 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/justrust_status.rs"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b08a17b574f3e1cb29a7b3980b61582206583194ce6a4b0ae69877fca0cd845"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::auth_remote::command::execute (cognitive 16): jcode_tui::tui::app::auth_remote::command::execute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (15 pts), match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_remote/command.rs"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7dd072c9fa9e350b65817291e41e733b54c45e95bfd1e69bc1ebe0c31c36d17"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::commands::handle_ssh_command (cognitive 16): jcode_tui::tui::app::commands::handle_ssh_command has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), match/switch 3 (7 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":1111}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc4945747a396ae402f2b16e9686ccb1f0c851f26f9ac0c9fd1536c3a87d5bb5"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::commands::handle_goals_command (cognitive 16): jcode_tui::tui::app::commands::handle_goals_command has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 3 (6 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":2581}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad371d3845006a61b1c5f4f61f82247f54b8096637b8db8ff19bdf67591cde0d"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::input::handle_paste (cognitive 16): jcode_tui::tui::app::input::handle_paste has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 1 (2 pts), match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"321e70767279e52869cda196cdb08a06b41a1203194f4ac214adf108ce5840ba"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::input::handle_text_input (cognitive 16): jcode_tui::tui::app::input::handle_text_input has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":838}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fd71003b7bd32d2380512ac142b6c10a64ac45640b947ddb943dbf259e71d2f"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::input::handle_navigation_shortcuts (cognitive 16): jcode_tui::tui::app::input::handle_navigation_shortcuts has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (16 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":2215}}}],"partialFingerprints":{"codehealthFindingId/v1":"11a73b4c26fce022f092e73b2ac844441e34861b34c9e526e22478135b711b91"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::app::remote::recover_stuck_remote_history (cognitive 16): jcode_tui::tui::app::remote::recover_stuck_remote_history has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 2, match/switch 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote.rs"},"region":{"startLine":1289}}}],"partialFingerprints":{"codehealthFindingId/v1":"69c853b21e45df9bfd93848c32522788f0868259eb8b2a968b75f77e1222487a"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::cloud_git::bounded_output_for (cognitive 16): jcode_tui::tui::cloud_git::bounded_output_for has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), match/switch 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/cloud_git.rs"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5415cc51dcffcaa407a8c4e1e7b85931dcbc89429238f18c343fa0abf794974"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::session_picker::transcript_search::cached_paths_scan_with_scores (cognitive 16): jcode_tui::tui::session_picker::transcript_search::cached_paths_scan_with_scores has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/transcript_search.rs"},"region":{"startLine":1347}}}],"partialFingerprints":{"codehealthFindingId/v1":"304f1c294303a3ee13be9e1acd19f37cf38ce6acb3c04d6b892729815c34fa69"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui::url::link_target_for_display_column (cognitive 16): jcode_tui::tui::ui::url::link_target_for_display_column has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui/url.rs"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"05fb1db349991c7750a6cd74cba71a9ea6beb8298726b3f73200fca5812b5287"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_inline_interactive::picker_entry_display_name (cognitive 16): jcode_tui::tui::ui_inline_interactive::picker_entry_display_name has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_inline_interactive.rs"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"43b105b82aead8ac6bf57d083407a226ba6206edbee9139dc4795324dfac3d00"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::render_agentgrep_output_body (cognitive 16): jcode_tui::tui::ui_messages::render_agentgrep_output_body has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8ba99dc33bb5d7d255230f688fa49b133408561d1332849f2464ebfc6e75fb5"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::connection::render_connection_system_message (cognitive 16): jcode_tui::tui::ui_messages::connection::render_connection_system_message has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), loops 2 (5 pts) (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages/connection.rs"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"863d49c849193855b389f2063dcee71bfa06f7a7efa9848d06b37da7917fa843"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_messages::usage::wrap_words (cognitive 16): jcode_tui::tui::ui_messages::usage::wrap_words has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages/usage.rs"},"region":{"startLine":769}}}],"partialFingerprints":{"codehealthFindingId/v1":"97a5ef9b1bfa5fad4fac6b99552e02fb0ba8a86130c1c8c4166bf8655b0d218b"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui::tui::ui_tools::infer_selfdev_action_from_display_text (cognitive 16): jcode_tui::tui::ui_tools::infer_selfdev_action_from_display_text has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 6. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tools.rs"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"39ce5dcdd9e840e2479ce5f9fc71155cd276e895e1b49c2f7c4e5c52009b6009"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_render::swarm_gallery::render_swarm_dock (cognitive 16): jcode_tui_render::swarm_gallery::render_swarm_dock has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (13 pts), loops 2, boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/swarm_gallery.rs"},"region":{"startLine":1282}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ef870f6358c8f07569eb96b8284ce8fe0a1db5f0c018f31ab715e11d86307e4"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_style::color::detect_raw_color_capability (cognitive 16): jcode_tui_style::color::detect_raw_color_capability has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-style/src/color.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"aad76bb3cfff05200173410f748e0d8924641d9150899966caadeb5e8f9dffbb"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_workspace::color_support::detect_raw_color_capability (cognitive 16): jcode_tui_workspace::color_support::detect_raw_color_capability has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-workspace/src/color_support.rs"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b7b42bb8dd2f70dbe6cd9d614864e6b99f2dcdcc6faec74ab9da33783c88e00"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode_tui_workspace::workspace_map_widget::compute_workspace_tile_placements (cognitive 16): jcode_tui_workspace::workspace_map_widget::compute_workspace_tile_placements has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-workspace/src/workspace_map_widget.rs"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c29b5900262a1fbea349d499c4d70466981f239f094a59a3d78e8aedaff42a6"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::cloud_env::collect (cognitive 16): jcode::cli::cloud_env::collect has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (6 pts), match/switch 3 (6 pts), if/else 1 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_env.rs"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"5466ffef086fe31ad12a1cc38c1a79b5212c0d5a4b133475178fbe4b09c21ec1"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::cloud_group_receive::receive (cognitive 16): jcode::cli::cloud_group_receive::receive has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_group_receive.rs"},"region":{"startLine":2}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cb13cd88bce68a33fd40fb482556ef651402a95df40a3cc82e48626b44657c5"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::cloud_move::import_return_credentials (cognitive 16): jcode::cli::cloud_move::import_return_credentials has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_move.rs"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"a10e5b32ce413763cd41f4e5b5763caeafe0336b4b04960481185fa46342fed3"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::cloud_move::merge_back (cognitive 16): jcode::cli::cloud_move::merge_back has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 3, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_move.rs"},"region":{"startLine":1911}}}],"partialFingerprints":{"codehealthFindingId/v1":"49a00bdc1ab6d27dddc1645641e8a6f3b2b86ab5841e1c24ca10013cbf403273"}},{"ruleId":"D2","level":"warning","message":{"text":"jcode::cli::commands::report_info::run_auth_doctor_command (cognitive 16): jcode::cli::commands::report_info::run_auth_doctor_command has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (7 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands/report_info.rs"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dbb97674b4c7e6a2b304ee60ac04a7db7704777858fe8604b7845634b959424"}},{"ruleId":"D2","level":"warning","message":{"text":"worker.validateTranscript (cognitive 16): worker.validateTranscript has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 8. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":867}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9da9708be1ab889090eef855fb2e90ad89ee7b75431f4f8342eafa44920f6ed"}},{"ruleId":"D2","level":"warning","message":{"text":"worker.normalizeInstallFunnelEvent (cognitive 16): worker.normalizeInstallFunnelEvent has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":2187}}}],"partialFingerprints":{"codehealthFindingId/v1":"ada00daf823ec7436bfd11b0a72dfbd607bd01a89a7f66bc845d14854209ee12"}},{"ruleId":"D2","level":"warning","message":{"text":"syncModelPrices (cognitive 16): syncModelPrices has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (5 pts), ternaries 1 (3 pts), boolean chains 2, error handling 1 (2 pts), loops 2, other 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/model-pricing.js"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"914badb4b30ace2cef8bf20d0ea16df95631533801ca2727ff3b9a085189fb18"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: App: TooManyMethods \u2014 1017 methods, declared across 84 files: app/navigation.rs (61), app/onboarding_flow_control.rs (59), app/inline_interactive.rs (56), app/input.rs (56), \u002B80 more file(s). The bar is 30 methods; this is 987 over it, 33.90\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app.rs"},"region":{"startLine":935}}}],"partialFingerprints":{"codehealthFindingId/v1":"53d0f95f9ea96c4c3911448039b24ed153cc08b706d246371a3f59b9cc42832f"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::client_lifecycle::handle_client: FunctionTooLong \u2014 jcode_app_core::server::client_lifecycle::handle_client runs 2430 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 2330 over it, 24.30\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_lifecycle.rs"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"5754f63aa4d27735e9cee32f7a8c49a9bb6572b1bfcb949518d215c5e01661fb"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::app::remote::server_events::handle_server_event_inner: FunctionTooLong \u2014 jcode_tui::tui::app::remote::server_events::handle_server_event_inner runs 2301 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 2201 over it, 23.01\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/server_events.rs"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"303a9c1d11e9c44ea15118bc3433e79a34db3b97439513109f831da99b287824"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: App: TooManyFields \u2014 424 stored fields beside 1017 methods. The bar is 30 stored fields; this is 394 over it, 14.13\u00D7 the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member \u2014 each reader then names only the group it uses."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app.rs"},"region":{"startLine":935}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac39ce29103733e3b278387fb903cd239cf643cf4f9a75103dc1a1bef4632138"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::app::remote::key_handling::submit_prepared_remote_enter_input: FunctionTooLong \u2014 jcode_tui::tui::app::remote::key_handling::submit_prepared_remote_enter_input runs 1316 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 1216 over it, 13.16\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/key_handling.rs"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"71de1888edd1ea23d4d766ea956b4c066202166e17eb9763bcd83bd13768f8b1"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Agent.run_turn_streaming_mpsc: MethodTooLong \u2014 run_turn_streaming_mpsc runs 1242 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 1142 over it, 12.42\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/turn_streaming_mpsc.rs"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"a55f81636c171b7ad1aa820cd122e81895423cb8e36851be411f59b4a0e2e07e"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.run_turn_interactive: MethodTooLong \u2014 run_turn_interactive runs 1121 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 1021 over it, 11.21\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/turn.rs"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"a96a237ae78d2d9ebbef214d2f4a40ff04b303b1ad78b34bf4cf95ad7dea5713"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Agent.run_turn: MethodTooLong \u2014 run_turn runs 923 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 823 over it, 9.23\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/turn_loops.rs"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a5032bc1ea647909e8e66719f7a96a89f8a4314c9092d0d88daaf3d2d49ad04"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Agent: TooManyMethods \u2014 275 methods, declared across 16 files: agent/turn_execution.rs (65), src/agent.rs (52), agent/provider.rs (50), agent/interrupts.rs (23), \u002B12 more file(s). The bar is 30 methods; this is 245 over it, 9.17\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent.rs"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"6812717c82218c5b0b2c1774bedcbca4d30f3b12faeb4054ff5412ee7259cbe7"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.handle_debug_command: MethodTooLong \u2014 handle_debug_command runs 888 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 788 over it, 8.88\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_cmds.rs"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f657349dcad9b018e9d41a18585902f998472b75f6f0524e51d9e773f69c2b1"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode::bin::memory_recall_bench::cmd_metrics: FunctionTooLong \u2014 jcode::bin::memory_recall_bench::cmd_metrics runs 815 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 715 over it, 8.15\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":1014}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0af412b7558a8c10843e454331c689ae7efaf8f813d833306dfe1e289393cc8"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: BridgeState.legacy_event_to_api_inner: MethodTooLong \u2014 legacy_event_to_api_inner runs 786 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 686 over it, 7.86\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/translate.rs"},"region":{"startLine":1692}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ea58b38549c5b4bbd59194247fd423593f8e062e8b5846ce322f5d5981ee1ca"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui_markdown::markdown_render_full::render_markdown_with_link_urls: FunctionTooLong \u2014 jcode_tui_markdown::markdown_render_full::render_markdown_with_link_urls runs 759 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 659 over it, 7.59\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_full.rs"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fb916255c8a2d2a417ebd3e53c2cb41cb3f0a95e13d0464e240eb0c15eba213"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: BridgeState.translate_request: MethodTooLong \u2014 translate_request runs 721 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 621 over it, 7.21\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/translate.rs"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"17705de1c1b4ebf0736fc93e5f889cff50aad8eec6cd285a5b7ff5eba5f9a075"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CommunicateTool.execute: MethodTooLong \u2014 execute runs 720 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 620 over it, 7.20\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/communicate.rs"},"region":{"startLine":810}}}],"partialFingerprints":{"codehealthFindingId/v1":"a82dfa6463335224e5b15cdefc1253785befd70c748e1daf6d6d767590fe90de"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_viewport::draw_messages: FunctionTooLong \u2014 jcode_tui::tui::ui_viewport::draw_messages runs 712 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 612 over it, 7.12\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_viewport.rs"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b690c78e10675d3a3070498e0e3539dc7a3beb250befff9839ac37396f1b8ae"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui::draw_inner: FunctionTooLong \u2014 jcode_tui::tui::ui::draw_inner runs 711 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 611 over it, 7.11\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui.rs"},"region":{"startLine":2981}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f4bbc877040a171cd8a5752227aa82ee2a81e58916842025b7446675dab588e"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::client_lightweight_control::handle_lightweight_control_request: FunctionTooLong \u2014 jcode_app_core::server::client_lightweight_control::handle_lightweight_control_request runs 702 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 602 over it, 7.02\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_lightweight_control.rs"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f00f314c94fd76c22392ff272ce1018716e388b638db3aaf2878096efa95c88"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui_markdown::markdown_render_lazy::render_markdown_lazy_with_link_urls: FunctionTooLong \u2014 jcode_tui_markdown::markdown_render_lazy::render_markdown_lazy_with_link_urls runs 702 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 602 over it, 7.02\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_lazy.rs"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b19be94b4cea712bd9b7d69ec64d1e782e86cd9cccb7776e1fa0352d7b22684"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tui/ui_messages.rs: FileTooLong \u2014 3362 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 94 free functions. The bar is 500 significant lines; this is 2862 over it, 6.72\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a524e5bcaaaf20b8a1f8edbf3c1d5945c32b9d2811886367de998c594e7b5f8"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::debug_swarm_read::maybe_handle_swarm_read_command: FunctionTooLong \u2014 jcode_app_core::server::debug_swarm_read::maybe_handle_swarm_read_command runs 645 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 545 over it, 6.45\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_swarm_read.rs"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"62e4a93ff5e8d9af69eb1c59bb850a0ee223a96a90865fe04555245033a7f271"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::client_session::handle_resume_session: FunctionTooLong \u2014 jcode_app_core::server::client_session::handle_resume_session runs 598 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 498 over it, 5.98\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_session.rs"},"region":{"startLine":1285}}}],"partialFingerprints":{"codehealthFindingId/v1":"c43ee2f3ca5cf88671e8e14a3ff953b55a5add35c075779857f1dcf49fe06651"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/inline_interactive.rs: FileTooLong \u2014 2962 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 85% of them inside a single declaration: App (634-4237). The bar is 500 significant lines; this is 2462 over it, 5.92\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b48debbea7a77520e8ef860798573bedfb7547b7c7a96b367ea4d3f4e4755d3"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Config.apply_env_overrides: MethodTooLong \u2014 apply_env_overrides runs 592 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 492 over it, 5.92\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/config/env_overrides.rs"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ce4bbb1fa252971adfde055d2f808122b8217f18f5cf1c456721c9f38046039"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_provider_openai_runtime::openai_stream_runtime::continue_persistent_ws_locked: FunctionTooLong \u2014 jcode_provider_openai_runtime::openai_stream_runtime::continue_persistent_ws_locked runs 580 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 480 over it, 5.80\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs"},"region":{"startLine":539}}}],"partialFingerprints":{"codehealthFindingId/v1":"e51ac485c31494f19f2e4623a59ec4209d5cb5719c02c847a3fd4d23dac3798a"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_tools::get_tool_summary_with_budget: FunctionTooLong \u2014 jcode_tui::tui::ui_tools::get_tool_summary_with_budget runs 572 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 472 over it, 5.72\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tools.rs"},"region":{"startLine":847}}}],"partialFingerprints":{"codehealthFindingId/v1":"205e31e8c762f927fc1526540f26e6cb3f8c4c8f8de635083b6da36b4cc9e2d0"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: BridgeState: ClassTooLong \u2014 2273 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 60 methods, 3 blocks, lines 125-3520. The bar is 400 significant lines; this is 1873 over it, 5.68\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/translate.rs"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ea8e7b451f15d80ca8875b312528034534fb1e2d3e2559c4d77c21229481e81"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.handle_login_input: MethodTooLong \u2014 handle_login_input runs 559 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 459 over it, 5.59\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth.rs"},"region":{"startLine":1841}}}],"partialFingerprints":{"codehealthFindingId/v1":"22f8c6cd2f7e66133334cbece3aba1ba1892ebc31e87c9716eb9627dee0d7919"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::app::remote::key_handling::key_events::handle_remote_key_internal: FunctionTooLong \u2014 jcode_tui::tui::app::remote::key_handling::key_events::handle_remote_key_internal runs 546 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 446 over it, 5.46\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/key_handling/key_events.rs"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"6000aac2d5f09a3a2ae4bf55d2aed5516fa7a23761072d2dda14007e8685c802"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/input.rs: FileTooLong \u2014 2728 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 88 free functions. The bar is 500 significant lines; this is 2228 over it, 5.46\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9892315f7449a5caf02da7883d05fe825494a3aaeb40dea1c50fa5a75fed15e2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: server/client_lifecycle.rs: FileTooLong \u2014 2675 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 2175 over it, 5.35\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_lifecycle.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"90504b7ded613e5dcac1f0325d341a031f55503d1a3c7779510311c6b0830957"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/commands.rs: FileTooLong \u2014 2616 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 129 free functions. The bar is 500 significant lines; this is 2116 over it, 5.23\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"05f60002f0f82887eecee63bd97fc0a7fda6e89dab571d26894b358cf1f88fb3"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_provider_cursor_runtime::agent_transport::run_agent_turn: FunctionTooLong \u2014 jcode_provider_cursor_runtime::agent_transport::run_agent_turn runs 523 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 423 over it, 5.23\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/agent_transport.rs"},"region":{"startLine":758}}}],"partialFingerprints":{"codehealthFindingId/v1":"50bd5f7ede2aa0842e9d172fd8af1ef549b3ca11567b770fb7469d61808f2b18"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cli/commands.rs: FileTooLong \u2014 2570 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 77 free functions. The bar is 500 significant lines; this is 2070 over it, 5.14\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d2bdf3cb813ae956e1a242f96afcb943f20f7532922483faf6b148f75185e13"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: remote/server_events.rs: FileTooLong \u2014 2502 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 2002 over it, 5.00\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/server_events.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ac8d1d4a5cd78aab3b4cd7f60ee0d9c0cca28ac763262dc150e4423d6e2e8d7"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.new: MethodTooLong \u2014 new runs 493 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 393 over it, 4.93\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tui_lifecycle.rs"},"region":{"startLine":756}}}],"partialFingerprints":{"codehealthFindingId/v1":"a54d46e983de286b4715c8703d0eb1d6fe7c8a3a1332157484ead58743be9e80"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: OpenAIProvider.complete: MethodTooLong \u2014 complete runs 492 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 392 over it, 4.92\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_provider_impl.rs"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4b181391ed6214ad86b87755c94398be7b8acd5cffb7a5f2096f1028cf81155"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/auth.rs: FileTooLong \u2014 2459 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 97% of them inside a single declaration: App (85-3398). The bar is 500 significant lines; this is 1959 over it, 4.92\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ee676ba2b794bc59b521c10293e9277206386611e51366d2cc8cb3b17bfa1d1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/translate.rs: FileTooLong \u2014 2414 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 94% of them inside a single declaration: BridgeState (3 blocks, 125-3520). The bar is 500 significant lines; this is 1914 over it, 4.83\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/translate.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bb587c5ff07d05cc854e7d3efaaca7a9983914ab7f576658b424eed9434bb87"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode::cli::dispatch::run_main: FunctionTooLong \u2014 jcode::cli::dispatch::run_main runs 482 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 382 over it, 4.82\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/dispatch.rs"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"557424d6dbb434f268717ec5bf786bc36355c0a5ceebf54d8fa01e1597da524a"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_messages::render_tool_message: FunctionTooLong \u2014 jcode_tui::tui::ui_messages::render_tool_message runs 479 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 379 over it, 4.79\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":3961}}}],"partialFingerprints":{"codehealthFindingId/v1":"a50ca53718abc57d1f16f1892522eebb090f6806cacf2a4d1fc6f6e347f5bff4"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: SessionLifecycleEvent: TooManyFields \u2014 142 stored fields. The bar is 30 stored fields; this is 112 over it, 4.73\u00D7 the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member \u2014 each reader then names only the group it uses."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-usage-types/src/lib.rs"},"region":{"startLine":545}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c62b7b7559f4e5589af0f7b68b5465a247690d7187eb40be3cd8db648623793"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.new_minimal_with_session: MethodTooLong \u2014 new_minimal_with_session runs 473 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 373 over it, 4.73\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tui_lifecycle.rs"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"423d00c3340418aa0d8962b79628e5351c318c9e401c737b9392400814217b77"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: SessionPicker: TooManyMethods \u2014 140 methods, declared across 11 files: tui/session_picker.rs (64), session_picker/filter.rs (23), session_picker/navigation.rs (19), session_picker/render.rs (12), \u002B7 more file(s). The bar is 30 methods; this is 110 over it, 4.67\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker.rs"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"eaca73355fdbbafc3365e944ad73140c8523078363ae4a9b0efd452635cea300"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: MultiProvider: ClassTooLong \u2014 1854 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 99 methods, 4 blocks, lines 387-3076. The bar is 400 significant lines; this is 1454 over it, 4.64\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/mod.rs"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1d849c6d9740c67267cd83906d3686d3081b8df1b32d62bda081d98338ded67"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.get_suggestions_for: MethodTooLong \u2014 get_suggestions_for runs 455 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 355 over it, 4.55\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui_input_helpers.rs"},"region":{"startLine":478}}}],"partialFingerprints":{"codehealthFindingId/v1":"195afe6f6c72c3f8b622ff16c78cd7c4607955cf3a701b4006701b767d87439c"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode::bin::tui_bench::main: FunctionTooLong \u2014 jcode::bin::tui_bench::main runs 452 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 352 over it, 4.52\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/tui_bench.rs"},"region":{"startLine":1212}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f6347cae830d632cccc14ffedba440411e0a9cc9d44c186ea3c1b2c5be3a918"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Server.spawn_background_tasks: MethodTooLong \u2014 spawn_background_tasks runs 447 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 347 over it, 4.47\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server.rs"},"region":{"startLine":1199}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f76453e680719b30b38f12d26554d3b658766d72b8f3277753f52bce506974b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: GmailTool.execute: MethodTooLong \u2014 execute runs 440 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 340 over it, 4.40\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/gmail.rs"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac86f410fd75e192afce9c4c3e68c179b764ac056a5cac987e78710d95a94037"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::app::state_ui::format_cache_stats: FunctionTooLong \u2014 jcode_tui::tui::app::state_ui::format_cache_stats runs 440 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 340 over it, 4.40\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui.rs"},"region":{"startLine":1225}}}],"partialFingerprints":{"codehealthFindingId/v1":"20146e661cc1155dff86683852452a26f17094d0b452a623e2b03f69526c95b7"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tui/ui.rs: FileTooLong \u2014 2187 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 92 free functions. The bar is 500 significant lines; this is 1687 over it, 4.37\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"eda82002455546541946b8d892d56fd681a2779206a58bf7d1cb182e138abb8a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: provider/mod.rs: FileTooLong \u2014 2150 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 86% of them inside a single declaration: MultiProvider (4 blocks, 387-3076). The bar is 500 significant lines; this is 1650 over it, 4.30\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/mod.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c3b4a3917a4be46c4aa112a8782fb7e8d114184a2808b372cc1d7af333265c0"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.handle_inline_interactive_key: MethodTooLong \u2014 handle_inline_interactive_key runs 427 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 327 over it, 4.27\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":3532}}}],"partialFingerprints":{"codehealthFindingId/v1":"f756ae98ba9681e4622474173916c4e20230a4099f84b7a76258a27084f6e44b"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_render_core::markdown::parse_markdown_with_options: FunctionTooLong \u2014 jcode_render_core::markdown::parse_markdown_with_options runs 425 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 325 over it, 4.25\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/markdown.rs"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b2a534ae6cd5e3132ce001beb596f8df36ed76c164620b878ffbdba625af58e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 2049 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 87 free functions. The bar is 500 significant lines; this is 1549 over it, 4.10\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bbd36cc8b540b4d5c8ea1af30bc7aa9580d6fc603305c4b33f5561ba9356e9a"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::comm_control::handle_comm_task_control: FunctionTooLong \u2014 jcode_app_core::server::comm_control::handle_comm_task_control runs 407 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 307 over it, 4.07\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_control.rs"},"region":{"startLine":1690}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dda279d5d2723314deb1b95de509b0786fffbd437a778082ff38ec1215907de"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tui/ui_input.rs: FileTooLong \u2014 2026 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 79 free functions. The bar is 500 significant lines; this is 1526 over it, 4.05\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_input.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"106b8ee918c4ed45690a586ffa408dd9a550f54e12da9af0b53ee14281581160"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_overlays::draw_help_overlay: FunctionTooLong \u2014 jcode_tui::tui::ui_overlays::draw_help_overlay runs 400 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 300 over it, 4.00\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_overlays.rs"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"fce0e27786ce72fa915a0c65964badd4b5f212e11d6460b91e725b6775dbaee5"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cli/cloud_move.rs: FileTooLong \u2014 1992 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 68 free functions. The bar is 500 significant lines; this is 1492 over it, 3.98\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_move.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"29a2aaca5bd4874ef91d28af495edc1431251522ac0f54b951be1115738ffcd4"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::debug_command_exec::execute_debug_command: FunctionTooLong \u2014 jcode_app_core::server::debug_command_exec::execute_debug_command runs 396 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 296 over it, 3.96\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_command_exec.rs"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"59fbff055604b4301b02214b6cbb82db7cfca339d7908f95ef2a06d463dddcf8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: session_picker/loading.rs: FileTooLong \u2014 1968 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 71 free functions. The bar is 500 significant lines; this is 1468 over it, 3.94\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"063e48e1965e2c7d2f8b39fc90ef6047cc7527ec54e40863893ec957e7cf49a2"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_inline_interactive::draw_inline_interactive: FunctionTooLong \u2014 jcode_tui::tui::ui_inline_interactive::draw_inline_interactive runs 393 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 293 over it, 3.93\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_inline_interactive.rs"},"region":{"startLine":595}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e1d3c97ed0010a8b959ad2fef29a3318de33823d251da8e86fc91cda98112cc"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: server/comm_control.rs: FileTooLong \u2014 1916 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 1416 over it, 3.83\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_control.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"91d9fdb78c781a8737fb523269c03b8e19d188cff0d63c503babd297ad09eff9"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DiscoverToolsTool.execute: MethodTooLong \u2014 execute runs 382 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 282 over it, 3.82\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/discover.rs"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"feffe6bdb2c731767c028b6c27f93326d4e850d78892c9405333f00944f4ebf2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tui/ui_prepare.rs: FileTooLong \u2014 1908 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 46 free functions. The bar is 500 significant lines; this is 1408 over it, 3.82\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_prepare.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8dcc761a5800e174c34dd3ce76a67371c2e45202da6aa589081252b78826703"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bin/memory_recall_bench.rs: FileTooLong \u2014 1890 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 33 free functions. The bar is 500 significant lines; this is 1390 over it, 3.78\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f70926c33bc65c1e9ddc503f3feb37bfa2df6dd06d978cccde269a380524a9d6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/tui_state.rs: FileTooLong \u2014 1873 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 86% of them inside a single declaration: App (4 blocks, 134-2862). The bar is 500 significant lines; this is 1373 over it, 3.75\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tui_state.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"96d5f4c050254ce1563958e1427bdcfb9b59107200196bb48dd497c19748fa78"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: SessionPicker: ClassTooLong \u2014 1484 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 140 methods, 2 blocks, lines 272-2525. The bar is 400 significant lines; this is 1084 over it, 3.71\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker.rs"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4ca59d3997db000d54616144b02710ec06abc2bd939b7eeeeb3e5df91391bc2"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: SessionTelemetry: TooManyFields \u2014 110 stored fields. The bar is 30 stored fields; this is 80 over it, 3.67\u00D7 the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member \u2014 each reader then names only the group it uses."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lib.rs"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d71cde9ecde9e3591496805a3f99db14d0a7876de9e7759b7f0eaf9c9b2f60b"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_provider_openai_runtime::openai_stream_runtime::stream_response_websocket_authenticated: FunctionTooLong \u2014 jcode_provider_openai_runtime::openai_stream_runtime::stream_response_websocket_authenticated runs 365 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 265 over it, 3.65\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs"},"region":{"startLine":1410}}}],"partialFingerprints":{"codehealthFindingId/v1":"e521d7b6b4b92789ba00d38ad10613f99aed837df6e154e8dc5e5245101c3614"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 1817 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 72% of them inside a single declaration: OpenRouterProvider (2 blocks, 820-2846). The bar is 500 significant lines; this is 1317 over it, 3.63\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"df24a612e3b563d5830ec0d1e7df320792a15e0e5600184042b730500e94fda7"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::debug_server_state::build_server_memory_payload: FunctionTooLong \u2014 jcode_app_core::server::debug_server_state::build_server_memory_payload runs 362 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 262 over it, 3.62\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_server_state.rs"},"region":{"startLine":665}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd1bc1a8454b88572eb137311fc46b767cb1e1d7abd700ab572af3f77e4698a1"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::app::state_ui::handle_info_command: FunctionTooLong \u2014 jcode_tui::tui::app::state_ui::handle_info_command runs 360 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 260 over it, 3.60\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui.rs"},"region":{"startLine":1895}}}],"partialFingerprints":{"codehealthFindingId/v1":"0dab255852225fd32d2ce151491d5c7b6235e7f3b6875beb83522f159bd97596"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.build_model_picker_entries: MethodTooLong \u2014 build_model_picker_entries runs 356 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 256 over it, 3.56\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":1668}}}],"partialFingerprints":{"codehealthFindingId/v1":"971c6cad8970cfb782b053fee4c8d557721fe6d64928d161200a84deed6e15bd"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::client_comm_message::handle_comm_message: FunctionTooLong \u2014 jcode_app_core::server::client_comm_message::handle_comm_message runs 354 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 254 over it, 3.54\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_comm_message.rs"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"2eb148590e6079cf7b384ad069fb4e3625d0413c525fec2bc443ea4b2736ae73"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/worker.js: FileTooLong \u2014 1768 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 1268 over it, 3.54\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f992ef7b4fe9ac0a77d3292ceae72032069c81739dee0884ab2eed6eabf266a5"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::app::commands::handle_session_command: FunctionTooLong \u2014 jcode_tui::tui::app::commands::handle_session_command runs 351 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 251 over it, 3.51\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":1698}}}],"partialFingerprints":{"codehealthFindingId/v1":"2658cfb59308ed60085efd2389b8472dc2232b1ca45b5fe5037f4d134e47f6b5"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tui/app.rs: FileTooLong \u2014 1753 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 65% of them inside a single declaration: App (2 blocks, 935-2917). The bar is 500 significant lines; this is 1253 over it, 3.51\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebece44cbab8285117899ccfeb7c0e0be6ae74d7c1b2eba4b1a1a131b4b19825"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/server.rs: FileTooLong \u2014 1751 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 78% of them inside a single declaration: Server (2 blocks, 553-2564). The bar is 500 significant lines; this is 1251 over it, 3.50\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bbe9f16688d98c221529684fb7d6e6444388f59ffdfdf54f062fa7c4d36b883"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::debug_swarm_write::maybe_handle_swarm_write_command: FunctionTooLong \u2014 jcode_app_core::server::debug_swarm_write::maybe_handle_swarm_write_command runs 350 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 250 over it, 3.50\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_swarm_write.rs"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"101b32075225e9505c5d027ac38853f8d8967f5c15b1d1be8e8b340b99b026f6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 1740 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 1240 over it, 3.48\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic-runtime/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"72ee67abb7aabb5655741a197ac82f963a213a0172f887dc045f9c0e554dd6b1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/state_ui.rs: FileTooLong \u2014 1738 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 1238 over it, 3.48\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3973ad0bac44f725bb15560a79ee63d6e1b16f660ed3762a945b8b856c652a3"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Config.display_string: MethodTooLong \u2014 display_string runs 342 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 242 over it, 3.42\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/config/display_summary.rs"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f2db048b696d13124302bd25ab0e9075409c132095bbf3c6cfc47074b5a1883"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: Server: ClassTooLong \u2014 1365 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 18 methods, 2 blocks, lines 553-2564. The bar is 400 significant lines; this is 965 over it, 3.41\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server.rs"},"region":{"startLine":553}}}],"partialFingerprints":{"codehealthFindingId/v1":"48ec63c389699d7f973786f65e6076fcbca70c9db1a240aa9ef37e7c41954402"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_provider_openai::request::build_responses_input_with_logger: FunctionTooLong \u2014 jcode_provider_openai::request::build_responses_input_with_logger runs 341 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 241 over it, 3.41\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai/src/request.rs"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"f80365ee91b38ed273e4fbbaf9f2be5cb3b1251636bc07691359dc29dbabd517"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_provider_openrouter::request::build_chat_messages: FunctionTooLong \u2014 jcode_provider_openrouter::request::build_chat_messages runs 340 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 240 over it, 3.40\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter/src/request.rs"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe6de4ca0cb3e769015db421420bab8cd9c2baea9f0754b74846d7e2dcd20b41"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_telemetry_core::lifecycle::emit_lifecycle_event: FunctionTooLong \u2014 jcode_telemetry_core::lifecycle::emit_lifecycle_event runs 339 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 239 over it, 3.39\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lifecycle.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"79ba3c3f50748862a2ca22e56f7900d987b78859d9feed00249fb7593a319b7f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tui/session_picker.rs: FileTooLong \u2014 1656 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 90% of them inside a single declaration: SessionPicker (2 blocks, 272-2525). The bar is 500 significant lines; this is 1156 over it, 3.31\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a03b22a8604fa39a99fa585db62793873810d4f102f23118ec4574f8ddf8d2f3"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: MultiProvider: TooManyMethods \u2014 99 methods, declared across 12 files: provider/mod.rs (21), provider/selection.rs (18), provider/startup.rs (18), provider/accessors.rs (13), \u002B8 more file(s). The bar is 30 methods; this is 69 over it, 3.30\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/mod.rs"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"df9ef4ed914285daafa98a0ba3a4092757c77fc38dfc01bf6415360089e3879c"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: worker.insertEvent: FunctionTooLong \u2014 insertEvent runs 327 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 227 over it, 3.27\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":1183}}}],"partialFingerprints":{"codehealthFindingId/v1":"d092ce334bbe87200b5682f4399eca4bc48b463ff447e8b56e5bc257fa1a1584"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: OpenRouterProvider: ClassTooLong \u2014 1305 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 78 methods, 2 blocks, lines 820-2846. The bar is 400 significant lines; this is 905 over it, 3.26\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/lib.rs"},"region":{"startLine":820}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fbd280616206bd6cb00fab390e2fe879489b160c3534fec50912e464b9bab0e"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.debug_app_owned_memory_profile: MethodTooLong \u2014 debug_app_owned_memory_profile runs 322 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 222 over it, 3.22\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_profile.rs"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"0840f8daf2e0fc19ee8224c84bf35e5b95542c66e278f158af2832d7ac2991ef"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Session: TooManyMethods \u2014 96 methods, declared across 3 files: src/session.rs (78), session/persistence.rs (14), session/agent_models.rs (4). The bar is 30 methods; this is 66 over it, 3.20\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session.rs"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b9432dc4ddd1b906cac75deb091569acfba2f3248dd12efc1630f0510d61263"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::app::state_ui_storage::compact_tool_input_for_display: FunctionTooLong \u2014 jcode_tui::tui::app::state_ui_storage::compact_tool_input_for_display runs 319 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 219 over it, 3.19\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui_storage.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"c155332c6235bb01f7e355ee169f016ae725d084a5494c8580936903d4a70348"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: RemoteConnection: TooManyMethods \u2014 95 methods, declared across 4 files: tui/backend.rs (80), tui/backend_auth.rs (7), tui/backend_cloud.rs (6), backend/ssh_sessions.rs (2). The bar is 30 methods; this is 65 over it, 3.17\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/backend.rs"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"b19c2ccf5f1eb6e4fa2f10d8cb137646e49b64d115256df20102bbbcaee694c0"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode::cli::provider_init::init_provider_with_model_policy: FunctionTooLong \u2014 jcode::cli::provider_init::init_provider_with_model_policy runs 315 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 215 over it, 3.15\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/provider_init.rs"},"region":{"startLine":1525}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c587c08d0823b12b2799caf8ba6adeb99d9fc1bd95df2764d02cee8a9552b6b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 1572 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 60 free functions. The bar is 500 significant lines; this is 1072 over it, 3.14\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a138e353b66e75c785378ec8da4556f0590ca333aa196cc9ef67dd71d9d8525c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/remote.rs: FileTooLong \u2014 1570 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 33 free functions. The bar is 500 significant lines; this is 1070 over it, 3.14\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd737629661bdc14d5bf6a8a7ce56c7325d2bbffe6cc255fde95a1b8a79db21b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.handle_mouse_event: MethodTooLong \u2014 handle_mouse_event runs 314 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 214 over it, 3.14\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/navigation.rs"},"region":{"startLine":1329}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0830c2b3315295ab8fd3cd97f8608745726344f484ae0126282d62a7ddfc649"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_pinned::draw_side_panel_markdown: FunctionTooLong \u2014 jcode_tui::tui::ui_pinned::draw_side_panel_markdown runs 306 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 206 over it, 3.06\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_pinned.rs"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"90c7dd315f04952769213453ff41116a068e22eac6de8b1a8f3bbe4b8f149cbe"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cli/acp.rs: FileTooLong \u2014 1525 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 1025 over it, 3.05\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/acp.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f32aa41437cdfc77d98369056a7b4dc2c010f6ae563f93bca1ed50799ca4946e"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::app::remote::handle_tick: FunctionTooLong \u2014 jcode_tui::tui::app::remote::handle_tick runs 302 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 202 over it, 3.02\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3a33ecad603a44410325428782e82f3cad76f5969bc2c864014fb024c1335d7"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: remote/key_handling.rs: FileTooLong \u2014 1502 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 1002 over it, 3.00\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/key_handling.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cadcaf598c262ce1dd60aa8e9bf5b2cbdea199c227d4abebd90d4bf3bbbd530"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::comm_control::handle_comm_assign_task_with_mode: FunctionTooLong \u2014 jcode_app_core::server::comm_control::handle_comm_assign_task_with_mode runs 299 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 199 over it, 2.99\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_control.rs"},"region":{"startLine":1090}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e03f9b561770c51275d9ee9152b47adb0b6dd828af39b4f74a97570505fcbda"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::debug::handle_debug_client: FunctionTooLong \u2014 jcode_app_core::server::debug::handle_debug_client runs 299 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 199 over it, 2.99\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug.rs"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7da1ee091cd203e7214646b5a839c881f361373c3b73e3e5da66decb352edb2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: server/client_session.rs: FileTooLong \u2014 1486 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 986 over it, 2.97\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_session.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"55f69a5e6f41e0e660596cf81c792a5dc034d814bec899fc7a322dc3419399e8"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.info_widget_data: MethodTooLong \u2014 info_widget_data runs 294 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 194 over it, 2.94\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tui_state.rs"},"region":{"startLine":1582}}}],"partialFingerprints":{"codehealthFindingId/v1":"714ff48be0d7b523bdca7a961c227297a4608134b877ac9a4b26055ebd4b731e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: server/swarm.rs: FileTooLong \u2014 1466 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 50 free functions. The bar is 500 significant lines; this is 966 over it, 2.93\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/swarm.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a82b7028fd0ea24d22c5338563b7908f0c1874ceded5ee999b2a8d6df2c5e0c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/model_context.rs: FileTooLong \u2014 1442 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 98% of them inside a single declaration: App (2 blocks, 12-2169). The bar is 500 significant lines; this is 942 over it, 2.88\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/model_context.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"98c9e28709cc67d3095f09c80ac70e510e0c370c9253423beefcabc5fdfa3e77"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Server.monitor_bus: MethodTooLong \u2014 monitor_bus runs 288 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 188 over it, 2.88\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server.rs"},"region":{"startLine":1981}}}],"partialFingerprints":{"codehealthFindingId/v1":"45defe46f348eb1c107cb29e0982271323b886bb080fb323c38eb37a68946028"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: App: ClassTooLong \u2014 1147 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 1017 methods, 2 blocks, lines 935-2917. The bar is 400 significant lines; this is 747 over it, 2.87\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app.rs"},"region":{"startLine":935}}}],"partialFingerprints":{"codehealthFindingId/v1":"619876aa074676a0cc88670c76ee467fe424cc72940b0254d0db32b9e99d1caf"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: BackgroundTaskManager: ClassTooLong \u2014 1135 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 39 methods, 3 blocks, lines 36-1706. The bar is 400 significant lines; this is 735 over it, 2.84\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/background.rs"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"6452fbb87bcdabfef3a00f7be201020bf28577c81fdcb4612d33e10cacdc31ce"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::app::hotkey_feedback::build_registry: FunctionTooLong \u2014 jcode_tui::tui::app::hotkey_feedback::build_registry runs 283 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 183 over it, 2.83\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/hotkey_feedback.rs"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4b991d94f0ec402614d4f81b9715bf8bd52368399faf6e9f803b33c66d11c3f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tool/discover.rs: FileTooLong \u2014 1413 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 913 over it, 2.83\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/discover.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"37043d9bffca5bea3511fa8ebe864a4fa4017dafdecc424dd3e41557178d08ce"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/tui_lifecycle.rs: FileTooLong \u2014 1412 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 100% of them inside a single declaration: App (10-1670). The bar is 500 significant lines; this is 912 over it, 2.82\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tui_lifecycle.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3479d781d2a6fde74aa1b2b57972e5f92ee639f7127a4cd4d855f0eda4c78196"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode::cli::cloud_managed::prepare_script_for_paths_with_candidate: FunctionTooLong \u2014 jcode::cli::cloud_managed::prepare_script_for_paths_with_candidate runs 282 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 182 over it, 2.82\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_managed.rs"},"region":{"startLine":582}}}],"partialFingerprints":{"codehealthFindingId/v1":"da300d30880859e6c528d930080d10c2bf8b6f47872243348e349820e2ff49ff"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Server.recover_headless_sessions_on_startup: MethodTooLong \u2014 recover_headless_sessions_on_startup runs 281 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 181 over it, 2.81\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server.rs"},"region":{"startLine":750}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a9ed6a48bd7526ababc913648f5f24ff396aac1c898d0b751b95bfc08fbeb3f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: BgTool.execute: MethodTooLong \u2014 execute runs 280 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 180 over it, 2.80\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/bg.rs"},"region":{"startLine":559}}}],"partialFingerprints":{"codehealthFindingId/v1":"7978cc4a2f3d58c3e05bfb6755d073f9fa11c71b9aa355bff94c3ddae7463630"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionPicker.render_session_list_impl: MethodTooLong \u2014 render_session_list_impl runs 276 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 176 over it, 2.76\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/render.rs"},"region":{"startLine":418}}}],"partialFingerprints":{"codehealthFindingId/v1":"41de769c0f9cbdfec5b96385c9cb90e2cf049c7f43e1a248a42e509e291ed008"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cli/provider_init.rs: FileTooLong \u2014 1363 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 51 free functions. The bar is 500 significant lines; this is 863 over it, 2.73\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/provider_init.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b852d3c4a14d794068d73ca22440e99db8633bc42c86ccacb49eadf27b6d1ed6"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_prepare::render_message_into: FunctionTooLong \u2014 jcode_tui::tui::ui_prepare::render_message_into runs 270 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 170 over it, 2.70\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_prepare.rs"},"region":{"startLine":1428}}}],"partialFingerprints":{"codehealthFindingId/v1":"7801b03b5910236583a024b4a830b4f5ccc734aa7b186e1037a408f8f4628a07"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/openai_stream_runtime.rs: FileTooLong \u2014 1349 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 849 over it, 2.70\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0ee640d94c166303d9562fd33d73279f8c1c2573a64afa4acc4a5644b940e99"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: Registry: ClassTooLong \u2014 1065 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 50 methods, 3 blocks, lines 364-1993. The bar is 400 significant lines; this is 665 over it, 2.66\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/mod.rs"},"region":{"startLine":364}}}],"partialFingerprints":{"codehealthFindingId/v1":"22c705d817513e81cb8b87c0c85543f2ba25ab91333152cb66965742d8f237e2"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: BedrockProvider: ClassTooLong \u2014 1055 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 44 methods, 4 blocks, lines 98-1547. The bar is 400 significant lines; this is 655 over it, 2.64\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-bedrock/src/lib.rs"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3c55024c9a880513b8d5d94796c5f24f1f0c1cb6298f3977d59f25aa2ba5b88"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: TurnEndEvent: TooManyFields \u2014 79 stored fields. The bar is 30 stored fields; this is 49 over it, 2.63\u00D7 the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member \u2014 each reader then names only the group it uses."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-usage-types/src/lib.rs"},"region":{"startLine":744}}}],"partialFingerprints":{"codehealthFindingId/v1":"edb828d4918f85f744bf8d782bbd2b23cb5a5442a8fffb8e3a138212de8ecfb6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tool/session_search.rs: FileTooLong \u2014 1311 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 49 free functions. The bar is 500 significant lines; this is 811 over it, 2.62\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/session_search.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7386a64dc73611f8ec4d74896afb38dee0741ef0161ed78502198c1e78f2da7f"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: Session: ClassTooLong \u2014 1048 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 96 methods, 2 blocks, lines 103-1731. The bar is 400 significant lines; this is 648 over it, 2.62\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session.rs"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b5ad100439082bea455deebc76b3ad30448434ed14ca4eebb31972da93a4aaf"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode::cli::cloud_move::run_move: FunctionTooLong \u2014 jcode::cli::cloud_move::run_move runs 261 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 161 over it, 2.61\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_move.rs"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"efe9f24617a4252a055ca9771359142a3e0851b395cfc18ca3b915ac4f5b722d"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: OpenRouterProvider: TooManyMethods \u2014 78 methods, declared across 3 files: src/lib.rs (70), src/openrouter_provider_impl.rs (7), src/openai_compatible_runtime.rs (1). The bar is 30 methods; this is 48 over it, 2.60\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/lib.rs"},"region":{"startLine":820}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b135d5abe9181314890f8ccce2f23b95527052342adcdb8c148259585f153c7"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: JcodeClient: TooManyMethods \u2014 78 methods, declared across 3 files: src/client.rs (76), src/native_ssh.rs (1), src/structured.rs (1). The bar is 30 methods; this is 48 over it, 2.60\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-sdk/src/client.rs"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"280854b4b6d96cca7e4ce5523953615d57134e40bb007ad540530545214cea8f"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_base::session::render::render_messages_and_images_with_compacted_history: FunctionTooLong \u2014 jcode_base::session::render::render_messages_and_images_with_compacted_history runs 259 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 159 over it, 2.59\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/render.rs"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"431158fbd2b91be0c4c40dbd6e02b9806faecbecd7c3557c132d7aab900c5427"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::app::remote::process_remote_followups: FunctionTooLong \u2014 jcode_tui::tui::app::remote::process_remote_followups runs 259 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 159 over it, 2.59\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote.rs"},"region":{"startLine":1461}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b85f0a9dc4a4e3a49d00a5b9061c433dea43205764cd585118b67e37c139019"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/session.rs: FileTooLong \u2014 1293 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 81% of them inside a single declaration: Session (2 blocks, 103-1731). The bar is 500 significant lines; this is 793 over it, 2.59\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"51b1b32554877232f8f2acc2d891c1cb4b5149467036d5f82e91d365fd173eef"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::client_state::send_history_with_guard: FunctionTooLong \u2014 jcode_app_core::server::client_state::send_history_with_guard runs 258 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 158 over it, 2.58\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_state.rs"},"region":{"startLine":986}}}],"partialFingerprints":{"codehealthFindingId/v1":"c46747f9f3142bbfcbb1b843284dc4a9b45bb3f6dc8e31f549c1310649436ad6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tool/mod.rs: FileTooLong \u2014 1286 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 83% of them inside a single declaration: Registry (3 blocks, 364-1993). The bar is 500 significant lines; this is 786 over it, 2.57\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/mod.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d1acec7d92efc1149cff2c7669ed2ad57a362d13265a418805c744ec60647de"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/navigation.rs: FileTooLong \u2014 1284 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 95% of them inside a single declaration: App (77-1958). The bar is 500 significant lines; this is 784 over it, 2.57\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/navigation.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"64b3fd9296eead49079dfd8225b3ff3f25b7b66aea1ec4eeb447736733f033b9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/swarm_gallery.rs: FileTooLong \u2014 1281 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 36 free functions. The bar is 500 significant lines; this is 781 over it, 2.56\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/swarm_gallery.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"079cba34240f87922459042b176631857928e64eb22981a32d9e34ec31960769"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tui/info_widget.rs: FileTooLong \u2014 1279 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 33 free functions. The bar is 500 significant lines; this is 779 over it, 2.56\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b795a2d111d9a0a66a27f4dd776968940e26aa3258bb80cccfbb55635fc657b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/live_provider_probes.rs: FileTooLong \u2014 1278 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 778 over it, 2.56\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/live_provider_probes.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"00897add8c71d97ede3e33dc40d2163b61c4f3520e232b7b4b5c71e7701427cc"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: bin/tui_bench.rs: FileTooLong \u2014 1275 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 775 over it, 2.55\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/tui_bench.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc7398bdeab68b95241b384ea50259908c3e1d173f505500799e91b6f06066ef"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::runtime_commands::execute: FunctionTooLong \u2014 jcode_app_core::server::runtime_commands::execute runs 255 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 155 over it, 2.55\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/runtime_commands.rs"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"0468dfc5002024f96e955e5ea2e4ae2e59fba81a0a460501d483fab8da77e320"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MultiProvider.new_with_auth_status: MethodTooLong \u2014 new_with_auth_status runs 255 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 155 over it, 2.55\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/startup.rs"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"505a01ee047ccd031bb73027a4842467dbb5e2a8a88e01afda35b3a5e05065cc"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_provider_openai_runtime::openai_stream_http::stream_response: FunctionTooLong \u2014 jcode_provider_openai_runtime::openai_stream_http::stream_response runs 254 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 154 over it, 2.54\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_stream_http.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"71e3061c13cbdbcaa322f5fc0e3b69e15bffbc9d61630970a73b177f024cf1f4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tui/ui_tools.rs: FileTooLong \u2014 1267 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 34 free functions. The bar is 500 significant lines; this is 767 over it, 2.53\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tools.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"84a58e5970b3303ecedefc0b81ca3a8580240bcd4863ca54d8d57fee4d730a42"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::comm_session::spawn_swarm_agent: FunctionTooLong \u2014 jcode_app_core::server::comm_session::spawn_swarm_agent runs 252 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 152 over it, 2.52\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_session.rs"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"36dbbf69348b6216aeb4969013361a6d1de86ec9e7d8e705bea1bdfb08a25f20"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.run_remote: MethodTooLong \u2014 run_remote runs 251 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 151 over it, 2.51\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/run_shell.rs"},"region":{"startLine":901}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a32f62c6648040b890d8eb64a9e3c6a99a25ab3f2459d0d567e09656306de69"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: agent/turn_streaming_mpsc.rs: FileTooLong \u2014 1252 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 99% of them inside a single declaration: Agent (13-1869). The bar is 500 significant lines; this is 752 over it, 2.50\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/turn_streaming_mpsc.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b13f2c6f72c59f109d91267c0f9b3d3342ac2ee30a44548fded9663c7a8a2b3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tool/communicate.rs: FileTooLong \u2014 1251 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 67% of them inside a single declaration: CommunicateTool (3 blocks, 470-1851). The bar is 500 significant lines; this is 751 over it, 2.50\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/communicate.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b8ae2e83b55a12339d5248d0b6f7d6f5f48d11fef4147db55a5268d791d0635"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: JcodeClient: TooManyMethods \u2014 75 methods. The bar is 30 methods; this is 45 over it, 2.50\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/typescript/src/client.ts"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"646648a5d1eb682bf980f342dba9a37830cc90ff8f57f584225ea814e2b2c787"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.open_account_center: MethodTooLong \u2014 open_account_center runs 250 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 150 over it, 2.50\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker/account_center.rs"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"966ce578c01b63a2da386c928b5fdc13fba4d85d08feec14ea1fcd05d087b0ec"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::app::model_context_commands::handle_model_command: FunctionTooLong \u2014 jcode_tui::tui::app::model_context_commands::handle_model_command runs 249 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 149 over it, 2.49\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/model_context_commands.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c3394f232cc74a903564938f543bad85b7c33dbec5968d137092ff4b5a0128c"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::client_session::handle_subscribe: FunctionTooLong \u2014 jcode_app_core::server::client_session::handle_subscribe runs 243 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 143 over it, 2.43\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_session.rs"},"region":{"startLine":643}}}],"partialFingerprints":{"codehealthFindingId/v1":"a03846a20c816d2ec29945ff6e885884313fe19352da54bfce7c54fb0e26683d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MemoryTool.execute: MethodTooLong \u2014 execute runs 241 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 141 over it, 2.41\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/memory.rs"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"e00a1ad4e0eeffec2e0c9ace6c41ea82cef5b2a8b8b8ec165d9fac1d5efeeb23"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::comm_control::spawn_assigned_task_run: FunctionTooLong \u2014 jcode_app_core::server::comm_control::spawn_assigned_task_run runs 240 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 140 over it, 2.40\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_control.rs"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"b73168148fc07ad71f5243d9c3fc866c3251b2c8d4cd5bf6f4cb5a7c404ac2cc"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode::bin::memory_recall_bench::cmd_gate: FunctionTooLong \u2014 jcode::bin::memory_recall_bench::cmd_gate runs 238 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 138 over it, 2.38\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":2189}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed7d03d95611b0f151d19445f82f74da2668439f55990bae170bd095359c3e2d"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode::cli::tui_launch::list_sessions: FunctionTooLong \u2014 jcode::cli::tui_launch::list_sessions runs 238 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 138 over it, 2.38\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/tui_launch.rs"},"region":{"startLine":606}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f70afceded00389b97fa610ac16c0a72fe5069030de18a8877932e8c7d5dede"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: GeminiProvider.complete: MethodTooLong \u2014 complete runs 237 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 137 over it, 2.37\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-gemini-runtime/src/lib.rs"},"region":{"startLine":605}}}],"partialFingerprints":{"codehealthFindingId/v1":"4656f21d28bccd09dcf7f42ea032919dcbbd2e8882ccbe35d0784e12ab5a156d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tool/todo.rs: FileTooLong \u2014 1175 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 675 over it, 2.35\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/todo.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a716da0f4a8d4b61abdc78e0051dc5113d2b4cc949c6d80a78dc4a58586faa0f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/client.rs: FileTooLong \u2014 1175 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 73% of them inside a single declaration: JcodeClient (4 blocks, 354-1672). The bar is 500 significant lines; this is 675 over it, 2.35\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-sdk/src/client.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4d1a96090a501e62e26500c95461138fa0cb396e1893d2a36d04a5e764ed08e"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.restore_input_for_reload: MethodTooLong \u2014 restore_input_for_reload runs 235 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 135 over it, 2.35\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui.rs"},"region":{"startLine":494}}}],"partialFingerprints":{"codehealthFindingId/v1":"6914efc606bb568edc886b7f3bd4bdc1ba0fe8f114656b6e0ddafcca68a6dac7"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ApplyPatchTool.execute: MethodTooLong \u2014 execute runs 234 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 134 over it, 2.34\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/apply_patch.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"92985e082723c665bd866931dc358a903be1ae5740f7e5494eb4a40b11df7686"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.build_all_inline_account_picker: MethodTooLong \u2014 build_all_inline_account_picker runs 233 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 133 over it, 2.33\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker.rs"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"9eb74a14a1ccddd1e056f3a83269da4b9a2dff22d60eecb911ff5b9d97df6a37"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/background.rs: FileTooLong \u2014 1163 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 98% of them inside a single declaration: BackgroundTaskManager (3 blocks, 36-1706). The bar is 500 significant lines; this is 663 over it, 2.33\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/background.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d0bcaa05f0485af91fde2f99e75ac6497b4d8aecbfaf62f76b2ed797293c45a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/turn.rs: FileTooLong \u2014 1158 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 97% of them inside a single declaration: App (62-1698). The bar is 500 significant lines; this is 658 over it, 2.32\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/turn.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"985a6be47a38e0c61220adc9fb5b25717f3cd8998688014b827f7e46ee04c1b2"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_input::draw_status: FunctionTooLong \u2014 jcode_tui::tui::ui_input::draw_status runs 231 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 131 over it, 2.31\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_input.rs"},"region":{"startLine":824}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c96384dfe312aa26f4225dd2548e24aa6420d8ec7e45a1d311ac043cfcc4ef1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 1139 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 93% of them inside a single declaration: BedrockProvider (4 blocks, 98-1547). The bar is 500 significant lines; this is 639 over it, 2.28\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-bedrock/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bf421d83741e99417260ce88b0fcff16bf412809eb0d9da0e7e383147e577f6"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: CompactionManager: ClassTooLong \u2014 908 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 63 methods, 3 blocks, lines 135-1722. The bar is 400 significant lines; this is 508 over it, 2.27\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/compaction.rs"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"58dec9183102f162c14d40a3edbb480da45efe557ba1c15121504f636d2e38c8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/helpers.rs: FileTooLong \u2014 1134 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 69 free functions. The bar is 500 significant lines; this is 634 over it, 2.27\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/helpers.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"02a48f40aa2fca81dff31b8b16e2729d9feaa5ebdc1f75120957d3f46b196054"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tui/mod.rs: FileTooLong \u2014 1134 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 49 free functions. The bar is 500 significant lines; this is 634 over it, 2.27\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/mod.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"29bb0cf809fc583707728a51b30e7c06a5f82fa181b7014981da8e2aa8ab4d4d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.run_scroll_test: MethodTooLong \u2014 run_scroll_test runs 226 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 126 over it, 2.26\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_bench.rs"},"region":{"startLine":717}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e652f8486b7bb0e4e16923991180c28019504f7dc0b74bab8152f064240a8b3"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::client_processing::start_processing_message: FunctionTooLong \u2014 jcode_app_core::server::client_processing::start_processing_message runs 223 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 123 over it, 2.23\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_processing.rs"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a98c478fee5a5d522ce8f7bb402ff2b0808466129679131547d0f7b4d31ff0d"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::info_widget_layout::calculate_placements_anchored: FunctionTooLong \u2014 jcode_tui::tui::info_widget_layout::calculate_placements_anchored runs 222 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 122 over it, 2.22\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_layout.rs"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1eaedc6264b62115ef6e42ebb193e720c2f91afe7eb76a77055896c8892ebf9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/state_ui_input_helpers.rs: FileTooLong \u2014 1107 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 80% of them inside a single declaration: App (269-1788). The bar is 500 significant lines; this is 607 over it, 2.21\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui_input_helpers.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1b21001960755e951f6397f7bd445c046c1b9f9f549149517cfd91d37f04c36"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode::cli::cloud_move::run_cli: FunctionTooLong \u2014 jcode::cli::cloud_move::run_cli runs 221 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 121 over it, 2.21\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_move.rs"},"region":{"startLine":2111}}}],"partialFingerprints":{"codehealthFindingId/v1":"0dd37fe1da5638e736d572491783ee9a9b07dc8e5bbdfacf3005c0f9d7a79ee3"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode::cli::cloud_group_run::run_migrate: FunctionTooLong \u2014 jcode::cli::cloud_group_run::run_migrate runs 220 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 120 over it, 2.20\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_group_run.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"98110f00d9c15f82d778f1033f74d14eb57232c68d7f5ccd0b059e12a9a70684"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_provider_cursor_runtime::wire::decode_exec_server_message: FunctionTooLong \u2014 jcode_provider_cursor_runtime::wire::decode_exec_server_message runs 219 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 119 over it, 2.19\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/wire.rs"},"region":{"startLine":691}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b9953d3c3675e8256895ac407ec1ef3ededf36d4a795492df6b94af0f6caec2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/compaction.rs: FileTooLong \u2014 1092 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 83% of them inside a single declaration: CompactionManager (3 blocks, 135-1722). The bar is 500 significant lines; this is 592 over it, 2.18\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/compaction.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f51e68c416cf5f66bc9febcb92355546ef090da1e71696f1c06366e44d5e13b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: agent/turn_execution.rs: FileTooLong \u2014 1083 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 99% of them inside a single declaration: Agent (4-1671). The bar is 500 significant lines; this is 583 over it, 2.17\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/turn_execution.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"306abd9159b9734894679b7af89d492b34c3822194da788d35be3da0d13a28e3"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui_render::swarm_gallery::render_swarm_strip: FunctionTooLong \u2014 jcode_tui_render::swarm_gallery::render_swarm_strip runs 216 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 116 over it, 2.16\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/swarm_gallery.rs"},"region":{"startLine":624}}}],"partialFingerprints":{"codehealthFindingId/v1":"59b19a858c454fdf1dd29e90cf0a7a79a81e2eafdaf774919f96ab8854eb537e"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: JcodeClient: ClassTooLong \u2014 862 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 78 methods, 4 blocks, lines 354-1672. The bar is 400 significant lines; this is 462 over it, 2.16\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-sdk/src/client.rs"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b10d7d6ae6133b9eae0d9125e50f1e8c0dcb6aefc1021c20107d8cb38862ee5"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: MemoryManager: ClassTooLong \u2014 862 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 61 methods, 3 blocks, lines 184-1568. The bar is 400 significant lines; this is 462 over it, 2.16\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory.rs"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"3df967a1ba12e0a64b0be3897a4871f62b21c92591b0fe5f5f7da3ef52f5d457"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tui/ui_viewport.rs: FileTooLong \u2014 1071 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 571 over it, 2.14\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_viewport.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"83a1eded49b66a06cf530b9b9c6d218f89a3d222b345949dc36aff36372757d8"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::comm_plan::handle_comm_propose_plan: FunctionTooLong \u2014 jcode_app_core::server::comm_plan::handle_comm_propose_plan runs 212 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 112 over it, 2.12\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_plan.rs"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"0551677058d9af9fc1b43e1810387684979922236b59906e931d3ac5774a8542"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AntigravityProvider.complete: MethodTooLong \u2014 complete runs 212 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 112 over it, 2.12\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-antigravity-runtime/src/lib.rs"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"897b8e30f14da10122c50101ca4f167276ded82780a32aa31db08b8c7628c042"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::debug_server_state::build_server_memory_incident_payload: FunctionTooLong \u2014 jcode_app_core::server::debug_server_state::build_server_memory_incident_payload runs 211 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 111 over it, 2.11\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_server_state.rs"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"b91a1cc711ca32153843d369b5d01db4b8470639e20e0d823cdfcc8eb826eda5"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tui/backend.rs: FileTooLong \u2014 1053 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 553 over it, 2.11\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/backend.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fbddbc72e63b68f64085d48773c9aa13699c5b0484d817dbbb8bf60c289b6f8"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: CompactionManager: TooManyMethods \u2014 63 methods. The bar is 30 methods; this is 33 over it, 2.10\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/compaction.rs"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"99eb5e267168482b6fa03cb7f90f4e158b65c9bcad0a34a7c2374b369cf7111f"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_provider_doctor::live_provider_probes::run_live_native_provider_tool_smoke: FunctionTooLong \u2014 jcode_provider_doctor::live_provider_probes::run_live_native_provider_tool_smoke runs 210 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 110 over it, 2.10\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/live_provider_probes.rs"},"region":{"startLine":1559}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea1d9121d75c29d9953242c8c959dc6c12eafb80c8687f42cffe0b8520c5d268"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: CommunicateTool: ClassTooLong \u2014 839 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 2 methods, 3 blocks, lines 470-1851. The bar is 400 significant lines; this is 439 over it, 2.10\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/communicate.rs"},"region":{"startLine":470}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd3f4368e17e02ccd88f4362b0dc58834f7e97a0d3072a9bb8810214ba8f7799"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::headless::create_headless_session: FunctionTooLong \u2014 jcode_app_core::server::headless::create_headless_session runs 209 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 109 over it, 2.09\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/headless.rs"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"78e7aac4974b1f7d06434a5f0df1979f6516247ba9bd4399f375048b608879ff"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AcpRuntime: ClassTooLong \u2014 833 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 26 methods, 2 blocks, lines 383-1497. The bar is 400 significant lines; this is 433 over it, 2.08\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/acp.rs"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfc73fac04fe921a478cf1e04a93e300c7f49b7769e4ca5e9100280109a42a2a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: server/client_state.rs: FileTooLong \u2014 1040 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 540 over it, 2.08\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_state.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b37f128c9bd5b53efa25219518f040b27b92883ad6f6cdc3b0014f34a405bd2"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::client_disconnect_cleanup::cleanup_client_connection: FunctionTooLong \u2014 jcode_app_core::server::client_disconnect_cleanup::cleanup_client_connection runs 208 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 108 over it, 2.08\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_disconnect_cleanup.rs"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d09b52bba06a650ef36ae6b224aff8b17af31ad5522ee520f12b4fc15bc0ef9"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: Agent: ClassTooLong \u2014 831 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 275 methods, 3 blocks, lines 86-1371. The bar is 400 significant lines; this is 431 over it, 2.08\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent.rs"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"c10a8927376196c61cdf76cd8a62f7eea2bf1f64de9f285f2ddebb7fc3a8de5b"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui_render::swarm_gallery::render_swarm_strip_vertical: FunctionTooLong \u2014 jcode_tui_render::swarm_gallery::render_swarm_strip_vertical runs 207 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 107 over it, 2.07\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/swarm_gallery.rs"},"region":{"startLine":957}}}],"partialFingerprints":{"codehealthFindingId/v1":"79019d8718309e728f11a2944a29b06d2803684c4dec9b341379ee0619704112"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 1030 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 530 over it, 2.06\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"334e3d88c3e253e621fc40f3342cbfc56efc430d7baaf48ab7fc428ab9e50f83"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MultiProvider.complete_with_failover: MethodTooLong \u2014 complete_with_failover runs 205 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 105 over it, 2.05\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/mod.rs"},"region":{"startLine":600}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9b58bc64826a1d78e5d873cad2aa6cd4bbc040def2686d305b5fe3b77cde601"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: server/provider_control.rs: FileTooLong \u2014 1022 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 39 free functions. The bar is 500 significant lines; this is 522 over it, 2.04\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/provider_control.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c39b6e16f61c9ea25ef51166a4e6c83fbd0aded1827843c30750bbbc8874bb6"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::debug_server_state::maybe_handle_server_state_command: FunctionTooLong \u2014 jcode_app_core::server::debug_server_state::maybe_handle_server_state_command runs 204 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 104 over it, 2.04\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_server_state.rs"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c324aebe1a27863c50891cbdd25fec0af01643aab4e8e11e3d641981b6e9b36"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode::cli::commands::run_single_message_command_ndjson: FunctionTooLong \u2014 jcode::cli::commands::run_single_message_command_ndjson runs 204 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 104 over it, 2.04\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":3106}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b409d949fc13044cf200b44879ad30f72a102714006315ccb0fa839e53bec06"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cli/dispatch.rs: FileTooLong \u2014 1018 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 518 over it, 2.04\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/dispatch.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d1d600415d7ad0d3fe686d5a3ec1c9501535f43f2f8413535539dd7bfa53569"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/browser.rs: FileTooLong \u2014 1017 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 68 free functions. The bar is 500 significant lines; this is 517 over it, 2.03\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/browser.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"51f2ce37bc60ac1804cae88f4f51c420a9a669fc506a1d08047c166920f5355b"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: MemoryManager: TooManyMethods \u2014 61 methods. The bar is 30 methods; this is 31 over it, 2.03\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory.rs"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"39e18c25fbbfe6e1830f5d795d6014fd806e3de84d8a4bb72e7c5909274dfd7c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 1008 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 36 free functions. The bar is 500 significant lines; this is 508 over it, 2.02\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3db3eec2f24a08f1d52c8a5dd153218e10a8eaca3cf5b2b0910a061e3386042"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/commands_cloud.rs: FileTooLong \u2014 1007 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 507 over it, 2.01\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_cloud.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d081f78e24e72304f107dc27a3be0ea28eabdb3e269a971c1d6e40bb64837433"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/debug_bench.rs: FileTooLong \u2014 1007 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 100% of them inside a single declaration: App (3-1286). The bar is 500 significant lines; this is 507 over it, 2.01\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_bench.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"894ad4668dad52b62b093e8e834bc375491066fc44180ed82d496f5490e2c5a4"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.submit_input: MethodTooLong \u2014 submit_input runs 201 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 101 over it, 2.01\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":3906}}}],"partialFingerprints":{"codehealthFindingId/v1":"a028b2743ee6d0f1548f8213bac660af1dd7241d4089552e914626c3de325ff1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tui/ui_frame_metrics.rs: FileTooLong \u2014 1003 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 67 free functions. The bar is 500 significant lines; this is 503 over it, 2.01\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_frame_metrics.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"07ad612812086ab5a317edeb1fd23883a872aa27714c11844b83f93a055e22aa"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: BridgeState: TooManyMethods \u2014 60 methods, declared across 4 files: src/translate.rs (45), translate/session_files.rs (8), translate/credentials.rs (6), translate/control_replies.rs (1). The bar is 30 methods; this is 30 over it, 2.00\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/translate.rs"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"140f3d9325289f56c9dd749434c416bdb30007f919899b5cd35500f992b9b7b3"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::app::tui_lifecycle_runtime::handle_dev_command: FunctionTooLong \u2014 jcode_tui::tui::app::tui_lifecycle_runtime::handle_dev_command runs 200 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 100 over it, 2.00\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tui_lifecycle_runtime.rs"},"region":{"startLine":574}}}],"partialFingerprints":{"codehealthFindingId/v1":"a15e3e187c9d9a48a4560a4219311de7c71a19a281d38fd646590c75ecf6d3f5"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: server/jade_relay.rs: FileTooLong \u2014 993 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 493 over it, 1.99\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/jade_relay.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3cb7fcb79a629af5db947de7fe643d753a3d05fe5127e45d2b20fccde67b44c"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::app::commands_cloud::finish_cloud_command: FunctionTooLong \u2014 jcode_tui::tui::app::commands_cloud::finish_cloud_command runs 198 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 98 over it, 1.98\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_cloud.rs"},"region":{"startLine":1177}}}],"partialFingerprints":{"codehealthFindingId/v1":"3de481f523e54d1a18ab1e6dc6b1c069eb500256d219a1abdb6867c3a424388d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: auth/mod.rs: FileTooLong \u2014 986 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 46 free functions. The bar is 500 significant lines; this is 486 over it, 1.97\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/mod.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4b900190f7c8c0b9ffeb3f3fb47dd11f4ef3b3001d6c46c2fdd8ea47e7dd239"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tool/bash.rs: FileTooLong \u2014 982 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 31 free functions. The bar is 500 significant lines; this is 482 over it, 1.96\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/bash.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"adefa0ae2b799bcd3c949406e30b9160ebd6565ba5a9fe7c8522df9e8e3b21da"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui_mermaid::mermaid_cache_render::render_mermaid_sized_internal: FunctionTooLong \u2014 jcode_tui_mermaid::mermaid_cache_render::render_mermaid_sized_internal runs 196 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 96 over it, 1.96\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_cache_render.rs"},"region":{"startLine":1173}}}],"partialFingerprints":{"codehealthFindingId/v1":"69309fe4bb77414c69816492ca10f0046c3547aa96dc9b2409c5646648915c26"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/memory.rs: FileTooLong \u2014 972 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 89% of them inside a single declaration: MemoryManager (3 blocks, 184-1568). The bar is 500 significant lines; this is 472 over it, 1.94\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"35f69c3f081d4c62760bcec19bc053d5f938c6d4cca8b75033717afc5c3c692d"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::group_transfer::handle_with_gate: FunctionTooLong \u2014 jcode_app_core::server::group_transfer::handle_with_gate runs 194 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 94 over it, 1.94\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/group_transfer.rs"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbd0680405a39ce5f9a1573f09dfdb665ba424099121de211811c177d6484f55"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_harness_api_server::run_bridge_stream: FunctionTooLong \u2014 jcode_harness_api_server::run_bridge_stream runs 194 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 94 over it, 1.94\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/lib.rs"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"666de0e65c5ba7c7a325f83ce5397a967d3a56a11788b0aacf78fd5c3a23251a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.run_mermaid_ui_bench: MethodTooLong \u2014 run_mermaid_ui_bench runs 194 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 94 over it, 1.94\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_bench.rs"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a057e87e7c5118a1a102b1a50c4afc0d8f6ff994c5d3a8df0fd1ed3cbf55beb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: auth/oauth.rs: FileTooLong \u2014 969 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 50 free functions. The bar is 500 significant lines; this is 469 over it, 1.94\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/oauth.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bc6af6486f18387b13ebe2c688a59340981da68d701db73e217887e9f4b8b96"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/agent_transport.rs: FileTooLong \u2014 968 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 468 over it, 1.94\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/agent_transport.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"807f76695e108fb40c565a102c68ac2e2826ba66c03f5a5ea3d201c4953b1707"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: server/comm_session.rs: FileTooLong \u2014 967 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 467 over it, 1.93\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_session.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a3479f94aab209cc7948a98e221a8ffece725887a62804360715e3408cbc2b2"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: CopilotApiProvider: ClassTooLong \u2014 772 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 32 methods, 3 blocks, lines 46-1165. The bar is 400 significant lines; this is 372 over it, 1.93\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-copilot-runtime/src/lib.rs"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb7e65291a03090ca6ce65db1f8c4b6235e3ef877e1338326e71b88482771832"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/onboarding_flow_control.rs: FileTooLong \u2014 965 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 99% of them inside a single declaration: App (21-1821). The bar is 500 significant lines; this is 465 over it, 1.93\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/onboarding_flow_control.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f835ec83ac92e1b0abbaf764c493ff90b9d686417fb307fb16f553e11eb35e9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: server/client_actions.rs: FileTooLong \u2014 964 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 464 over it, 1.93\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_actions.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"865f776130e44c0e953dc04f07dfb69d9661b336c49f3712c74b80a2cc2e3aa2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 964 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 464 over it, 1.93\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6290bc08ed76b77fedf327fdb3bc241e1498279eabd092f365d0cdc24634b07"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/debug_cmds.rs: FileTooLong \u2014 964 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 97% of them inside a single declaration: App (5-1132). The bar is 500 significant lines; this is 464 over it, 1.93\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_cmds.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b2bd8623a5990b2e2d09152f7f39383ca61dc680b56021a834110b2b16508e4"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_productivity_core::dashboard::render_svg: FunctionTooLong \u2014 jcode_productivity_core::dashboard::render_svg runs 192 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 92 over it, 1.92\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-productivity-core/src/dashboard.rs"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7ff047d5336445964ef8283779903309cbe3e3ea7f5dbfb8d4e569713e0429d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.run_side_panel_latency_bench: MethodTooLong \u2014 run_side_panel_latency_bench runs 192 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 92 over it, 1.92\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_bench.rs"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"c61ce1411eedb8bedaaa3e5c9c56d989ecb35d252fb120b327bacb79019f2e58"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.schedule_auto_poke_followup_after_response: MethodTooLong \u2014 schedule_auto_poke_followup_after_response runs 192 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 92 over it, 1.92\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":1475}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7b3224ccbc02cfb7a6cc0b100674f054c38569da7811b7ebd194ccaf49874a7"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.context_snapshot: MethodTooLong \u2014 context_snapshot runs 192 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 92 over it, 1.92\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tui_state.rs"},"region":{"startLine":1302}}}],"partialFingerprints":{"codehealthFindingId/v1":"484617eec8a42fd6d70ae484f7c614304c463fc5d2567d7e0f40320baccc1a6b"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: JcodeClient: ClassTooLong \u2014 766 significant lines (blank, comment-only and punctuation-only lines excluded), 75 methods. The bar is 400 significant lines; this is 366 over it, 1.92\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/typescript/src/client.ts"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"b70cf218cb52ba6dfaef7bd2c4a3b07069de72631b6ffbec8a7d7816cf9337c8"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: OpenRouterProvider.complete: MethodTooLong \u2014 complete runs 191 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 91 over it, 1.91\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/openrouter_provider_impl.rs"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"35c6db832ae2349a96b2bffe9dd43033ed2b7cdfb30843fd3209396d80056810"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: server/debug_server_state.rs: FileTooLong \u2014 954 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 454 over it, 1.91\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_server_state.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ace606a525c5f903b978369469f179e8ddcb7be89b472f61130c9954d63190d7"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: TurnTelemetry: TooManyFields \u2014 57 stored fields beside 1 method. The bar is 30 stored fields; this is 27 over it, 1.90\u00D7 the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member \u2014 each reader then names only the group it uses."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lib.rs"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"92551e07c14784a0a5cf34dd77187cb0813fe2872daf95d92b05bbeba8f3047e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/auth_account_picker.rs: FileTooLong \u2014 950 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 98% of them inside a single declaration: App (11-1207). The bar is 500 significant lines; this is 450 over it, 1.90\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ffebb52e33acdcb075245ece25ee9c1b17b01e970302af82deb27ef134289dc"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::video_export::box_drawing_to_svg: FunctionTooLong \u2014 jcode_tui::video_export::box_drawing_to_svg runs 190 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 90 over it, 1.90\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/video_export.rs"},"region":{"startLine":933}}}],"partialFingerprints":{"codehealthFindingId/v1":"13bc05d01e23c47e5602e97d7c6863348645c680df3fa6c960ca9c58adba2326"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: agent/turn_loops.rs: FileTooLong \u2014 949 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 99% of them inside a single declaration: Agent (9-1366). The bar is 500 significant lines; this is 449 over it, 1.90\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/turn_loops.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0363cd989d50a6a005cdd58131d8bed3e09b9ba6d180620c799dfb035fc114e"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::ambient::prompt::build_ambient_system_prompt: FunctionTooLong \u2014 jcode_app_core::ambient::prompt::build_ambient_system_prompt runs 188 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 88 over it, 1.88\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/ambient/prompt.rs"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"5934d7215b37f86907998bb15da64d22c3eb0746d5ff071fa3b71f577714a164"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_base::provider_catalog::apply_named_provider_profile_env_from_config: FunctionTooLong \u2014 jcode_base::provider_catalog::apply_named_provider_profile_env_from_config runs 188 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 88 over it, 1.88\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider_catalog.rs"},"region":{"startLine":935}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d9caf1d5d33dd5c96b2b397c04a8b6b50b8671d09b0945044f776df1baa7a06"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/agent.rs: FileTooLong \u2014 936 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 89% of them inside a single declaration: Agent (3 blocks, 86-1371). The bar is 500 significant lines; this is 436 over it, 1.87\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb8e402cc1319134276ae4cd0248e2178c8ef0d9044cb9aeff0384e65628759c"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode::cli::login::scriptable::start_scriptable_login: FunctionTooLong \u2014 jcode::cli::login::scriptable::start_scriptable_login runs 187 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 87 over it, 1.87\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/login/scriptable.rs"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"b566d59b1f0054e2ccf5a78455926e6112e6f50fb0066f2a906e95474fc19cd2"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_messages::render_background_task_message: FunctionTooLong \u2014 jcode_tui::tui::ui_messages::render_background_task_message runs 186 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 86 over it, 1.86\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":2764}}}],"partialFingerprints":{"codehealthFindingId/v1":"529947e8e560ce86a0b19610c3b422d61e7d83a667c313bcc96b39dbdee7224d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: InitiativeTool.execute: MethodTooLong \u2014 execute runs 184 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 84 over it, 1.84\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/goal.rs"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"08cc26caaafb69e21af583e25f506c8dc1ccb62bc44350cd6a08b147a7501a1f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Registry.register_mcp_tools_for_dir: MethodTooLong \u2014 register_mcp_tools_for_dir runs 184 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 84 over it, 1.84\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/mod.rs"},"region":{"startLine":1647}}}],"partialFingerprints":{"codehealthFindingId/v1":"adca760ed5df0f2bd41c13ef60e9f7851c3b367c44639a7a5b4322260e8729f2"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: SessionPicker: TooManyFields \u2014 55 stored fields beside 140 methods. The bar is 30 stored fields; this is 25 over it, 1.83\u00D7 the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member \u2014 each reader then names only the group it uses."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker.rs"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"75a1ff451968128edbdbf71a52b2bb2cfd946ecb038fd00859315651d6c360e9"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: FramePerfStats: TooManyFields \u2014 55 stored fields. The bar is 30 stored fields; this is 25 over it, 1.83\u00D7 the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member \u2014 each reader then names only the group it uses."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_frame_metrics.rs"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"4153cf58cdc3beed71bb92fcc10217ba4b39e12d13469d879979989a5ac804f0"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::client_session::handle_clear_session: FunctionTooLong \u2014 jcode_app_core::server::client_session::handle_clear_session runs 183 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 83 over it, 1.83\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_session.rs"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"64b7c4567753d2a5ce20ac611dfb611e7869ec50cb3b609bedda639c5e395533"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/client.ts: FileTooLong \u2014 914 significant lines (blank, comment-only and punctuation-only lines excluded), about 84% of them inside a single declaration: JcodeClient (223-1497). The bar is 500 significant lines; this is 414 over it, 1.83\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/typescript/src/client.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"99a98c8e0d333631ffc0c7eddc93a837bdb3bc17b32075673b48f66478190f38"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: session_picker/transcript_search.rs: FileTooLong \u2014 911 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 411 over it, 1.82\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/transcript_search.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"001cd9c4d95f5b2dac7dfb8ad3bf4a10bfccb8c49481a77c12e759939d9bcb74"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::provider_control::handle_notify_auth_changed: FunctionTooLong \u2014 jcode_app_core::server::provider_control::handle_notify_auth_changed runs 182 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 82 over it, 1.82\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/provider_control.rs"},"region":{"startLine":881}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b33db7de8fe9258d375ac9475381e491fea6eff048f827dd08bda4038b105b5"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::app::commands::handle_config_command: FunctionTooLong \u2014 jcode_tui::tui::app::commands::handle_config_command runs 182 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 82 over it, 1.82\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":3479}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fedf57f4472a9dc8d8832462e8dd577f601aa67b3d7bfa58df698380aaa2586"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::app::runtime_memory::client_runtime_totals_from_profile: FunctionTooLong \u2014 jcode_tui::tui::app::runtime_memory::client_runtime_totals_from_profile runs 182 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 82 over it, 1.82\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/runtime_memory.rs"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"d15a2f27ac5db5f77d096f11c6e4f997fffde069e69f445a957b1558ff2010c9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/openai_provider_impl.rs: FileTooLong \u2014 905 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 99% of them inside a single declaration: OpenAIProvider (16-1310). The bar is 500 significant lines; this is 405 over it, 1.81\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_provider_impl.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f8677f8ca32ac38b80c799dfaed78d6d12003f26278681bbb76f8e84448d565"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::session_picker::transcript_search::search_shard: FunctionTooLong \u2014 jcode_tui::tui::session_picker::transcript_search::search_shard runs 180 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 80 over it, 1.80\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/transcript_search.rs"},"region":{"startLine":752}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fa7fd9556fc4cf8a115fe7fc4f4421e5842b67927c28893e6d677065e35af62"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/mermaid_viewport.rs: FileTooLong \u2014 899 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 34 free functions. The bar is 500 significant lines; this is 399 over it, 1.80\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_viewport.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0c7ac2eab60e2ee01ebfa6245ccb27458549659c8b6a2ff2711e9f76964ab4b"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui_mermaid::mermaid_viewport::render_image_widget_viewport_precise: FunctionTooLong \u2014 jcode_tui_mermaid::mermaid_viewport::render_image_widget_viewport_precise runs 179 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 79 over it, 1.79\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_viewport.rs"},"region":{"startLine":1355}}}],"partialFingerprints":{"codehealthFindingId/v1":"b83e8ff78595aac7c3345c95ae3d63a74d4e3cb858588a6c0bda837608f79d05"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::video_export::buffer_to_svg: FunctionTooLong \u2014 jcode_tui::video_export::buffer_to_svg runs 179 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 79 over it, 1.79\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/video_export.rs"},"region":{"startLine":612}}}],"partialFingerprints":{"codehealthFindingId/v1":"816de980129d895875ae64a14f172ebf77121c665fccce585b371f49a5ba642e"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::tool::browser_fast::run: FunctionTooLong \u2014 jcode_app_core::tool::browser_fast::run runs 177 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 77 over it, 1.77\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/browser_fast.rs"},"region":{"startLine":584}}}],"partialFingerprints":{"codehealthFindingId/v1":"487f53b77dcee5acd77a495db1550297c3eb17b8f619d452e7f3572198e2d471"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.log_kv_cache_usage_summary: MethodTooLong \u2014 log_kv_cache_usage_summary runs 177 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 77 over it, 1.77\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app.rs"},"region":{"startLine":2295}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cb6d56c66a5a0088ae952b56cf720b0f116b8df0ade566c59471d332dee6176"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::client_processing::cancel_processing_message: FunctionTooLong \u2014 jcode_app_core::server::client_processing::cancel_processing_message runs 176 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 76 over it, 1.76\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_processing.rs"},"region":{"startLine":501}}}],"partialFingerprints":{"codehealthFindingId/v1":"8178a113b0b02a902e76636c748bbaa8fbaa593f4788156f70af008edc5ac269"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::app::debug::handle_debug_command: FunctionTooLong \u2014 jcode_tui::tui::app::debug::handle_debug_command runs 176 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 76 over it, 1.76\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug.rs"},"region":{"startLine":580}}}],"partialFingerprints":{"codehealthFindingId/v1":"dafba9f125b25144e7d1c32d3c49e15c1913cc782ba3be0449c4afe59ab24dea"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.command_help: MethodTooLong \u2014 command_help runs 176 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 76 over it, 1.76\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input_help.rs"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc09ce900501744d841e1bb8c06b8c1f7c0183ee2031efeee9a16ce1f88f1be9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: login/scriptable.rs: FileTooLong \u2014 879 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 32 free functions. The bar is 500 significant lines; this is 379 over it, 1.76\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/login/scriptable.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"43f79729fc622a54692b78cb0a16edf19c22be7829460eec04baa6bb2dc26fe2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 878 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 35 free functions. The bar is 500 significant lines; this is 378 over it, 1.76\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-import-core/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7de1d39215bda70abb5fd69a5e54974e5453ddc0b4b94fb8945c50ea86ed546c"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AmbientRunnerHandle: ClassTooLong \u2014 699 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 24 methods, 2 blocks, lines 39-1099. The bar is 400 significant lines; this is 299 over it, 1.75\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/ambient/runner.rs"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae32f52d02058f5b4c09f245982bd4fd7d9c21c1522dfa549fd5f15e98261991"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/wire.rs: FileTooLong \u2014 870 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 54 free functions. The bar is 500 significant lines; this is 370 over it, 1.74\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/wire.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"42ab46341d625b09c0433c2b352993ba16a6dc38afa8e934120711d25a0bfc0e"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::comm_await::handle_comm_await_members: FunctionTooLong \u2014 jcode_app_core::server::comm_await::handle_comm_await_members runs 174 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 74 over it, 1.74\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_await.rs"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"a93d5550a0f82b42ffb6b481c61d3c2c64eb76062b1dd0b19f6a1ae3f501701c"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_render_core::preprocess::normalize_latex_delimiters_and_environments: FunctionTooLong \u2014 jcode_render_core::preprocess::normalize_latex_delimiters_and_environments runs 174 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 74 over it, 1.74\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/preprocess.rs"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5ba28e04f844df4943d47c8d42baadedf0c74ee74e69ff1f4757fc9ebf7e51f"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_input::draw_input: FunctionTooLong \u2014 jcode_tui::tui::ui_input::draw_input runs 174 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 74 over it, 1.74\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_input.rs"},"region":{"startLine":2159}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3733191803682a3bd57a704c9600e38b06688cc109558d8196425ece2004c38"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode::cli::login::run_login_provider: FunctionTooLong \u2014 jcode::cli::login::run_login_provider runs 174 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 74 over it, 1.74\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/login.rs"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9fdbac7dbab41f1a4e787b0a8d16d0d5746cf0449c88bdc0d2aef96fb7aa00b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cli/login.rs: FileTooLong \u2014 869 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 369 over it, 1.74\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/login.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"13f077b8eb9bc3e261e05f83346653be4dc3cc33b9c71e614b598d39f998c1e4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/video_export.rs: FileTooLong \u2014 866 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 366 over it, 1.73\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/video_export.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fc1796a2b568287d09a78f8f5326b0c1ad9e0cdb48411d147076b55c8dcb794"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: TodoTool.parameters_schema: MethodTooLong \u2014 parameters_schema runs 173 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 73 over it, 1.73\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/todo.rs"},"region":{"startLine":1369}}}],"partialFingerprints":{"codehealthFindingId/v1":"7724211a0c6eabb6b5ed4a2ac028f8a6048c66005ef2a99030f1157417b99fa2"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_prepare::prepare_messages_inner: FunctionTooLong \u2014 jcode_tui::tui::ui_prepare::prepare_messages_inner runs 173 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 73 over it, 1.73\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_prepare.rs"},"region":{"startLine":665}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7edfcaf25f4ab1c38a551efec14ec472fc945a062663e57c30584c1e2e22898"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tui/ui_pinned.rs: FileTooLong \u2014 861 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 36 free functions. The bar is 500 significant lines; this is 361 over it, 1.72\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_pinned.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"68b3db0f31ff3251631d7a1773d426c87040ea6abd3960c68a8a267b31ccfad3"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_messages::discovery::render_discovery_card: FunctionTooLong \u2014 jcode_tui::tui::ui_messages::discovery::render_discovery_card runs 172 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 72 over it, 1.72\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages/discovery.rs"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"716b2762df239612d2411e91b64fe71dc645aa3eee7ceda1a60035bd8f5fa4b8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: server/client_lightweight_control.rs: FileTooLong \u2014 859 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 359 over it, 1.72\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_lightweight_control.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e97ad926a66c1db1d4c4a94ab52f1c6969c27137961ff1c4cf0249e370a64f9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tui/ui_todo_stages.rs: FileTooLong \u2014 859 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 33 free functions. The bar is 500 significant lines; this is 359 over it, 1.72\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_todo_stages.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"03cf1abaa7833f0e3321d769e39b8284b32087f9c287f3accc2433994c4827bd"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_base::provider_catalog::openai_compatible_profile_static_models: FunctionTooLong \u2014 jcode_base::provider_catalog::openai_compatible_profile_static_models runs 171 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 71 over it, 1.71\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider_catalog.rs"},"region":{"startLine":432}}}],"partialFingerprints":{"codehealthFindingId/v1":"d415caa8ca6b287660b860151cdc31304fa41c418e0436926e6d19c3552ac6b7"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.widget_usage_info_inner: MethodTooLong \u2014 widget_usage_info_inner runs 171 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 71 over it, 1.71\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tui_state.rs"},"region":{"startLine":520}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d7b2dca0f8446121de89e2d71025c0d3ce3815eb7fb08f03a98e259402b1bef"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_onboarding::welcome_body_lines: FunctionTooLong \u2014 jcode_tui::tui::ui_onboarding::welcome_body_lines runs 171 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 71 over it, 1.71\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_onboarding.rs"},"region":{"startLine":440}}}],"partialFingerprints":{"codehealthFindingId/v1":"44a34152c07b717723b622a272db1388c2cdec0752af09b20a485da49e450b03"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: GeminiProvider: ClassTooLong \u2014 683 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 20 methods, 5 blocks, lines 44-1052. The bar is 400 significant lines; this is 283 over it, 1.71\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-gemini-runtime/src/lib.rs"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"9be59325a5d25d48d02ea170315fc0ca789e59767089c67bdd3739917beb6aba"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/mermaid_cache_render.rs: FileTooLong \u2014 850 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 41 free functions. The bar is 500 significant lines; this is 350 over it, 1.70\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_cache_render.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6316a83da1cd111cc0a1268f73a75617e675de18cbf9a84b0c85865adb865e65"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::comm_plan::handle_comm_approve_plan: FunctionTooLong \u2014 jcode_app_core::server::comm_plan::handle_comm_approve_plan runs 170 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 70 over it, 1.70\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_plan.rs"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"1793989ea47b920fa8d9d3ca8b7acb7f77dcf229a0b7342323eaf419a42a104f"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::app::remote::reconnect::connect_with_retry: FunctionTooLong \u2014 jcode_tui::tui::app::remote::reconnect::connect_with_retry runs 170 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 70 over it, 1.70\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/reconnect.rs"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"18b4cc4ad1cec050088fe295a6bd02c08294cfe41c9642a68301ec26eeee646f"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode::cli::commands::emit_ndjson_event: FunctionTooLong \u2014 jcode::cli::commands::emit_ndjson_event runs 170 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 70 over it, 1.70\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":3373}}}],"partialFingerprints":{"codehealthFindingId/v1":"89d3ba8290bb33f54630a1d7bbe26dfae35c33b6142fbf0d715af2734815c583"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tool/browser.rs: FileTooLong \u2014 847 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 347 over it, 1.69\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/browser.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"452dd52f0adf9e3a5de30549d3ae23a40a3b992bbebd8c9918760c7d76572142"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tool/mcp.rs: FileTooLong \u2014 843 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 343 over it, 1.69\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/mcp.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd27150e83c7d3bfcac557bdfd4c0c04bdb9afceb2b57f781c1fdb268e01f18a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/update.rs: FileTooLong \u2014 843 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 42 free functions. The bar is 500 significant lines; this is 343 over it, 1.69\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/update.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e206e2ee4c12416f4c7b29ffdc298644c2c68d842788ea06aa14335719dac977"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 840 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 340 over it, 1.68\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-config-types/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb36a098150ba437e970912d4afcf45081c931d36cebd364ace360a476848490"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: selfdev/build_queue.rs: FileTooLong \u2014 838 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 338 over it, 1.68\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/selfdev/build_queue.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1485a77882e07df3437002a58f6e061156596f846a9443970b63e5dffb60738f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/mobile_push.rs: FileTooLong \u2014 835 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 48 free functions. The bar is 500 significant lines; this is 335 over it, 1.67\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/mobile_push.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a21bb67013dbb2b23ce4cf658e1044f7aaf622178bf4b8f425ad63ab26e3a12"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.open_model_picker_inner: MethodTooLong \u2014 open_model_picker_inner runs 167 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 67 over it, 1.67\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":1161}}}],"partialFingerprints":{"codehealthFindingId/v1":"38ed0b6843316179b63fd949f43edbaa8600bba2302e86ed13e71ffb81b0a2e0"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AcpRuntime.run_prompt: MethodTooLong \u2014 run_prompt runs 167 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 67 over it, 1.67\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/acp.rs"},"region":{"startLine":1107}}}],"partialFingerprints":{"codehealthFindingId/v1":"d65577a8aa21dd61dfc0c19c5c5ae714f49bd1a3ffd2616a50e317e749ae4756"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode::cli::commands::run_memory_command_for_dir: FunctionTooLong \u2014 jcode::cli::commands::run_memory_command_for_dir runs 167 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 67 over it, 1.67\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":1637}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fb0f542e321dfd7f2a6b20690fc23f8d1687cce616c5cd18ca5f244b213c531"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: auth/transfer.rs: FileTooLong \u2014 834 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 31 free functions. The bar is 500 significant lines; this is 334 over it, 1.67\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/transfer.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e6d8e7825e9c7337d99ab009dc34cc871dc96a1bcc31a0f53ec80052c2598be"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/provider_catalog.rs: FileTooLong \u2014 834 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 36 free functions. The bar is 500 significant lines; this is 334 over it, 1.67\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider_catalog.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c387793a76088d52659e43ee49f6ed7cbfed1a0800e37b915d718ee73a35714"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Registry: TooManyMethods \u2014 50 methods, declared across 3 files: tool/mod.rs (48), tool/name_suggestions.rs (1), tool/remote_exec.rs (1). The bar is 30 methods; this is 20 over it, 1.67\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/mod.rs"},"region":{"startLine":364}}}],"partialFingerprints":{"codehealthFindingId/v1":"374d4f63b546ca04ac6c5f45df35f44ad84dbc0cd8d92d5bc433fde88381d888"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::tool::computer::dispatch: FunctionTooLong \u2014 jcode_app_core::tool::computer::dispatch runs 166 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 66 over it, 1.66\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/computer/mod.rs"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"e210287faeb70fb99b1603027d5984a5c2d63401c5bcc68c4ac38c7dc576bb45"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode::cli::tui_launch::run_replay_command: FunctionTooLong \u2014 jcode::cli::tui_launch::run_replay_command runs 166 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 66 over it, 1.66\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/tui_launch.rs"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"97f8fe1629fb4485af1a5014beeeed20665d71233c570780d10be856afe50c3a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/gmail.rs: FileTooLong \u2014 825 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 325 over it, 1.65\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/gmail.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"84fcf856095ae95f1dbe85200a45e3a80c6def4efc9edfbf33a6527ff11c828d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: agentgrep/context.rs: FileTooLong \u2014 824 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 31 free functions. The bar is 500 significant lines; this is 324 over it, 1.65\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/agentgrep/context.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"770da30fbb731b792c575fc72cec6cbcbd60d6cccdd4010d3d1bd13a79e2bdf1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: mcp/oauth.rs: FileTooLong \u2014 820 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 45 free functions. The bar is 500 significant lines; this is 320 over it, 1.64\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mcp/oauth.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b42f3225c7640ae49fb8fcb0618e1481fe4587a4985727b96ba27d8f0f7bfe89"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_todo_policy::completion_report::render_completion_report: FunctionTooLong \u2014 jcode_todo_policy::completion_report::render_completion_report runs 164 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 64 over it, 1.64\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-todo-policy/src/completion_report.rs"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9d3b9b2d43e0618229c7b22c64ed3d991729662a416e6e5cb2add634f2ae398"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: MermaidDebugStats: TooManyFields \u2014 49 stored fields. The bar is 30 stored fields; this is 19 over it, 1.63\u00D7 the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member \u2014 each reader then names only the group it uses."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/lib.rs"},"region":{"startLine":1247}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a7baa6de1e9dc71141067deaaf4aadc8d9f181e1a576cbb64ed32a492562dc5"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tui/ui_inline_interactive.rs: FileTooLong \u2014 815 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 315 over it, 1.63\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_inline_interactive.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a593d58c218e37f41a45d2a80a7da06ee344b1022d724a9f63ea410380f4670"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AmbientRunnerHandle.run_loop: MethodTooLong \u2014 run_loop runs 163 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 63 over it, 1.63\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/ambient/runner.rs"},"region":{"startLine":555}}}],"partialFingerprints":{"codehealthFindingId/v1":"2580c85479688640190e8d7b2ef560db26c0af6b89c5c38f430c08153ff0274f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AuthStatus.assessment_for_provider: MethodTooLong \u2014 assessment_for_provider runs 162 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 62 over it, 1.62\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/mod.rs"},"region":{"startLine":590}}}],"partialFingerprints":{"codehealthFindingId/v1":"08dc6452ed59ae54488357f8364c1350bdcc49f8f178e0639ee0bf099a974926"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_provider_openai::stream::parse_openai_response_event: FunctionTooLong \u2014 jcode_provider_openai::stream::parse_openai_response_event runs 162 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 62 over it, 1.62\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai/src/stream.rs"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc9cbed9fe31d9fa1c95e97d5191f82a3c4ebd0fc4a334475bcfaa1fac262d94"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::info_widget_stability::analyze_frames_with_scroll: FunctionTooLong \u2014 jcode_tui::tui::info_widget_stability::analyze_frames_with_scroll runs 162 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 62 over it, 1.62\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_stability.rs"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f09ed8ecf9bb4f538d218820c76f51910934663388841bf22fa5f970618203d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/overnight.rs: FileTooLong \u2014 805 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 38 free functions. The bar is 500 significant lines; this is 305 over it, 1.61\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/overnight.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"27cffc3b439ce7d8f88167dcb83944ff0fef2c35a7b886bd81cdc90df3b1a417"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_prepare::prepare_body_prepended: FunctionTooLong \u2014 jcode_tui::tui::ui_prepare::prepare_body_prepended runs 161 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 61 over it, 1.61\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_prepare.rs"},"region":{"startLine":2133}}}],"partialFingerprints":{"codehealthFindingId/v1":"8998cfe806335b3d920b916b4994d4dd4a2f8d9bd9686d9342bbf317c2416ae9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/run_shell.rs: FileTooLong \u2014 804 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 304 over it, 1.61\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/run_shell.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"42974eca71547f1c15b9b19059555333ce042fde738a16aa3cf46dad49965549"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: OpenAIProvider: TooManyMethods \u2014 48 methods, declared across 4 files: src/lib.rs (45), src/model_selection.rs (1), src/native_compaction.rs (1), src/openai_prewarm_request.rs (1). The bar is 30 methods; this is 18 over it, 1.60\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/lib.rs"},"region":{"startLine":688}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a0e4adeb80cf4ef5405bfdb737353046ba3972e64886bd94b1c9045ba6f5226"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::app::onboarding_graph::graph: FunctionTooLong \u2014 jcode_tui::tui::app::onboarding_graph::graph runs 160 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 60 over it, 1.60\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/onboarding_graph.rs"},"region":{"startLine":344}}}],"partialFingerprints":{"codehealthFindingId/v1":"61ee862b96021ecc804d38af0c8fc4e67a19678d60bcc313ed4cf6379ea16ab7"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 799 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 97% of them inside a single declaration: CopilotApiProvider (3 blocks, 46-1165). The bar is 500 significant lines; this is 299 over it, 1.60\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-copilot-runtime/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a752edb3c581139940cd0084b62e3166c032b5d567e17af802f5466e4699fcb"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::swarm::update_member_status_with_report_tldr: FunctionTooLong \u2014 jcode_app_core::server::swarm::update_member_status_with_report_tldr runs 159 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 59 over it, 1.59\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/swarm.rs"},"region":{"startLine":1709}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1d0d1457b6088e2219cafb8b912c88533e5474b709ac8337ae7d73da2b1dfca"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_base::usage::provider_fetch::fetch_openai_usage_for_account: FunctionTooLong \u2014 jcode_base::usage::provider_fetch::fetch_openai_usage_for_account runs 159 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 59 over it, 1.59\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/provider_fetch.rs"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"53194bb898d0bf17a37f6713c6fba3842b793e2ac00fe67d23eaa70846ce2d3b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 793 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 86% of them inside a single declaration: GeminiProvider (5 blocks, 44-1052). The bar is 500 significant lines; this is 293 over it, 1.59\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-gemini-runtime/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b44e4485fff922d259ff5ee1470b8547ff2dfd6c19001c68c80dc72f5996615"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: BackgroundTaskManager.adopt_with_options: MethodTooLong \u2014 adopt_with_options runs 158 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 58 over it, 1.58\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/background.rs"},"region":{"startLine":653}}}],"partialFingerprints":{"codehealthFindingId/v1":"a26f8ffcb413ce43e67e4c429bbbc8bd61b2c1202ad9ffa3a229c865ca138611"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CopilotApiProvider.stream_request: MethodTooLong \u2014 stream_request runs 157 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 57 over it, 1.57\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-copilot-runtime/src/lib.rs"},"region":{"startLine":417}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfd5d9bd0c3f146fe99a8604e4b0478c90bbc27f0e8bffc9b82290e7d325862d"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::app::commands_cloud::start_cloud_command: FunctionTooLong \u2014 jcode_tui::tui::app::commands_cloud::start_cloud_command runs 157 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 57 over it, 1.57\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_cloud.rs"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"776ac4ce0dd042d0bd6231f7d7a34cfb723241f2c2450fcfb37d07e66e341444"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 784 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 284 over it, 1.57\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-overnight-core/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c71a14f816ac1d12f88d439f4bbfd5e7f785a47b30e65053cfc990aa0b067ac"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: remote/reconnect.rs: FileTooLong \u2014 780 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 280 over it, 1.56\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/reconnect.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"77c382c2d944e908cacb7167dc2eb1d67ec8d6d3907325daa1f756e595e9c021"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RelayLauncherClient.handle_launch: MethodTooLong \u2014 handle_launch runs 156 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 56 over it, 1.56\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/jade_relay.rs"},"region":{"startLine":786}}}],"partialFingerprints":{"codehealthFindingId/v1":"7293e55b6269893e21c36348b61da1e00f83f2b9618121d78b32a6676ca9813c"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_messages::render_todo_goal_updates: FunctionTooLong \u2014 jcode_tui::tui::ui_messages::render_todo_goal_updates runs 156 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 56 over it, 1.56\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":1878}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2477d448eaa2ba371b2a865fefd70f39962cb3d9618f158d47b5458f890d992"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/math.rs: FileTooLong \u2014 778 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 278 over it, 1.56\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/math.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"95287d29c5dff984c91e494c3b79905b3f24ce79adab99467a1414920a70e94c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 778 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 278 over it, 1.56\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-usage-types/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a89a85a99653bc0c3d6e2ff5d7a07fb4cdb259d2d1df8ae493f94de6e5d6bae"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::comm_control::handle_comm_assign_next: FunctionTooLong \u2014 jcode_app_core::server::comm_control::handle_comm_assign_next runs 155 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 55 over it, 1.55\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_control.rs"},"region":{"startLine":1494}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a27859743b82ded5331174a5c5e844bbb6f328d69b7665fca17aaf0f5cad10f"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui_mermaid::mermaid_widget::render_image_widget: FunctionTooLong \u2014 jcode_tui_mermaid::mermaid_widget::render_image_widget runs 155 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 55 over it, 1.55\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_widget.rs"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b87b3f7a2a20569b9d1db3849a86e6c2617e8b118d52edecf20c20a8f4ea931"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui_mermaid::mermaid_widget::render_image_widget_fit_inner: FunctionTooLong \u2014 jcode_tui_mermaid::mermaid_widget::render_image_widget_fit_inner runs 155 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 55 over it, 1.55\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_widget.rs"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"31daa44be1c7aa1afff0010bf6d1d7291cc41d63b9fa93edeead1be7f70c9c03"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionPicker.rebuild_items_inner: MethodTooLong \u2014 rebuild_items_inner runs 155 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 55 over it, 1.55\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/filter.rs"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"aee267d8740f545c7ef75f9e520753554e9d449a1563a1c155aefc514f3d33a4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/sidecar.rs: FileTooLong \u2014 770 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 60% of them inside a single declaration: Sidecar (3 blocks, 141-860). The bar is 500 significant lines; this is 270 over it, 1.54\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/sidecar.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c1788bf4fb346f37f7f4009c85eb41cd45e20a8580d256b991961bc300b1e6d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 767 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 72 free functions. The bar is 500 significant lines; this is 267 over it, 1.53\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3eb1c11eec5040a238213b702a00744a7eea595f3f0e48f3f71c075bef8fbcbd"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/markdown_render_full.rs: FileTooLong \u2014 767 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 267 over it, 1.53\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_full.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"70fd218bc4188c2936feb6d1fd01dad482b551d90ea33a104eae06915c38b828"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_base::browser::ensure_browser_setup_for: FunctionTooLong \u2014 jcode_base::browser::ensure_browser_setup_for runs 153 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 53 over it, 1.53\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/browser.rs"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"12c24c85b9577955b323f65e6aff05ec5afc47278e70658eec32cc138bc650a3"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui_markdown::markdown_wrap::wrap_line: FunctionTooLong \u2014 jcode_tui_markdown::markdown_wrap::wrap_line runs 153 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 53 over it, 1.53\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_wrap.rs"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2f16bf6d07f5269bcc7ff836d1fdbdd9a176b78dc56b7147ac1aa388f8979de"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.start_openai_compatible_post_login_activation: MethodTooLong \u2014 start_openai_compatible_post_login_activation runs 153 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 53 over it, 1.53\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth.rs"},"region":{"startLine":2899}}}],"partialFingerprints":{"codehealthFindingId/v1":"feff06cc166b7f51b7290c30639f9edc6b919a5abdfd56d5907247e367fc1918"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::tool::selfdev::status::selfdev_status_output: FunctionTooLong \u2014 jcode_app_core::tool::selfdev::status::selfdev_status_output runs 152 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 52 over it, 1.52\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/selfdev/status.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"404b44941a8f37c8145464a73342490fcfd0621e301282bd54b606d1442e08b0"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::app::debug_profile::build_debug_summary: FunctionTooLong \u2014 jcode_tui::tui::app::debug_profile::build_debug_summary runs 151 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 51 over it, 1.51\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_profile.rs"},"region":{"startLine":517}}}],"partialFingerprints":{"codehealthFindingId/v1":"0776872d67062d9f5d3f3d64c7003719d89a83e10def5fa88fffd58a59f1ea77"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode::cli::cloud_move::run_return: FunctionTooLong \u2014 jcode::cli::cloud_move::run_return runs 151 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 51 over it, 1.51\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_move.rs"},"region":{"startLine":828}}}],"partialFingerprints":{"codehealthFindingId/v1":"46cee18090ef3dda54e48dfbb3771e512e77244549e686e795e184e0fd6e9d21"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Config: TooManyMethods \u2014 45 methods, declared across 4 files: config/config_file.rs (40), config/default_file.rs (2), config/display_summary.rs (2), config/env_overrides.rs (1). The bar is 30 methods; this is 15 over it, 1.50\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/config.rs"},"region":{"startLine":652}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b2d87dfc6c3cac3f6d880037570dc40a4abdd5de2159c764e601c83cd57d429"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AnthropicProvider: TooManyMethods \u2014 45 methods, declared across 2 files: src/lib.rs (42), src/catalog.rs (3). The bar is 30 methods; this is 15 over it, 1.50\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic-runtime/src/lib.rs"},"region":{"startLine":482}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ce29eab0a5b59464b7e1d2b49ae2e329fcf847ee94a015ebd177241f46b8055"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: OpenRouterStream.parse_next_event: MethodTooLong \u2014 parse_next_event runs 150 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 50 over it, 1.50\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter/src/stream.rs"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"92fff9c7a383e8aaf92edb1af5eab865e8e7b9645e493ef557dd1997a1ef769f"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_telemetry_core::begin_session_with_mode: FunctionTooLong \u2014 jcode_telemetry_core::begin_session_with_mode runs 150 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 50 over it, 1.50\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lib.rs"},"region":{"startLine":1984}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d32ec314e28584693b8ae82eb59ff6b7ee8e083d768d863c614c1d9c3c2a217"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_diagram_pane::draw_pinned_diagram: FunctionTooLong \u2014 jcode_tui::tui::ui_diagram_pane::draw_pinned_diagram runs 150 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 50 over it, 1.50\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_diagram_pane.rs"},"region":{"startLine":779}}}],"partialFingerprints":{"codehealthFindingId/v1":"68db2ffe5c3282046ad19f25fe69b42d9640fc8d811417f932cc74c2bbf75ebe"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/stream.rs: FileTooLong \u2014 749 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 249 over it, 1.50\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai/src/stream.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"20923f347db285338e99ffe1423165549ea2044f1d7227246c7e1d47fc75cfa5"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AppletTool.execute: MethodTooLong \u2014 execute runs 149 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 49 over it, 1.49\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/applet.rs"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c61e2985b3f2a237b7fae02c769d2b3d974edb85cfccb9b5cb58b23b10e0d30"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MultiProvider.cross_provider_pool_prompt: MethodTooLong \u2014 cross_provider_pool_prompt runs 149 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 49 over it, 1.49\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/multi_provider.rs"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3bc9820cf93079ca9314cf2d731bf29e8329836118a24d019e91c7d225710d7"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tool/ambient.rs: FileTooLong \u2014 743 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 243 over it, 1.49\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/ambient.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c11e57d7de322378be9aadaf2a25ef141739b763d73df8b90092501e1e76c714"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::swarm::remove_session_from_swarm: FunctionTooLong \u2014 jcode_app_core::server::swarm::remove_session_from_swarm runs 148 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 48 over it, 1.48\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/swarm.rs"},"region":{"startLine":1187}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae5f346c9af58909530d12e9aa71e5e5ddbb45d5f5800d94139137283701c83b"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_base::message::redact_secrets: FunctionTooLong \u2014 jcode_base::message::redact_secrets runs 148 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 48 over it, 1.48\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/message.rs"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd29c8ff054d37d06a2df57806750a60497bf038cf45ce544a862f5aa6a0b15d"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AntigravityProvider: ClassTooLong \u2014 589 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 13 methods, 5 blocks, lines 35-946. The bar is 400 significant lines; this is 189 over it, 1.47\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-antigravity-runtime/src/lib.rs"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"adf5014033696293eae799599bd4ae2c7bc72e60409ec5b6ef76ea99835ecdd5"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ambient/runner.rs: FileTooLong \u2014 735 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 95% of them inside a single declaration: AmbientRunnerHandle (2 blocks, 39-1099). The bar is 500 significant lines; this is 235 over it, 1.47\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/ambient/runner.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fcff3aa1af63640f4e32b250eb8503b5ccfbeea3353b74660051d7ef220174d"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::replay::export_timeline: FunctionTooLong \u2014 jcode_app_core::replay::export_timeline runs 147 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 47 over it, 1.47\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/replay.rs"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"c982c02b6ae483568dfe28b4271a88ff461fe13b476cda5d47edf736deef3795"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui_visual_debug::write_frame: FunctionTooLong \u2014 jcode_tui_visual_debug::write_frame runs 147 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 47 over it, 1.47\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-visual-debug/src/lib.rs"},"region":{"startLine":576}}}],"partialFingerprints":{"codehealthFindingId/v1":"db0f22f59d33bfb8433a6bc4e68708a99ac48f86a5964bc9a07452e758ce0ce6"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFunctions: jcode_base::auth::codex: TooManyFunctions \u2014 44 free functions. The bar is 30 free functions; this is 14 over it, 1.47\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/codex.rs"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"5663e0b78b1a30533a127a4fd4559cf6eb7e3a8b0ad7cbb82cb26ae525721b6b"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: BedrockProvider: TooManyMethods \u2014 44 methods, declared across 2 files: src/lib.rs (40), src/catalog.rs (4). The bar is 30 methods; this is 14 over it, 1.47\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-bedrock/src/lib.rs"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"a08c903a162548c3a19171dc34e24d2859cd6ae40cba76fc45b396f861828748"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: ProductivityReport: TooManyFields \u2014 44 stored fields. The bar is 30 stored fields; this is 14 over it, 1.47\u00D7 the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member \u2014 each reader then names only the group it uses."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-productivity-core/src/model.rs"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c8df09e04c3cbe629cb4aa07c9ca151b1dcbbd714fbc9ef0850f9ff381a8212"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/state_ui_messages.rs: FileTooLong \u2014 732 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 88% of them inside a single declaration: App (108-1137). The bar is 500 significant lines; this is 232 over it, 1.46\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui_messages.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5eb06f79e0517e7c15a2d005b108ab3461155acd73f9623c60e8784d50f86fa0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: provider/models.rs: FileTooLong \u2014 730 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 78 free functions. The bar is 500 significant lines; this is 230 over it, 1.46\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/models.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe44c35dfb9ef2bda0994124cde75df79aabc2031354ae0499aae85ebdb76d87"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_base::provider::catalog_remote_routes::remote_model_routes_fallback: FunctionTooLong \u2014 jcode_base::provider::catalog_remote_routes::remote_model_routes_fallback runs 146 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 46 over it, 1.46\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/catalog_remote_routes.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"8568367cab48d2312192c8963f192929e7fa32c74b77ff9ac9dbd10b015fa025"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_todo_stages::push_stage_lines: FunctionTooLong \u2014 jcode_tui::tui::ui_todo_stages::push_stage_lines runs 146 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 46 over it, 1.46\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_todo_stages.rs"},"region":{"startLine":868}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9b65d1cb8ea79a1b321412ee1e91792f79990012191a793149736552122921a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: JcodeClient.globalEvents: MethodTooLong \u2014 globalEvents runs 146 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 46 over it, 1.46\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/typescript/src/client.ts"},"region":{"startLine":1148}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa3be71cf3bf3a036571f5bdd80b4fc07c7bb5b080130c65e538482838e9e90b"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::app::auth_account_commands::parse_account_command: FunctionTooLong \u2014 jcode_tui::tui::app::auth_account_commands::parse_account_command runs 145 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 45 over it, 1.45\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_commands.rs"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"93f8b5239bb4945ea7d1ae7166380e6f3ec8a0ea38ab126a187a4e5665470acf"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/windows_setup.rs: FileTooLong \u2014 723 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 36 free functions. The bar is 500 significant lines; this is 223 over it, 1.45\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/windows_setup.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8107f9f25b6e38acadded0ad33c35811314779353f8da36774876ad2d2440f07"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AccountPicker: ClassTooLong \u2014 576 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 21 methods, 2 blocks, lines 30-831. The bar is 400 significant lines; this is 176 over it, 1.44\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay.rs"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"e019d3ca1e8af1872d201f809ac647c4a381fb7238978bddfe2e412fb3dc5629"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: mcp/remote.rs: FileTooLong \u2014 720 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 220 over it, 1.44\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mcp/remote.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"54762633b35ef7213014771bb953c54b04b3d37a33e22d09d3a28c5546d2c174"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ServerEvent: ClassTooLong \u2014 576 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 0 methods. The bar is 400 significant lines; this is 176 over it, 1.44\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-protocol/src/wire/events.rs"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"274a57c34fb73e3ae93150dc60c253a83220dae591b6f2de9ae0bc403bf00975"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_provider_openrouter_runtime::openrouter_sse_stream::stream_response: FunctionTooLong \u2014 jcode_provider_openrouter_runtime::openrouter_sse_stream::stream_response runs 144 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 44 over it, 1.44\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/openrouter_sse_stream.rs"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"95d0d8480a1120ceae6d0eaf06927a813d5e1c6d49f49fe39f17c71d0d669b51"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: OpenAIProvider: ClassTooLong \u2014 575 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 48 methods, 2 blocks, lines 688-1553. The bar is 400 significant lines; this is 175 over it, 1.44\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/lib.rs"},"region":{"startLine":688}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e646d9e66cc9dfe0de0d8b8e09470ca2b4386a21c75b7e09e9fb6dac57f7317"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: Agent: TooManyFields \u2014 43 stored fields beside 275 methods. The bar is 30 stored fields; this is 13 over it, 1.43\u00D7 the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member \u2014 each reader then names only the group it uses."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent.rs"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"07a9b865c7f7a383c6e99116bdee264dbeed685e730aef4e93406561efa423a6"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: Session: TooManyFields \u2014 43 stored fields beside 96 methods. The bar is 30 stored fields; this is 13 over it, 1.43\u00D7 the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member \u2014 each reader then names only the group it uses."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session.rs"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"e757628683420f1250b1c3a420807016cd47bbcdf52560f636a3e3433751d6fa"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: SelfDevTool: TooManyMethods \u2014 43 methods, declared across 6 files: selfdev/mod.rs (19), selfdev/build_queue.rs (12), selfdev/setup.rs (5), selfdev/launch.rs (3), \u002B2 more file(s). The bar is 30 methods; this is 13 over it, 1.43\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/selfdev/mod.rs"},"region":{"startLine":478}}}],"partialFingerprints":{"codehealthFindingId/v1":"06613914a1a7eef9eb950ddcbfe7bf8adbbdb4551c5d3a12b50e3d94c16b427b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 715 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 215 over it, 1.43\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-protocol/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"118fa7d69ca6bc0614a318567d93d6d6b09a638af26dbea346f106bd5ebe629d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/auth_account_commands.rs: FileTooLong \u2014 715 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 215 over it, 1.43\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_commands.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a596c472d9def4dca9b583ca8f1a935f0fcdc06dd4f829c85b52328fa8367495"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MultiProvider.set_model_on_provider_with_credential_modes: MethodTooLong \u2014 set_model_on_provider_with_credential_modes runs 143 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 43 over it, 1.43\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/mod.rs"},"region":{"startLine":1164}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bfe324493300ba696b9c93740227ce3dd183fa5b9cbd9be5720df86d682cdc8"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui_anim::shape_char_3x3: FunctionTooLong \u2014 jcode_tui_anim::shape_char_3x3 runs 143 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 43 over it, 1.43\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-anim/src/lib.rs"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"b05e2ad4a33e50769651e1ecd5c61a4eacc442483529e70b672aa9ca580bcfdf"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui_render::swarm_gallery::hovered_detail_body: FunctionTooLong \u2014 jcode_tui_render::swarm_gallery::hovered_detail_body runs 143 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 43 over it, 1.43\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/swarm_gallery.rs"},"region":{"startLine":1705}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e59d4071b265698b5b2103bdf5c60bebcc621c3e8fd6d056e7de1b9d504ee08"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/markdown_render_lazy.rs: FileTooLong \u2014 713 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 213 over it, 1.43\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_lazy.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec8bc4eb732521c05eb1c7eee4c7f25e347c84327dc25054d60144a4f129ae70"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AccountPicker.render_detail_pane: MethodTooLong \u2014 render_detail_pane runs 142 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 42 over it, 1.42\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay.rs"},"region":{"startLine":579}}}],"partialFingerprints":{"codehealthFindingId/v1":"90f194ae1e03b4b52d9967127c963261af3ba7f2b5d3849008c969cf8201b57a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: provider/catalog_routes.rs: FileTooLong \u2014 707 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 207 over it, 1.41\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/catalog_routes.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"06b03708ae66d05ca5d42395032c5ae11f6746af221ff1c83fe673bdb9523c3c"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::runtime_ssh_host::execute: FunctionTooLong \u2014 jcode_app_core::server::runtime_ssh_host::execute runs 141 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 41 over it, 1.41\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/runtime_ssh_host.rs"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e3b8086198d125894d94133ae297aad632d505e723c406c9e3d1cd3d4246101"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: usage/provider_fetch.rs: FileTooLong \u2014 701 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 201 over it, 1.40\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/provider_fetch.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c855cd2dba4c0f500a3fa999dd6a22d58eae3623e66eafb61e8480a4988642cb"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: BashTool.execute_background: MethodTooLong \u2014 execute_background runs 140 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 40 over it, 1.40\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/bash.rs"},"region":{"startLine":1234}}}],"partialFingerprints":{"codehealthFindingId/v1":"9be0a580d78bd94bc99fe08a0cb8bc84606f70e9e5a80ec9df826262b8f1bc5d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MultiProvider.complete_split_on_provider: MethodTooLong \u2014 complete_split_on_provider runs 140 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 40 over it, 1.40\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/dispatch.rs"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9144b7ba296858284db39baade1ca65eb08f9e773e918520e79e99e6dbd382b"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_prepare::wrap_lines_with_map: FunctionTooLong \u2014 jcode_tui::tui::ui_prepare::wrap_lines_with_map runs 140 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 40 over it, 1.40\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_prepare.rs"},"region":{"startLine":2760}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ed05b34caec9c1e8ceb89c431a0e561225ec18b93625fa6bc1c6d24b1911d33"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_prepare::prepare_body_incremental: FunctionTooLong \u2014 jcode_tui::tui::ui_prepare::prepare_body_incremental runs 139 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 39 over it, 1.39\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_prepare.rs"},"region":{"startLine":1806}}}],"partialFingerprints":{"codehealthFindingId/v1":"c17a80d23a32814d804f15629e437a887454f5fd5c635577382b013aabd7c978"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 694 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 194 over it, 1.39\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-session-types/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4282306e2948e14d4b9bc983cb2ca8a24de2ac72ee1d71215400bd01e32f655"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::tool::todo::apply_todo_patch: FunctionTooLong \u2014 jcode_app_core::tool::todo::apply_todo_patch runs 138 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 38 over it, 1.38\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/todo.rs"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ae6c2b265ec3e1c1dadde3f788f59cfb9119ce0c7bdb0758b592f69b84184c0"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_base::mobile_sync::sync_pass: FunctionTooLong \u2014 jcode_base::mobile_sync::sync_pass runs 138 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 38 over it, 1.38\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mobile_sync.rs"},"region":{"startLine":708}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b2180d9c42168a24e8ea008a6e4c2a7ed98aa1aec5a9dc84152d9e550d85d6b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MultiProvider.handle_auth_changed: MethodTooLong \u2014 handle_auth_changed runs 138 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 38 over it, 1.38\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/mod.rs"},"region":{"startLine":1444}}}],"partialFingerprints":{"codehealthFindingId/v1":"fac516c7f724ab4efa4081cf56bbe8ba5abcae29f22572d87e8f5136e706e276"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_telemetry_core::finalize_current_turn: FunctionTooLong \u2014 jcode_telemetry_core::finalize_current_turn runs 138 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 38 over it, 1.38\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lib.rs"},"region":{"startLine":1561}}}],"partialFingerprints":{"codehealthFindingId/v1":"c708c12bf18971abd2645fa7aaf6c5412121862209e2796b02f3fe6cf855f5a1"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.memory_profile_value: MethodTooLong \u2014 memory_profile_value runs 138 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 38 over it, 1.38\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_profile.rs"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"56880c8ac75b66948f8e37c278ff8c551d08c3e485f80b83fc080fb4ece51e86"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_messages::render_overnight_message: FunctionTooLong \u2014 jcode_tui::tui::ui_messages::render_overnight_message runs 138 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 38 over it, 1.38\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":585}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2c34490b9391afe799da8f0d8acdd694f6e2dbbced152dd7bd8d3db8828bc98"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode::cli::commands::run_cloud_sessions_sync: FunctionTooLong \u2014 jcode::cli::commands::run_cloud_sessions_sync runs 138 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 38 over it, 1.38\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":625}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0468e8360c99189480099bad8e268a960272e787568ccc202b354934d72ce5a"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode::cli::login::login_openai_compatible_flow: FunctionTooLong \u2014 jcode::cli::login::login_openai_compatible_flow runs 138 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 38 over it, 1.38\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/login.rs"},"region":{"startLine":853}}}],"partialFingerprints":{"codehealthFindingId/v1":"de711ac6db71d711f497e986eaddaef1776784c1742599529e42998263ac6e70"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::comm_session::handle_comm_stop: FunctionTooLong \u2014 jcode_app_core::server::comm_session::handle_comm_stop runs 137 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 37 over it, 1.37\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_session.rs"},"region":{"startLine":855}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b64c18504b65eb02eb261311458a1193ea318aaa7d79f900c6e22ece33738ed"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::session_picker::loading::load_opencode_session_info: FunctionTooLong \u2014 jcode_tui::tui::session_picker::loading::load_opencode_session_info runs 137 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 37 over it, 1.37\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading.rs"},"region":{"startLine":2591}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7e787942ae6c8f6c68782f8eec6874665724feb03bb2248c5db27372ea124ab"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: InfoWidgetData: TooManyFields \u2014 41 stored fields beside 5 methods. The bar is 30 stored fields; this is 11 over it, 1.37\u00D7 the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member \u2014 each reader then names only the group it uses."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget.rs"},"region":{"startLine":679}}}],"partialFingerprints":{"codehealthFindingId/v1":"94f12b228664d0fabbac7bf9d1e419c1825ff2936dd7e5dff6b133caac2da9a7"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: TodoSessionEvent: TooManyFields \u2014 41 stored fields. The bar is 30 stored fields; this is 11 over it, 1.37\u00D7 the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member \u2014 each reader then names only the group it uses."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-usage-types/src/lib.rs"},"region":{"startLine":500}}}],"partialFingerprints":{"codehealthFindingId/v1":"43ec20abd69817759ec301a6622d6c209ea1e18468db156e4b60c6c6428597a0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cli/cloud_managed.rs: FileTooLong \u2014 679 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 38 free functions. The bar is 500 significant lines; this is 179 over it, 1.36\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_managed.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a9ffa5ac71466a564f7747b8b0bc20c62c74cbd6fc3fccba1af5e1a062f95f2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cli/args.rs: FileTooLong \u2014 676 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 176 over it, 1.35\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/args.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"63629db1b9a9db1ebd5126d4ad8ea05f2d927d7e8b15d87bc48b3438044eed03"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CalendarTool.execute: MethodTooLong \u2014 execute runs 135 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 35 over it, 1.35\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/calendar.rs"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"305ae0bccd38064f5a853d7db7ce07c14cdde37fb90ad0db0d7f69647a7db605"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::session_picker::loading::pi_sessions::load_pi_session_info: FunctionTooLong \u2014 jcode_tui::tui::session_picker::loading::pi_sessions::load_pi_session_info runs 135 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 35 over it, 1.35\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading/pi_sessions.rs"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"1408deca3ebcae178dc40638d9d0e3b7a49c89951ccca19a0251c9120417dba4"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_input::build_notification_spans: FunctionTooLong \u2014 jcode_tui::tui::ui_input::build_notification_spans runs 135 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 35 over it, 1.35\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_input.rs"},"region":{"startLine":1231}}}],"partialFingerprints":{"codehealthFindingId/v1":"4df9de20b39ab7106e6d81ea382e0d3024fdc969e8c8349e5dff361e843d8a51"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tool/bg.rs: FileTooLong \u2014 670 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 170 over it, 1.34\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/bg.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"656ddb31bcd06113732b39b6da1e3053c62e67cb5888e199a97d96cba0d7d706"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SelfDevTool.do_reload: MethodTooLong \u2014 do_reload runs 134 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 34 over it, 1.34\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/selfdev/reload.rs"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"77b2aa0b70e8b4446bad007fcff6ff3db7ef078bfbd23d0b3e90df91585a2841"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_file_diff::draw_file_diff_view: FunctionTooLong \u2014 jcode_tui::tui::ui_file_diff::draw_file_diff_view runs 134 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 34 over it, 1.34\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_file_diff.rs"},"region":{"startLine":429}}}],"partialFingerprints":{"codehealthFindingId/v1":"21edb6a335be6aa918c8e56b8cc2d0d55fbe2c286391b80a4d9484b775d7b7cd"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ProviderCard.body_lines: MethodTooLong \u2014 body_lines runs 134 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 34 over it, 1.34\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages/usage.rs"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c43e8982cf784397d5a344ae79fcbe03cbd317e359fd08be91ce00a5799eb20"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_messages::usage::activity_summary_lines: FunctionTooLong \u2014 jcode_tui::tui::ui_messages::usage::activity_summary_lines runs 134 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 34 over it, 1.34\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages/usage.rs"},"region":{"startLine":496}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e3a012038944b4a2f6b37d7cc05282c9b2baf8d32c0794270c37c207b36990d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/debug_profile.rs: FileTooLong \u2014 667 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 70% of them inside a single declaration: App (4-515). The bar is 500 significant lines; this is 167 over it, 1.33\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_profile.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d123abb3a1e7346b3809f7d7c47a9151ae338d798ca19cd05abf547197aeee0"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFunctions: jcode_telemetry_core::state_support: TooManyFunctions \u2014 40 free functions. The bar is 30 free functions; this is 10 over it, 1.33\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/state_support.rs"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb742fef5a424173fd24e599bfba8a4adf2565610eedcdaeb2470e5f044a9797"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: DisplayConfig: TooManyFields \u2014 40 stored fields beside 6 methods. The bar is 30 stored fields; this is 10 over it, 1.33\u00D7 the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member \u2014 each reader then names only the group it uses."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-config-types/src/display.rs"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"de4e18f292a296b21e8b36f215444719e70f739886f14fa6b7e40e622bb11530"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::comm_session::ensure_spawn_coordinator_swarm: FunctionTooLong \u2014 jcode_app_core::server::comm_session::ensure_spawn_coordinator_swarm runs 133 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 33 over it, 1.33\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_session.rs"},"region":{"startLine":1116}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5a745efe6f7d9b985a2cc41b46f3a63777295b543dd7397ce8c66695f3ac18e"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::debug_ambient::maybe_handle_ambient_command: FunctionTooLong \u2014 jcode_app_core::server::debug_ambient::maybe_handle_ambient_command runs 133 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 33 over it, 1.33\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_ambient.rs"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f41a4a58d42204c5658ca37a96b2ad4751c41c5982a08d245f07360c1ae6cc9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tool/websearch.rs: FileTooLong \u2014 663 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 163 over it, 1.33\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/websearch.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4becc52f71f1dd635a2c87a49b6d419f051805323cb0b69e2df1ba88fda8fc09"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/openrouter_provider_impl.rs: FileTooLong \u2014 662 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 98% of them inside a single declaration: OpenRouterProvider (2 blocks, 7-1082). The bar is 500 significant lines; this is 162 over it, 1.32\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/openrouter_provider_impl.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b16e0e0f1432c5ec08171c8a901620fce3f686d9f2c95332271e871fdaba52ea"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: auth/copilot.rs: FileTooLong \u2014 661 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 34 free functions. The bar is 500 significant lines; this is 161 over it, 1.32\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/copilot.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7eb69985e824f9f9962a02ec53ebdef22536f3ffa71d72ede14fa3ac609091e"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: Request: ClassTooLong \u2014 528 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 2 methods, 2 blocks, lines 36-945. The bar is 400 significant lines; this is 128 over it, 1.32\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-protocol/src/wire.rs"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e693fb6427da9e40c7b14b77a6d6b889f027c9265caa60afbbd607edbd61dcf"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: server/debug_swarm_read.rs: FileTooLong \u2014 660 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 160 over it, 1.32\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_swarm_read.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"56c281a911c597bb94f3a4051f4138477cd0433c18d0cebea859a65166f88b65"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: OpenRouterProvider.new_named_openai_compatible: MethodTooLong \u2014 new_named_openai_compatible runs 132 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 32 over it, 1.32\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/lib.rs"},"region":{"startLine":1344}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea3a87d53424470824115ace6512e3f0e9788cd0e8e7f0156d5247b17f39a2a9"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_sdk::launch::launch_instance: FunctionTooLong \u2014 jcode_sdk::launch::launch_instance runs 132 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 32 over it, 1.32\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-sdk/src/launch.rs"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"648f4fe92060e94df9d1a35e4a4292e33427de1ed52dbfac165bc53beb956325"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_setup_hints::keymap::conflicts::jcode_bindings: FunctionTooLong \u2014 jcode_setup_hints::keymap::conflicts::jcode_bindings runs 132 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 32 over it, 1.32\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/keymap/conflicts.rs"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e906c81155a3107def41090f1cee1610982b4d4c489914b7fd9371a401236d7"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/preprocess.rs: FileTooLong \u2014 659 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 159 over it, 1.32\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/preprocess.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"85dc770be57a8ea06bb18757f02e45300f8d06de0f0ec3651cb1c4b65977bc7d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ui_messages/usage.rs: FileTooLong \u2014 658 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 158 over it, 1.32\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages/usage.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4435c9eda69e13ced0b39fbaaaf854f4bc64fcf330000761a3f39e28b446b6a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 657 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 157 over it, 1.31\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-usage-overlay/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a2987f9d77c02e362d36f9540f4c3642217fb562da2b302f32fcb29187e4b2e"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::replay::timeline_to_replay_events: FunctionTooLong \u2014 jcode_app_core::replay::timeline_to_replay_events runs 131 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 31 over it, 1.31\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/replay.rs"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"a232faf0614f02e56f388a44e0470b8191dfca3330ab6ab3721cec56efc40479"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Registry.execute: MethodTooLong \u2014 execute runs 131 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 31 over it, 1.31\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/mod.rs"},"region":{"startLine":1053}}}],"partialFingerprints":{"codehealthFindingId/v1":"a882601803de70e0a81c1185424416d99590b4b285293aec16a3883eaaf3c2c2"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_provider_anthropic::format_messages_with_native: FunctionTooLong \u2014 jcode_provider_anthropic::format_messages_with_native runs 131 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 31 over it, 1.31\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic/src/lib.rs"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"839a05969bfb1fb43089aadfd8d3c1aeb677b17b15963e34aab9eaee5de84e77"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: BedrockProvider.complete: MethodTooLong \u2014 complete runs 131 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 31 over it, 1.31\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-bedrock/src/lib.rs"},"region":{"startLine":1179}}}],"partialFingerprints":{"codehealthFindingId/v1":"987bd0212de4aec3c629dfd27b5619ba8aa3e164acac65fda078eb91f69f804f"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_header::account_router::inventory_lines: FunctionTooLong \u2014 jcode_tui::tui::ui_header::account_router::inventory_lines runs 131 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 31 over it, 1.31\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_header/account_router.rs"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"558858930d5ad70c480bf896adef28ecb22c394dedb6482d0fa6ed7c32b73f66"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/notifications.rs: FileTooLong \u2014 653 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 153 over it, 1.31\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/notifications.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa5d3801721b53e85553a68cf4e9ca1e0e08e2d616010bac547f3a5fd58cbd58"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tui/ui_overlays.rs: FileTooLong \u2014 653 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 153 over it, 1.31\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_overlays.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ba5294d61d0d994365cf7a9fa39641eb9d0d46705f00dbc11190b97284c6bd1"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: BridgeState: TooManyFields \u2014 39 stored fields beside 60 methods. The bar is 30 stored fields; this is 9 over it, 1.30\u00D7 the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member \u2014 each reader then names only the group it uses."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/translate.rs"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7d1a0ced28a2876853586177f114a31f6d055f548c1e23f9a5402a07b7dd762"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: BackgroundTaskManager: TooManyMethods \u2014 39 methods, declared across 2 files: src/background.rs (37), background/cleanup.rs (2). The bar is 30 methods; this is 9 over it, 1.30\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/background.rs"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"87ef9191ce59b4f72a89c31cfb0553a53bc36052ae1b5e532a9d3d81c547c537"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFunctions: jcode_build_support::paths: TooManyFunctions \u2014 39 free functions. The bar is 30 free functions; this is 9 over it, 1.30\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-build-support/src/paths.rs"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bad9752b74adf9470aa955a974758733d3164e193c6596c93cfca0b94a709ee"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFunctions: jcode_logging: TooManyFunctions \u2014 39 free functions. The bar is 30 free functions; this is 9 over it, 1.30\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-logging/src/lib.rs"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"37bb81cdfadaf45b21315037fe3c979f36aae0690eee7f33cbb3cf0770e7a60d"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFunctions: jcode_tui_mermaid::mermaid_runtime: TooManyFunctions \u2014 39 free functions. The bar is 30 free functions; this is 9 over it, 1.30\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_runtime.rs"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"2053fc37650cb2afacfc1601b85829ff55f709e3e0020270aa4b7ebf14eba2b9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/subscription_api.rs: FileTooLong \u2014 650 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 150 over it, 1.30\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/subscription_api.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"51693102317dc9e3d577e9a2f5a3421453ca1324768c58aee7ddfb2e3920cb42"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::debug_session_admin::maybe_handle_session_admin_command: FunctionTooLong \u2014 jcode_app_core::server::debug_session_admin::maybe_handle_session_admin_command runs 130 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 30 over it, 1.30\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_session_admin.rs"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"7afb22837c734fa69b1dc8ec596f31a7efb46acae24789327c06e6209d7a09ae"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_messages::render_todos_message_with_cap: FunctionTooLong \u2014 jcode_tui::tui::ui_messages::render_todos_message_with_cap runs 130 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 30 over it, 1.30\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":1121}}}],"partialFingerprints":{"codehealthFindingId/v1":"212a9f810ebf31f09978e225ff4446d7a49cb323c47589025b8f786733514a94"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/debug.rs: FileTooLong \u2014 647 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 147 over it, 1.29\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0aed2b2babdb48e7ee6151f7c8d9bd9d563bacdee57a9b7eec4a2960a51bdbb"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::overnight::run_supervisor: FunctionTooLong \u2014 jcode_app_core::overnight::run_supervisor runs 129 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 29 over it, 1.29\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/overnight.rs"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e8b1d3fd64d1530c8261e4798b772f9edd8b5602a32a310ee733538b0975094"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::client_state::send_history_from_persisted_session: FunctionTooLong \u2014 jcode_app_core::server::client_state::send_history_from_persisted_session runs 129 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 29 over it, 1.29\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_state.rs"},"region":{"startLine":792}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb230f81531ad3004446f832560313aa16e3914ebd01f92907eaf0e9ef4866c8"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_provider_antigravity::parse_fetch_available_models_response: FunctionTooLong \u2014 jcode_provider_antigravity::parse_fetch_available_models_response runs 129 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 29 over it, 1.29\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-antigravity/src/lib.rs"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b3b134cece049ac8425488f3fbfabff932d0da8d40f9d08cc5c2cd5834f8a67"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::app::remote::server_events::handle_server_event: FunctionTooLong \u2014 jcode_tui::tui::app::remote::server_events::handle_server_event runs 129 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 29 over it, 1.29\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/server_events.rs"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7d5dae50a7f13ba016a5e15f64ca86a1211b0aeb591767e171463c7ab5392a3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/mobile_sync.rs: FileTooLong \u2014 644 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 34 free functions. The bar is 500 significant lines; this is 144 over it, 1.29\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mobile_sync.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"da4a293e912a728d86d632798ae1a6c0936fe5a5634b33dcf7c2269d9ef16225"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/prompt.rs: FileTooLong \u2014 644 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 41 free functions. The bar is 500 significant lines; this is 144 over it, 1.29\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/prompt.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbd7ea3fb664c578b532164b846775249e12de6070c15b46b50c159fa275b2e9"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: GmailTool: ClassTooLong \u2014 514 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 2 methods, 3 blocks, lines 9-760. The bar is 400 significant lines; this is 114 over it, 1.29\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/gmail.rs"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bdfc0f9c9a348b948c3a71a24371ea5414b69a674a6a6f4499a1a246da44888"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: auth/lifecycle.rs: FileTooLong \u2014 641 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 141 over it, 1.28\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/lifecycle.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9e34c6e8b4b0ca1e327c9b641d8020dc6ac9d5261e5109e06fca636c4ed4edb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tui/login_picker.rs: FileTooLong \u2014 641 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 141 over it, 1.28\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/login_picker.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4058c3d22d88a76de86888bed70c404f0d4c7f1bd48514cde9f3dbe65450f17b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/overlay.rs: FileTooLong \u2014 640 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 90% of them inside a single declaration: AccountPicker (2 blocks, 30-831). The bar is 500 significant lines; this is 140 over it, 1.28\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"060bc8fdf92695c9cfa8486229f3f31e14a0139de583b5a333a0639024454e94"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::reload::await_reload_signal: FunctionTooLong \u2014 jcode_app_core::server::reload::await_reload_signal runs 128 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 28 over it, 1.28\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/reload.rs"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cbb669b31df150176a835e64c64283f47893fab067a33aaf1cfc2f42e78586d"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::tool::agentgrep::context::collect_trace_exposure: FunctionTooLong \u2014 jcode_app_core::tool::agentgrep::context::collect_trace_exposure runs 128 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 28 over it, 1.28\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/agentgrep/context.rs"},"region":{"startLine":444}}}],"partialFingerprints":{"codehealthFindingId/v1":"f44af113f79ad0dc6fb465a71bfc5030b2ca783d94dec41386ebc7bc67de7b6a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.start_muse_subscription_login: MethodTooLong \u2014 start_muse_subscription_login runs 128 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 28 over it, 1.28\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth/auth_muse.rs"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f611a7ed88e0140297853827b48ea20af56820dc8a6a49f3ee7d823d910bdc4"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_messages::render_swarm_message: FunctionTooLong \u2014 jcode_tui::tui::ui_messages::render_swarm_message runs 128 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 28 over it, 1.28\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":3611}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc5894ab678bc599dece2273f40877cda63208e7d7ac83e1b5c1b15354f30979"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_overnight_core::build_review_html: FunctionTooLong \u2014 jcode_overnight_core::build_review_html runs 127 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 27 over it, 1.27\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-overnight-core/src/lib.rs"},"region":{"startLine":569}}}],"partialFingerprints":{"codehealthFindingId/v1":"8000ae4533a6b821367e6334ef820f6d1422dff2aeda52b3d334a3ac2c78da24"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.debug_model_picker_live_json: MethodTooLong \u2014 debug_model_picker_live_json runs 127 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 27 over it, 1.27\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":2233}}}],"partialFingerprints":{"codehealthFindingId/v1":"49fa2da1cea5a6af57ea9f0146638a43130ebfe774402e4d6aa90000872f3afd"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: server/state.rs: FileTooLong \u2014 634 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 134 over it, 1.27\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/state.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3eaeef4fc0c20b6403eb5af43ba5e222499bff00d27adb6ed832331e36e8291d"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFunctions: jcode_app_core::telemetry_state: TooManyFunctions \u2014 38 free functions. The bar is 30 free functions; this is 8 over it, 1.27\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/telemetry_state.rs"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"42a7a27a396219f0969b04e3ae1fe847403f97f6471ec1338daaf34f63d0f2dc"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 631 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 131 over it, 1.26\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-terminal-launch/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"84a50290b7cc4855478d446cb507b69a26ee991ab6c6a5b72ed2477e80985122"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_command_risk::assess_segment: FunctionTooLong \u2014 jcode_command_risk::assess_segment runs 126 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 26 over it, 1.26\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-command-risk/src/lib.rs"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7b42f9f409c7989e04f4d0eead60c93d074c3c14e52f4442b9fa7104e3e767e"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: launch.launchInstance: FunctionTooLong \u2014 launchInstance runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/typescript/src/launch.ts"},"region":{"startLine":522}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a3527a060bfee26b3a38aa9e2eaba23afdb645173ab3f9e9d06d2059d6c1ae1"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode::cli::commands::provider_setup::configure_provider_profile: FunctionTooLong \u2014 jcode::cli::commands::provider_setup::configure_provider_profile runs 126 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 26 over it, 1.26\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands/provider_setup.rs"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ec7aeef67f658dcba38bc347c82f88d232073085b0c68d7cb62d7cd55ce22f6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/todos_view.rs: FileTooLong \u2014 627 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 127 over it, 1.25\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/todos_view.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2976ae12800ebdb39f06925df4b8358d31ab74e0c4af7336e945cf6f2b36b8f2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/process_memory.rs: FileTooLong \u2014 626 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 34 free functions. The bar is 500 significant lines; this is 126 over it, 1.25\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/process_memory.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f296b27dbcc68a691ce0587b5c05cc0172541f3e13ac02e9e584d7a6a0705a57"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: FollowUpPolicy.decide_after_turn: MethodTooLong \u2014 decide_after_turn runs 125 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 25 over it, 1.25\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-todo-policy/src/followup.rs"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"11ab88fc66f37d8eb74a3b57ef49fb0e64e38e2a27fb9644f62f16cb2ed5a01d"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::info_widget_swarm_background::render_swarm_dock: FunctionTooLong \u2014 jcode_tui::tui::info_widget_swarm_background::render_swarm_dock runs 125 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 25 over it, 1.25\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_swarm_background.rs"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"90556af71b5f3f0ee006588a995caa744966b619a73463153cb58a852bc44548"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tui/ui_inline_image.rs: FileTooLong \u2014 623 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 32 free functions. The bar is 500 significant lines; this is 123 over it, 1.25\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_inline_image.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c5eb611b2bb4fd6dd29eae5d302b8941695ed2e86948f93e22cfa7ab84c5b29"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_notify_email::build_permission_email_html: FunctionTooLong \u2014 jcode_notify_email::build_permission_email_html runs 124 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 24 over it, 1.24\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-notify-email/src/lib.rs"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"5beb724ddebeb727415a9817e46ce9cd8d95bf28a30e5b4aa0ce8b9c1f3b5835"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CopilotApiProvider.process_sse_stream: MethodTooLong \u2014 process_sse_stream runs 124 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 24 over it, 1.24\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-copilot-runtime/src/lib.rs"},"region":{"startLine":688}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b5180fcc054f695f41e56ac8c667ed5f46d9121e42cdef5a4602c5032bd342f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.start_jcode_login: MethodTooLong \u2014 start_jcode_login runs 124 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 24 over it, 1.24\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth.rs"},"region":{"startLine":550}}}],"partialFingerprints":{"codehealthFindingId/v1":"22d4897c9a53bded325e802c5932289cff0465b1322162ba5d6bc0141932b39e"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.restore_session: MethodTooLong \u2014 restore_session runs 124 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 24 over it, 1.24\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tui_lifecycle_runtime.rs"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"a76df367b117e7dbb293750cbfb47102cbb0721cae46647fe245b830370de903"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tui/ui_diagram_pane.rs: FileTooLong \u2014 618 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 118 over it, 1.24\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_diagram_pane.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5228753d38e3523e3cade6223889f5c5e7f687f9753e2fbe1596d1cf20a88d07"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 617 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 117 over it, 1.23\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-memory-types/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"58c68ec197b1c6b871363b324c85dca67174a27d136ac4dac3df3cf421b7616e"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_base::mcp::remote::streamable_post_inner: FunctionTooLong \u2014 jcode_base::mcp::remote::streamable_post_inner runs 123 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 23 over it, 1.23\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mcp/remote.rs"},"region":{"startLine":610}}}],"partialFingerprints":{"codehealthFindingId/v1":"1452bf96e0b275f1f7f1ce4c787d413958a2a78e9f0c3f6a6ef4f286721d9cb4"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::app::helpers::gather_git_info_in: FunctionTooLong \u2014 jcode_tui::tui::app::helpers::gather_git_info_in runs 123 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 23 over it, 1.23\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/helpers.rs"},"region":{"startLine":1850}}}],"partialFingerprints":{"codehealthFindingId/v1":"272440a28151da793790f772c6194e9c380287c9fb0a4e3b837e46fd681efc87"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.open_agent_model_picker: MethodTooLong \u2014 open_agent_model_picker runs 123 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 23 over it, 1.23\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive/openers.rs"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1c84fb157fb3b0a05f6976c781e3483cf433c678606a25f055806755377af14"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::app::local::handle_bus_event: FunctionTooLong \u2014 jcode_tui::tui::app::local::handle_bus_event runs 123 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 23 over it, 1.23\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/local.rs"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"2327de3e2e8bd60c4f6c22ef7c8e166174ac9ce205663cb52c93735aacfebc0f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/runtime_memory_log.rs: FileTooLong \u2014 613 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 113 over it, 1.23\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/runtime_memory_log.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"983500c00b99495a709ce2c19ddeadc39475cbc76ab859f5823481c1942725cd"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cli/tui_launch.rs: FileTooLong \u2014 612 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 112 over it, 1.22\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/tui_launch.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7aead5669173c6925c0c20c52a4f332735a88d2f04748de2079e6c5d1689e49d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 611 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 64% of them inside a single declaration: PermissionsApp (2 blocks, 18-580). The bar is 500 significant lines; this is 111 over it, 1.22\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-permissions/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"17a5b1afb7416a0c4d707262c015130bca5cb0b29e3e0ded3a4ae0262fd626d3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: wire/events.rs: FileTooLong \u2014 610 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 94% of them inside a single declaration: ServerEvent (108-1100). The bar is 500 significant lines; this is 110 over it, 1.22\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-protocol/src/wire/events.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3ec22aefa5a06538699ae750c2cc03965a3988976d969ef4bf164d9ad5be06e"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::client_state::build_model_catalog: FunctionTooLong \u2014 jcode_app_core::server::client_state::build_model_catalog runs 122 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 22 over it, 1.22\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_state.rs"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"67ffa4766803d29d7ffaca5d8a3cc3ed41353ae29d0a0426beefc15414fcd4c9"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_fuzzy::run_dp: FunctionTooLong \u2014 jcode_fuzzy::run_dp runs 122 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 22 over it, 1.22\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-fuzzy/src/lib.rs"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"1613ce731d954891026922a0eb3fc7adce3fee59c38833de9b9739138974f1e3"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.capture_scroll_test_step: MethodTooLong \u2014 capture_scroll_test_step runs 122 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 22 over it, 1.22\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_bench.rs"},"region":{"startLine":555}}}],"partialFingerprints":{"codehealthFindingId/v1":"7488a27ff1887d9d0d8d8210a5cc118bdfe18e6546c3e9abe20b4f4c14bdef9e"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::app::remote_notifications::present_swarm_notification_inner: FunctionTooLong \u2014 jcode_tui::tui::app::remote_notifications::present_swarm_notification_inner runs 122 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 22 over it, 1.22\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote_notifications.rs"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd9862c4b03bbae2b21d1b05312f3ff15ce17257af9c5e615e81aa68169126a0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: session/persistence.rs: FileTooLong \u2014 609 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 109 over it, 1.22\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/persistence.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ac406b25527d1dfb21ffa95ed37bfb7491ff250990693ad025f2fdda1224211"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 609 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 32 free functions. The bar is 500 significant lines; this is 109 over it, 1.22\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-build-support/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4865987a3d22595ac2f984c7812a2c3fe954c2cd2e79d034a4bd14e6b0e273bc"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 609 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 97% of them inside a single declaration: AntigravityProvider (5 blocks, 35-946). The bar is 500 significant lines; this is 109 over it, 1.22\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-antigravity-runtime/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"aefe40b6506ac7987828b51928195d1fe72bf42eff48586ee3e1f68a1864028a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: config/env_overrides.rs: FileTooLong \u2014 608 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 98% of them inside a single declaration: Config (3-965). The bar is 500 significant lines; this is 108 over it, 1.22\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/config/env_overrides.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"afd3c61d4a5865bda971ff489cfe1292354274fb62454170210258bd4469ac1d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: global/hotkey.rs: FileTooLong \u2014 607 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 107 over it, 1.21\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-voice/src/global/hotkey.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cea1ee0c4097f73b6746bae93dd760c3eb367de1ff7d27e82d105ee84e0f11c5"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: server/client_processing.rs: FileTooLong \u2014 605 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 105 over it, 1.21\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_processing.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e068249335246c47d65e249e6f886c13c3c2979f62ea00f64dd48ac83ef634a4"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui_render::memory_tiles::render_memory_tiles: FunctionTooLong \u2014 jcode_tui_render::memory_tiles::render_memory_tiles runs 121 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 21 over it, 1.21\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/memory_tiles.rs"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5b10c5600a270a4b3e4fb05cd19cabb5819d95450b4c3e12b174865cea1949c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.build_openai_inline_account_picker: MethodTooLong \u2014 build_openai_inline_account_picker runs 121 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 21 over it, 1.21\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker.rs"},"region":{"startLine":883}}}],"partialFingerprints":{"codehealthFindingId/v1":"47e31b5a3cc1fc9454a56bbd088cbbdac17cf041611398f292a2fd7907a476e9"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionPicker.render_preview: MethodTooLong \u2014 render_preview runs 121 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 21 over it, 1.21\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker.rs"},"region":{"startLine":1671}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cb96b3fb476777595151dce014805abfaf4ca5d3ab6afd38f24bc819ed0aab8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tool/browser_fast.rs: FileTooLong \u2014 601 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 101 over it, 1.20\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/browser_fast.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"558008356bf0f21ff2011ca99104c6b509408efadcc88dc3fbeffc7624a646f1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: auth/claude.rs: FileTooLong \u2014 601 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 45 free functions. The bar is 500 significant lines; this is 101 over it, 1.20\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/claude.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"96009f3e9e3093885643ff9373e3654a6947347f23121775b6102d91121e0daa"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 601 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 101 over it, 1.20\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"56dcd2bc309e77cc9d0e1fd2b09c27a221c65791fde39e44f40c2565a5100977"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFunctions: jcode_base::auth::external: TooManyFunctions \u2014 36 free functions. The bar is 30 free functions; this is 6 over it, 1.20\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/external.rs"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c5358aa6c606c8d3bd14111671c27a9ef00b1a697ba965b259b0ded802cfc11"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: CommunicateInput: TooManyFields \u2014 36 stored fields beside 2 methods. The bar is 30 stored fields; this is 6 over it, 1.20\u00D7 the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member \u2014 each reader then names only the group it uses."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/communicate.rs"},"region":{"startLine":516}}}],"partialFingerprints":{"codehealthFindingId/v1":"c41f43f84ad3133c58c26902c70e13cf6a0298c71abf9e3926dc912ee65b4c19"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tool/gmail.rs: FileTooLong \u2014 600 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 86% of them inside a single declaration: GmailTool (3 blocks, 9-760). The bar is 500 significant lines; this is 100 over it, 1.20\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/gmail.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5cdcd237d4301773378672098ef93f387de2731b973ab16b02bd9b38cda0dc9"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: BashTool.execute_reload_persistable_foreground: MethodTooLong \u2014 execute_reload_persistable_foreground runs 120 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 20 over it, 1.20\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/bash.rs"},"region":{"startLine":1085}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a5317b4c82e7f75c2275a15dd10b6432e947fe556181438edc4cd6c08898c95"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: McpClient.connect_in_dir: MethodTooLong \u2014 connect_in_dir runs 120 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 20 over it, 1.20\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mcp/client.rs"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"6eeb4e78583d55b1cec8cbc818e34a5f37761194f0667a22c1f5dc66a4fff4ab"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_protocol::comm_format::format_comm_members: FunctionTooLong \u2014 jcode_protocol::comm_format::format_comm_members runs 120 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 20 over it, 1.20\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-protocol/src/comm_format.rs"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"780cfc307b19a8e449ed1cf0efc0803ebfd5b318da719d25486e8054178e22ef"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.handle_login_completed: MethodTooLong \u2014 handle_login_completed runs 120 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 20 over it, 1.20\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth.rs"},"region":{"startLine":3111}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa1ce733d4d8b5f697a92584b1e0eb5d3aacfc587030c0d41855fdb71e0df884"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::video_export::render_svg_pipeline: FunctionTooLong \u2014 jcode_tui::video_export::render_svg_pipeline runs 120 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 20 over it, 1.20\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/video_export.rs"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b7f3792e049bf499e8010c017dd11368ea385b0307d7173c1dc3c1716986fbc"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: BrowserInput: TooManyFields \u2014 36 stored fields. The bar is 30 stored fields; this is 6 over it, 1.20\u00D7 the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member \u2014 each reader then names only the group it uses."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/browser.rs"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"913c31187ba8eae08588a7842d669edf4440e862a175028c1bf47078d7e9e3de"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: KeybindingsConfig: TooManyFields \u2014 36 stored fields. The bar is 30 stored fields; this is 6 over it, 1.20\u00D7 the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member \u2014 each reader then names only the group it uses."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-config-types/src/lib.rs"},"region":{"startLine":1007}}}],"partialFingerprints":{"codehealthFindingId/v1":"82f2329268d2eed67cf847383d93cc60b1c74d8a77e68efd34b96c23a09c546d"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::app::remote::reconnect::handle_post_connect: FunctionTooLong \u2014 jcode_tui::tui::app::remote::reconnect::handle_post_connect runs 119 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 19 over it, 1.19\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/reconnect.rs"},"region":{"startLine":717}}}],"partialFingerprints":{"codehealthFindingId/v1":"e22c8d12a2a08d4868eb16105051d2030f15a92db66dfa937cd3b0f5e59fb237"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/hotkey_feedback.rs: FileTooLong \u2014 593 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 93 over it, 1.19\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/hotkey_feedback.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f75dd9e6c154207dfccd513ea982a40032db76daee16c84b73ffed5872518c46"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::swarm_persistence::load_runtime_state: FunctionTooLong \u2014 jcode_app_core::server::swarm_persistence::load_runtime_state runs 118 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 18 over it, 1.18\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/swarm_persistence.rs"},"region":{"startLine":500}}}],"partialFingerprints":{"codehealthFindingId/v1":"96eb08cd57039a65502025c7e77b75f9de27c7439123dc37bddba8798a816507"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_terminal_launch::build_spawn_command: FunctionTooLong \u2014 jcode_terminal_launch::build_spawn_command runs 118 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 18 over it, 1.18\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-terminal-launch/src/lib.rs"},"region":{"startLine":724}}}],"partialFingerprints":{"codehealthFindingId/v1":"e17bb22a0277e524cc47f13acfef13f0f1d88eb071480aec17fc7d85ea791150"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.eval_assertions: MethodTooLong \u2014 eval_assertions runs 118 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 18 over it, 1.18\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_script.rs"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfe0c204d3e7ef948b48b7bd9b22d0ab2e078b9be3392246306598feb1f71131"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.handle_session_picker_selection: MethodTooLong \u2014 handle_session_picker_selection runs 118 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 18 over it, 1.18\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":2850}}}],"partialFingerprints":{"codehealthFindingId/v1":"0915fcd2d3bf724124c691d2a18b55a053e9ebae4716833eaaa978930d008fbd"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_tools::browser_summary: FunctionTooLong \u2014 jcode_tui::tui::ui_tools::browser_summary runs 118 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 18 over it, 1.18\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tools.rs"},"region":{"startLine":464}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c3edee3dc81a4768d142d5cc64c9b36fdafd8245a5c33f00616d56f741b958e"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode::bin::tui_bench::reconstruct_side_panel_snapshot_from_session: FunctionTooLong \u2014 jcode::bin::tui_bench::reconstruct_side_panel_snapshot_from_session runs 118 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 18 over it, 1.18\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/tui_bench.rs"},"region":{"startLine":659}}}],"partialFingerprints":{"codehealthFindingId/v1":"b06bb4f83253c2a81a075ecaa413db81406ef730488abc945e574bf6b444f1ca"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: session_picker/render.rs: FileTooLong \u2014 587 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 95% of them inside a single declaration: SessionPicker (4-844). The bar is 500 significant lines; this is 87 over it, 1.17\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/render.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9f6688e08d3ec94a137a24eda7b84c38026ed26abf353774837ba3642312fc9"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::comm_control::handle_comm_assign_role: FunctionTooLong \u2014 jcode_app_core::server::comm_control::handle_comm_assign_role runs 117 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 17 over it, 1.17\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_control.rs"},"region":{"startLine":867}}}],"partialFingerprints":{"codehealthFindingId/v1":"e188441bd294960033f42d12a841ab9317e3da7f51bc8d7c1a0ae5ad5b13b30f"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_base::browser::download_bridge_release: FunctionTooLong \u2014 jcode_base::browser::download_bridge_release runs 117 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 17 over it, 1.17\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/browser.rs"},"region":{"startLine":553}}}],"partialFingerprints":{"codehealthFindingId/v1":"36cb2aadcab4700d52811d53d84a9438fcd61affe0b6ee369482a1a345bb2a26"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_base::gateway::handle_ws_connection: FunctionTooLong \u2014 jcode_base::gateway::handle_ws_connection runs 117 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 17 over it, 1.17\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/gateway.rs"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9c265d81c26f0d4ef8a98089f7c6be76bcfcb91456987a30a4b0317bdfcf4c7"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: PermissionsApp.render_detail: MethodTooLong \u2014 render_detail runs 117 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 17 over it, 1.17\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-permissions/src/lib.rs"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e7331ebf632c14a80aba77fa3d701008c6427d36c737ec7bfea54eed8bc5072"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.start_gemini_login: MethodTooLong \u2014 start_gemini_login runs 117 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 17 over it, 1.17\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth.rs"},"region":{"startLine":1249}}}],"partialFingerprints":{"codehealthFindingId/v1":"0019f90d417337ffbe2983fe4a082eb07652e17b8835bee621e5412df19fecb0"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::app::remote::handle_disconnected_key_internal: FunctionTooLong \u2014 jcode_tui::tui::app::remote::handle_disconnected_key_internal runs 117 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 17 over it, 1.17\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote.rs"},"region":{"startLine":2197}}}],"partialFingerprints":{"codehealthFindingId/v1":"f87195821388b4f0465daa93aa450e8f614f11e4a86c6d412b2bb3549b7dfa2b"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFunctions: jcode_base::auth::gemini: TooManyFunctions \u2014 35 free functions. The bar is 30 free functions; this is 5 over it, 1.17\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/gemini.rs"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"168e96c5b5173959fbcb0312678a2daf4e0c26edf1cbed98211c86fe6c57092d"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: ClientRuntimeMemoryTotals: TooManyFields \u2014 35 stored fields. The bar is 30 stored fields; this is 5 over it, 1.17\u00D7 the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member \u2014 each reader then names only the group it uses."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/runtime_memory_log.rs"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ef8b8905c4649fc890633fc69a8a2480c06480dbf0e65b33ce7a62a0861b75c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/chatgpt_web.rs: FileTooLong \u2014 583 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 83 over it, 1.17\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/chatgpt_web.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e81f2dab5d24300889558a73255bd228ea5e832d3054db06aada1f6f7037720"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: DiscoverToolsTool: ClassTooLong \u2014 466 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 1 methods, 3 blocks, lines 236-982. The bar is 400 significant lines; this is 66 over it, 1.17\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/discover.rs"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"f70ed4dd2d0b84477ca521ba49c592ef132a957ce9b9177465d7011ed2fba2d7"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/usage.rs: FileTooLong \u2014 580 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 80 over it, 1.16\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"57ffe4e51ac0a958e1f60bf280caa35b5b84ec3eb63859ae23349c2414807a14"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: BatchTool.execute: MethodTooLong \u2014 execute runs 116 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 16 over it, 1.16\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/batch.rs"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bc36d77d60dcff09b32aff547c8f820b762b7718ef4e0f69e381c4f28a40042"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_messages::render_compact_agent_notification: FunctionTooLong \u2014 jcode_tui::tui::ui_messages::render_compact_agent_notification runs 116 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 16 over it, 1.16\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":3350}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb7d1ee5f304638b5b42df782640d24f94dc6b70cf605e5409d25c68c0973751"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: selfdev/mod.rs: FileTooLong \u2014 579 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 79 over it, 1.16\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/selfdev/mod.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"59e276b3708b3b5931b4c3a3e39ed43cd58b96780fcb4609f7ca8dbbc1909eb1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tool/apply_patch.rs: FileTooLong \u2014 575 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 75 over it, 1.15\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/apply_patch.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bec3e151a82aee7ae1a916888f5aab4a0cd81fb70d140ae6bab862ddcf3d04ab"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/tui_lifecycle_runtime.rs: FileTooLong \u2014 575 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 65% of them inside a single declaration: App (4-572). The bar is 500 significant lines; this is 75 over it, 1.15\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tui_lifecycle_runtime.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a1e82944dcbac5c9dc78ac11627f84fce7e131960790f43526ddcb8ccae4309"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::catchup::render_markdown: FunctionTooLong \u2014 jcode_app_core::catchup::render_markdown runs 115 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 15 over it, 1.15\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/catchup.rs"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"e63f690d6d6db19337105f0be032a27cf2e3c5039ed0568d4995dea6ccd02e8f"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_base::auth::assessment_for_key: FunctionTooLong \u2014 jcode_base::auth::assessment_for_key runs 115 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 15 over it, 1.15\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/mod.rs"},"region":{"startLine":1119}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e1585f4fd54dcd6fa1b3e2d88e022be8f71bf2d4848efcd127712f2e8224abf"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_base::usage::fetch_anthropic_usage_data_uncached: FunctionTooLong \u2014 jcode_base::usage::fetch_anthropic_usage_data_uncached runs 115 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 15 over it, 1.15\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage.rs"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"98c720a6fa777c891456c90e7a97034491c34528975dffdcaf5c8cd9371cba88"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.poll_ssh_login: MethodTooLong \u2014 poll_ssh_login runs 115 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 15 over it, 1.15\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_remote.rs"},"region":{"startLine":540}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed3c9f3090bf7f200f6300f6befac3b75fe898095c0058a46490d29a03f5497d"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::app::input::handle_pre_control_shortcuts: FunctionTooLong \u2014 jcode_tui::tui::app::input::handle_pre_control_shortcuts runs 115 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 15 over it, 1.15\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":2359}}}],"partialFingerprints":{"codehealthFindingId/v1":"45a80fd07e94824171f71ea81223cf61350cdc23f424d462079b3a9f9f0f3a3a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.new_for_remote_with_options: MethodTooLong \u2014 new_for_remote_with_options runs 115 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 15 over it, 1.15\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tui_lifecycle.rs"},"region":{"startLine":1493}}}],"partialFingerprints":{"codehealthFindingId/v1":"51e01617e49ce15cb71bfbc2241b25137b45b4543d16d1f68805c567d66246e7"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/commands_improve.rs: FileTooLong \u2014 574 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 74 over it, 1.15\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_improve.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d486f0a9c6ff827c2f6e7737755988598b058376e2b410155601ce5c7359b320"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: Sidecar: ClassTooLong \u2014 459 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 21 methods, 3 blocks, lines 141-860. The bar is 400 significant lines; this is 59 over it, 1.15\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/sidecar.rs"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"f191fadaf018e8293b921a225aa9cb1b9f5713f55b5761f8b750b09df049a807"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/conversation_state.rs: FileTooLong \u2014 571 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 100% of them inside a single declaration: App (3-855). The bar is 500 significant lines; this is 71 over it, 1.14\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/conversation_state.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab7f7cb2e3aec37d7e9a1d14004b29b6d815ae7000e66234c67dcfc686d62ea5"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: server/group_transfer.rs: FileTooLong \u2014 569 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 69 over it, 1.14\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/group_transfer.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7eceffc8d6a16b4e736948ded57f84dbdb9bb6446e02e206d40aa21e4e576f91"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 567 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 67 over it, 1.13\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-visual-debug/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"edb4c1175079be5159127065c597c349aec7e63602c201585e86243ab88be470"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFunctions: jcode_base::auth::cursor: TooManyFunctions \u2014 34 free functions. The bar is 30 free functions; this is 4 over it, 1.13\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/cursor.rs"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc4045b49d3ed49dbd6cf100c184d2f5f576fb9c4d1407d23c189cd376eb2482"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: SkillRegistry: TooManyMethods \u2014 34 methods, declared across 2 files: src/skill.rs (33), skill/invocation.rs (1). The bar is 30 methods; this is 4 over it, 1.13\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/skill.rs"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"d682e12e2b919f9e6053a45d379771b6da5464737112a80ec36436fd91f4f7ca"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFunctions: jcode_tui_style::theme: TooManyFunctions \u2014 34 free functions. The bar is 30 free functions; this is 4 over it, 1.13\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-style/src/theme.rs"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e162e9aa754df6e7ce3e700e8cb735e4339737e6063f0406d6bbd206dfae497"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: provider/startup.rs: FileTooLong \u2014 566 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 99% of them inside a single declaration: MultiProvider (11-815). The bar is 500 significant lines; this is 66 over it, 1.13\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/startup.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"be697c6770e78ae1ee2edff1e6fc957b36292e88b0a19bb83c44b384d2579685"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/skill.rs: FileTooLong \u2014 566 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 60% of them inside a single declaration: SkillRegistry (2 blocks, 45-728). The bar is 500 significant lines; this is 66 over it, 1.13\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/skill.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"403f3f4c03e6ff77d17f2ac8bcc012e5269dc8da42be8ae9aa85d1978442c8a4"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.trigger_provider_auth_changed: MethodTooLong \u2014 trigger_provider_auth_changed runs 113 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 13 over it, 1.13\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth.rs"},"region":{"startLine":2638}}}],"partialFingerprints":{"codehealthFindingId/v1":"b914073d865ef7d1ed312b6c6936780c05056c146c41aabf946a5e52d37d38ce"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode::cli::dispatch::subcommand_mapping::map_cloud_sessions_subcommand: FunctionTooLong \u2014 jcode::cli::dispatch::subcommand_mapping::map_cloud_sessions_subcommand runs 113 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 13 over it, 1.13\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/dispatch/subcommand_mapping.rs"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"6406b4b54aab5852b400d4e76e7a05550ae938b7ed01ebb6437d2c68095326f3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/replay.rs: FileTooLong \u2014 562 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 62 over it, 1.12\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/replay.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c5661983d678a6d97bfdc2550c8920289cbea747ddda11462e526a119f793f7"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 562 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 33 free functions. The bar is 500 significant lines; this is 62 over it, 1.12\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-todo-policy/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d389e58270fbec4985c44b9aa45dfc727406e2cdba43d6b259d3247a398219fd"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::tool::apply_patch::parse_apply_patch: FunctionTooLong \u2014 jcode_app_core::tool::apply_patch::parse_apply_patch runs 112 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 12 over it, 1.12\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/apply_patch.rs"},"region":{"startLine":661}}}],"partialFingerprints":{"codehealthFindingId/v1":"82ba96e7a0a36feafd43ac7edcba5d964cf42339dbc895abd3490e0b96d1efea"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MultiProvider.refresh_catalogs: MethodTooLong \u2014 refresh_catalogs runs 112 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 12 over it, 1.12\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/catalog_refresh.rs"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"06bcd8c4ec4a712e95a944d4ec2b84c4747d7929e3f458140c5bedb8698db080"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_base::provider::catalog_routes::simplified_model_routes_for_picker: FunctionTooLong \u2014 jcode_base::provider::catalog_routes::simplified_model_routes_for_picker runs 112 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 12 over it, 1.12\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/catalog_routes.rs"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed2f7e6d762a50678f6331b98385a6cb776d8470f8972a402234f6d870a5e753"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_provider_doctor::live_provider_probes::consume_native_stream: FunctionTooLong \u2014 jcode_provider_doctor::live_provider_probes::consume_native_stream runs 112 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 12 over it, 1.12\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/live_provider_probes.rs"},"region":{"startLine":595}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b3cf3d8635236f195af491910f9ccd32afbe8d4ec4f8e49b96ea68057cacb74"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ResponsesStream.parse_event: MethodTooLong \u2014 parse_event runs 112 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 12 over it, 1.12\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/opencode_go_responses.rs"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"5babb639ed9f2cc1c729421edc3017cc53f3a85e8d91ebd0ac855ab1cfd2e9ad"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode::cli::cloud_move::merge_back: FunctionTooLong \u2014 jcode::cli::cloud_move::merge_back runs 112 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 12 over it, 1.12\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_move.rs"},"region":{"startLine":1911}}}],"partialFingerprints":{"codehealthFindingId/v1":"86f9bb9b2ce4942c29f0f54ccddb7b8e2ad0ac55022e948dfc5927c1e519667a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: server/comm_plan.rs: FileTooLong \u2014 559 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 59 over it, 1.12\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_plan.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c9545313fc85027956598f024e08b07263eed39ab9205d98242bc05df3f2b5d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: key_handling/key_events.rs: FileTooLong \u2014 559 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 59 over it, 1.12\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/key_handling/key_events.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4450599c2c052c3eb517e71bcb9fc0151769d2ac6137d2e1ed1fdb6743f72970"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tui/ui_header.rs: FileTooLong \u2014 557 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 57 over it, 1.11\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_header.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6820e16a622e480a727c55696383dfd99d281643a46a12b0b3320f888d49e70"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::reload::graceful_shutdown_sessions_with_timeout: FunctionTooLong \u2014 jcode_app_core::server::reload::graceful_shutdown_sessions_with_timeout runs 111 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 11 over it, 1.11\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/reload.rs"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b465aee4bca550c2fe528f774d5142576267ede8c4a1a8d659716f12ad19395"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::tool::browser_fast::scoped: FunctionTooLong \u2014 jcode_app_core::tool::browser_fast::scoped runs 111 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 11 over it, 1.11\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/browser_fast.rs"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"3013b5721a89b4929af8ea6c5eeffe344e8635819cdda3ec84786c85a631d57d"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::tool::todo_names::normalize_public_input: FunctionTooLong \u2014 jcode_app_core::tool::todo_names::normalize_public_input runs 111 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 11 over it, 1.11\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/todo_names.rs"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"954f79ddf16ee240ff527b5a2f2c0028180821d5402b06223d061e255d75fd2d"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode::cli::cloud_move::export_return_archive: FunctionTooLong \u2014 jcode::cli::cloud_move::export_return_archive runs 111 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 11 over it, 1.11\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_move.rs"},"region":{"startLine":1228}}}],"partialFingerprints":{"codehealthFindingId/v1":"1495de24f1c6392cfdb687b7c77139d3dbe92166ef615fe18cc178cddeb54f9b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 554 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 33 free functions. The bar is 500 significant lines; this is 54 over it, 1.11\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c71b40da5d8c242c8669fee801c2e0b9823432f50ccc0b28fd6d274b3ceaac2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/jev.rs: FileTooLong \u2014 553 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 53 over it, 1.11\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/jev.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"98be060ddb5eb768cdcd5f1b701e38ec6d104911c54e77097da45a6a325bb8b7"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: ScrollTestState: TooManyFields \u2014 33 stored fields beside 2 methods. The bar is 30 stored fields; this is 3 over it, 1.10\u00D7 the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member \u2014 each reader then names only the group it uses."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug.rs"},"region":{"startLine":459}}}],"partialFingerprints":{"codehealthFindingId/v1":"8883544dfea2c3aa2521770f64f434546d8a99ab274cddd138e34db0a9bc0be1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/wire.rs: FileTooLong \u2014 550 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 96% of them inside a single declaration: Request (2 blocks, 36-945). The bar is 500 significant lines; this is 50 over it, 1.10\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-protocol/src/wire.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9fb6a248d77776fb15f91477de31729cdb7461a3cd0cde617c1bcf583261440"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::client_actions::handle_set_feature: FunctionTooLong \u2014 jcode_app_core::server::client_actions::handle_set_feature runs 110 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 10 over it, 1.10\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_actions.rs"},"region":{"startLine":447}}}],"partialFingerprints":{"codehealthFindingId/v1":"837748988e57fb9d28c85bd0a17fda4838f62f25b182a79d503953c580b176b2"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui_style::harmony::generate::separate_confusable_pairs: FunctionTooLong \u2014 jcode_tui_style::harmony::generate::separate_confusable_pairs runs 110 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 10 over it, 1.10\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-style/src/harmony/generate.rs"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"912918e825b70a5e63beb50bbd9ce94c9dc00334311fe4d9d9ca5a12462a1f40"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.build_claude_inline_account_picker: MethodTooLong \u2014 build_claude_inline_account_picker runs 110 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 10 over it, 1.10\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker.rs"},"region":{"startLine":748}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f3bc961d2a479d1d254847cd0680e37c9f0b486ee16adc382a335534f2f5df4"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::info_widget_cloud::render_cloud_widget: FunctionTooLong \u2014 jcode_tui::tui::info_widget_cloud::render_cloud_widget runs 110 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 10 over it, 1.10\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_cloud.rs"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"51997df4d6f51089ac4a4cc709a2c04109d13a1796b9c7dd1feea482fa35315a"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_pinned::render_side_panel_markdown_cached_with_zoom_and_profile_area: FunctionTooLong \u2014 jcode_tui::tui::ui_pinned::render_side_panel_markdown_cached_with_zoom_and_profile_area runs 110 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 10 over it, 1.10\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_pinned.rs"},"region":{"startLine":975}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e88a310b12b8224028b5b98921cae6fe1d02e21e48db1c512b81380401bf684"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: McpManagementTool: ClassTooLong \u2014 439 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 8 methods, 5 blocks, lines 576-1190. The bar is 400 significant lines; this is 39 over it, 1.10\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/mcp.rs"},"region":{"startLine":576}}}],"partialFingerprints":{"codehealthFindingId/v1":"45ab55c118639cd27fb9d17a28de71d191262d7951786be2605f9382aa7ecd2b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/launch.rs: FileTooLong \u2014 547 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 47 over it, 1.09\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-sdk/src/launch.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc98ab54b9b615675747021e4ade341b1ce881bab57b64ca0d59a2761b79578c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 545 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 45 over it, 1.09\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5337b12e373bab9de86999f2d70af280b36e70a6348e81fb017d8dbc63a2d030"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::comm_plan::handle_comm_reject_plan: FunctionTooLong \u2014 jcode_app_core::server::comm_plan::handle_comm_reject_plan runs 109 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 9 over it, 1.09\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_plan.rs"},"region":{"startLine":575}}}],"partialFingerprints":{"codehealthFindingId/v1":"6109760524e61c40e79b22280dca14241938d9ea36dc848bd75b996046aa171e"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::runtime_ssh_accounts::execute: FunctionTooLong \u2014 jcode_app_core::server::runtime_ssh_accounts::execute runs 109 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 9 over it, 1.09\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/runtime_ssh_accounts.rs"},"region":{"startLine":380}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e8be61ec3836772f8c9be3bf090876af0299193b223e2335427cab854fd62e3"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AntigravityProvider.generate_content: MethodTooLong \u2014 generate_content runs 109 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 9 over it, 1.09\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-antigravity-runtime/src/lib.rs"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1e0b2541b3090363faae6d645b91b7a073dde25844e28912040f7db2ac63a3a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: OpenRouterProvider.new: MethodTooLong \u2014 new runs 109 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 9 over it, 1.09\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/lib.rs"},"region":{"startLine":1600}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5d5e6bc5680d20329fc73ff8747f3fea640f6efef26d7764bdbdda9a7f2ace8"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_render_core::preprocess::escape_currency_dollars: FunctionTooLong \u2014 jcode_render_core::preprocess::escape_currency_dollars runs 109 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 9 over it, 1.09\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/preprocess.rs"},"region":{"startLine":779}}}],"partialFingerprints":{"codehealthFindingId/v1":"df69f0965cac592b9b84d3671fffad9d45eb62ad355232154f264428304b7014"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.handle_copy_selection_mouse_with: MethodTooLong \u2014 handle_copy_selection_mouse_with runs 109 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 9 over it, 1.09\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/copy_selection.rs"},"region":{"startLine":558}}}],"partialFingerprints":{"codehealthFindingId/v1":"e310be7f2bfaf6fa5e4e42f0c586477e35d597a74b3631d936f59aece1279a54"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.run_widget_stability: MethodTooLong \u2014 run_widget_stability runs 109 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 9 over it, 1.09\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_bench.rs"},"region":{"startLine":1137}}}],"partialFingerprints":{"codehealthFindingId/v1":"b58fc21682b34410d3c4f25b6dfbcafe5cc4d71b2e0bbeae046c08d615aace81"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.offer_fallback_after_error_with_payload: MethodTooLong \u2014 offer_fallback_after_error_with_payload runs 109 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 9 over it, 1.09\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/model_context.rs"},"region":{"startLine":717}}}],"partialFingerprints":{"codehealthFindingId/v1":"da588a27fb2e5c1ebef1cc2ddc7d447d9bad977b9a7b8aeed54a33ef6d06ae4c"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::info_widget::render_ambient_widget: FunctionTooLong \u2014 jcode_tui::tui::info_widget::render_ambient_widget runs 109 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 9 over it, 1.09\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget.rs"},"region":{"startLine":1857}}}],"partialFingerprints":{"codehealthFindingId/v1":"9187435e48da5f9ad5ba8f1ea0ccc1e3e36fbd3fe2cb376daab38723c752eba6"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SessionPicker.render_session_item_lines_at_frame: MethodTooLong \u2014 render_session_item_lines_at_frame runs 109 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 9 over it, 1.09\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/render.rs"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"c675e5d28f85e1b882dd733e0b254e4cfa2af62af3eccdd8652b42d52efdafac"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_file_diff::build_file_diff_cache_entry: FunctionTooLong \u2014 jcode_tui::tui::ui_file_diff::build_file_diff_cache_entry runs 109 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 9 over it, 1.09\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_file_diff.rs"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"c540a56c0080c1e663c3f3eaae719b19df689e834ffd4387ce41910dad4a6e5f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Listener.poll: MethodTooLong \u2014 poll runs 109 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 9 over it, 1.09\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-voice/src/global/hotkey.rs"},"region":{"startLine":694}}}],"partialFingerprints":{"codehealthFindingId/v1":"79b3caab0698ff7a331a38dcd72804c8c6072cd30a1073450b322613aa22eda4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/markdown_latex_image.rs: FileTooLong \u2014 544 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 37 free functions. The bar is 500 significant lines; this is 44 over it, 1.09\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_latex_image.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ff6b9eae34fda2e104d7aaf6d3deb4cc19215f39da304eee99a42eb6b7f1066"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AuthStatus.method_detail_for_provider: MethodTooLong \u2014 method_detail_for_provider runs 108 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 8 over it, 1.08\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/status_detail.rs"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae7f167e7182c9a91933dc728c5886cca0d9c666201a503d2e391fbd81105de5"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: BackgroundTaskManager.wait: MethodTooLong \u2014 wait runs 108 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 8 over it, 1.08\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/background.rs"},"region":{"startLine":968}}}],"partialFingerprints":{"codehealthFindingId/v1":"66f0b35a30741f91dcc92de75f6c775e3ea56a770b8183652c66212b1b03dc64"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: BedrockProvider.model_info: MethodTooLong \u2014 model_info runs 108 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 8 over it, 1.08\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-bedrock/src/lib.rs"},"region":{"startLine":853}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd8337f519a17fd55696b239a3b398c3ede2d39b7251128494d16f5efe46f16f"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_header::build_persistent_header_with_auth: FunctionTooLong \u2014 jcode_tui::tui::ui_header::build_persistent_header_with_auth runs 108 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 8 over it, 1.08\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_header.rs"},"region":{"startLine":705}}}],"partialFingerprints":{"codehealthFindingId/v1":"a17367b1df20121ab502f80ee9d043278673af62d774ed7eec244d3283eb1520"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: server/background_tasks.rs: FileTooLong \u2014 535 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 35 over it, 1.07\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/background_tasks.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d1a4a737b43208d447642393f0f5a08b3bde7bb9d044f9a8f175fcc2dd60302"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/report_info.rs: FileTooLong \u2014 534 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 34 over it, 1.07\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands/report_info.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4575697c49edbfa4f11fd1e18c4d7d0145093f1c9a3dabf28384e046b4c325c"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: CopilotApiProvider: TooManyMethods \u2014 32 methods, declared across 2 files: src/lib.rs (27), src/catalog.rs (5). The bar is 30 methods; this is 2 over it, 1.07\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-copilot-runtime/src/lib.rs"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0f2ab5a7a0a6b3ac0a60a682b3877361db6b6ddf2f509b1627c05a3243d1a86"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: MermaidMemoryProfile: TooManyFields \u2014 32 stored fields. The bar is 30 stored fields; this is 2 over it, 1.07\u00D7 the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member \u2014 each reader then names only the group it uses."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/lib.rs"},"region":{"startLine":1349}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8022d257f195b5e4c6a3e49039b1fec31d71a99f2552f17c3d35576ca340feb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 532 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 33 free functions. The bar is 500 significant lines; this is 32 over it, 1.06\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-compaction-core/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"410b8680a2bad526d23a15d49a2a5263023774e53cb338119a15927097bad59c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ui_header/account_router.rs: FileTooLong \u2014 532 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 32 over it, 1.06\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_header/account_router.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dab5f9c6d7d6f87042b67a597f1722849ea2eb206531bfb2a258e4b85c7ca1c7"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::update::download_and_install_blocking_with_progress: FunctionTooLong \u2014 jcode_app_core::update::download_and_install_blocking_with_progress runs 106 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 6 over it, 1.06\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/update.rs"},"region":{"startLine":960}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fc9c82648dcfa9126bafd6294e73d3d1691106fa069e6dcf79603237622a693"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_base::auth::transfer::import_cloud_inner: FunctionTooLong \u2014 jcode_base::auth::transfer::import_cloud_inner runs 106 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 6 over it, 1.06\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/transfer.rs"},"region":{"startLine":1016}}}],"partialFingerprints":{"codehealthFindingId/v1":"688022e254153c476b562e182c30e75b9699e868a88853d1689a13646e5d1df2"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_base::memory_log::log_event: FunctionTooLong \u2014 jcode_base::memory_log::log_event runs 106 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 6 over it, 1.06\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory_log.rs"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"975a62f9aea641e5c43c39b9c625c6038a14f86e276314572370dd59d1124b41"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_provider_doctor::live_provider_probes::run_live_openai_compatible_tool_smoke: FunctionTooLong \u2014 jcode_provider_doctor::live_provider_probes::run_live_openai_compatible_tool_smoke runs 106 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 6 over it, 1.06\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/live_provider_probes.rs"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"4751ac1de9054c39079f93adfd024a6671e995f413566127453601cfc802e1f4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 525 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 25 over it, 1.05\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-plan/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4a201f316fe94eaa8fd455ab3c43fc51a4d60eb8dcc7aaf00fcef20093921f2"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ConversationSearchTool.execute: MethodTooLong \u2014 execute runs 105 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 5 over it, 1.05\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/conversation_search.rs"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"305c8a776e606e9fe62654e140823ec04980220535fb8385928d00d0cb8ffa9c"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_provider_copilot::build_messages: FunctionTooLong \u2014 jcode_provider_copilot::build_messages runs 105 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 5 over it, 1.05\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-copilot/src/lib.rs"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4392d21c98ecb9c3c829277b391deddb29555aa5b6a07d476c66475d3adac0b"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_provider_openai::stream::handle_openai_output_item: FunctionTooLong \u2014 jcode_provider_openai::stream::handle_openai_output_item runs 105 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 5 over it, 1.05\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai/src/stream.rs"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"e44806ac72ed14972e65c857f00692b7b0d052d32fdb777b39f772ab63c43cd1"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::app::remote::apply_terminal_event: FunctionTooLong \u2014 jcode_tui::tui::app::remote::apply_terminal_event runs 105 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 5 over it, 1.05\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote.rs"},"region":{"startLine":582}}}],"partialFingerprints":{"codehealthFindingId/v1":"94df31b81210a18b0cdc1d999274d9c185cfd02302cffcdeab7c4c4f1c519a22"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_inline_interactive::model_suggestion_lines: FunctionTooLong \u2014 jcode_tui::tui::ui_inline_interactive::model_suggestion_lines runs 105 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 5 over it, 1.05\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_inline_interactive.rs"},"region":{"startLine":457}}}],"partialFingerprints":{"codehealthFindingId/v1":"e45aabe599a8b39ea9051ed53c24f12a6a5e03dd75fbd3f06426a59580fa7e8e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/goal.rs: FileTooLong \u2014 521 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 33 free functions. The bar is 500 significant lines; this is 21 over it, 1.04\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/goal.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7b8466dcaa22b9e9095327086c93f81e2449ff2dd95699fe56d24328846ef3a"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::app::auth_account_commands::diagnostics::render_provider_settings_markdown: FunctionTooLong \u2014 jcode_tui::tui::app::auth_account_commands::diagnostics::render_provider_settings_markdown runs 104 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 4 over it, 1.04\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_commands/diagnostics.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cc23b71f5be9fc2925b96a899565336b5932827f1e24350e691924831e80c66"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::memory_profile::build_transcript_memory_profile: FunctionTooLong \u2014 jcode_tui::tui::memory_profile::build_transcript_memory_profile runs 104 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 4 over it, 1.04\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/memory_profile.rs"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"361b07523fce7131f99a05b52f3d374828e8dd2732ea4526adc1542098ac4039"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: GmailClient: TooManyMethods \u2014 31 methods. The bar is 30 methods; this is 1 over it, 1.03\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/gmail.rs"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"49932667697b282201aade1f3bfcf62950f3c109711d61ea4b9bba7d13b7aff8"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFunctions: jcode_base::memory::pending: TooManyFunctions \u2014 31 free functions. The bar is 30 free functions; this is 1 over it, 1.03\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory/pending.rs"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1d7eb2840fa7f57f8258a618dc7add256807f658e69a9dd5ea9ee333adf008a"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFunctions: jcode_tui::tui::keybind: TooManyFunctions \u2014 31 free functions. The bar is 30 free functions; this is 1 over it, 1.03\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/keybind.rs"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe9bb60a2526fb9ad341c61b595d788bd33372f9a55aa841a49827bd48252412"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFunctions: jcode_tui::tui::redraw_schedule: TooManyFunctions \u2014 31 free functions. The bar is 30 free functions; this is 1 over it, 1.03\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/redraw_schedule.rs"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcfa0507af0a358dfc16da12a1a96e96d211f45fbf94b0f9bfc47efaf3961905"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: SessionStartupStub: TooManyFields \u2014 31 stored fields. The bar is 30 stored fields; this is 1 over it, 1.03\u00D7 the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member \u2014 each reader then names only the group it uses."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session.rs"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"d891984f9da996a7123606388413ca92032ce837b53c4e04b002ec297c1eea49"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: RemoteStartupSessionSnapshot: TooManyFields \u2014 31 stored fields. The bar is 30 stored fields; this is 1 over it, 1.03\u00D7 the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member \u2014 each reader then names only the group it uses."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session.rs"},"region":{"startLine":1738}}}],"partialFingerprints":{"codehealthFindingId/v1":"12d64b43311e7819e657926a80e673972f1cb764e590912ae9d069a4911f2c3d"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: SessionJournalMeta: TooManyFields \u2014 31 stored fields. The bar is 30 stored fields; this is 1 over it, 1.03\u00D7 the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member \u2014 each reader then names only the group it uses."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/journal.rs"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f6c8b3340841b4c0c7c0e833b9fafb0d61f6fff08945180d741bd51837d383a"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::comm_session::handle_comm_spawn: FunctionTooLong \u2014 jcode_app_core::server::comm_session::handle_comm_spawn runs 103 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 3 over it, 1.03\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_session.rs"},"region":{"startLine":690}}}],"partialFingerprints":{"codehealthFindingId/v1":"a660f1d1a39b6358191ee3a148519b74ec13ddf1308cfd1b5bf489e80747e1b4"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::debug_testers::spawn_tester: FunctionTooLong \u2014 jcode_app_core::server::debug_testers::spawn_tester runs 103 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 3 over it, 1.03\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_testers.rs"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4bcdd12d72aecd3322564e890eadd132a436b7cef7c7e8d503c51793fc72e35"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::runtime_ssh_accounts::reset: FunctionTooLong \u2014 jcode_app_core::server::runtime_ssh_accounts::reset runs 103 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 3 over it, 1.03\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/runtime_ssh_accounts.rs"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"f785823a4e2cbd32c794d1ff1ea9417b83cb6005af4ac2e4eb37076ed3fbc84e"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::tool::bash::parse_heuristic_progress: FunctionTooLong \u2014 jcode_app_core::tool::bash::parse_heuristic_progress runs 103 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 3 over it, 1.03\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/bash.rs"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bfedba25dc5cf87e96a9bc9f9d61934d2de4aa1f860c70283845d82d815a597"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::tool::browser_jev::request_body_for_model: FunctionTooLong \u2014 jcode_app_core::tool::browser_jev::request_body_for_model runs 103 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 3 over it, 1.03\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/browser_jev.rs"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"42af4a9d4d85ec3d2bdc61fa390e7eb0186b58de8da8e1218bdb91f2f4d8471f"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_productivity_core::aggregate::build_report: FunctionTooLong \u2014 jcode_productivity_core::aggregate::build_report runs 103 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 3 over it, 1.03\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-productivity-core/src/aggregate.rs"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"42d1ec2dab7a22eb54f04034342b76636b53b60f87097e0e0cc3aa5d138288b4"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.save_input_for_reload: MethodTooLong \u2014 save_input_for_reload runs 103 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 3 over it, 1.03\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui.rs"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd3ee98c06572128a771f765b074cb1cd05112c2f206abfdbe78379195e3742c"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::info_widget_usage::render_usage_widget: FunctionTooLong \u2014 jcode_tui::tui::info_widget_usage::render_usage_widget runs 103 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 3 over it, 1.03\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_usage.rs"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"e142d098ff8c206f024bb559aeed398be4de8975a8dd3aacf4e9f34ed0b689e2"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode::cli::commands::build_jade_sessions_args_with_config: FunctionTooLong \u2014 jcode::cli::commands::build_jade_sessions_args_with_config runs 103 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 3 over it, 1.03\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":1232}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b140ef192317a9e6fdd3748e9ebbb5844ac05d1c6df9aa8517ebf5fe3105238"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/external_auth.rs: FileTooLong \u2014 514 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 14 over it, 1.03\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/external_auth.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e4b083b9179029515f2a7d4816e1e65f1fa5050630a092f942cd798af0ff4c0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: usage/api_keys.rs: FileTooLong \u2014 514 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 14 over it, 1.03\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/api_keys.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0836ff3eb44deee8a2ab8ed7feef9d434dfb8fdf24246a44ec2e9d48ba13a175"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: BenchState: ClassTooLong \u2014 411 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 4 methods, 4 blocks, lines 336-1199. The bar is 400 significant lines; this is 11 over it, 1.03\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/tui_bench.rs"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"55c2f2582d5fc7e496654577f57930ab3bad486b987d619f8fbf3bb966f18805"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: server/comm_await.rs: FileTooLong \u2014 513 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 13 over it, 1.03\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_await.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f17023e45eaed7c32eee66f385d4a7ce172baca6afc675e2a1ff673427c900f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: auth/muse.rs: FileTooLong \u2014 513 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 31 free functions. The bar is 500 significant lines; this is 13 over it, 1.03\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/muse.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1585f216294bdc1284e1ff4967c7e2ff65bba07e8842f7d6f3a530d58521ab6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: server/debug.rs: FileTooLong \u2014 510 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 10 over it, 1.02\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"58a79c3beeae541f9793df36e8169dd87665084cd1abc42cf0333eb06c49b2b9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: server/debug_command_exec.rs: FileTooLong \u2014 510 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 10 over it, 1.02\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_command_exec.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9eff2cb881c2fe64d30810bf2a4291c0e37ccb2efe7d33e3d5ef14b3dce18262"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::mobile_push::notify_turn: FunctionTooLong \u2014 jcode_app_core::mobile_push::notify_turn runs 102 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 2 over it, 1.02\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/mobile_push.rs"},"region":{"startLine":865}}}],"partialFingerprints":{"codehealthFindingId/v1":"a37441760cc39e6c36dce0fddf0f4090fd48cf2102aa7cf6e4feda23f691285b"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::live_turn::spawn_tracked_live_turn: FunctionTooLong \u2014 jcode_app_core::server::live_turn::spawn_tracked_live_turn runs 102 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 2 over it, 1.02\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/live_turn.rs"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"e30d924184d2cd461459daea63384ac64d42397de42a4e523c8f8c5af22531fb"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_input::live_processing_status_line: FunctionTooLong \u2014 jcode_tui::tui::ui_input::live_processing_status_line runs 102 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 2 over it, 1.02\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_input.rs"},"region":{"startLine":679}}}],"partialFingerprints":{"codehealthFindingId/v1":"482170841801a83b63832c2bcd0e582651c3946ce1741c994b932bb58c6cb802"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui::tui::ui_messages::gmail_drafts::render_gmail_draft_card: FunctionTooLong \u2014 jcode_tui::tui::ui_messages::gmail_drafts::render_gmail_draft_card runs 102 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 2 over it, 1.02\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages/gmail_drafts.rs"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7915bb1df2423e3052133ef352a5876bef1b500acf6e6cd97b6f97558d093d0"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode::bin::memory_recall_bench::cmd_queries: FunctionTooLong \u2014 jcode::bin::memory_recall_bench::cmd_queries runs 102 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 2 over it, 1.02\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bc12176cf8701c5aee8f983f797cd324bc8d34b7bf7d55abaea4d61aee3b4c3"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode::cli::commands::todo_followup::prepare_run_todo_follow_up: FunctionTooLong \u2014 jcode::cli::commands::todo_followup::prepare_run_todo_follow_up runs 102 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 2 over it, 1.02\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands/todo_followup.rs"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"edf4097aab80f9bd754597ee6dacd85c946f716fe5f49624847e0ec398605ad5"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: app/auth_remote.rs: FileTooLong \u2014 507 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), about 90% of them inside a single declaration: App (76-694). The bar is 500 significant lines; this is 7 over it, 1.01\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_remote.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb808ab9bbf3fe36a9cc8d1d45cc11266ba67d51c4075e1d5ca9327d3ba71416"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: BashTool: ClassTooLong \u2014 405 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 5 methods, 3 blocks, lines 775-1430. The bar is 400 significant lines; this is 5 over it, 1.01\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/bash.rs"},"region":{"startLine":773}}}],"partialFingerprints":{"codehealthFindingId/v1":"470f9a71b5c315c6f3b47e0109fd25947a28f39b1cfa7240e7466de71f463063"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::client_actions::handle_run_subagent: FunctionTooLong \u2014 jcode_app_core::server::client_actions::handle_run_subagent runs 101 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 1 over it, 1.01\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_actions.rs"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f2a709e97c11219e69decea4734324f3cfcd1e83db990fa8647aa391ebb100b"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_app_core::server::client_comm_context::handle_comm_list: FunctionTooLong \u2014 jcode_app_core::server::client_comm_context::handle_comm_list runs 101 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 1 over it, 1.01\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_comm_context.rs"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a0ec24eb32e1ad8868bb486857e74c0f2b395951e7e3204cb145a646cd31662"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_setup_hints::run_setup_hotkey: FunctionTooLong \u2014 jcode_setup_hints::run_setup_hotkey runs 101 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 1 over it, 1.01\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/lib.rs"},"region":{"startLine":689}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4a5b2df15721c4f10225be3cdde464e8a27017a908291613897baf08e9e6975"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: jcode_tui_mermaid::mermaid_viewport::render_non_kitty_fit_stable: FunctionTooLong \u2014 jcode_tui_mermaid::mermaid_viewport::render_non_kitty_fit_stable runs 101 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 1 over it, 1.01\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_viewport.rs"},"region":{"startLine":1062}}}],"partialFingerprints":{"codehealthFindingId/v1":"86da5df792e49433d1a1bd71c33c5cb8bf70aac2acea0be5c454f1d67012c909"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.start_logout_all: MethodTooLong \u2014 start_logout_all runs 101 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 1 over it, 1.01\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth.rs"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"49d6716b23c0fe1a34a384f4a656ca11888396ac92c8d6c4749b7b3df09c6ce4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/markdown.rs: FileTooLong \u2014 502 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 2 over it, 1.00\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/markdown.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8a224893128b9e138c4ce89e586dd6cac25c4b98c11236c34fce751f64a1f09"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (3 members, 28 shared lines): crates/jcode-app-core/src/tool/discover.rs:991-1062 | crates/jcode-app-core/src/tool/discover.rs:1180-1256 | crates/jcode-app-core/src/tool/discover.rs:1261-1350 \u2014 These 3 members are variants of one another: a block of 28 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/discover.rs"},"region":{"startLine":991}}}],"partialFingerprints":{"codehealthFindingId/v1":"d42719ac79c0dd67b04ead04ebecbcf627a8db532c55d6bb05cea4d56c4e255d"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (849 shared lines): crates/jcode-tui-markdown/src/markdown_render_full.rs:28-1089 | crates/jcode-tui-markdown/src/markdown_render_lazy.rs:21-984 \u2014 These two members are variants of one another: 849 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_full.rs"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"020d30ed460712683bb546ecae8b430ecc1cb0103f98dbb770d0cbb37eeaf2d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (95 shared lines): crates/jcode-provider-anthropic-runtime/src/lib.rs:1282-1384 | crates/jcode-provider-anthropic-runtime/src/lib.rs:1728-1829 \u2014 These two members are variants of one another: 95 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic-runtime/src/lib.rs"},"region":{"startLine":1282}}}],"partialFingerprints":{"codehealthFindingId/v1":"92f24a591f97fac28e7b073bbfa5bb08b8257db3616dbcbb40ee2a48a4491131"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (92 shared lines): crates/jcode-provider-antigravity-runtime/src/lib.rs:456-771 | crates/jcode-provider-gemini-runtime/src/lib.rs:611-941 \u2014 These two members are variants of one another: 92 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-antigravity-runtime/src/lib.rs"},"region":{"startLine":456}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2516171b6300f3156754a2a889e398e3a141f7c7d381d62e6c685c91302bf53"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (89 shared lines): crates/jcode-tui-mermaid/src/mermaid_widget.rs:87-311 | crates/jcode-tui-mermaid/src/mermaid_widget.rs:341-548 \u2014 These two members are variants of one another: 89 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_widget.rs"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"7967ac5851537ea67704772f94c5dd3cd0ba48d195a20718a21bbb38648c4060"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (88 shared lines): crates/jcode-render-core/src/preprocess.rs:779-929 | crates/jcode-tui-markdown/src/markdown_text_preprocess.rs:3-126 \u2014 These two members are variants of one another: 88 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/preprocess.rs"},"region":{"startLine":779}}}],"partialFingerprints":{"codehealthFindingId/v1":"2579622cd49dc6a13e2660ff6332ae0dcc9ae97a25a538e9e07c95bfdbb3f060"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (82 shared lines): crates/jcode-base/src/background.rs:449-633 | crates/jcode-base/src/background.rs:661-850 \u2014 These two members are variants of one another: 82 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/background.rs"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf4b68534e1ca8c8f681955decf9e2b5a073c96171451818dfc0a799db53e201"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (53 shared lines): crates/jcode-tui/src/tui/ui_prepare.rs:2650-2744 | crates/jcode-tui/src/tui/ui_prepare.rs:2771-2936 \u2014 These two members are variants of one another: 53 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_prepare.rs"},"region":{"startLine":2650}}}],"partialFingerprints":{"codehealthFindingId/v1":"09083685ac4b4c0c66b8edff8e677aa692cdb36919f6fffa859ccd35b76098c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (48 shared lines): crates/jcode-base/src/provider/dispatch.rs:64-181 | crates/jcode-base/src/provider/dispatch.rs:191-356 \u2014 These two members are variants of one another: 48 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/dispatch.rs"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"98ee91d9d4ff8fd02d7911995a72b2ead3217b801c01a0644ecaab620f841911"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (47 shared lines): crates/jcode-tui/src/tui/login_picker.rs:679-752 | crates/jcode-tui/src/tui/login_picker.rs:754-827 \u2014 These two members are variants of one another: 47 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/login_picker.rs"},"region":{"startLine":679}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ee81d7ff2cbe674efd1f16168ae48a96a027e8445c1ce0a3f0cd06e5945a7d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (46 shared lines): crates/jcode-base/src/auth/oauth_callback_io.rs:93-183 | crates/jcode-base/src/auth/oauth_callback_io.rs:200-306 \u2014 These two members are variants of one another: 46 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/oauth_callback_io.rs"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"13d3fa3fd6e450aa0f71bd7b768a911c09f20a28e72a99289feef183c0cd7447"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (42 shared lines): crates/jcode-tui/src/tui/app/commands_improve.rs:456-523 | crates/jcode-tui/src/tui/app/commands_improve.rs:525-592 \u2014 These two members are variants of one another: 42 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_improve.rs"},"region":{"startLine":456}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba724a490346a7e2f934710be553be0fc9dcdf95b0f5eb2053bbf8f2c3920fc2"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (36 shared lines): crates/jcode-app-core/src/channel.rs:198-280 | crates/jcode-app-core/src/channel.rs:397-489 \u2014 These two members are variants of one another: 36 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/channel.rs"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"99307bd3eb71e2485d9e6ff2e48c8e50706a4db3f178b06e4bbafc7c2144d8dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (35 shared lines): crates/jcode-tui/src/tui/app/remote/reconnect.rs:270-371 | crates/jcode-tui/src/tui/app/remote/reconnect.rs:483-711 \u2014 These two members are variants of one another: 35 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/reconnect.rs"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"35cc2cbbce9b9bc933724aa7ee50cf1ed486b0dff4557bd2a1b000fc855e6100"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (35 corresponding lines): crates/jcode-tui-core/src/keybind.rs:65-99 | crates/jcode-tui/src/tui/keybind.rs:588-625 \u2014 These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-core/src/keybind.rs"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea866d3c38dfcd998af4a7285673f9f70c5ae966f718b2de8437ef2c5e69533f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): crates/jcode-app-core/src/usage_display.rs:32-65 | crates/jcode-base/src/usage/display.rs:32-72 \u2014 These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_display.rs"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"34c8abb9c89516bc12ecdc7eae57f7b65ea39d0685e253c0319f8efbd658f354"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (35 corresponding lines): crates/jcode-render-core/src/math.rs:193-257 | crates/jcode-tui-core/src/korean_input.rs:23-60 \u2014 These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/math.rs"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d49861b862b449af0f3e3e9b340ddb4299081e162b6bb945da2f628d48fe15e"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (9 members, 50\u002B identical tokens): crates/jcode-tui-account-picker/src/overlay.rs:458-496 | crates/jcode-tui-account-picker/src/overlay.rs:498-577 | crates/jcode-tui-account-picker/src/overlay.rs:579-771 | crates/jcode-tui-usage-overlay/src/lib.rs:440-505 | crates/jcode-tui-usage-overlay/src/lib.rs:507-588 | crates/jcode-tui-usage-overlay/src/lib.rs:590-638 | crates/jcode-tui/src/tui/login_picker.rs:346-402 | crates/jcode-tui/src/tui/login_picker.rs:404-470 | crates/jcode-tui/src/tui/login_picker.rs:472-593 \u2014 These 9 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 9 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay.rs"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"c40e43e5d0d99bca750ce2748dea53db9f11e74e8d9e27a1a6950d2fc135689b"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (7 members, 50\u002B identical tokens): crates/jcode-provider-doctor/src/live_provider_probes.rs:766-814 | crates/jcode-provider-doctor/src/live_provider_probes.rs:823-912 | crates/jcode-provider-doctor/src/live_provider_probes.rs:1094-1142 | crates/jcode-provider-doctor/src/live_provider_probes.rs:1151-1232 | crates/jcode-provider-doctor/src/live_provider_probes.rs:1286-1333 | crates/jcode-provider-doctor/src/live_provider_probes.rs:1344-1424 | crates/jcode-provider-doctor/src/live_provider_probes.rs:1447-1528 \u2014 These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/live_provider_probes.rs"},"region":{"startLine":766}}}],"partialFingerprints":{"codehealthFindingId/v1":"694e86fe7b5980469405a41deb8d614c5d3be9ff1ccbb8e58543e1c830c5fe58"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (7 members, 50\u002B identical tokens): crates/jcode-tui/src/tui/ui.rs:2607-2626 | crates/jcode-tui/src/tui/ui.rs:2634-2662 | crates/jcode-tui/src/tui/ui_file_diff.rs:9-41 | crates/jcode-tui/src/tui/ui_input.rs:2165-2397 | crates/jcode-tui/src/tui/ui_overlays.rs:20-136 | crates/jcode-tui/src/tui/ui_pinned_selection.rs:9-41 | crates/jcode-tui/src/tui/ui_viewport.rs:328-1363 \u2014 These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui.rs"},"region":{"startLine":2607}}}],"partialFingerprints":{"codehealthFindingId/v1":"28f96d6315542e06811a1abd82a7fcad0f978ed9e283addb98d37fd823362809"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): crates/jcode-tui/src/tui/ui_messages.rs:589-753 | crates/jcode-tui/src/tui/ui_messages.rs:2542-2630 | crates/jcode-tui/src/tui/ui_messages.rs:2686-2758 | crates/jcode-tui/src/tui/ui_messages.rs:2768-3017 | crates/jcode-tui/src/tui/ui_messages.rs:3160-3214 | crates/jcode-tui/src/tui/ui_messages/connection.rs:56-141 \u2014 These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":589}}}],"partialFingerprints":{"codehealthFindingId/v1":"88ac4d6e7b83565477a4d416b2acfab1a47e8009a02c4f9d32a56d51888fe35a"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): crates/jcode-app-core/src/tool/read.rs:401-442 | crates/jcode-base/src/provider/image_clamp.rs:404-443 | crates/jcode-terminal-image/src/display.rs:229-290 | crates/jcode-tui-mermaid/src/lib.rs:1506-1518 | crates/jcode-tui-mermaid/src/mermaid_inline.rs:269-346 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/read.rs"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"11c28f8f84f433aac010056fe00661132b464fc7a4940f2d1cc054b4dca7901a"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): crates/jcode-tui/src/tui/app/auth_account_picker.rs:466-746 | crates/jcode-tui/src/tui/app/auth_account_picker.rs:883-1029 | crates/jcode-tui/src/tui/app/auth_account_picker_saved_accounts.rs:210-272 | crates/jcode-tui/src/tui/app/auth_account_picker_saved_accounts.rs:391-448 | crates/jcode-tui/src/tui/login_picker.rs:754-827 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker.rs"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"18470e99051d518df8c76cc295cfa002e7e78116d6f307e1a8396160a0082a59"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): crates/jcode-tui/src/tui/keybind.rs:64-83 | crates/jcode-tui/src/tui/keybind.rs:647-660 | crates/jcode-tui/src/tui/keybind.rs:664-677 | crates/jcode-tui/src/tui/keybind.rs:681-694 | crates/jcode-tui/src/tui/keybind.rs:698-711 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/keybind.rs"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dd57158e86a9ced4aa3a151ea171483ced5bb51cb5ecc8d3ed708d8b8a42750"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/jcode-app-core/src/agent/status.rs:77-119 | crates/jcode-app-core/src/agent/turn_execution.rs:1564-1670 | crates/jcode-app-core/src/tool/conversation_search.rs:83-234 | crates/jcode-base/src/memory_agent.rs:34-79 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/status.rs"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f241c1a8c2f1738061222b63ce5e20582990eb31365f4dc891e3e363b08be16"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/jcode-app-core/src/server/comm_session.rs:33-46 | crates/jcode-app-core/src/server/swarm_persistence.rs:34-45 | crates/jcode-app-core/src/server/swarm_persistence.rs:47-58 | crates/jcode-base/src/usage/flight.rs:13-25 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_session.rs"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"c600964eefc77f5bba910787e9aed0f83bcb103cedd3778116c485abe24d6a5b"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/jcode-app-core/src/tool/session_search.rs:866-907 | crates/jcode-app-core/src/tool/session_search.rs:938-974 | crates/jcode-app-core/src/tool/session_search.rs:1145-1183 | crates/jcode-app-core/src/tool/session_search.rs:1251-1320 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/session_search.rs"},"region":{"startLine":866}}}],"partialFingerprints":{"codehealthFindingId/v1":"1423fbfa124c53cb490faef70d09a20a3a48aee6e934ca100cb56d778192b563"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/jcode-base/src/embedding_stub.rs:47-85 | crates/jcode-embedding/src/lib.rs:47-84 | crates/jcode-memory-types/src/graph.rs:50-87 | crates/jcode-memory-types/src/lib.rs:872-910 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/embedding_stub.rs"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"561e176ea5d73cfd445cabdffa868476cff26d544349ffc54807d3f13727b32a"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/jcode-core/src/panic_util.rs:1-9 | crates/jcode-pdf/src/lib.rs:22-30 | crates/jcode-tui-mermaid/src/lib.rs:194-202 | src/cli/terminal.rs:224-232 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-core/src/panic_util.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8582f6b7fd9b07c33dfe15d082d80f2f7ce9975cf7f97fb7e9294b7af4220f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/jcode-tui-render/src/lib.rs:71-110 | crates/jcode-tui-render/src/lib.rs:112-160 | crates/jcode-tui-render/src/swarm_tiles.rs:308-330 | crates/jcode-tui/src/tui/info_widget_usage.rs:453-480 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/lib.rs"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"5003091cb8ec0557b6eeb35382fbe5c4c78aa34a3f7c11d62bad883427b55da9"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/jcode-tui/src/tui/app/auth_account_picker.rs:466-746 | crates/jcode-tui/src/tui/app/auth_account_picker.rs:748-881 | crates/jcode-tui/src/tui/app/auth_account_picker_saved_accounts.rs:274-324 | crates/jcode-tui/src/tui/app/auth_account_picker_saved_accounts.rs:330-385 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker.rs"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"922061de931e26466d5283ca67d2a1fd30fc52aa038aa29d2776fa773d19980b"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/jcode-tui/src/tui/app/inline_interactive.rs:1161-1399 | crates/jcode-tui/src/tui/app/inline_interactive.rs:1498-1619 | crates/jcode-tui/src/tui/app/inline_interactive.rs:1673-2140 | crates/jcode-tui/src/tui/app/inline_interactive.rs:2236-2391 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":1161}}}],"partialFingerprints":{"codehealthFindingId/v1":"785f2592f50e4bd750ed8fbe903e942f31ce406486b3c4878ba8195564dc1cde"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (82 corresponding lines): crates/jcode-tui-anim/src/lib.rs:193-274 | crates/jcode-tui-anim/src/lib.rs:283-382 \u2014 These two members are one piece of code written twice and then edited apart: 82 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-anim/src/lib.rs"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"86244b4632632df9c1b81f58b616bdcd81a4585707a89d32c2569c471a9c9f25"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (92 corresponding lines): crates/jcode-app-core/src/session_launch.rs:660-751 | crates/jcode-app-core/src/session_launch.rs:785-876 \u2014 These two members are one piece of code written twice and then edited apart: 92 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/session_launch.rs"},"region":{"startLine":660}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a74b8e9447b5d56d51f7156bcf1f96816aa505f6a637897306bb4d617ea3076"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (95 corresponding lines): crates/jcode-app-core/src/usage_openai.rs:314-408 | crates/jcode-base/src/usage/openai_helpers.rs:339-441 \u2014 These two members are one piece of code written twice and then edited apart: 95 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_openai.rs"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7579297dd1c6a558c3c81d8026d5cac97def03b8312a3d6b8e7bbab62fd3dd7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (107 corresponding lines): src/cli/commands.rs:2871-2983 | src/cli/commands.rs:2988-3094 \u2014 These two members are one piece of code written twice and then edited apart: 107 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":2871}}}],"partialFingerprints":{"codehealthFindingId/v1":"d021aff76645bca6fd0fde60f21684666bdd04989071ba131d6a7fce1a424c65"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (82 corresponding lines): crates/jcode-tui/src/tui/session_picker/loading.rs:2284-2365 | crates/jcode-tui/src/tui/session_picker/loading/pi_sessions.rs:35-117 \u2014 These two members are one piece of code written twice and then edited apart: 82 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading.rs"},"region":{"startLine":2284}}}],"partialFingerprints":{"codehealthFindingId/v1":"afb1e014e0e1914931557c2fa80490760fcd084b4b56dde97c69ce0a40407614"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (96 corresponding lines): crates/jcode-tui/src/tui/app/commands_improve.rs:601-696 | crates/jcode-tui/src/tui/app/commands_improve.rs:698-793 \u2014 These two members are one piece of code written twice and then edited apart: 96 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_improve.rs"},"region":{"startLine":601}}}],"partialFingerprints":{"codehealthFindingId/v1":"868e6aaf222f354361deaa528b6f21b6d796db328f89a4e85f599c1f5a733fdd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (75 corresponding lines): crates/jcode-app-core/src/tool/session_search.rs:1378-1452 | crates/jcode-app-core/src/tool/session_search.rs:1506-1599 \u2014 These two members are one piece of code written twice and then edited apart: 75 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/session_search.rs"},"region":{"startLine":1378}}}],"partialFingerprints":{"codehealthFindingId/v1":"f329b88ea86983052ababafd4a49859ced01d80eb1d8643dc9bb8aa975c6144c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 61\u002B corresponding lines): crates/jcode-base/src/session/memory_profile.rs:61-134 | crates/jcode-tui/src/tui/app/debug.rs:347-412 | crates/jcode-tui/src/tui/memory_profile.rs:191-251 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 61 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/memory_profile.rs"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"137988a17aa7969ccae656b52d7c5bbbd40ae3bcef057d1f5a6b5538f95c9dc3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (70 corresponding lines): crates/jcode-tui/src/tui/session_picker.rs:389-458 | crates/jcode-tui/src/tui/session_picker.rs:527-620 \u2014 These two members are one piece of code written twice and then edited apart: 70 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker.rs"},"region":{"startLine":389}}}],"partialFingerprints":{"codehealthFindingId/v1":"4175f441c011f7a099d17c94272128af6660ece52c1991f0e71c11e86b1a3310"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (62 corresponding lines): crates/jcode-provider-bedrock/src/lib.rs:386-447 | crates/jcode-schema-dialect/src/dialect.rs:331-399 \u2014 These two members are one piece of code written twice and then edited apart: 62 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-bedrock/src/lib.rs"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"4808ab9ba11dbff7dda5bf355dbe610abc5459f5adf7f925d11362bf6c5c8929"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (52 corresponding lines): crates/jcode-tui-account-picker/src/overlay.rs:309-372 | crates/jcode-tui-usage-overlay/src/lib.rs:333-384 \u2014 These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay.rs"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"497bd13278cc8f2799e55a373fc3b891125fc47be0d4a82e44d1cea82b3ea220"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (63 corresponding lines): crates/jcode-render-core/src/preprocess.rs:69-132 | crates/jcode-render-core/src/preprocess.rs:141-203 \u2014 These two members are one piece of code written twice and then edited apart: 63 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/preprocess.rs"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"befaa70924c062fcad745b09d85a4c0c9a35c0e9459d52b4715817c4f4e1bb80"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (70 corresponding lines): crates/jcode-base/src/import.rs:201-270 | crates/jcode-base/src/import.rs:272-346 \u2014 These two members are one piece of code written twice and then edited apart: 70 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/import.rs"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8c60483045028de3d7cbda6cb8bc16b8f3dcfc564afcdad65ff39cd0bd0463a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (64 corresponding lines): crates/jcode-base/src/prompt.rs:390-453 | crates/jcode-base/src/prompt.rs:526-601 \u2014 These two members are one piece of code written twice and then edited apart: 64 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/prompt.rs"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3a02f29e138590929177463c6ff60ba7768d1e4a450ea0f134a75f0c6805934"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (51 corresponding lines): crates/jcode-base/src/session/crash.rs:68-118 | crates/jcode-base/src/session/crash.rs:204-268 \u2014 These two members are one piece of code written twice and then edited apart: 51 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/crash.rs"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"175a6e08ea32f7a7fd01133890612e67a5e82f685147a34e1eace09cd038183f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (57 corresponding lines): crates/jcode-app-core/src/message_notifications.rs:137-193 | crates/jcode-base/src/message/notifications.rs:492-557 \u2014 These two members are one piece of code written twice and then edited apart: 57 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/message_notifications.rs"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ade28e133c5a6621b223ad23ad07237bd29a097acb8783e65dd977326386813"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (41 corresponding lines): crates/jcode-app-core/src/server/runtime.rs:339-391 | crates/jcode-app-core/src/server/runtime.rs:398-438 \u2014 These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/runtime.rs"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6570570e047ef39d02f99ed46ecedc088448f588ddbf9cfabac514bb19d7f4e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (48 corresponding lines): crates/jcode-base/src/cloud_environment.rs:304-355 | crates/jcode-base/src/cloud_environment.rs:447-494 \u2014 These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/cloud_environment.rs"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ec9adf30956ddf8b7adc7b0ac8541c0e396517e241f56b8d868370ce8389c32"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 53\u002B corresponding lines): crates/jcode-tui-account-picker/src/overlay.rs:402-456 | crates/jcode-tui-usage-overlay/src/lib.rs:386-438 | crates/jcode-tui/src/tui/login_picker.rs:290-344 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 53 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay.rs"},"region":{"startLine":402}}}],"partialFingerprints":{"codehealthFindingId/v1":"236b60062d16c35c7352e5b2ba7a03d21df89a6a1e181fdab94ae7af7649c1b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (53 corresponding lines): crates/jcode-base/src/memory.rs:1226-1288 | crates/jcode-base/src/memory.rs:1291-1343 \u2014 These two members are one piece of code written twice and then edited apart: 53 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory.rs"},"region":{"startLine":1226}}}],"partialFingerprints":{"codehealthFindingId/v1":"349c877e38d5ae0fc3da3f5f533ed87eb02217b9d54566e6caf620465af3816d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (35 corresponding lines): crates/jcode-embedding/src/lib.rs:124-170 | crates/jcode-embedding/src/lib.rs:292-326 \u2014 These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-embedding/src/lib.rs"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d75c3cf6d9255e37ec61486dde8aa0e6d35cf2b849ec555c6a64b7cae769689"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (47 corresponding lines): crates/jcode-app-core/src/restart_snapshot.rs:78-134 | crates/jcode-app-core/src/restart_snapshot.rs:136-182 \u2014 These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/restart_snapshot.rs"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3b06a2c828d0f91daf886acddfaab6cbe62623d18061e1ab580a4578797dbb5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (38 corresponding lines): crates/jcode-base/src/session.rs:354-392 | crates/jcode-base/src/session.rs:394-431 \u2014 These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session.rs"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5d213e5c543a0c069d13d579ed6107ba613f44061ead3b947e9cf62bedf8657"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (47 corresponding lines): crates/jcode-provider-openrouter-runtime/src/lib.rs:2635-2704 | crates/jcode-provider-openrouter-runtime/src/lib.rs:2707-2753 \u2014 These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/lib.rs"},"region":{"startLine":2635}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2d52397bad9040fd8f64430459aa1179cfba1323103a4115be7dc9999dec95c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (60 corresponding lines): crates/jcode-tui/src/tui/app/debug.rs:17-76 | src/bin/tui_bench.rs:147-206 \u2014 These two members are one piece of code written twice and then edited apart: 60 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug.rs"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"157262d02a8fb88c81dd00e2a02c10c9f531940198613e2ad5eda1749e557062"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (53 corresponding lines): crates/jcode-base/src/session.rs:784-836 | crates/jcode-base/src/session.rs:838-896 \u2014 These two members are one piece of code written twice and then edited apart: 53 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session.rs"},"region":{"startLine":784}}}],"partialFingerprints":{"codehealthFindingId/v1":"aee5327f372243a01865945b2d2bb05704098cc7fc27e9e44a02e736bf1f78da"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): crates/jcode-provider-copilot-runtime/src/lib.rs:109-133 | crates/jcode-provider-copilot-runtime/src/lib.rs:147-170 \u2014 These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-copilot-runtime/src/lib.rs"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ae2a186baca474d8a7b9917a7735017990fd3db10b23102e8c294687e6f2c8b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 38\u002B corresponding lines): crates/jcode-tui/src/tui/app/commands.rs:305-360 | crates/jcode-tui/src/tui/app/commands_improve.rs:401-438 | crates/jcode-tui/src/tui/app/commands_overnight.rs:72-116 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 38 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":305}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c118586dc015d07b91c874af13d5698a0fd4fe409480ad0cc2552fdd68539be"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (40 corresponding lines): crates/jcode-provider-core/src/transport.rs:33-88 | scripts/repro/tls-bad-record-mac/src/main.rs:24-63 \u2014 These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/transport.rs"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5cdf5a6b9af71bf052793e3c0312d2b3950204543bfdcde0fb18f176d48a807"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (49 corresponding lines): crates/jcode-tui/src/tui/app/commands_improve.rs:11-59 | crates/jcode-tui/src/tui/app/commands_improve.rs:65-113 \u2014 These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_improve.rs"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb711fed0792d6497cb6cf6c36c111f13db5dafdc5c9d2c2961ce3274c79a359"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (42 corresponding lines): crates/jcode-app-core/src/tool/session_search.rs:1088-1129 | crates/jcode-app-core/src/tool/session_search.rs:1191-1243 \u2014 These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/session_search.rs"},"region":{"startLine":1088}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e8fe4db608dbef2588aed0efd54469cff25a584d5b8bd79bf137627c9f6b5be"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (45 corresponding lines): crates/jcode-base/src/usage/accessors.rs:434-478 | crates/jcode-base/src/usage/accessors.rs:480-534 \u2014 These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/accessors.rs"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"24e087a29b1084da26d0529b0c97d30746a7118b7d45e7d8305f51da2806b835"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 36\u002B corresponding lines): crates/jcode-import-core/src/lib.rs:461-502 | crates/jcode-import-core/src/lib.rs:1119-1156 | crates/jcode-tui/src/tui/session_picker/loading.rs:853-888 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 36 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-import-core/src/lib.rs"},"region":{"startLine":461}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dd5b39e9df5720f4f4fd8ac741b78e27438b34a301e7b709ba6294e5a0dddc8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (46 corresponding lines): crates/jcode-app-core/src/server/client_actions.rs:199-246 | crates/jcode-tui/src/tui/app/input/shell_commands.rs:49-94 \u2014 These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_actions.rs"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0cec5c40b291c9548eb1d500fd83b2ad663dbb055abce6a86a1620b9964805d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (42 corresponding lines): src/cli/acp.rs:511-552 | src/cli/acp.rs:558-609 \u2014 These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/acp.rs"},"region":{"startLine":511}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8ad03bde55e63f3dfde0fdcbc0514ae52d2884ed1aff258d4a597d928e54fa2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (58 corresponding lines): crates/jcode-base/src/auth/antigravity.rs:229-286 | crates/jcode-base/src/auth/gemini.rs:353-416 \u2014 These two members are one piece of code written twice and then edited apart: 58 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/antigravity.rs"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"b501fda3e8a1f01e238c7fda6b818ef635ed72cd0721e6e1658703bc7bc23c61"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): crates/jcode-app-core/src/server/client_actions.rs:833-861 | crates/jcode-tui/src/tui/app/commands.rs:393-419 \u2014 These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_actions.rs"},"region":{"startLine":833}}}],"partialFingerprints":{"codehealthFindingId/v1":"1380a9c954f5b2f22536335b3a5c34b729c3f314fd82f39cacc3842cba0705f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (48 corresponding lines): crates/jcode-base/src/usage.rs:680-731 | crates/jcode-base/src/usage/provider_fetch.rs:94-141 \u2014 These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage.rs"},"region":{"startLine":680}}}],"partialFingerprints":{"codehealthFindingId/v1":"cff6ef96d7d8d2f700e3267882d2c5943a197aa24068d8d95aae4ca45bee2d3b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (49 corresponding lines): crates/jcode-tui-markdown/src/markdown_wrap.rs:260-308 | crates/jcode-tui-markdown/src/markdown_wrap.rs:381-431 \u2014 These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_wrap.rs"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea953695bf81661d72ee30c879b59ffe7e69378a3de52e95fd34dffb97266e7d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 44\u002B corresponding lines): crates/jcode-tui/src/tui/app/commands.rs:2932-2975 | crates/jcode-tui/src/tui/app/commands.rs:2977-3021 | crates/jcode-tui/src/tui/app/commands.rs:3023-3066 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 44 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":2932}}}],"partialFingerprints":{"codehealthFindingId/v1":"91a7337bd49d1d94edf0c07b15f9acba59bb417c1409248e70c83398caf6845f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (48 corresponding lines): crates/jcode-tui/src/tui/app/model_context.rs:1099-1159 | crates/jcode-tui/src/tui/app/remote/key_handling.rs:152-199 \u2014 These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/model_context.rs"},"region":{"startLine":1099}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f03ebc4622e7e51054616ffcd8ec5df23f3e00cc11433ad9f179fa379e58fc4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (38 corresponding lines): crates/jcode-tui/src/tui/app/remote/reconnect.rs:117-157 | crates/jcode-tui/src/tui/app/remote/reconnect.rs:163-200 \u2014 These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/reconnect.rs"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"b114aaf7b50935c512d91ae5758dd109106bc09e1e776f02999d1caa359ebf63"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (55 corresponding lines): crates/jcode-provider-cursor-runtime/src/agent_transport.rs:581-635 | crates/jcode-provider-cursor-runtime/src/wire.rs:101-165 \u2014 These two members are one piece of code written twice and then edited apart: 55 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/agent_transport.rs"},"region":{"startLine":581}}}],"partialFingerprints":{"codehealthFindingId/v1":"954bf9def6a1eef1fa32ed3991fecbb664d7f76ffd415abdca604f5c7af1aff5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (55 corresponding lines): crates/jcode-base/src/memory_prompt.rs:167-233 | src/bin/memory_recall_bench.rs:294-348 \u2014 These two members are one piece of code written twice and then edited apart: 55 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory_prompt.rs"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"64305fbf4bfea058e7b38d8d8b579e3ce4b0d358b6e19006be99090c3121cf09"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 43\u002B corresponding lines): crates/jcode-base/src/prompt.rs:921-967 | crates/jcode-base/src/prompt.rs:977-1019 | crates/jcode-base/src/prompt.rs:1022-1065 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 43 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/prompt.rs"},"region":{"startLine":921}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ad59e0b203d06b93bc5d88f325bfd78bf8f7d6e64b9f705f881d06a2c5c87ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): crates/jcode-tui/src/tui/ui_diagram_pane.rs:699-726 | crates/jcode-tui/src/tui/ui_pinned_layout.rs:339-382 \u2014 These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_diagram_pane.rs"},"region":{"startLine":699}}}],"partialFingerprints":{"codehealthFindingId/v1":"12c554eeee5d224b8c5039ae5dea15959eab0db60e16cef8179eb3dfc644fe24"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 38\u002B corresponding lines): src/cli/login/scriptable.rs:569-606 | src/cli/login/scriptable.rs:612-662 | src/cli/login/scriptable.rs:668-724 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 38 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/login/scriptable.rs"},"region":{"startLine":569}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cde91b6607b6ef3fb28a26625e29b6de16e9e1dd212bbf7e7a2d50e5ace75de"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (46 corresponding lines): crates/jcode-tui/src/tui/ui.rs:1307-1360 | crates/jcode-tui/src/tui/ui.rs:1476-1521 \u2014 These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui.rs"},"region":{"startLine":1307}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ebf75e471ea44d42896bd088168b36a383c9e2e6da765598f20d40a8587f0e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (39 corresponding lines): crates/jcode-base/src/usage/api_keys.rs:132-171 | crates/jcode-base/src/usage/api_keys.rs:173-211 \u2014 These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/api_keys.rs"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0e909f5e2a0d3cc72af5b3527e254ccf2643065c61203f0ac21f09701835d6d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (36 corresponding lines): crates/jcode-base/src/usage/api_keys.rs:694-730 | crates/jcode-base/src/usage/api_keys.rs:733-768 \u2014 These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/api_keys.rs"},"region":{"startLine":694}}}],"partialFingerprints":{"codehealthFindingId/v1":"d98d0e781d51007b1c2ce939d355ec5143f0082d90a0eb5fd2dfa3bf650129bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 39\u002B corresponding lines): crates/jcode-base/src/provider/mod.rs:1918-1957 | crates/jcode-base/src/provider/mod.rs:2359-2397 | crates/jcode-base/src/provider/mod.rs:2863-2901 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 39 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/mod.rs"},"region":{"startLine":1918}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2a2dd545917b3ecc9292f4974304152acfab172dc928ad0be855d45d1a41110"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): src/cli/login/device_login.rs:101-134 | src/cli/login/device_login.rs:141-167 \u2014 These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/login/device_login.rs"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"83ca3d75f5b72446c2f27411b799baac7f3fdebcdd2d675c9d366ac29c7034b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 68\u002B corresponding lines): crates/jcode-app-core/src/server/background_tasks.rs:89-162 | crates/jcode-app-core/src/server/background_tasks.rs:182-249 | crates/jcode-app-core/src/server/background_tasks.rs:268-340 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 68 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/background_tasks.rs"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"19e81c6cb4b7d123bdd21086b880c2a6d4bd6fdb5d238d12674a58568a83f2fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (34 corresponding lines): crates/jcode-app-core/src/message_notifications.rs:22-55 | crates/jcode-base/src/message/notifications.rs:83-117 \u2014 These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/message_notifications.rs"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"2198b1b4f35910c27e1bcba104bdcb69ea080ebcba97321b72cad9d820c121da"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (69 corresponding lines): crates/jcode-app-core/src/server/client_comm_channels.rs:131-199 | crates/jcode-app-core/src/server/client_comm_channels.rs:216-284 \u2014 These two members are one piece of code written twice and then edited apart: 69 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_comm_channels.rs"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"23f9b0a4593c797f85d32af758fd39a81dd77c2bda213ebb945b728998513e18"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (36 corresponding lines): crates/jcode-tui/src/tui/session_picker/loading.rs:2200-2242 | crates/jcode-tui/src/tui/session_picker/loading.rs:2776-2811 \u2014 These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading.rs"},"region":{"startLine":2200}}}],"partialFingerprints":{"codehealthFindingId/v1":"93cd1993d0a25e5e236cbe6b641f0d718ca3b71e890b586c57f092b400b60135"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 31\u002B corresponding lines): src/cli/commands.rs:593-623 | src/cli/commands.rs:848-880 | src/cli/commands.rs:1134-1168 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 31 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":593}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b59959c4d69767db5a5ec85c126aa9053baa386981189c6a2c4a03753243e6c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (33 corresponding lines): crates/jcode-setup-hints/src/lib.rs:1884-1916 | crates/jcode-setup-hints/src/lib.rs:1922-1954 \u2014 These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/lib.rs"},"region":{"startLine":1884}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a05d8d4c92615c01f02da82f4b96df48f028f2867d5fd039097426e729180cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (35 corresponding lines): src/cli/login/scriptable.rs:729-771 | src/cli/login/scriptable.rs:776-810 \u2014 These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/login/scriptable.rs"},"region":{"startLine":729}}}],"partialFingerprints":{"codehealthFindingId/v1":"734ff9de3d608dd5b6737d1e9e52e6b673a956a16dc32e590d0395fd1f0fa9eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (33 corresponding lines): crates/jcode-provider-openrouter/src/lib.rs:569-601 | crates/jcode-provider-openrouter/src/lib.rs:603-635 \u2014 These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter/src/lib.rs"},"region":{"startLine":569}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a12ceeeabf98f6380d2423c71b882918c10608ba80a631d6dc60a9fd8b45034"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): crates/jcode-tui-account-picker/src/overlay.rs:374-400 | crates/jcode-tui/src/tui/login_picker.rs:263-288 \u2014 These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay.rs"},"region":{"startLine":374}}}],"partialFingerprints":{"codehealthFindingId/v1":"7497be52e249bfb680e1fc160a99298f0f4b0fad4e46c0d83ac513c091fe8dcd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (45 corresponding lines): crates/jcode-base/src/auth/antigravity.rs:367-412 | crates/jcode-base/src/auth/gemini.rs:512-556 \u2014 These two members are one piece of code written twice and then edited apart: 45 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/antigravity.rs"},"region":{"startLine":367}}}],"partialFingerprints":{"codehealthFindingId/v1":"168127f7311bb88401a27774c580b5d38408fd6f617d75d2ff18b16a5b611a02"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 30\u002B corresponding lines): crates/jcode-base/src/provider/mod.rs:2113-2148 | crates/jcode-base/src/provider/mod.rs:2677-2709 | crates/jcode-base/src/provider/mod.rs:2711-2740 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 30 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/mod.rs"},"region":{"startLine":2113}}}],"partialFingerprints":{"codehealthFindingId/v1":"520c2fc72331f693e5dcd4aed1922c8ad2a60a13a00a0b22810be8f8c944fdc4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 28\u002B corresponding lines): crates/jcode-tui/src/tui/app/misc_ui.rs:470-497 | crates/jcode-tui/src/tui/app/misc_ui.rs:499-526 | crates/jcode-tui/src/tui/app/misc_ui.rs:528-565 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 28 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/misc_ui.rs"},"region":{"startLine":470}}}],"partialFingerprints":{"codehealthFindingId/v1":"550771d252a0a939d215d3dec3efcf9b3bb55db6230bb65ee4268887da392408"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): crates/jcode-base/src/import.rs:1039-1062 | crates/jcode-tui/src/tui/session_picker/loading.rs:2367-2394 \u2014 These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/import.rs"},"region":{"startLine":1039}}}],"partialFingerprints":{"codehealthFindingId/v1":"0faf257b6f25084a194df1dcb36322786f95c71fb309dcb8052f2bb3d6c0b36f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (43 corresponding lines): crates/jcode-tui/src/tui/app/commands_improve.rs:298-340 | crates/jcode-tui/src/tui/app/commands_improve.rs:345-387 \u2014 These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_improve.rs"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbfba0403f68c33f973c50cce956f9302bb59f90f588cadaa23d9dce16ecbb30"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (31 corresponding lines): src/cli/login/scriptable.rs:478-508 | src/cli/login/scriptable.rs:514-563 \u2014 These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/login/scriptable.rs"},"region":{"startLine":478}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f957670e11641f07d09853164480afa2b3dc7a6802006431c46a09d2ed212ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 29\u002B corresponding lines): crates/jcode-app-core/src/server/jade_relay.rs:358-386 | crates/jcode-app-core/src/server/jade_relay.rs:712-740 | crates/jcode-app-core/src/server/jade_relay.rs:749-784 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 29 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/jade_relay.rs"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d6c91ff5024fbc6cb7edebd25188a2710ad167143fd99414e9e9ebbd9212195"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 43\u002B corresponding lines): crates/jcode-app-core/src/tool/apply_patch.rs:477-522 | crates/jcode-app-core/src/tool/edit.rs:306-348 | crates/jcode-app-core/src/tool/patch.rs:469-514 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 43 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/apply_patch.rs"},"region":{"startLine":477}}}],"partialFingerprints":{"codehealthFindingId/v1":"a868b80a49ad04728806d3ce94a0c5be617f0d47c2bbb18407d96decfc152ebf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (32 corresponding lines): crates/jcode-tui-messages/src/message.rs:415-446 | crates/jcode-tui/src/tui/app/remote/server_events/history_fingerprint.rs:56-88 \u2014 These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-messages/src/message.rs"},"region":{"startLine":415}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb622be2793e86ba14f3179049fa35925772d79dedc9308c563d795f38124088"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): crates/jcode-app-core/src/tool/computer/input.rs:160-187 | crates/jcode-app-core/src/tool/computer/input.rs:209-238 \u2014 These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/computer/input.rs"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"f15619f9614ef4d8603fb0e332500c803afafbe40d9fe57749526702555e91f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (42 corresponding lines): crates/jcode-base/src/auth/oauth.rs:1118-1159 | crates/jcode-base/src/auth/oauth.rs:1262-1306 \u2014 These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/oauth.rs"},"region":{"startLine":1118}}}],"partialFingerprints":{"codehealthFindingId/v1":"91d6260326634b1cf98e8f049eb966f59770a8ba13306ba91235535c5ca7f416"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): crates/jcode-render-core/src/math.rs:610-638 | crates/jcode-render-core/src/preprocess.rs:662-690 \u2014 These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/math.rs"},"region":{"startLine":610}}}],"partialFingerprints":{"codehealthFindingId/v1":"43fa8a69e6ae2c5ca6260649e6366e7f0b25a844ea21fb883d00d43bf5fe946e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): crates/jcode-tui/src/tui/ui_tools/patch_summary.rs:3-37 | crates/jcode-tui/src/tui/ui_tools/patch_summary.rs:39-67 \u2014 These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tools/patch_summary.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"0de37c0db482ef17f324f3fb92286c946cd19e1c8f8bffde170855d487fd9791"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (30 corresponding lines): crates/jcode-tui/src/tui/app/state_ui_messages.rs:77-106 | src/bin/tui_bench.rs:628-657 \u2014 These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui_messages.rs"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"5852e913c146cdd5106d3bc664f29de98c482e0cea0b2b81fe1c1aa7fb87ee3c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (34 corresponding lines): crates/jcode-base/src/runtime_memory_log.rs:516-550 | crates/jcode-base/src/runtime_memory_log.rs:562-595 \u2014 These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/runtime_memory_log.rs"},"region":{"startLine":516}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f2b1b77500c980b0a8d558858b86ea829efa901dda3a4cc902089eb83d59b96"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (47 corresponding lines): crates/jcode-app-core/src/server/provider_control/deferred_operations.rs:158-204 | crates/jcode-app-core/src/server/provider_control/deferred_operations.rs:210-256 \u2014 These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/provider_control/deferred_operations.rs"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"91b17a69138cd8669a39887e8e2e70715827c99a75d2de4ae646b05c4d092e36"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): crates/jcode-tui/src/tui/info_widget_memory_utils.rs:4-26 | crates/jcode-tui/src/tui/info_widget_memory_utils.rs:47-71 \u2014 These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_memory_utils.rs"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"a431b11e41e1628e262ef3e1d06b8d12165134d19391418b0d86ec99f2271874"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 40\u002B corresponding lines): src/cli/provider_init.rs:970-1014 | src/cli/provider_init.rs:1052-1091 | src/cli/provider_init.rs:1135-1178 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 40 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/provider_init.rs"},"region":{"startLine":970}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bc628d893b7d4e64b5a3c936daadc298caad0bd22a755497a7ac58bb652eb07"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (39 corresponding lines): crates/jcode-base/src/sidecar.rs:920-958 | crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs:1943-1981 \u2014 These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/sidecar.rs"},"region":{"startLine":920}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fe988139ba1338458c9daa8f7ecd7ce679dfc2eb4509a7da8acbc4493ca0d7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): crates/jcode-tui/src/tui/ui_messages.rs:2361-2389 | crates/jcode-tui/src/tui/ui_messages.rs:3118-3155 \u2014 These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":2361}}}],"partialFingerprints":{"codehealthFindingId/v1":"66889ffa317ededf90a5bc74f2a50d42a741ef50ab889e7bc21937b1f4897528"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (35 corresponding lines): crates/jcode-base/src/auth/antigravity.rs:294-328 | crates/jcode-base/src/auth/gemini.rs:423-457 \u2014 These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/antigravity.rs"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"114323ca814a33f4a875d22dd16c5134fad75c1b3d45f67ee4c5aa92174e1594"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (38 corresponding lines): crates/jcode-base/src/memory_prompt.rs:14-51 | crates/jcode-base/src/memory_prompt.rs:53-91 \u2014 These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory_prompt.rs"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ca8b78f801968bf94557809eb2b5f299dfe866aa3bac65c350a6d1763b998bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): crates/jcode-tui/src/tui/app/debug.rs:436-455 | crates/jcode-tui/src/tui/memory_profile.rs:279-306 \u2014 These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug.rs"},"region":{"startLine":436}}}],"partialFingerprints":{"codehealthFindingId/v1":"76d58ef5affd5ccd82c7d3a9959fafd2f51b71b1d72d3d977d9ce9c0fe87cc93"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (42 corresponding lines): crates/jcode-app-core/src/server/comm_sync.rs:207-248 | crates/jcode-app-core/src/server/comm_sync.rs:342-391 \u2014 These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_sync.rs"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"10264841b56911fb47f09302944964fce700467e0d76ff06fcd8baa9a0ba3385"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): crates/jcode-provider-openrouter/src/lib.rs:528-557 | crates/jcode-provider-openrouter/src/lib.rs:637-663 \u2014 These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter/src/lib.rs"},"region":{"startLine":528}}}],"partialFingerprints":{"codehealthFindingId/v1":"172c8cc46f94dba653f90f1133a9dcae6767d3430b0f5fb84e0d9922a49aeb9b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (36 corresponding lines): crates/jcode-base/src/browser.rs:824-859 | crates/jcode-update-core/src/lib.rs:141-177 \u2014 These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/browser.rs"},"region":{"startLine":824}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e27d8218d3a31bc538f8f92be535ea1b2c9e7de6a2fe7fcdf5cc8428a05d78a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): crates/jcode-tui/src/tui/ui_diagram_pane.rs:637-655 | crates/jcode-tui/src/tui/ui_diagram_pane.rs:674-692 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_diagram_pane.rs"},"region":{"startLine":637}}}],"partialFingerprints":{"codehealthFindingId/v1":"499de9a652df47d8a440d65b811c654ef9143ba27eb79a79c6988f45e829fdf3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): crates/jcode-app-core/src/server/jade_relay.rs:328-350 | crates/jcode-app-core/src/server/jade_relay.rs:682-704 \u2014 These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/jade_relay.rs"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"157b64fc80266ce5b937f5595024b5bdb9550be24ae7d9481920ecb8691d9e19"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (33 corresponding lines): crates/jcode-app-core/src/server/provider_control.rs:729-773 | crates/jcode-app-core/src/server/provider_control.rs:780-812 \u2014 These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/provider_control.rs"},"region":{"startLine":729}}}],"partialFingerprints":{"codehealthFindingId/v1":"91621a8fd14543a767ca5624a1b42246141f621f1f46fa823a4949ca791a059b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): crates/jcode-base/src/auth/claude.rs:410-431 | crates/jcode-base/src/auth/codex.rs:271-293 \u2014 These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/claude.rs"},"region":{"startLine":410}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b1f1ec4a922e12e01e3cae777a3ebf3af24d190c01a21b6ccc2d34f17ca5046"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): crates/jcode-app-core/src/tool/ambient.rs:435-460 | crates/jcode-tui-permissions/src/lib.rs:679-704 \u2014 These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/ambient.rs"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ca260c74716002efe9064c47a3b96362f4bdfc9844ff0e5ffc23af1e25d9ed4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): crates/jcode-app-core/src/agent/turn_execution.rs:41-72 | crates/jcode-app-core/src/agent/turn_execution.rs:83-108 \u2014 These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/turn_execution.rs"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"76ecf7f90c4c95a171b0eff9523bfaf7fc4c9282f351ca16dd3747596251e6fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): crates/jcode-base/src/skill.rs:696-722 | crates/jcode-base/src/skill/invocation.rs:14-44 \u2014 These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/skill.rs"},"region":{"startLine":696}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bec1a9a0bfa924188c6bc22444ca85b04540cce2e12a74acc3274e1cf2bdc16"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): crates/jcode-base/src/memory_log.rs:415-436 | crates/jcode-logging/src/lib.rs:610-637 \u2014 These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory_log.rs"},"region":{"startLine":415}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d2a453782ed7d315fe5add460895e33c8b82df2b9ef35ea5b4e1fd7ebd9aafb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): crates/jcode-base/src/runtime_memory_log.rs:635-660 | crates/jcode-base/src/runtime_memory_log.rs:662-687 \u2014 These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/runtime_memory_log.rs"},"region":{"startLine":635}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd50172b35d912f7756b0764710aa6461c566d838bc329c079ed772d8a8d1f51"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): crates/jcode-tui/src/tui/ui_header/account_router.rs:500-522 | crates/jcode-tui/src/tui/ui_inline_interactive.rs:322-342 \u2014 These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_header/account_router.rs"},"region":{"startLine":500}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3637a72d51e03a402152d39bcdd0f92f0c076e24de7d1112b6fd72668b04601"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/jcode-base/src/embedding_stub.rs:164-181 | crates/jcode-embedding/src/lib.rs:369-383 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/embedding_stub.rs"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"65acd2c91f9d2d678f2ec07214af6394638af43273aabfddb260f8884b8f96db"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (33 corresponding lines): crates/jcode-base/src/provider/openrouter.rs:105-137 | crates/jcode-provider-openrouter-runtime/src/lib.rs:110-142 \u2014 These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/openrouter.rs"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"75361a348ca7958b77c3d530a11e28d658e78cf1b04ac7382ef21b1d731309dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): crates/jcode-tui-core/src/graph_topology.rs:119-145 | crates/jcode-tui-core/src/graph_topology.rs:151-178 \u2014 These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-core/src/graph_topology.rs"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b154805dba25eddf4367d8af25ccabfbb1f035c18d625857b4083dffcf062c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): crates/jcode-tui-style/src/harmony.rs:375-403 | crates/jcode-tui-style/src/harmony.rs:664-698 \u2014 These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-style/src/harmony.rs"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b6d87e36ba01f1594530ba060de82861f09bf2fdcbcbf721c1b062fcf6805d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): crates/jcode-sdk/src/client.rs:230-259 | crates/jcode-sdk/src/client.rs:262-287 \u2014 These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-sdk/src/client.rs"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"a33321945f184120be0cb8f699418b885ed061b9b9cea35a636236cf53c99bea"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (41 corresponding lines): crates/jcode-app-core/src/tool/agentgrep/context.rs:166-208 | crates/jcode-app-core/src/tool/agentgrep/context.rs:617-657 \u2014 These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/agentgrep/context.rs"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"42a7b7e087ab0c785fa86b62f7808ed8f74044514ba68e6946c93061ad1a00e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (30 corresponding lines): crates/jcode-app-core/src/tool/websearch.rs:620-651 | crates/jcode-app-core/src/tool/websearch_kagi.rs:82-111 \u2014 These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/websearch.rs"},"region":{"startLine":620}}}],"partialFingerprints":{"codehealthFindingId/v1":"839ee3f7bc2508c63aad6f54506c20bf3762b3c8287fce046505b8eb26398a98"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): crates/jcode-tui-mermaid/src/mermaid_inline.rs:212-237 | crates/jcode-tui-mermaid/src/mermaid_runtime.rs:743-769 \u2014 These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_inline.rs"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"028d300f58c4cb3b0b7e979ea132cc86bfe32354ab899f3b785a9b78e364d332"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): crates/jcode-app-core/src/server/client_lifecycle_logging.rs:10-40 | crates/jcode-tui/src/tui/backend.rs:591-618 \u2014 These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_lifecycle_logging.rs"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"1700dc52e1aa0cafb94cc942aa6779a260bf069cbf3dd50daa3986ef2f49bd5c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): crates/jcode-base/src/auth/claude.rs:477-498 | crates/jcode-base/src/auth/codex.rs:314-347 \u2014 These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/claude.rs"},"region":{"startLine":477}}}],"partialFingerprints":{"codehealthFindingId/v1":"889aec07672d595e177586e2dcf75f8e881e70b1ea6b838c5cf9a8532ae59fbf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): crates/jcode-tui-render/src/swarm_gallery.rs:1614-1641 | crates/jcode-tui/src/tui/info_widget_swarm_gallery.rs:480-508 \u2014 These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/swarm_gallery.rs"},"region":{"startLine":1614}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b0775edf1b2caf63aa296ca3f420ae363e6b2c74529ec481d539cfe9b1fa667"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): crates/jcode-tui-style/src/theme_mode.rs:78-106 | crates/jcode-tui/src/bin/replay_frames.rs:33-56 \u2014 These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-style/src/theme_mode.rs"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ddaf0cab44e955ac1510dd47b171a75edd57a848175f9a5b0715b80a2e54a03"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (32 corresponding lines): crates/jcode-tui/src/tui/ui.rs:2127-2168 | crates/jcode-tui/src/tui/ui.rs:2176-2207 \u2014 These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui.rs"},"region":{"startLine":2127}}}],"partialFingerprints":{"codehealthFindingId/v1":"52322cfc68ef81c883332493957b3ce902874a89928ebb265b08b98ca9e60cba"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (35 corresponding lines): crates/jcode-telemetry-core/src/lib.rs:806-840 | crates/jcode-telemetry-core/src/lib.rs:1855-1889 \u2014 These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lib.rs"},"region":{"startLine":806}}}],"partialFingerprints":{"codehealthFindingId/v1":"299f45a7b5c701fd2c792a81050b0a5f3cbcbcafdb877b88f0c557ffa7b86a57"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): crates/jcode-base/src/provider/models.rs:685-716 | crates/jcode-base/src/provider/models.rs:718-743 \u2014 These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/models.rs"},"region":{"startLine":685}}}],"partialFingerprints":{"codehealthFindingId/v1":"09df8c40ef7a01ad3ea40e8e3aafa957cfce4c8dca9410fc4408f9b3ddb4dc9d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (32 corresponding lines): crates/jcode-app-core/src/server/client_state.rs:1304-1341 | crates/jcode-app-core/src/server/comm_sync.rs:29-60 \u2014 These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_state.rs"},"region":{"startLine":1304}}}],"partialFingerprints":{"codehealthFindingId/v1":"1001cf25747e45b6fbec28e6eebf294ce51ccd9d5308b2e0cfaa48105d13f5fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): crates/jcode-tui-mermaid/src/lib.rs:1075-1103 | crates/jcode-tui-mermaid/src/lib.rs:1178-1207 \u2014 These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/lib.rs"},"region":{"startLine":1075}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c069ff4aae33b1d4d893fb4e1545ae5fbec709e4a246172380f87a058cf21b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 22\u002B corresponding lines): crates/jcode-tui/src/tui/app/observe.rs:46-67 | crates/jcode-tui/src/tui/app/split_view.rs:16-39 | crates/jcode-tui/src/tui/app/todos_view.rs:347-370 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/observe.rs"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b522badccbf9c75e0936ae170bcc5b59abf75fcd5d5c5713585fc91996643e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): crates/jcode-app-core/src/agent/turn_execution.rs:950-972 | crates/jcode-app-core/src/agent/turn_execution.rs:978-1006 \u2014 These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/turn_execution.rs"},"region":{"startLine":950}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a043ac4636aa60354add75c012ce4ff6c6672140bac6f60e03f87a80d633e5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): crates/jcode-app-core/src/server/client_api.rs:118-141 | crates/jcode-app-core/src/server/client_api.rs:178-203 \u2014 These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_api.rs"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"80cd9b171b9639a1e714da3d966fb4c849ac07e247b4c6e7a9b6fbb1b0a3d884"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (39 corresponding lines): src/cli/provider_init.rs:930-968 | src/cli/provider_init.rs:1093-1133 \u2014 These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/provider_init.rs"},"region":{"startLine":930}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed321a7769706cf2982a1e571c04e544a2a20de268a9eecb3c4bcec9ba2c37fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): crates/jcode-build-support/src/paths.rs:14-53 | crates/jcode-telemetry-core/src/state_support.rs:281-307 \u2014 These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-build-support/src/paths.rs"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c2ee364c01882833557eccfa9103f62bbd6110ab9a7c5a413c621046c8319af"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): crates/jcode-tui/src/tui/ui_frame_metrics.rs:791-814 | crates/jcode-tui/src/tui/ui_frame_metrics.rs:1297-1323 \u2014 These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_frame_metrics.rs"},"region":{"startLine":791}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b1518e2ac4c6a8d35b38cc1d298a300936fa84d62acb5ff4eff0d51a9f3331c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): crates/jcode-app-core/src/tool/session_search.rs:1481-1499 | crates/jcode-app-core/src/tool/session_search.rs:1737-1762 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/session_search.rs"},"region":{"startLine":1481}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a1e47b07c444bd3d3ee34862834f6cc2f3d5536c07a159fdfe8932c4c9769d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (40 corresponding lines): crates/jcode-app-core/src/tool/websearch.rs:212-258 | crates/jcode-app-core/src/tool/websearch.rs:330-369 \u2014 These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/websearch.rs"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a9af5cf8b3e63cf1d19acc6779a74a6b022c8cb215af948bf80cc5a33b19070"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/jcode-base/src/jev.rs:593-613 | crates/jcode-base/src/jev/laya.rs:73-86 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/jev.rs"},"region":{"startLine":593}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6c68ff8e4632a282348753cba9db1870875a3bbd1e9a9ff3f52d5d824473e9b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): crates/jcode-setup-hints/src/lib.rs:2212-2248 | crates/jcode-setup-hints/src/windows_setup.rs:591-619 \u2014 These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/lib.rs"},"region":{"startLine":2212}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fd9a09e34fbfa1c807157f39f67b71f8fe750122bdc2e68b11aa3ad8fbc1df0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/jcode-telemetry-core/src/lib.rs:1007-1026 | crates/jcode-telemetry-core/src/lib.rs:1028-1044 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lib.rs"},"region":{"startLine":1007}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d605c693261dc2ecb7855c76ef298ca74255cb6a4cb0ef744aa0cc3b8997bfe"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): crates/jcode-app-core/src/server/socket.rs:284-307 | src/cli/dispatch.rs:1092-1123 \u2014 These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/socket.rs"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac9f6c8ded07bf1c5106de882dd651b403ea0d8708c38d79f30b8e61b42d6781"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 19\u002B corresponding lines): crates/jcode-tui-account-picker/src/overlay.rs:51-78 | crates/jcode-tui-usage-overlay/src/lib.rs:249-267 | crates/jcode-tui/src/tui/login_picker.rs:147-165 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay.rs"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"5eb4fc5f81d323cb2d3e81952d80204505f3ffecf7ccf7f8c8c57809b04ed539"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): src/cli/provider_init.rs:1223-1248 | src/cli/provider_init.rs:1275-1300 \u2014 These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/provider_init.rs"},"region":{"startLine":1223}}}],"partialFingerprints":{"codehealthFindingId/v1":"acadb7ca109b4ee724e4e9da4fedc59df83522e70e3385bd86fd0db849461153"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/jcode-base/src/session/prewarm.rs:100-117 | crates/jcode-storage/src/active_pids.rs:145-162 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/prewarm.rs"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecf3ea54d0704cdf75630cde81000569badf09a965e310e4a8efca626d4d2614"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): crates/jcode-tui-account-picker/src/overlay_render.rs:239-260 | crates/jcode-tui/src/tui/login_picker.rs:620-640 \u2014 These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay_render.rs"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c6b28dc13b17a6a8cec67bda8951f2b4d32f481e16045737405dc928381cbe7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/jcode-tui/src/tui/ui_inline_image.rs:1111-1129 | crates/jcode-tui/src/tui/ui_prepare.rs:232-249 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_inline_image.rs"},"region":{"startLine":1111}}}],"partialFingerprints":{"codehealthFindingId/v1":"e25cada7542adc26707a8f2c3c4eea49c370a85ecf7e96ecfc4dcbfce8355d19"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): crates/jcode-base/src/auth/antigravity.rs:414-440 | crates/jcode-base/src/auth/gemini.rs:558-580 \u2014 These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/antigravity.rs"},"region":{"startLine":414}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bc6ef537534457e2d88fdea882c0b6af86deaf10c045662f0107e218c44a42d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): crates/jcode-app-core/src/server/comm_control.rs:2477-2510 | crates/jcode-app-core/src/server/comm_sync.rs:399-427 \u2014 These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_control.rs"},"region":{"startLine":2477}}}],"partialFingerprints":{"codehealthFindingId/v1":"08cf2a59e0b373a7efd10716acb516fb57f712bbf2d6fa99cc74e0f8797c3c99"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): crates/jcode-base/src/memory_prompt.rs:121-143 | crates/jcode-base/src/memory_prompt.rs:238-260 \u2014 These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory_prompt.rs"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"d786217c4c3cea5d5e2535df853198e549f235d7776f97d1cb144c07a2912fcf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): crates/jcode-base/src/provider/openrouter.rs:286-310 | crates/jcode-provider-openrouter-runtime/src/lib.rs:366-390 \u2014 These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/openrouter.rs"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"afa0b631c36520c2da9f3696c5eed9ab0bafc2bd5c89cb3774b98d8fcdf6aae7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/jcode-harness-api-server/src/lib.rs:301-312 | src/cli/ssh_transport.rs:610-625 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/lib.rs"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"83896cbc9497a59dec38fc4c31a2580eef5d469dfa394f454971ea0318840fc3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): crates/jcode-app-core/src/server/runtime.rs:155-185 | crates/jcode-app-core/src/server/runtime.rs:191-219 \u2014 These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/runtime.rs"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"3940f161fa5c0b400a796d61179da4e03c7abbee670f2d84d274a6ebfe7e78d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): crates/jcode-tui-tool-display/src/lib.rs:182-209 | crates/jcode-tui/src/tui/app/dictation.rs:461-492 \u2014 These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-tool-display/src/lib.rs"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"9badd3b8bf7a41992ec80a8742998e979ddf2a6adec32fbc48766a2984ab4175"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): crates/jcode-tui/src/tui/app/inline_interactive.rs:3449-3480 | crates/jcode-tui/src/tui/app/inline_interactive.rs:3482-3504 \u2014 These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":3449}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff14fdd006b2f96be2b8ad963d0366541ac4a25a427c3569fa8cd5cdbfa64793"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): crates/jcode-app-core/src/perf.rs:513-534 | crates/jcode-tui/src/tui/ui_frame_metrics.rs:928-948 \u2014 These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/perf.rs"},"region":{"startLine":513}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd92e45acb89fe155156db262f335c8639769d620b3cf473c90ca956756a8339"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/jcode-app-core/src/server/jade_relay.rs:311-326 | crates/jcode-app-core/src/server/jade_relay.rs:664-680 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/jade_relay.rs"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"4627da2db8241a2a6adaa0577098f411a5b187db99432ed3cfe255a6113c5fef"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (30 corresponding lines): crates/jcode-tui/src/tui/app/auth_account_picker_saved_accounts.rs:69-98 | crates/jcode-tui/src/tui/app/auth_account_picker_saved_accounts.rs:146-179 \u2014 These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker_saved_accounts.rs"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0c69f24474981b28239579a293676ffcc073782d2e0436bfe02cbc1a12da7cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs:1984-2020 | scripts/repro/tls-bad-record-mac/src/main.rs:68-93 \u2014 These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs"},"region":{"startLine":1984}}}],"partialFingerprints":{"codehealthFindingId/v1":"82e1cc04600834a4d900c9eb87c831102a811b6b8b9620820a7911f6d0852f28"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/jcode-tui-markdown/src/markdown_mermaid_fallback.rs:105-118 | crates/jcode-tui-mermaid/src/mermaid_content.rs:393-405 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_mermaid_fallback.rs"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"c03b1f2d27b2da4804834f51630549e3168a93a6ab49643897126d00566d2521"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): crates/jcode-provider-antigravity/src/lib.rs:233-256 | crates/jcode-provider-gemini/src/lib.rs:601-619 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-antigravity/src/lib.rs"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"2396debb0484a7b1d666423cb61c7600c02810964760360dcbce4e3133e7a4de"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 14\u002B corresponding lines): crates/jcode-base/src/gmail.rs:564-581 | crates/jcode-base/src/gmail.rs:625-638 | crates/jcode-base/src/gmail.rs:678-693 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/gmail.rs"},"region":{"startLine":564}}}],"partialFingerprints":{"codehealthFindingId/v1":"553c15c6cd39f0f876a0907c74e094f26692e6706dd1d6f289610c14f7fcc5bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): crates/jcode-app-core/src/session_launch.rs:327-345 | crates/jcode-tui/src/tui/app/helpers.rs:1142-1160 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/session_launch.rs"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b8884c1046664a9fe4495ba5a395df6db38481359e8504f7829ae459c39d6f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 11\u002B corresponding lines): crates/jcode-app-core/src/tool/agentgrep/context.rs:900-911 | crates/jcode-app-core/src/tool/agentgrep/context.rs:926-936 | crates/jcode-app-core/src/tool/agentgrep/context.rs:938-956 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/agentgrep/context.rs"},"region":{"startLine":900}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff4a8aa2ecc049bdf81fb32d2288eec668e457e109d6048e1afa0b93fab8e41d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/jcode-base/src/prompt.rs:15-32 | crates/jcode-base/src/prompt.rs:77-94 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/prompt.rs"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"10a3b9e27de2ea3ff046960a9a8ec284f922f5e6f8fc898ec03b0c6df146efcb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): crates/jcode-app-core/src/session_window.rs:101-127 | crates/jcode-tui/src/tui/window_visibility.rs:272-291 \u2014 These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/session_window.rs"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"327601b32ea5132fa96532499ef3997cd5f1f5e84e44a3990518f8d90483ddee"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/jcode-tui-markdown/src/lib.rs:1049-1066 | crates/jcode-tui-markdown/src/render_core_adapter.rs:54-68 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/lib.rs"},"region":{"startLine":1049}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b4f9cdd57955efc6ddc1638b4bddd278bb28df20dc306978ea9094b77529143"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): src/cli/dispatch.rs:1046-1063 | src/cli/selfdev.rs:79-99 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/dispatch.rs"},"region":{"startLine":1046}}}],"partialFingerprints":{"codehealthFindingId/v1":"0800b98020006a82a7904769388bb9258d3bd98c690cc915a4b6da020e84fe6c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/jcode-base/src/memory.rs:786-808 | src/bin/memory_recall_bench.rs:191-207 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory.rs"},"region":{"startLine":786}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b59a6c385255171dbc1882627f5be617e136777add6c86024e0374e4de22a9a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): crates/jcode-setup-hints/src/lib.rs:2390-2408 | crates/jcode-tui-style/src/color.rs:59-81 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/lib.rs"},"region":{"startLine":2390}}}],"partialFingerprints":{"codehealthFindingId/v1":"048790a92fa3f101347c6607646a67d469d16815a08f3289ef6653dc0364ef97"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): crates/jcode-tui-markdown/src/markdown_render_support.rs:354-374 | crates/jcode-tui-render/src/memory_tiles.rs:123-145 \u2014 These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_support.rs"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c4df8398b3acd800c23c7f13b70b036ea00d1d6615c419e4cb40494f05b6760"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (30 corresponding lines): crates/jcode-app-core/src/agent/interrupts.rs:144-179 | crates/jcode-app-core/src/server/state.rs:607-636 \u2014 These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/interrupts.rs"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"873c26fe5f58c9da08ba910a51029bec21ed2963450ded80da85a1a587a6800f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): crates/jcode-base/src/auth/external.rs:539-561 | crates/jcode-base/src/auth/external.rs:567-593 \u2014 These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/external.rs"},"region":{"startLine":539}}}],"partialFingerprints":{"codehealthFindingId/v1":"60d6f5e23024b1a3e903e2b47c2826588039c18c1003ef4740dbe5b35593187a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/jcode-base/src/usage/api_keys.rs:439-454 | crates/jcode-base/src/usage/api_keys.rs:609-624 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/api_keys.rs"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"62c24bed61ef2556c703d2ae9ff74a894e39dbfd5f0c04a2d9cc51daf67ba242"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): crates/jcode-todo-policy/src/lib.rs:563-581 | crates/jcode-todo-policy/src/lib.rs:586-604 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-todo-policy/src/lib.rs"},"region":{"startLine":563}}}],"partialFingerprints":{"codehealthFindingId/v1":"a32aab8be852436a70926a095581be21b154406b805109f1f9a67cdd3db4473d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): src/cli/acp.rs:1565-1592 | src/cli/acp.rs:1594-1612 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/acp.rs"},"region":{"startLine":1565}}}],"partialFingerprints":{"codehealthFindingId/v1":"81b215cdc6edd378652ff9c9717cab76b38a1bb96057574593eed2de979e43c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/jcode-app-core/src/server/reload.rs:34-53 | crates/jcode-base/src/mobile_runner.rs:306-322 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/reload.rs"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"901b514816bf3542192ecccc07b61292073cdde13411071d3c3bce04bd51ffef"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): crates/jcode-base/src/auth/mod.rs:1349-1378 | crates/jcode-base/src/auth/mod.rs:1380-1407 \u2014 These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/mod.rs"},"region":{"startLine":1349}}}],"partialFingerprints":{"codehealthFindingId/v1":"83533f9b9ae81fce4fa4c2b5ddd8d49c8d7b7f25e5dcc89933af19e3aa8fe99e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/jcode-base/src/provider/mod.rs:1836-1853 | crates/jcode-base/src/provider/mod.rs:2056-2068 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/mod.rs"},"region":{"startLine":1836}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8d4640d30eafe935e61320729695032df091ffa81ab9589f6237d97f36c26a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (55 corresponding lines): crates/jcode-overnight-core/src/prompts.rs:92-149 | crates/jcode-overnight-core/src/prompts.rs:151-205 \u2014 These two members are one piece of code written twice and then edited apart: 55 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-overnight-core/src/prompts.rs"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9886941dfbe71b1dcf60cdb6658af4a2442c0a5a88a51e4d9e122596113255d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/jcode-tui/src/tui/app/helpers.rs:952-971 | src/cli/ssh.rs:250-267 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/helpers.rs"},"region":{"startLine":952}}}],"partialFingerprints":{"codehealthFindingId/v1":"9eaf6f98a17d4f1cd101caa330c05db530540d2842eb7f200961cce6b0f913bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): crates/jcode-base/src/skill.rs:260-288 | crates/jcode-base/src/skill.rs:613-647 \u2014 These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/skill.rs"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3f45dbc570ebb332c5317da21ad918c54007cc9f7b14f16e52d50f090672378"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/jcode-tui/src/tui/ui_diagram_pane.rs:99-120 | crates/jcode-tui/src/tui/ui_pinned_layout.rs:229-240 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_diagram_pane.rs"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"567a7039f971ce3d13ff06bc54fd9ffbc696498a11dba9609ab4d3ce1ddfb795"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 24\u002B corresponding lines): src/cli/provider_init.rs:790-817 | src/cli/provider_init.rs:1198-1221 | src/cli/provider_init.rs:1250-1273 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/provider_init.rs"},"region":{"startLine":790}}}],"partialFingerprints":{"codehealthFindingId/v1":"71a8c0f23083d1c541e894f5024207ca2ae6dfe55c06fa9f454221f107b74df6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): crates/jcode-base/src/browser_chromium_diag.rs:77-99 | crates/jcode-companion/src/lid_override.rs:264-285 \u2014 These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/browser_chromium_diag.rs"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"13af37f9b37ced10dd89944d8d1510c29e5e6ab1da7c1f361fd747722db70dbd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): crates/jcode-telemetry-core/src/lib.rs:2222-2242 | crates/jcode-telemetry-core/src/lib.rs:2257-2275 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lib.rs"},"region":{"startLine":2222}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bb100fbb91da37d3f9a768de2fdf9b699e16a9de228da91eaea85632c68fc82"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/jcode-tui-messages/src/message.rs:296-311 | crates/jcode-tui/src/tui/session_picker/performance.rs:168-183 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-messages/src/message.rs"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ee133f38d6bd6b74cfe3459d373b3a7ef9bc7b59b488e91fe59a32846e9204d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/jcode-harness-api-server/src/translate.rs:2978-2992 | crates/jcode-harness-api-server/src/translate.rs:2994-3006 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/translate.rs"},"region":{"startLine":2978}}}],"partialFingerprints":{"codehealthFindingId/v1":"39b8be3f9748a66af2fd5699a59e67ece05587fa2d193f0038e17bb24bc500e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 23\u002B corresponding lines): crates/jcode-provider-gemini-runtime/src/lib.rs:358-388 | crates/jcode-provider-gemini-runtime/src/lib.rs:397-419 | crates/jcode-provider-gemini-runtime/src/lib.rs:421-449 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 23 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-gemini-runtime/src/lib.rs"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c548b2ead1ef8587e99469593dcbebf3dc1a099897d2e4e0cfe8db29834a994"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): crates/jcode-tui/src/tui/app/input.rs:1947-1976 | crates/jcode-tui/src/tui/app/input.rs:2820-2843 \u2014 These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":1947}}}],"partialFingerprints":{"codehealthFindingId/v1":"41b2bbefa6c0c693f2dfa89409de950111578fc4b1e4be2051fdf07ffc097dae"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 16\u002B corresponding lines): crates/jcode-app-core/src/tool/agentgrep/context.rs:830-848 | crates/jcode-app-core/src/tool/agentgrep/context.rs:850-865 | crates/jcode-app-core/src/tool/agentgrep/context.rs:867-883 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/agentgrep/context.rs"},"region":{"startLine":830}}}],"partialFingerprints":{"codehealthFindingId/v1":"3291b43182d71c16c8d218e7624ce3b8d609c525c49dc53813b9a648a16307d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): crates/jcode-app-core/src/tool/selfdev/reload.rs:44-62 | crates/jcode-app-core/src/tool/selfdev/reload.rs:65-85 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/selfdev/reload.rs"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"1274dbe646ccc0329beeedb4b29e05a69739330fb8e31b15d183d683e382a285"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): crates/jcode-base/src/auth/copilot.rs:585-609 | crates/jcode-provider-cursor-runtime/src/agent_transport.rs:104-123 \u2014 These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/copilot.rs"},"region":{"startLine":585}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f2f82feb0f2231df9ebb6e4140a2ff986ca9a0cb28d2b79e1d55c8bf4173bcd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/jcode-tui-permissions/src/lib.rs:53-66 | crates/jcode-tui-permissions/src/lib.rs:68-81 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-permissions/src/lib.rs"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"de33882972dcb9d54cde9d1a31de77a5783a1d88d5a46197684067ad5a52c72a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): crates/jcode-app-core/src/agent/status.rs:143-166 | crates/jcode-app-core/src/agent/status.rs:176-196 \u2014 These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/status.rs"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a87d207765697b56a3604c4d19530606ed49bfc782c8486daa1a32be4079cb8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): crates/jcode-base/src/provider/mod.rs:2535-2557 | crates/jcode-base/src/provider/mod.rs:2590-2608 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/mod.rs"},"region":{"startLine":2535}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf521000b7614a50e9139c1504cc6f38e147076c1cdb7ce1c4b14c010b53b1a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): crates/jcode-base/src/subscription_api.rs:707-725 | crates/jcode-base/src/subscription_api.rs:736-755 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/subscription_api.rs"},"region":{"startLine":707}}}],"partialFingerprints":{"codehealthFindingId/v1":"523a0dc6a4c1b1fda3aabe496e1e50637b4a23395ff87dcea799bd58044874f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/jcode-setup-hints/src/keymap/chord.rs:65-81 | crates/jcode-setup-hints/src/keymap/chord.rs:87-103 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/keymap/chord.rs"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"67458a92d278c3c486a36bb3d293eb6658bdb61231eb9470661b653ec7eb0d30"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): crates/jcode-tui/src/tui/app/helpers.rs:1813-1836 | crates/jcode-tui/src/tui/app/turn_notify.rs:382-403 \u2014 These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/helpers.rs"},"region":{"startLine":1813}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6098498d6bf508d851125cdf85a3e9fa46f6491ad29143c20cd2f8fa43bbfe8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): src/cli/acp.rs:1519-1536 | src/cli/acp.rs:1538-1560 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/acp.rs"},"region":{"startLine":1519}}}],"partialFingerprints":{"codehealthFindingId/v1":"4035bd38f4f5dc027a4c43cb9c939514911e3d4e304727f6e65268ddb9882b29"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/jcode-base/src/memory/pending.rs:589-612 | crates/jcode-base/src/memory/pending.rs:639-656 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory/pending.rs"},"region":{"startLine":589}}}],"partialFingerprints":{"codehealthFindingId/v1":"7240da1d2fb747f9a0023c16517371cbc4f7fe59459b7e8a5254e0cabd9d6d6a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): crates/jcode-base/src/platform.rs:409-433 | crates/jcode-desktop-open/src/lib.rs:80-102 \u2014 These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/platform.rs"},"region":{"startLine":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5da07420627c1444ec96f2381c81cc4bd9de6a7a7f9b69bc7cacf4664ff2fbe"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 18\u002B corresponding lines): crates/jcode-app-core/src/telemetry_state.rs:266-286 | crates/jcode-telemetry-core/src/state_support.rs:309-332 | crates/jcode-tui/src/tui/app/support.rs:70-87 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/telemetry_state.rs"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"975dbec00af08c95d63e71c3162ca3636d788fdd37895a081a8c390f5805d4db"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/jcode-tui/src/tui/app/inline_interactive.rs:2605-2620 | crates/jcode-tui/src/tui/app/inline_interactive.rs:2626-2639 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":2605}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6022960c08fe7475ba94423cacc3a021259317cbe4aea48c1eaa292a73ddb80"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 25\u002B corresponding lines): src/cli/login.rs:594-619 | src/cli/login.rs:650-677 | src/cli/login.rs:695-721 | src/cli/login.rs:1067-1092 | src/cli/login.rs:1166-1190 \u2014 These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/login.rs"},"region":{"startLine":594}}}],"partialFingerprints":{"codehealthFindingId/v1":"83f6dcc6092e4fc686a221a3cad880643c5473e7e029f6228381fdb3639ee379"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): crates/jcode-app-core/src/server/client_session.rs:45-65 | crates/jcode-app-core/src/server/client_state.rs:718-737 \u2014 These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_session.rs"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"9437a8c447fab62c73d1f256a09b96ca7ac6bfb509ad6ff5a36a7d39488eca74"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/jcode-app-core/src/server/group_transfer.rs:604-623 | src/cli/cloud_group.rs:252-263 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/group_transfer.rs"},"region":{"startLine":604}}}],"partialFingerprints":{"codehealthFindingId/v1":"29916acb5d6efb3c9f36a8093fd8e9cd07ad3c169d6a21d659125fd6d7a8d3ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/jcode-base/src/embedding_stub.rs:183-203 | crates/jcode-embedding/src/lib.rs:385-401 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/embedding_stub.rs"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b8031105c0ae397111f88bfd4a7a9bc7fbcd2098d073a26e477e14de46c7342"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/jcode-base/src/mcp/oauth.rs:592-606 | crates/jcode-base/src/mcp/oauth.rs:608-623 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mcp/oauth.rs"},"region":{"startLine":592}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4162229d1b11c384121c74671d2dee95779a7c9a4fd158b5d74948d48e8ddb9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/jcode-tui/src/tui/app/commands_overnight.rs:153-171 | crates/jcode-tui/src/tui/app/commands_overnight.rs:173-189 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_overnight.rs"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"252edeb1c661696e537beb5ebd7c114f0e7deecfb91584fc628a3c9b92ae21f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): crates/jcode-tui/src/tui/app/model_context.rs:394-416 | crates/jcode-tui/src/tui/app/model_context.rs:669-688 \u2014 These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/model_context.rs"},"region":{"startLine":394}}}],"partialFingerprints":{"codehealthFindingId/v1":"6df24b895e07be209c076a6728b71bdf750e32525afe95f113e179069556efcf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): crates/jcode-voice/src/lib.rs:568-586 | crates/jcode-voice/src/streaming_capture.rs:259-278 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-voice/src/lib.rs"},"region":{"startLine":568}}}],"partialFingerprints":{"codehealthFindingId/v1":"42afbc674100793992ac64c7997e841e1a3880285a0fd4b3b8e5df122f9ec4d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/jcode-base/src/auth/copilot.rs:468-476 | crates/jcode-base/src/auth/copilot.rs:527-540 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/copilot.rs"},"region":{"startLine":468}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b16718bd002078ba34aa5f7a9ef7c1cbbc58505fe46c11ce3f2f0b701b5c98f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): crates/jcode-base/src/mcp/pool.rs:161-180 | crates/jcode-base/src/mcp/pool.rs:183-202 \u2014 These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mcp/pool.rs"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8420a3db6f827a5d8d441aeed404df4779e766572f6a24b07211f22f92f428e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (6 members, 15\u002B corresponding lines): crates/jcode-base/src/provider/openrouter.rs:139-153 | crates/jcode-base/src/provider/openrouter.rs:155-171 | crates/jcode-base/src/provider/openrouter.rs:173-189 | crates/jcode-provider-openrouter-runtime/src/lib.rs:144-158 | crates/jcode-provider-openrouter-runtime/src/lib.rs:160-176 | crates/jcode-provider-openrouter-runtime/src/lib.rs:178-194 \u2014 These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/openrouter.rs"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"080c086a4efbccd76dd2eeee7acae717f0887467817b45980233396da93c6b72"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/jcode-build-support/src/lib.rs:171-187 | crates/jcode-build-support/src/lib.rs:189-209 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-build-support/src/lib.rs"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7bca079bcdcb1805c3239bae4152986b0597260685c0e9a187a6a9dadae9749"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/jcode-provider-core/src/fallback_pick.rs:423-438 | crates/jcode-tui/src/tui/app/model_context.rs:692-712 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/fallback_pick.rs"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"14e842d47e6946fcab9dbc4c3dd0ffef5687590487342162386656194efe0dbb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): crates/jcode-app-core/src/server/comm_session.rs:152-174 | crates/jcode-app-core/src/server/jade_relay.rs:1144-1167 \u2014 These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_session.rs"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"62c383575348036a87e3bd63d0d64d4ac496f5030bc625c9e257d7e66f662e28"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/jcode-app-core/src/tool/browser.rs:423-441 | crates/jcode-app-core/src/tool/browser.rs:447-461 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/browser.rs"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed7e5f8a0cc309a3ed936a1b03a0897cda09cc19c424d31b03d0bd40f0aca8b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/jcode-provider-anthropic-runtime/src/lib.rs:271-286 | crates/jcode-provider-anthropic-runtime/src/lib.rs:294-310 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic-runtime/src/lib.rs"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b694e9f0f53c10b505a09eeee8d1a66d9d7f86955791729ba6a6283ff39b6e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/jcode-app-core/src/ssh_remote.rs:125-141 | crates/jcode-app-core/src/ssh_remote.rs:159-173 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/ssh_remote.rs"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e7b1d06212f8a9b1fb8a8a3f10b616cc4f43d202bb143f57088e68865734d5b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 17\u002B corresponding lines): crates/jcode-app-core/src/tool/agentgrep/context.rs:958-978 | crates/jcode-app-core/src/tool/agentgrep/context.rs:980-1000 | crates/jcode-app-core/src/tool/agentgrep/context.rs:1002-1022 | crates/jcode-app-core/src/tool/agentgrep/context.rs:1024-1040 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/agentgrep/context.rs"},"region":{"startLine":958}}}],"partialFingerprints":{"codehealthFindingId/v1":"f337375d2c66758664a9f5dbc9f49cbc97d5b7e0573de71636680a7744acf78c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/jcode-base/src/auth/oauth_callback_io.rs:53-66 | crates/jcode-base/src/auth/oauth_callback_io.rs:73-90 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/oauth_callback_io.rs"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c1d9af811eda92e043f86aecc649ac458b7a47cf7abb992e75c09ecff14c019"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/jcode-provider-anthropic-runtime/src/lib.rs:1412-1427 | crates/jcode-provider-openai-runtime/src/openai_provider_impl.rs:33-52 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic-runtime/src/lib.rs"},"region":{"startLine":1412}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed0ec1e9ee07a37e127f9df573b6dd01be63220a362354e89996b75b6af1f2c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/jcode-provider-antigravity-runtime/src/lib.rs:261-286 | crates/jcode-provider-gemini-runtime/src/lib.rs:477-493 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-antigravity-runtime/src/lib.rs"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0f0d111fb59eb9f4974a55cd4a54a32cf5e9c3a1b33873e6d43cbe17e68d5e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 15\u002B corresponding lines): crates/jcode-tui-mermaid/src/mermaid_cache_render.rs:224-239 | crates/jcode-tui-mermaid/src/mermaid_cache_render.rs:394-408 | crates/jcode-tui-messages/src/cache.rs:36-53 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_cache_render.rs"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d826cfe9d2de0a2bfb5d6b43a1ff72b5fd866cbffb1b7068c83af069c936f24"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/jcode-tui/src/tui/app/inline_interactive.rs:195-210 | crates/jcode-tui/src/tui/app/inline_interactive.rs:247-262 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c585b4b2ca91794935b1f69c0a54a8542da99ffdf843f54d84d361cdadf0d59"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 13\u002B corresponding lines): crates/jcode-tui/src/tui/app/observe.rs:179-191 | crates/jcode-tui/src/tui/app/split_view.rs:45-61 | crates/jcode-tui/src/tui/app/todos_view.rs:376-392 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/observe.rs"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"f67ed4ee023f146924c929a44af833d5b5c5e9ebba377a03f22c08ebb23e2378"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/jcode-base/src/auth/claude.rs:393-407 | crates/jcode-base/src/auth/codex.rs:255-269 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/claude.rs"},"region":{"startLine":393}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad93c968a6b318abae44b6d9a539e63e49175afdcf17219659146b703295be90"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): crates/jcode-base/src/skill.rs:476-496 | crates/jcode-base/src/skill.rs:650-672 \u2014 These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/skill.rs"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a18d6a3887ed0c1193e1b8f62d4245301ee6751adc5abfe7b49b928cf5d36a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): src/cli/cloud_runtime.rs:140-152 | src/cli/cloud_runtime.rs:264-281 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_runtime.rs"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cdbf96968157503e333ec06a2f9b731c96ed7da9a78a1086bf82b9406e601c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/jcode-app-core/src/tool/desktop_selfdev.rs:43-52 | crates/jcode-app-core/src/tool/side_panel.rs:48-81 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/desktop_selfdev.rs"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fa41ed2391315aa30e169a16e5dd8a3f2db4177d3b863c28061865b43a4f7bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/jcode-base/src/auth/claude.rs:376-390 | crates/jcode-base/src/auth/codex.rs:239-253 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/claude.rs"},"region":{"startLine":376}}}],"partialFingerprints":{"codehealthFindingId/v1":"64e5117dac7e1546a1e2bc4535cb1131dbefdcbab5cbcfdcb69378d001b0bfff"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/jcode-base/src/usage/openai_reset.rs:75-88 | src/cli/cloud_managed.rs:909-924 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/openai_reset.rs"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"77ae04c044e60fc898b7da702a7c2aa710283ae7ea07ab8130593da282c33d5b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): crates/jcode-tui/src/tui/app/auth_account_picker.rs:1184-1206 | crates/jcode-tui/src/tui/app/auth_account_picker_saved_accounts.rs:186-208 \u2014 These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker.rs"},"region":{"startLine":1184}}}],"partialFingerprints":{"codehealthFindingId/v1":"d70c9c6ae5c992d32fd16b8d3a49cc6c5c30b86ce20493af23ff6e8c37b9b5e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): crates/jcode-tui/src/tui/ui_diff.rs:99-122 | crates/jcode-tui/src/tui/ui_diff.rs:124-142 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_diff.rs"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"711ab6460eadb3637fe819c13d5452171ff9d5c3c503a1ad19d67e74bae1b386"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/jcode-app-core/src/ambient/prompt.rs:555-573 | crates/jcode-base/src/provider_activity.rs:292-309 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/ambient/prompt.rs"},"region":{"startLine":555}}}],"partialFingerprints":{"codehealthFindingId/v1":"955860c1da3bcccb601e49a6522667b289ae58135fbd27aa86cb97766a38cb93"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): crates/jcode-app-core/src/server/provider_control.rs:1204-1224 | crates/jcode-app-core/src/server/provider_control.rs:1231-1251 \u2014 These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/provider_control.rs"},"region":{"startLine":1204}}}],"partialFingerprints":{"codehealthFindingId/v1":"7059d44f8d78e4909029db39895182a0f5e270e9a21e95323d8c5f7cb7a63b80"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/jcode-base/src/auth/claude.rs:447-464 | crates/jcode-base/src/auth/codex.rs:349-367 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/claude.rs"},"region":{"startLine":447}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bc68c3b21ffc9889945981f8a23656ca4bb11d0fbf3a834e34f4ddde7116a64"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/jcode-tui/src/tui/app/helpers.rs:937-947 | src/cli/tui_launch.rs:575-593 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/helpers.rs"},"region":{"startLine":937}}}],"partialFingerprints":{"codehealthFindingId/v1":"b339f7daf932b59070c15acbfade83094fa54d75cc7221b771f7e1a5d10a9010"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/jcode-base/src/provider/mod.rs:2559-2579 | crates/jcode-base/src/provider/mod.rs:2610-2626 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/mod.rs"},"region":{"startLine":2559}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f9cc19b6cf3c56a34cd82fa76e6695dda110441913af9468ed4ae692ddc47b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): crates/jcode-tui-render/src/swarm_gallery_labels.rs:3-24 | crates/jcode-tui/src/tui/ui_input.rs:2821-2840 \u2014 These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/swarm_gallery_labels.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"8525da2fa0fa2d18af772f23ae17195848c5c940e289b1dddc7e8e28d60b3d9e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): crates/jcode-tui/src/tui/ui_inline_interactive.rs:9-32 | crates/jcode-tui/src/tui/ui_messages/usage.rs:748-766 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_inline_interactive.rs"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"b33e51a9d1c08b2e839ecd3f7fe7440b255418774c037381187ee5bbf16b80e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/jcode-app-core/src/server/swarm.rs:191-203 | crates/jcode-app-core/src/server/swarm.rs:205-217 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/swarm.rs"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"61584a40350032066d69b0e744e7ad3310df4a095e7fca6612432318cd7953cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/jcode-base/src/memory.rs:1367-1383 | crates/jcode-base/src/memory.rs:1386-1405 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory.rs"},"region":{"startLine":1367}}}],"partialFingerprints":{"codehealthFindingId/v1":"258e44fceed2dae747acece4eaab9d1638621b27679460ede1db3405e7eb6006"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/jcode-harness-api/src/sockets.rs:16-28 | crates/jcode-storage/src/lib.rs:110-127 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api/src/sockets.rs"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"0dbb6d4c1f7ab9326490aed137b25ddc27672f42a4244a27e87d0aa8b6be6b37"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/jcode-tui/src/tui/app/debug.rs:133-147 | crates/jcode-tui/src/tui/memory_profile.rs:134-152 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug.rs"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf029bee70a03872e51005657b64a5428b277b7e01823bd7f77d5b21bc774c12"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/jcode-tui/src/tui/ui_inline_image.rs:433-448 | crates/jcode-tui/src/tui/ui_inline_image.rs:450-465 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_inline_image.rs"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"a68a933ce4756ecaa90f901c3477d4a9e715af0401e334fcd32d3fce637f3694"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/jcode-app-core/src/agent.rs:1261-1273 | crates/jcode-app-core/src/agent/turn_execution.rs:365-377 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent.rs"},"region":{"startLine":1261}}}],"partialFingerprints":{"codehealthFindingId/v1":"66efaca7aacf9471c8c44f92cf915b436b16d5d245baf5e650557b1fa553eb0d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/jcode-app-core/src/server/debug_server_state.rs:1103-1123 | crates/jcode-app-core/src/server/debug_server_state.rs:1147-1157 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_server_state.rs"},"region":{"startLine":1103}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b3575998530c6ac2fdac69b943c7b90400c136b7fc57cb9d1c62de8981c5420"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/jcode-base/src/session.rs:1601-1618 | crates/jcode-base/src/session.rs:1627-1650 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session.rs"},"region":{"startLine":1601}}}],"partialFingerprints":{"codehealthFindingId/v1":"89038709106587c482113ad3c3c95f70c8f327cd1c2f89fdb937a09d3382388a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/jcode-base/src/session/maintenance.rs:56-67 | src/cli/hot_exec.rs:246-261 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/maintenance.rs"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"5264caa15a82a9919cc5e7d046b2d1af66517b7f2152df2dbb08193a1f481f56"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/jcode-tui-mermaid/src/mermaid_content.rs:306-328 | crates/jcode-tui-mermaid/src/mermaid_content.rs:375-389 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_content.rs"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"d49a6855098ef08085f9272e72885048716e5fe1adda6e91500f0ca73f89223a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/jcode-base/src/usage/accessors.rs:161-178 | crates/jcode-base/src/usage/accessors.rs:560-580 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/accessors.rs"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f40669b586f17761efd5682962e9b793ab9f267554e5e569dc79e54625ea643"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 14\u002B corresponding lines): crates/jcode-tui/src/tui/session_picker/loading.rs:2269-2282 | crates/jcode-tui/src/tui/session_picker/loading.rs:2474-2489 | crates/jcode-tui/src/tui/session_picker/loading.rs:2756-2769 | crates/jcode-tui/src/tui/session_picker/loading/pi_sessions.rs:20-33 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading.rs"},"region":{"startLine":2269}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7cda08b3a3b3e522fa7aa12f88102de93032673626c6229805288daa33b390b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/jcode-app-core/src/server/state.rs:462-474 | crates/jcode-app-core/src/server/state.rs:483-498 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/state.rs"},"region":{"startLine":462}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9615ddca27bd0a643b8d6077c10ae368f01c644e404819097eea94d5fcbc442"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/jcode-base/src/memory/pending.rs:128-142 | crates/jcode-sdk/src/collections.rs:252-264 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory/pending.rs"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"995f3ccec38bbf707a4badcd959e9e06e7a3ea6356476d328140409692c3186f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/jcode-base/src/provider_activity_oauth.rs:245-256 | crates/jcode-base/src/provider_activity_oauth.rs:368-379 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider_activity_oauth.rs"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"07dfe4605a04ffd9dc502dcb88e133458ac9cb42563a6c2740f7a12990a3d914"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/jcode-base/src/subscription_catalog.rs:395-409 | crates/jcode-base/src/subscription_catalog.rs:411-422 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/subscription_catalog.rs"},"region":{"startLine":395}}}],"partialFingerprints":{"codehealthFindingId/v1":"2afb7372ed41b1c6d892bdaafaac257794c4fcfb3f8dd5d2c457e00b5eaf70f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/jcode-tui/src/tui/ui_messages.rs:3083-3095 | crates/jcode-tui/src/tui/ui_messages.rs:3537-3552 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":3083}}}],"partialFingerprints":{"codehealthFindingId/v1":"a08eb3b2fda29ea07bf0867e384251c3147018f760ec0adace5924e3631f7789"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): crates/jcode-tui/src/tui/ui_frame_metrics.rs:665-688 | crates/jcode-tui/src/tui/ui_frame_metrics.rs:704-731 \u2014 These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_frame_metrics.rs"},"region":{"startLine":665}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd5813c3a1cf3f1e2703d39575bc0595fc5c9ba71c1ef87e99c3b95347d0bcdb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): src/cli/commands.rs:253-263 | src/cli/commands.rs:476-485 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1e503aebcbe9d11cc042a3372467789e25abca97507312ef2bd7d5d847d6c78"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/jcode-app-core/src/tool/communicate.rs:51-64 | crates/jcode-app-core/src/tool/communicate.rs:98-111 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/communicate.rs"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"494328f4aedc39d0e28e33dba15c0fd49922ccb4cf263abaab3d4d71dadb3840"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/jcode-base/src/memory_rerank.rs:109-121 | src/bin/memory_recall_bench.rs:691-702 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory_rerank.rs"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1a6b6563f16c672658b7b601bbae94b8d0808bc0a3e8b5b71e4f23635fffc6f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/jcode-app-core/src/message_notifications.rs:195-212 | crates/jcode-base/src/message/notifications.rs:559-574 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/message_notifications.rs"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"52066eefc87e22adb77a0687fe9d16618fc97dfcc206910ef0e3abe3791ad2a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/jcode-base/src/browser.rs:1086-1098 | crates/jcode-base/src/browser.rs:1100-1115 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/browser.rs"},"region":{"startLine":1086}}}],"partialFingerprints":{"codehealthFindingId/v1":"6805832c2cf957f6ba07248d215e9187406a0b31029d74d8a40bfda01e1651d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/jcode-provider-core/src/selection.rs:68-80 | crates/jcode-provider-core/src/selection.rs:108-120 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/selection.rs"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef313a111ee751753c1981edee9f176255b9ab0805ecb467b3c0415bb64887bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/jcode-app-core/src/overnight.rs:705-716 | src/cli/hot_exec.rs:295-311 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/overnight.rs"},"region":{"startLine":705}}}],"partialFingerprints":{"codehealthFindingId/v1":"cccb42cc28f25b738598917275fdc12247e4f5eeda719eeb5e65bd2eb4fd2863"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/jcode-app-core/src/tool/discover_secrets.rs:107-118 | crates/jcode-tui/src/tui/ui_messages.rs:3027-3038 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/discover_secrets.rs"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"24739fb4513ea4806668ad39b941b5084e7d9697f5bddc6ab8de64632c30fe5f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 15\u002B corresponding lines): crates/jcode-base/src/auth/antigravity.rs:171-185 | crates/jcode-base/src/auth/gemini.rs:309-323 | crates/jcode-base/src/auth/google.rs:494-508 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/antigravity.rs"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"84678a83fb621d80aa630d5982c9ef9c836fa5791c4a752e6e0ba6181ced45f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/jcode-base/src/subscription_api.rs:666-678 | crates/jcode-base/src/subscription_api.rs:686-699 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/subscription_api.rs"},"region":{"startLine":666}}}],"partialFingerprints":{"codehealthFindingId/v1":"a43a6d5b5afb7b6cd77e55b904df2c559bd272a7fec75237000c51d3034fbfaf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/jcode-harness-api/src/requests.rs:366-378 | crates/jcode-protocol/src/wire.rs:932-944 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api/src/requests.rs"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf6521c3993c48f8a9c705be07b70e47b687ea2f7ecc978084b0264ec549c48b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/jcode-provider-antigravity-runtime/src/lib.rs:83-95 | crates/jcode-provider-gemini-runtime/src/lib.rs:75-85 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-antigravity-runtime/src/lib.rs"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5075043455d5902414863e6c8fc2c63279d6f1665d93584351091c8f7eca7b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/jcode-tui/src/tui/app/auth.rs:948-959 | crates/jcode-tui/src/tui/app/auth.rs:1203-1215 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth.rs"},"region":{"startLine":948}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ca4573db671025a30ba926ccd5fe350e2be48b217c9757d25abb56bb303237f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/jcode-voice/src/dictation.rs:475-487 | crates/jcode-voice/src/dictation.rs:588-604 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-voice/src/dictation.rs"},"region":{"startLine":475}}}],"partialFingerprints":{"codehealthFindingId/v1":"97ecf33d0067d33a884fddef6e4e5eced83a1098b695343922becc17331497c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/jcode-compaction-core/src/lib.rs:737-745 | crates/jcode-provider-core/src/failover.rs:60-70 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-compaction-core/src/lib.rs"},"region":{"startLine":737}}}],"partialFingerprints":{"codehealthFindingId/v1":"17940e820a4ce0e1d48ec3bc209edcf06a4e881a57229237cc6fb14a1e4d80d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 13\u002B corresponding lines): crates/jcode-app-core/src/server/background_tasks.rs:427-439 | crates/jcode-app-core/src/server/background_tasks.rs:506-521 | crates/jcode-app-core/src/server/background_tasks.rs:555-572 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/background_tasks.rs"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcd826f974df8f17d9ea16c9075176e422e67087963df1b2528d6e82c83c0d3a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/jcode-base/src/auth/copilot.rs:511-523 | crates/jcode-base/src/github.rs:36-50 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/copilot.rs"},"region":{"startLine":511}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd825c350026bb058fbad6c16e08b9067e53dc1ca87d83d3ed6c764339f16e7b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/jcode-tui/src/tui/app/commands_improve.rs:233-248 | crates/jcode-tui/src/tui/app/commands_improve.rs:266-281 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_improve.rs"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8136cfe901957c38c03aae1334b560dd442acd2ebaaa7253a03b94b81cf98d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/jcode-tui/src/tui/app/local.rs:193-205 | crates/jcode-tui/src/tui/app/remote.rs:564-580 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/local.rs"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"b899554308805edddb4a355374adba5a1f881b4d553b0c8fc376b24b7e7b91ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 16\u002B corresponding lines): crates/jcode-tui/src/tui/app/observe.rs:213-228 | crates/jcode-tui/src/tui/app/split_view.rs:121-136 | crates/jcode-tui/src/tui/app/todos_view.rs:456-471 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/observe.rs"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"f375aced274056adbbae1110af0f0825e943f52960c116d0991755f5db641e90"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/jcode-tui/src/tui/ui.rs:1614-1631 | crates/jcode-tui/src/tui/ui.rs:1707-1734 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui.rs"},"region":{"startLine":1614}}}],"partialFingerprints":{"codehealthFindingId/v1":"caed462e5f5c80740a4ca2923a2690a3aaa06e2f3a85065f493d4508311e725b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/jcode-app-core/src/server/turn_failover.rs:187-204 | crates/jcode-app-core/src/server/turn_failover.rs:236-250 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/turn_failover.rs"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"88b2e3862ea4df9ae4dd84b5d9aadc166e0e3797c0f34df0a07543b3f253a45d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/jcode-app-core/src/tool/mcp.rs:561-574 | crates/jcode-base/src/mcp/remote.rs:835-848 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/mcp.rs"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"4554c41daf5a74f767539dbbed97fcff7bb69961a0dd850c9211c536488f7295"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/jcode-harness-api-server/src/lib.rs:142-155 | crates/jcode-harness-api-server/src/lib.rs:163-176 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/lib.rs"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb7f67239e7cc211274a151881ea9401ba4ed43df996c5be0e6419c8dc5086f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/jcode-setup-hints/src/keymap/terminal.rs:137-154 | crates/jcode-setup-hints/src/keymap/terminal.rs:157-167 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/keymap/terminal.rs"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0992eac80e1bb3eda39d69bf4efeca84c4ea959368ba761927c05b2a8cbee12"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/jcode-tui-mermaid/src/mermaid_inline.rs:58-70 | crates/jcode-tui-mermaid/src/mermaid_runtime.rs:725-738 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_inline.rs"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2a178e80bdbf7d7bde8573148e81574f2ed7e3ce3eb866e60f218c08f86aa36"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 16\u002B corresponding lines): crates/jcode-app-core/src/agent/turn_execution.rs:1397-1412 | crates/jcode-app-core/src/agent/turn_execution.rs:1422-1439 | crates/jcode-app-core/src/agent/turn_execution.rs:1448-1469 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/turn_execution.rs"},"region":{"startLine":1397}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d44f257e27563bbc3f3543285093c2978db70c7df7d6c282777ab4d0d25f3c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 13\u002B corresponding lines): crates/jcode-base/src/auth/antigravity.rs:539-551 | crates/jcode-base/src/auth/gemini.rs:582-594 | crates/jcode-base/src/auth/gemini.rs:596-608 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/antigravity.rs"},"region":{"startLine":539}}}],"partialFingerprints":{"codehealthFindingId/v1":"8487b6669222bc49ac69c939cde7ef035d1d1b943e0a088d5f3c14b2393391a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/jcode-base/src/auth/google.rs:593-608 | crates/jcode-base/src/auth/google.rs:610-630 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/google.rs"},"region":{"startLine":593}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4f4247c053401ea074b8d0f62377fb538ac3a7065c7bc4cfa5d506c1eb90387"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/jcode-app-core/src/agents_status.rs:82-90 | crates/jcode-base/src/prompt.rs:182-194 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agents_status.rs"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"7049df81cea61579af45ab73d7a8d616a4fbbcff469d556a2ef1c080b8a5dc2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/jcode-base/src/auth/claude.rs:136-149 | crates/jcode-base/src/auth/codex.rs:95-108 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/claude.rs"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"89d5f169b9984f1483c09733fa7c1cd979133b9da13132a0714724a0d96df5c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/jcode-base/src/embedding_stub.rs:210-224 | crates/jcode-embedding/src/lib.rs:408-419 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/embedding_stub.rs"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"58aae3eaf88c1677126773a7d229390f81e70f7af37248ce9a0a39895c848df2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/jcode-base/src/gmail.rs:475-489 | crates/jcode-base/src/gmail.rs:502-511 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/gmail.rs"},"region":{"startLine":475}}}],"partialFingerprints":{"codehealthFindingId/v1":"adba0fc49ae14d4e0157397a0b48da445424e5cc37fd85e5d17a6f08ad108876"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/jcode-base/src/mcp/client.rs:39-49 | crates/jcode-base/src/mcp/remote.rs:373-386 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mcp/client.rs"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"92610278b54ec78e1e6fe58f11ea6087a90a9c6314b35b55c3c9f784c1b1f575"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/jcode-provider-anthropic-runtime/src/error_classification.rs:40-55 | crates/jcode-provider-copilot-runtime/src/routing.rs:36-48 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic-runtime/src/error_classification.rs"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"c99f5415ad796c5553ebcbd6e97c7f416784a7ec148e1d5bfb1be599a1fac29a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/jcode-tui-markdown/src/markdown_types.rs:36-48 | crates/jcode-tui-markdown/src/markdown_types.rs:50-64 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_types.rs"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"260f3e4d35a8ce6cacabfafe7bc01b2c36cf58a888643bc2f90ee9cf0914b479"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/jcode-app-core/src/channel.rs:629-640 | crates/jcode-app-core/src/server/jade_relay.rs:1323-1334 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/channel.rs"},"region":{"startLine":629}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ccd68a9f71a3a1dfb0b2e1b0883d674c98f0eb5b07a50b48ace402abf02b5d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/jcode-app-core/src/server/live_turn.rs:249-264 | crates/jcode-app-core/src/server/live_turn.rs:271-286 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/live_turn.rs"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b92086e6ff399ca81f42ec9c0b0dd1f63a0415b82ea7be5f10d0c6b0864c4cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/jcode-app-core/src/tool/ambient.rs:420-433 | crates/jcode-tui-permissions/src/lib.rs:663-677 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/ambient.rs"},"region":{"startLine":420}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cb5a86bcb01f420a00cd3c3e251f2b0ce50896a916dc54474de85d825ba137a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): crates/jcode-app-core/src/update.rs:1266-1285 | src/cli/hot_exec.rs:463-488 \u2014 These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/update.rs"},"region":{"startLine":1266}}}],"partialFingerprints":{"codehealthFindingId/v1":"6abe2eb130705ede5b17ba4e6031555e932769670e3d5d7569931e2ac958ede4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/jcode-base/src/provider/mod.rs:2521-2533 | crates/jcode-base/src/provider/mod.rs:2581-2588 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/mod.rs"},"region":{"startLine":2521}}}],"partialFingerprints":{"codehealthFindingId/v1":"9de7fc3a918363359cf6a48bbf67947cf52928f620a5376b6d429332f7e60fa4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/jcode-provider-openai-runtime/src/lib.rs:421-434 | crates/jcode-tui/src/tui/ui_inline_interactive.rs:437-449 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/lib.rs"},"region":{"startLine":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"507f7a106027d4f44252c6b7552097d1facc22c53596d2b3a631d0713b1e2c79"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/jcode-schema-dialect/src/rejection.rs:150-158 | crates/jcode-schema-dialect/src/rejection.rs:181-188 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-schema-dialect/src/rejection.rs"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"48736191e364e23faa4a82f8370e506dee83c5935014c331c19d7fd87b430064"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/jcode-tui-markdown/src/markdown_latex_image.rs:419-430 | crates/jcode-voice/src/command_capture.rs:172-180 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_latex_image.rs"},"region":{"startLine":419}}}],"partialFingerprints":{"codehealthFindingId/v1":"aac3768734d1c26489fdc4c516dc74ec1b85166c351285c285dbc1240d7d1b56"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/jcode-tui-usage-overlay/src/lib.rs:317-327 | crates/jcode-tui/src/tui/login_picker.rs:188-198 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-usage-overlay/src/lib.rs"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a496954efec5484d691ae1bcfd72d162efabbc320b649815347d3d3a5c87f30"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/jcode-tui/src/tui/app/input.rs:3764-3776 | crates/jcode-tui/src/tui/app/input.rs:3830-3842 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":3764}}}],"partialFingerprints":{"codehealthFindingId/v1":"4751d1af78f9ea234ad1deb901f0bbac7f242d2dc6b1efbfe094cafbf01a5b38"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/jcode-base/src/auth/claude.rs:343-356 | crates/jcode-base/src/auth/codex.rs:184-195 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/claude.rs"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"952321a5eeda3e7799850ca7d9ac54f6fb2aee9c7937643c7d138f872d9e6bfa"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/jcode-tui-mermaid/src/mermaid_cache_render.rs:860-874 | crates/jcode-tui/src/tui/ui_inline_image.rs:467-481 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_cache_render.rs"},"region":{"startLine":860}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5a4e81622e35e32dc79d3f763e458e21bc67ae2f8103b224cc4ad7ae110ae23"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): crates/jcode-app-core/src/session_rebuild.rs:167-185 | crates/jcode-app-core/src/session_rebuild.rs:187-205 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/session_rebuild.rs"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"11eb0dc38998230e09b620b294dab4800d6ae9bd4ee815605ef0f194649600ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/jcode-base/src/auth/claude.rs:434-444 | crates/jcode-base/src/auth/codex.rs:295-305 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/claude.rs"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"b516623f3202fa09261f4121bf732b614a8b458ba9e7f02c58634d838223216c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/jcode-base/src/gmail.rs:521-531 | crates/jcode-base/src/gmail.rs:594-603 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/gmail.rs"},"region":{"startLine":521}}}],"partialFingerprints":{"codehealthFindingId/v1":"090b8f756bf4c14b0df5fb074f43115899be4b3d764a053f7bdc5371078ae08a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/jcode-tui-mermaid/src/lib.rs:1049-1062 | crates/jcode-tui-mermaid/src/lib.rs:1147-1160 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/lib.rs"},"region":{"startLine":1049}}}],"partialFingerprints":{"codehealthFindingId/v1":"43f79eccfa252fdab9febacffb373a9e23a2e2cf249e8ef961d3af864caa8f99"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/jcode-base/src/copilot_usage.rs:20-37 | crates/jcode-base/src/provider_activity.rs:102-114 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/copilot_usage.rs"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c9ef1e4903d22f739f87d890f29c40022f27d0ebea7c86d4bfd023c23bcce05"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/jcode-base/src/memory_log.rs:28-41 | crates/jcode-logging/src/lib.rs:216-231 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory_log.rs"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"c57d2e42205cdfd489c5a9941e8809952aaf1686fa90ad37edc888ea96100c41"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 14\u002B corresponding lines): crates/jcode-build-support/src/storage_helpers.rs:119-132 | crates/jcode-build-support/src/storage_helpers.rs:135-148 | crates/jcode-build-support/src/storage_helpers.rs:151-164 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-build-support/src/storage_helpers.rs"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6332cddd223c6dc6c85c68a65f30201b024a511be404e160209f423f37db730"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 15\u002B corresponding lines): crates/jcode-app-core/src/server/provider_control.rs:226-240 | crates/jcode-app-core/src/server/provider_control.rs:470-484 | crates/jcode-app-core/src/server/provider_control.rs:492-518 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/provider_control.rs"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a82dcab1e1c5efb274e7500327d85642e501dc0beb2dc829cffdb21b5bffdda"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 7\u002B corresponding lines): crates/jcode-app-core/src/usage_display.rs:169-175 | crates/jcode-base/src/usage/display.rs:176-184 | crates/jcode-tui-usage-overlay/src/lib.rs:773-781 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_display.rs"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"b87d666f5919d4c91c9763f78b443671033a8cba5c978e1f81598ff0298384aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/jcode-base/src/memory.rs:490-504 | crates/jcode-base/src/memory.rs:512-525 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory.rs"},"region":{"startLine":490}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f932dff19b51d604dfaa0975afd06b8a68bf8ce8a9ab3e619524c5137921b69"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/jcode-base/src/memory/activity.rs:45-59 | crates/jcode-base/src/memory/activity.rs:87-100 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory/activity.rs"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b84b10444bc681373123287f55111e6db088326f8c8546db9c8b54045bcdbf3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/jcode-harness-api-server/src/translate.rs:1440-1454 | crates/jcode-harness-api-server/src/translate.rs:1456-1471 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/translate.rs"},"region":{"startLine":1440}}}],"partialFingerprints":{"codehealthFindingId/v1":"83aa3ac117ba69077f1966fbf184e5e11b5c889b0704340819d130f7dae78e33"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/jcode-provider-openrouter-runtime/src/lib.rs:930-946 | crates/jcode-provider-openrouter-runtime/src/lib.rs:967-985 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/lib.rs"},"region":{"startLine":930}}}],"partialFingerprints":{"codehealthFindingId/v1":"be39bcc09ac30da644c027798478f9960adc2b711b3e40742c5b59784c13d6e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/jcode-tui-permissions/src/lib.rs:83-92 | crates/jcode-tui-permissions/src/lib.rs:94-103 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-permissions/src/lib.rs"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbf431244c440cfe71fec056c793cd56222c9005a36ce2a68bb2c3fe648b4d43"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/jcode-tui/src/tui/ui/display_width.rs:8-22 | crates/jcode-tui/src/tui/ui/display_width.rs:27-41 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui/display_width.rs"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"f086b426861d3d24c9981f4709dc7cd041f14099caa5b76a5870b13df552f3bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/jcode-base/src/provider/catalog_routes.rs:751-765 | crates/jcode-base/src/provider/catalog_routes.rs:773-787 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/catalog_routes.rs"},"region":{"startLine":751}}}],"partialFingerprints":{"codehealthFindingId/v1":"a55932dfccf0b8a91de81412dacd42fea9a1e966551f6bc1797957b0dc4e5531"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 10\u002B corresponding lines): crates/jcode-base/src/session.rs:1402-1411 | crates/jcode-base/src/session.rs:1474-1486 | crates/jcode-base/src/session/persistence.rs:268-277 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session.rs"},"region":{"startLine":1402}}}],"partialFingerprints":{"codehealthFindingId/v1":"5256087277b8499c3a9def5da4604b67c75af954a6099d417397326f2a478b97"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): crates/jcode-compaction-core/src/lib.rs:410-432 | crates/jcode-compaction-core/src/lib.rs:442-460 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-compaction-core/src/lib.rs"},"region":{"startLine":410}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5233554ebe20a29542436f16e45554f32226d9ba687857161093588ba63fbd5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 17\u002B corresponding lines): crates/jcode-provider-openai-runtime/src/lib.rs:1117-1138 | crates/jcode-provider-openrouter-runtime/src/lib.rs:1082-1099 | crates/jcode-provider-openrouter-runtime/src/lib.rs:1101-1118 | crates/jcode-provider-openrouter-runtime/src/lib.rs:1120-1136 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/lib.rs"},"region":{"startLine":1117}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbb2a307bd9c1751c71b3f9c205e22baf3f059ed59810e9c7061624724a2761a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (6 members, 13\u002B corresponding lines): crates/jcode-app-core/src/server/client_api.rs:45-60 | crates/jcode-app-core/src/server/client_api.rs:215-230 | crates/jcode-app-core/src/server/client_api.rs:232-244 | crates/jcode-app-core/src/server/client_api.rs:264-277 | crates/jcode-app-core/src/server/client_api.rs:325-338 | crates/jcode-app-core/src/server/client_api.rs:340-352 \u2014 These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_api.rs"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e74f1c661bba3c41e682cdbefe34fd5601748eed9a95775d4ae2720b66ebec3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 15\u002B corresponding lines): crates/jcode-app-core/src/server/input_shell_output.rs:3-17 | crates/jcode-tui/src/tui/app/input/shell_commands.rs:3-17 | crates/jcode-voice/src/dictation.rs:655-669 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/input_shell_output.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"5aa1c30b26a288e42e5355214e6563c6f1175c66a7a36d94540e7cfc74bcac45"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/jcode-app-core/src/ssh_remote.rs:106-123 | crates/jcode-logging/src/lib.rs:494-510 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/ssh_remote.rs"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"720c51661f2d9f08db7a047bbd1e2b9d0eae1811cfe909f379bff8a9b2cc6bd3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/jcode-provider-openai/src/stream.rs:22-30 | crates/jcode-provider-openai/src/websocket_health.rs:63-71 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai/src/stream.rs"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"69a66ed296b96874cc240b9c9cfd5120e4753e7554e7228c1c826a886f139bd0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/jcode-tui/src/tui/ui.rs:696-712 | crates/jcode-tui/src/tui/ui.rs:785-804 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui.rs"},"region":{"startLine":696}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce6a7a841230f10d0a39c6695ef2c75ea3ad50afd266cb8f83d35ded5e8302fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/jcode-tui/src/tui/ui_frame_metrics.rs:1241-1253 | crates/jcode-tui/src/tui/ui_header.rs:597-608 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_frame_metrics.rs"},"region":{"startLine":1241}}}],"partialFingerprints":{"codehealthFindingId/v1":"174257282137d14fe2ade2b6158d4d4df25b7a5d5f33826b6e0021a00f45eef4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/jcode-tui/src/tui/ui_inline_image.rs:586-613 | crates/jcode-tui/src/tui/ui_inline_image.rs:665-678 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_inline_image.rs"},"region":{"startLine":586}}}],"partialFingerprints":{"codehealthFindingId/v1":"385ce6e4417eaf361af9be0d8a4bc170ba94e392af89902cdad70cb5a1d412a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/jcode-app-core/src/server/provider_control.rs:867-878 | crates/jcode-app-core/src/server/provider_control/deferred_operations.rs:71-82 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/provider_control.rs"},"region":{"startLine":867}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d4e8f2b245dcdbb7e3767cb0491762815a05bc4ce603022504ff94feeb49ed8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/jcode-app-core/src/tool/webfetch.rs:275-286 | crates/jcode-app-core/src/tool/webfetch.rs:288-299 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/webfetch.rs"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"14d03c7c41e324c7425c6b583cad39dc1d16e84175aa0a86ed3626bc81362655"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/jcode-base/src/power_inhibit.rs:469-485 | crates/jcode-base/src/power_inhibit.rs:487-501 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/power_inhibit.rs"},"region":{"startLine":469}}}],"partialFingerprints":{"codehealthFindingId/v1":"4668d7d61cdbda163a535a7438294548de48e8e9bb4f495193192e4cdb610512"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/jcode-provider-bedrock/src/lib.rs:212-222 | crates/jcode-provider-bedrock/src/lib.rs:225-232 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-bedrock/src/lib.rs"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b36e1f49fe87cb5e780670a009eae7854032973d953f5d76b24a8aa6836a770"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/jcode-setup-hints/src/keymap/external.rs:230-241 | crates/jcode-setup-hints/src/keymap/external.rs:301-312 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/keymap/external.rs"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"19ad67410aaea84f96f7249fbf9f4092a474c2de8bb0fba3c7da20e09cea5b58"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/jcode-setup-hints/src/lib.rs:2341-2353 | crates/jcode-setup-hints/src/lib.rs:2413-2423 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/lib.rs"},"region":{"startLine":2341}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc38cfd0d43fc9bed1f68d831bc461a389680851ce75ec1d926c6750a66000dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/jcode-telemetry-core/src/concurrency.rs:116-130 | src/cli/cloud_session_ops.rs:231-240 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/concurrency.rs"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"6604af30d3f562e68a74040762b1174d6ba96c5014240fe5cd3a2a08d869b847"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (6 members, 13\u002B corresponding lines): crates/jcode-tui/src/tui/ui_pinned.rs:411-423 | crates/jcode-tui/src/tui/ui_pinned.rs:427-439 | crates/jcode-tui/src/tui/ui_pinned.rs:441-453 | crates/jcode-tui/src/tui/ui_pinned.rs:455-467 | crates/jcode-tui/src/tui/ui_pinned.rs:469-481 | crates/jcode-tui/src/tui/ui_pinned.rs:483-495 \u2014 These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_pinned.rs"},"region":{"startLine":411}}}],"partialFingerprints":{"codehealthFindingId/v1":"09b66eac3ea20680a27a493ae69aa0a221c3511e88267aba07f19b6e766a8cb7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/jcode-app-core/src/tool/session_http.rs:147-158 | crates/jcode-tui/src/tui/app/cloud_environment.rs:80-91 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/session_http.rs"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"283eaae67c0e6092f23ee9214b2ce7e2a5c491c9bb55947b7bda2654f4068a16"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/jcode-base/src/provider/model_provider_availability.rs:80-93 | crates/jcode-base/src/provider/model_provider_availability.rs:103-113 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/model_provider_availability.rs"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e6edc42a30f997c24b4e5991ed17888747649b191f62883197e830da64d9163"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/jcode-tui/src/tui/info_widget_memory_render.rs:69-78 | crates/jcode-tui/src/tui/info_widget_swarm_background.rs:185-193 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_memory_render.rs"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a39c816586e7992624ee159855c3231991cbe1d0258492d12c18b3b88e4bf29"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/jcode-base/src/goal.rs:290-305 | crates/jcode-base/src/goal.rs:311-326 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/goal.rs"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"34b6957d97aac4ab5a33087032c4c6c911577e77d66550d8f4f45fafb0224b21"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/jcode-codemode/src/engine.rs:407-419 | crates/jcode-sdk/src/turn_retry.rs:555-566 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-codemode/src/engine.rs"},"region":{"startLine":407}}}],"partialFingerprints":{"codehealthFindingId/v1":"4250179b149295e119cace36cf20163d07990fa2d2ca5edc0a0707328874f465"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/jcode-telemetry-core/src/lib.rs:2244-2255 | crates/jcode-telemetry-core/src/lib.rs:2277-2288 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lib.rs"},"region":{"startLine":2244}}}],"partialFingerprints":{"codehealthFindingId/v1":"f04b7bd5c576f7b8d0e93f5e4ddbf9caf4ac3ee385795fd3d3c187c63ad0c0df"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/jcode-tui-account-picker/src/lib.rs:108-124 | crates/jcode-tui-usage-overlay/src/lib.rs:96-114 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/lib.rs"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7266dcc5606bf484e7b1203a8fd1ab868e7ec07b5781e280630a6ce886278ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/jcode-tui-mermaid/src/mermaid_debug.rs:522-529 | crates/jcode-tui/src/tui/app/input.rs:86-93 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_debug.rs"},"region":{"startLine":522}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c9d3bc4dcc78c5b3fad401979af53ebde69094429f6f589dcbffe6821ccfa30"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/jcode-tui/src/tui/ui.rs:755-768 | crates/jcode-tui/src/tui/ui.rs:770-783 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui.rs"},"region":{"startLine":755}}}],"partialFingerprints":{"codehealthFindingId/v1":"7244d0bf1ef7b4e49b2957c9272d1e4ea8982486265d042429928f5aaf8d1082"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): src/cli/provider_init.rs:759-771 | src/cli/provider_init.rs:773-786 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/provider_init.rs"},"region":{"startLine":759}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb465f4aa43893c248c755d1877cf233c1f09f861105af81e29a80f2622b5706"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/jcode-app-core/src/server/reload_trace.rs:16-32 | crates/jcode-message-types/src/lib.rs:595-614 \u2014 These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/reload_trace.rs"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"27cb8ceb5b0dc3bb2049820a4ee73149c34117c8cc1725175ff91fea904dbd97"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 9\u002B corresponding lines): crates/jcode-setup-hints/src/lib.rs:1817-1825 | crates/jcode-setup-hints/src/lib.rs:1829-1837 | crates/jcode-setup-hints/src/lib.rs:1986-1994 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/lib.rs"},"region":{"startLine":1817}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e9578935c22fd9027d2d419c357b444eb9ddd6cd53fe62872db02134d913ab4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 8\u002B corresponding lines): crates/jcode-tui-mermaid/src/lib.rs:804-811 | crates/jcode-tui-mermaid/src/lib.rs:1105-1112 | crates/jcode-tui-mermaid/src/lib.rs:1209-1216 | crates/jcode-tui/src/tui/ui_inline_image.rs:207-216 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/lib.rs"},"region":{"startLine":804}}}],"partialFingerprints":{"codehealthFindingId/v1":"01c207480d841d0be2d02b8f3c241e44c4bb4955d7e4bd03a8825a8aa510a5d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/jcode-tui/src/tui/keybind.rs:521-530 | crates/jcode-tui/src/tui/keybind.rs:534-546 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/keybind.rs"},"region":{"startLine":521}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d2f984ab1973b255aced6a37a1431002882f34a7e2d336abd27abdcfe25982f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): src/cli/commands/provider_setup.rs:363-376 | src/cli/commands/provider_setup.rs:378-391 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands/provider_setup.rs"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"960024004c93026466462f2385af93fac938c323dfa840767de1c0117096fc1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/jcode-app-core/src/server/debug_server_state.rs:1088-1101 | crates/jcode-app-core/src/server/debug_server_state.rs:1136-1145 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_server_state.rs"},"region":{"startLine":1088}}}],"partialFingerprints":{"codehealthFindingId/v1":"0de7f2f6ab434d14beee8df3d0557d4ee67544526077702b7a6b1254b4c1ac62"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/jcode-provider-cursor-runtime/src/lib.rs:639-652 | crates/jcode-provider-gemini-runtime/src/lib.rs:998-1011 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/lib.rs"},"region":{"startLine":639}}}],"partialFingerprints":{"codehealthFindingId/v1":"495d9b78793104a3247bb8213b348908818e3eb689365c61c5f492bc96a5932c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/jcode-setup-hints/src/windows_setup.rs:159-165 | src/cli/login/scriptable.rs:881-888 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/windows_setup.rs"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddcbbd91b71dc682afb7c0b2f12d075d055de4e7f816f151e296e83f1ed6acd4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/jcode-tui/src/tui/app/auth.rs:1042-1057 | crates/jcode-tui/src/tui/app/auth.rs:1063-1078 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth.rs"},"region":{"startLine":1042}}}],"partialFingerprints":{"codehealthFindingId/v1":"71ade4526e19495bbcd6c88138e9e2f8e8ac90c8cfddf9c3587f53826e9d7194"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/jcode-app-core/src/server/swarm.rs:342-348 | crates/jcode-base/src/scratch_maintenance.rs:35-41 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/swarm.rs"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"1afd876d47d453da805f29b318c6e1fe50e067155ee124c048be40337bf0d6e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/jcode-base/src/todo.rs:45-55 | crates/jcode-base/src/todo.rs:159-169 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/todo.rs"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"206f6341ea423b9740c90ad97bff4aff8cd5d14daea31661848048e621f6078d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/jcode-provider-core/src/openai_schema.rs:177-183 | crates/jcode-schema-dialect/src/dialect.rs:302-308 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/openai_schema.rs"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"24381d5b885f0f09914f7462702c0228f547bbbbc01b8772def5e7981a53aca9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/jcode-provider-cursor-runtime/src/wire.rs:1059-1072 | crates/jcode-provider-cursor-runtime/src/wire.rs:1159-1167 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/wire.rs"},"region":{"startLine":1059}}}],"partialFingerprints":{"codehealthFindingId/v1":"4587302e450a5051818f8e4a0bfd97985338c30af557f6f19b2cd1176648f40d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 9\u002B corresponding lines): crates/jcode-setup-hints/src/windows_setup.rs:22-30 | crates/jcode-setup-hints/src/windows_setup.rs:32-40 | crates/jcode-tui/src/tui/app/productivity.rs:137-146 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/windows_setup.rs"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"69914b8ab3b1f66e6ceccec0e1fbcc258f5e013dc34918e91aacddb7af7e0c27"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 11\u002B corresponding lines): crates/jcode-tui/src/tui/app/hotkey_feedback.rs:650-664 | crates/jcode-tui/src/tui/app/inline_interactive.rs:212-222 | crates/jcode-tui/src/tui/app/inline_interactive.rs:264-274 | crates/jcode-tui/src/tui/app/shortcut_hints.rs:143-157 | crates/jcode-tui/src/tui/app/swarm_hint.rs:42-56 \u2014 These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/hotkey_feedback.rs"},"region":{"startLine":650}}}],"partialFingerprints":{"codehealthFindingId/v1":"9175200e39392740e15473a6a14d21e574b2dff9a1876af596ea1b21028fa2b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/jcode-app-core/src/agent/tools.rs:7-19 | crates/jcode-app-core/src/agent/tools.rs:21-31 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/tools.rs"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fa44fdde34be64b17b5e718de1910de6a7ffdfc761aaea2675c3de21824b52d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/jcode-app-core/src/server/client_lifecycle_logging.rs:42-52 | crates/jcode-app-core/src/tool/communicate/transport.rs:60-70 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_lifecycle_logging.rs"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"48b5697a4e46ce51f9ebaee41755a45bbb4f43730406e26e7b1031d4fee02b12"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 11\u002B corresponding lines): crates/jcode-app-core/src/tool/computer/ax.rs:239-249 | crates/jcode-app-core/src/tool/computer/ax.rs:252-263 | crates/jcode-app-core/src/tool/computer/ax.rs:266-279 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/computer/ax.rs"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"26e50d5d1380bda9fb6d51b30fe2b206490a0d34fd644c82e90d37b794b37473"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 8\u002B corresponding lines): crates/jcode-base/src/auth/external.rs:177-184 | crates/jcode-base/src/auth/external.rs:186-196 | crates/jcode-base/src/auth/external.rs:306-314 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/external.rs"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe8611a512fea49f61a687dc34f8f31a16902bc334a7f4f3b6737e17b9b36b45"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/jcode-base/src/usage/accessors.rs:82-96 | crates/jcode-base/src/usage/accessors.rs:146-159 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/accessors.rs"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"e487e6747348fd62dff55df60d153422505441765224762460d03bee85b16f43"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/jcode-core/src/id.rs:222-234 | crates/jcode-core/src/id.rs:263-273 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-core/src/id.rs"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae1bb463d9f6f4dc52381f7191ae9153d859805588c722b741af1ecae79a63bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/jcode-notify-email/src/lib.rs:419-431 | crates/jcode-tui/src/tui/app/commands_cloud.rs:862-879 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-notify-email/src/lib.rs"},"region":{"startLine":419}}}],"partialFingerprints":{"codehealthFindingId/v1":"d34c4a6fb70c58ebd5925b3c2652e5cf91a265eebff834828b4fb06ad00ef52d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/jcode-app-core/src/notifications.rs:679-691 | crates/jcode-app-core/src/tool/computer/osa.rs:138-150 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/notifications.rs"},"region":{"startLine":679}}}],"partialFingerprints":{"codehealthFindingId/v1":"f303649d36c1a83a4ad7f9a5d54e7f771b92558f2271c9eea2274158437f40ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/jcode-app-core/src/tool/mod.rs:1425-1434 | crates/jcode-app-core/src/tool/mod.rs:1436-1446 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/mod.rs"},"region":{"startLine":1425}}}],"partialFingerprints":{"codehealthFindingId/v1":"3915ba51ba73c6943800eaa19054011f2d2e057f7b619d918d5c04f0b991fb0a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/jcode-base/src/goal.rs:607-618 | crates/jcode-tui/src/tui/app/voice_input.rs:502-510 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/goal.rs"},"region":{"startLine":607}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6c9d2eba690a2f0e7db8dcfdf35064e26f247c665d3b153f5fd334cc5857605"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/jcode-core/src/fs.rs:11-22 | crates/jcode-core/src/fs.rs:28-40 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-core/src/fs.rs"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"028595016c14afc9d9e41c590d04ecdb6b417d408bf42b415171fdc8e4f27ae0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 13\u002B corresponding lines): crates/jcode-provider-antigravity-runtime/src/lib.rs:784-798 | crates/jcode-provider-cursor-runtime/src/lib.rs:608-620 | crates/jcode-provider-gemini-runtime/src/lib.rs:958-970 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-antigravity-runtime/src/lib.rs"},"region":{"startLine":784}}}],"partialFingerprints":{"codehealthFindingId/v1":"afa92eb583c6bd9fc28ddc6465f999d3e4834ff73b1fc3de10f61c2f9547e483"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/jcode-provider-bedrock/src/lib.rs:1500-1512 | crates/jcode-provider-core/src/lib.rs:316-328 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-bedrock/src/lib.rs"},"region":{"startLine":1500}}}],"partialFingerprints":{"codehealthFindingId/v1":"61214a384df4829c0dd4a717f91d1c2852f5a75a9490ca594e855800f63464f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/jcode-sdk/src/client.rs:1206-1229 | crates/jcode-sdk/src/client.rs:1237-1249 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-sdk/src/client.rs"},"region":{"startLine":1206}}}],"partialFingerprints":{"codehealthFindingId/v1":"1371eb0cdcfaeba66b4cc82275579f6d759b2f26aaad123b41b242d49f20c8cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/jcode-tui/src/tui/app/commands.rs:2429-2444 | crates/jcode-tui/src/tui/app/commands.rs:2446-2461 \u2014 These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":2429}}}],"partialFingerprints":{"codehealthFindingId/v1":"7921af780e1062ffbf457bd253a1e73aea88abdffe4303d1bfbffb6aaa156e3c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): crates/jcode-tui/src/tui/ui_memory_estimates.rs:28-32 | crates/jcode-tui/src/tui/ui_pinned.rs:207-211 \u2014 These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_memory_estimates.rs"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"88a70b01f66a8b89b4b9a4bee5b373edb78dd40deda60b22677c2a7f333b110b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/jcode-base/src/auth/oauth.rs:1096-1108 | crates/jcode-base/src/auth/oauth.rs:1202-1214 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/oauth.rs"},"region":{"startLine":1096}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c94b61faf6256ae90df03e704570b58818ba7225bc85321c164c36b1d0f9e2b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/jcode-base/src/compaction.rs:1419-1430 | crates/jcode-base/src/compaction.rs:1433-1445 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/compaction.rs"},"region":{"startLine":1419}}}],"partialFingerprints":{"codehealthFindingId/v1":"625a60b30bc9cfe5c0f995b3821dc54fb2cfaca1d25569d1c73277e4dc83d145"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/jcode-storage/src/lib.rs:163-170 | crates/jcode-storage/src/lib.rs:221-229 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-storage/src/lib.rs"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"e040f99a85d04e4c8e9b0bb5b5c52600b3e9569467cc07a4e1f011f97d6e8053"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 11\u002B corresponding lines): crates/jcode-telemetry-core/src/lib.rs:1226-1236 | crates/jcode-telemetry-core/src/lib.rs:2567-2577 | crates/jcode-telemetry-core/src/lib.rs:2579-2589 | crates/jcode-telemetry-core/src/lib.rs:2591-2601 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lib.rs"},"region":{"startLine":1226}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8cc94e8b8b4922048b296fa91c82b0c6ab3d394b2694ebad24149c4dfdc55d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/jcode-base/src/usage/banked.rs:107-116 | crates/jcode-base/src/usage/remote_accounts.rs:18-27 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/banked.rs"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"e71520d05f8b2390682e8de31ee036f6b6cc3fa745d9a2c2b03068f31a060137"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/jcode-companion/src/server.rs:207-213 | crates/jcode-companion/src/server.rs:216-225 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-companion/src/server.rs"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"3811db53b1043f882c7e9f50e9e06c39d716ef35138673fa71467631669ee12e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/jcode-harness-api-server/src/timing.rs:16-21 | crates/jcode-harness-api-server/src/translate.rs:3050-3056 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/timing.rs"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1a814463ae9d7fd765f3b115bfca9409f25cf8b11cdfd444ea1fcfaf08a2e1b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 8\u002B corresponding lines): crates/jcode-provider-core/src/auth_mode.rs:194-201 | crates/jcode-provider-core/src/auth_mode.rs:204-211 | crates/jcode-provider-core/src/auth_mode.rs:214-221 | crates/jcode-provider-core/src/auth_mode.rs:233-240 | crates/jcode-provider-core/src/auth_mode.rs:243-250 \u2014 These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/auth_mode.rs"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b340433ec9ec37e84867296fa499eaa08107a0909f37deefcefbd64f1d43791"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/jcode-transport/src/windows.rs:168-173 | crates/jcode-transport/src/windows.rs:181-186 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-transport/src/windows.rs"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"533ccd0b812bf3559c55cd123d559315a1aec54cf2d32de54317cf0a1879be5e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/jcode-tui-markdown/src/markdown_math_copy.rs:29-38 | crates/jcode-tui/src/tui/ui_file_diff.rs:87-98 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_math_copy.rs"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed3c3a192ae2c7b418c2b62803fe9ef27fdeb68b087986192eb4b612fad91d44"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 11\u002B corresponding lines): crates/jcode-app-core/src/agent/utils.rs:29-39 | crates/jcode-build-support/src/source_state.rs:157-168 | crates/jcode-build-support/src/source_state.rs:171-182 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/utils.rs"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2453210b09505e0ab40ba798675339878bff1f43d721dc238d32e2663941d2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 9\u002B corresponding lines): crates/jcode-app-core/src/server/client_api.rs:160-168 | crates/jcode-app-core/src/server/client_api.rs:288-296 | crates/jcode-app-core/src/server/client_api.rs:298-306 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_api.rs"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"58b4cbe27480e4d2f52a3da0b31d2a32d32610353bf5b10cddd19967ce2c3f33"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 11\u002B corresponding lines): crates/jcode-base/src/mcp/manager.rs:122-133 | crates/jcode-base/src/mcp/manager.rs:147-157 | crates/jcode-base/src/mcp/manager.rs:160-170 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mcp/manager.rs"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"4eaf02e2964433653e61578c0af56574516e2ee704d05b77cc83e880c5517e32"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/jcode-base/src/provider/openrouter.rs:199-210 | crates/jcode-provider-openrouter-runtime/src/lib.rs:223-234 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/openrouter.rs"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"805e126034cd53720c125333110659472867797194bbda705e40b05905a786cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/jcode-provider-antigravity/src/lib.rs:49-56 | crates/jcode-base/src/auth/grok_build.rs:69-75 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-antigravity/src/lib.rs"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7b93cf6deb3f48b083d7257f1b4942bf955b4d3c4ce982540f6a0a15f22b9f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/jcode-tui-render/src/chrome.rs:53-65 | crates/jcode-tui/src/tui/ui_pinned.rs:35-47 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/chrome.rs"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"b350905a60573af6f2e14c85cbcf0a392abde0d420ccfa25c691f074b9761d3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 14\u002B corresponding lines): crates/jcode-tui/src/tui/ui.rs:320-333 | crates/jcode-tui/src/tui/ui.rs:391-405 | crates/jcode-tui/src/tui/ui.rs:465-479 | crates/jcode-tui/src/tui/ui.rs:494-508 | crates/jcode-tui/src/tui/ui.rs:526-540 \u2014 These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui.rs"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"636b69f71b2d26f72555d88b5fac45387ee93fd0840b34c9b2e190cf594d5ced"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/jcode-base/src/session.rs:588-596 | crates/jcode-base/src/session.rs:605-613 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session.rs"},"region":{"startLine":588}}}],"partialFingerprints":{"codehealthFindingId/v1":"77fcaf29119efd9a30152041ccf5ecc44b41930d5b419c12bbdc1b36a36900f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/jcode-sdk/src/client.rs:1173-1184 | crates/jcode-sdk/src/client.rs:1370-1383 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-sdk/src/client.rs"},"region":{"startLine":1173}}}],"partialFingerprints":{"codehealthFindingId/v1":"44bf59073c9b82a458addeb4cc83324bddcc9c91f53706592fe5b7a8e3e8235c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/jcode-provider-gemini/src/lib.rs:582-588 | crates/jcode-tui/src/tui/app/tui_state.rs:141-150 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-gemini/src/lib.rs"},"region":{"startLine":582}}}],"partialFingerprints":{"codehealthFindingId/v1":"12b2544ef0561fda1b7be5dfaa8ee02acd3b6d975fc65e64c18eca3b6c7fa240"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/jcode-tui/src/tui/ui_diagram_pane.rs:81-92 | crates/jcode-tui/src/tui/ui_pinned_layout.rs:119-130 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_diagram_pane.rs"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"03cb2b97869e2cc92bdb03477a457302e6b2d1ff734505d1919e4b81d9ada645"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/jcode-app-core/src/server/durable_state.rs:27-39 | crates/jcode-tui-markdown/src/markdown_latex_image.rs:845-853 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/durable_state.rs"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"b26beb75176ec969fff8ad5bc66427579bfc9397499a0f6417a4a414c7b1aad5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/jcode-app-core/src/tool/session_search.rs:1776-1786 | crates/jcode-message-types/src/lib.rs:322-330 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/session_search.rs"},"region":{"startLine":1776}}}],"partialFingerprints":{"codehealthFindingId/v1":"5598e5d0449cf767870a710f984fd34ea8f48d99595c5985c6a3b288eb587a2d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/jcode-provider-antigravity-runtime/src/lib.rs:938-945 | crates/jcode-provider-gemini-runtime/src/lib.rs:1028-1035 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-antigravity-runtime/src/lib.rs"},"region":{"startLine":938}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d49735ba48dc3f88ec2cbdc5a07df0b3dbd2253337ef59880f54b264b965eb9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/jcode-tui/src/tui/app/onboarding_flow.rs:272-286 | crates/jcode-tui/src/tui/app/onboarding_flow.rs:290-304 \u2014 These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/onboarding_flow.rs"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2cebfd341eb86fd8c0aa0a958fef3b4fef8c7d864fb5ba1f728ab8c85200c9c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/jcode-tui/src/tui/ui_input.rs:1905-1915 | crates/jcode-base/src/mcp/remote.rs:289-296 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_input.rs"},"region":{"startLine":1905}}}],"partialFingerprints":{"codehealthFindingId/v1":"efad040bb65f863f52940958b73c92160c83ebc8a9f37af3eda71f7c36688188"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/jcode-tui/src/tui/ui_tools.rs:789-798 | crates/jcode-voice/src/dictation.rs:642-653 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tools.rs"},"region":{"startLine":789}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea86db3851e05ca0d016c09caf1dbbbdc9fbd3085105f0a1e33bdfcd0cba2017"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): src/bin/memory_recall_bench.rs:151-156 | src/cli/cloud_move.rs:2664-2667 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"02e921e89506df2ab24ce95c18c9a6e517c08695bfc62878554bc609423c8339"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): src/cli/cloud_move.rs:146-158 | src/cli/cloud_session_ops.rs:214-224 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_move.rs"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"61eefdfbbfcddebfa417cf8c0be52f243dea5a8a515ec095bc6df87e74bc00e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/jcode-app-core/src/agent.rs:216-247 | crates/jcode-provider-openai-runtime/src/lib.rs:261-272 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent.rs"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"e571d66da42eccef1102cf9cb5457380a8fdf5d245229e43d3ca6d899a30df7c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/jcode-app-core/src/message_notifications.rs:85-93 | crates/jcode-base/src/message/notifications.rs:147-157 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/message_notifications.rs"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"95587bb25b361e813d793d1639eefc73e2e9e6c1463fcc8a9bf3d97db18ce79b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 10\u002B corresponding lines): crates/jcode-app-core/src/server/runtime_ssh_loops.rs:51-60 | crates/jcode-base/src/session_telemetry.rs:28-41 | src/cli/cloud_move.rs:1027-1040 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/runtime_ssh_loops.rs"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc5b054913a8a9379ed8e86195c08a0c69ac04aaf0c05f5d0d8974b62cb2d115"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/jcode-base/src/account_login.rs:372-382 | src/cli/login/jcode_device.rs:95-104 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/account_login.rs"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"e42ee68a82ee55978c996b620a53324af2e01dba8fbe0dcef287fa5e950f5226"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/jcode-base/src/session/render.rs:72-83 | crates/jcode-base/src/session/render.rs:87-98 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/render.rs"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"d83d6a09d5cf03340d11517d1fabc382418c24edac2eaa9b80dcda8487f490b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/jcode-base/src/session/window_closures.rs:51-58 | crates/jcode-base/src/mobile_runner_process.rs:19-28 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/window_closures.rs"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1fb3536540882955af10421305908273436acf9f6b20b84faea341851279fc4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/jcode-setup-hints/src/lib.rs:2561-2573 | crates/jcode-setup-hints/src/lib.rs:2584-2596 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/lib.rs"},"region":{"startLine":2561}}}],"partialFingerprints":{"codehealthFindingId/v1":"b77946238c618dfcb9c31210fdf21141b8cc2663f958af867e5bf9ca83ccdc6b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/jcode-tui/src/tui/ui_tests/palette_topology.rs:133-143 | crates/jcode-base/src/process_title.rs:27-33 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tests/palette_topology.rs"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"125c4a216640a2ad618180094200f304d70419ddc9a9097f221f024924719ddd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 9\u002B corresponding lines): crates/jcode-app-core/src/catchup.rs:569-580 | crates/jcode-app-core/src/tool/mcp.rs:47-55 | crates/jcode-tui/src/tui/ui_messages/connection.rs:12-22 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/catchup.rs"},"region":{"startLine":569}}}],"partialFingerprints":{"codehealthFindingId/v1":"62908d05b3e05150bc35bcfcefb155cf932d00f2921104e95c9c52cbaaf83c20"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/jcode-app-core/src/server/lifecycle.rs:245-259 | crates/jcode-storage/src/active_pids.rs:219-225 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/lifecycle.rs"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"45efcb704fcff6124590ae86e3189f23ce66c2f57d778ea48aafc803352c31f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 7\u002B corresponding lines): crates/jcode-app-core/src/server/swarm.rs:219-225 | crates/jcode-app-core/src/server/swarm_persistence.rs:60-68 | crates/jcode-app-core/src/tool/selfdev/mod.rs:718-724 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/swarm.rs"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"1da4673bee3095659169e3f38b4c84c79ea85556cc520c9e98205e8e6fac87f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/jcode-base/src/process_title.rs:35-43 | crates/jcode-protocol/src/comm_format.rs:522-530 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/process_title.rs"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"78e6e846fe4395a2d9a4aa75ea2c3a147f2bd0cccb7a5f3152e99e9c9dd1a786"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/jcode-build-support/src/storage_helpers.rs:225-231 | crates/jcode-telemetry-core/src/desktop.rs:17-22 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-build-support/src/storage_helpers.rs"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a8c8fcaad6b0a0ed8ada3c7fef801b1820997d71ea0a7d957c06315e163d8b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/jcode-terminal-image/src/metadata.rs:1-9 | crates/jcode-productivity-core/src/scan.rs:361-369 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-terminal-image/src/metadata.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"38e80e60150e52676d13ac225c2c4f9ecec9a841a0b2adbbb9aa1e754e8e19d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): src/cli/login/google.rs:149-155 | src/cli/login/presenter.rs:28-35 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/login/google.rs"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"583a941b0fa7295c0dfef5f86ad0e41b1c1abbcc4c834d16ec8e3b3736046670"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/jcode-app-core/src/tool/agentgrep/args.rs:223-232 | crates/jcode-selfdev-types/src/lib.rs:44-54 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/agentgrep/args.rs"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb77ee01f75cc89cb2dbb2d7ab99a7dc6d46b3519ba6c2ce929b145a5b859171"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/jcode-base/src/gmail.rs:583-591 | crates/jcode-base/src/gmail.rs:706-715 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/gmail.rs"},"region":{"startLine":583}}}],"partialFingerprints":{"codehealthFindingId/v1":"e709ca952e7b35470b2d7e81d181ff7292319ced3786c66ff167db3eb49724f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 7\u002B corresponding lines): crates/jcode-tui-core/src/stream_buffer.rs:526-534 | crates/jcode-tui/src/tui/app/debug.rs:4-11 | crates/jcode-tui/src/tui/ui_frame_metrics.rs:255-261 | src/bin/tui_bench.rs:41-48 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-core/src/stream_buffer.rs"},"region":{"startLine":526}}}],"partialFingerprints":{"codehealthFindingId/v1":"df101d8fee67b24e98ed6d1ee9682a4c30d7b6d3ae8da7dc3e2695212ec70495"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): crates/jcode-tui-mermaid/src/mermaid_cache_render.rs:939-958 | crates/jcode-tui-markdown/src/markdown_latex_image.rs:127-145 \u2014 These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_cache_render.rs"},"region":{"startLine":939}}}],"partialFingerprints":{"codehealthFindingId/v1":"240a34c2546c89091995dfa3ef559c357ed9c496ee4894147b1c05bbe4513118"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/jcode-app-core/src/agent.rs:429-437 | crates/jcode-app-core/src/agent/utils.rs:5-13 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent.rs"},"region":{"startLine":429}}}],"partialFingerprints":{"codehealthFindingId/v1":"a09cd7ca482b295eb3fa6fbab7b1d1e4d92e5eb4cc469bfef52c615086b96d22"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 8\u002B corresponding lines): crates/jcode-app-core/src/tool/selfdev/mod.rs:709-716 | crates/jcode-base/src/auth/copilot.rs:221-229 | crates/jcode-base/src/session.rs:294-301 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/selfdev/mod.rs"},"region":{"startLine":709}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbfcfe914195452efe4f0ab6b0f27cec562c3f305350a63a9162e619c7a4337a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/jcode-app-core/src/update_metadata.rs:56-64 | crates/jcode-base/src/mcp/protocol.rs:436-443 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/update_metadata.rs"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbe0a515048795fb2a6ddde01d5664e97bac10ffbeb1685af46544ed079cd54d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/jcode-base/src/provider/mod.rs:1892-1903 | crates/jcode-provider-core/src/selection.rs:82-93 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/mod.rs"},"region":{"startLine":1892}}}],"partialFingerprints":{"codehealthFindingId/v1":"5faf26fe4fc0560b0d79bf9976d9b38cd392992da9761f4403e87894bfb08dd6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 11\u002B corresponding lines): crates/jcode-base/src/provider/mod.rs:2461-2471 | crates/jcode-provider-anthropic-runtime/src/lib.rs:1652-1662 | crates/jcode-provider-copilot-runtime/src/lib.rs:1071-1084 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/mod.rs"},"region":{"startLine":2461}}}],"partialFingerprints":{"codehealthFindingId/v1":"1259fed4b0a551e52bbb1f49eaf8a4c80c97825ad6007112072928571a8fc8e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 11\u002B corresponding lines): crates/jcode-tui-render/src/swarm_gallery.rs:41-51 | crates/jcode-tui/src/tui/info_widget_commits.rs:54-65 | crates/jcode-tui/src/tui/info_widget_memory_render.rs:682-693 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/swarm_gallery.rs"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"116effb2d39e11711fa16cd4dc3fae91646f4f80a29948037ecaf30dd722d051"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/jcode-app-core/src/server/comm_control.rs:747-754 | crates/jcode-app-core/src/server/state.rs:572-579 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_control.rs"},"region":{"startLine":747}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ccaf3b7a5254677a55f5254ef8961df61b86f059f0e46a5ceddde962119efef"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/jcode-base/src/mcp/tool.rs:130-139 | crates/jcode-app-core/src/tool/mod.rs:275-283 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mcp/tool.rs"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"114926f70107740d08d94a640d5afa065b83bb6e039fb7c67f30303208c8ab1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 12\u002B corresponding lines): crates/jcode-tui-account-picker/src/overlay.rs:84-96 | crates/jcode-tui-usage-overlay/src/lib.rs:273-284 | crates/jcode-tui/src/tui/login_picker.rs:133-145 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay.rs"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"adcb5867719675dafb947ec05cf6099da7bc40d885793331c0f8f2a7ed54ec6b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/jcode-tui-markdown/src/markdown_math_copy.rs:56-64 | crates/jcode-base/src/mobile_sync.rs:528-534 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_math_copy.rs"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"28b79e063767593047eb53da5b7f1f1100a9ca07fc137d62daa0941206614a17"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/jcode-tui/src/tui/session_picker/loading.rs:647-654 | crates/jcode-productivity-core/src/scan.rs:167-173 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading.rs"},"region":{"startLine":647}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ac74586ad9492d806b7a95e58bfe4af49e5f632c541db10bfe2f25edc02353e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/jcode-app-core/src/tool/selfdev/mod.rs:188-194 | src/cli/commands.rs:2846-2851 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/selfdev/mod.rs"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"da9b4a75f5a085bef4933c7b7ed9570a9a537a96c23f8effab8335686a22d08a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/jcode-app-core/src/tool/selfdev/mod.rs:766-771 | src/cli/commands/restart.rs:172-177 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/selfdev/mod.rs"},"region":{"startLine":766}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f7a5d0951e92c716851c9a638afb2920c50da91aa021127d7ab6bfb71811273"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): crates/jcode-base/src/auth/codex.rs:623-627 | crates/jcode-base/src/auth/cursor.rs:635-639 \u2014 These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/codex.rs"},"region":{"startLine":623}}}],"partialFingerprints":{"codehealthFindingId/v1":"28f53a5c8d0a7e1896f222d48398e7d49c07011c3339bb2748fa1423c5e0cd28"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/jcode-base/src/provider/openrouter.rs:60-71 | crates/jcode-provider-openrouter-runtime/src/lib.rs:2464-2475 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/openrouter.rs"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"e51338e4fb5a200c070373eb4cec504807df84f51bec2433c0430129a898ac2d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): crates/jcode-tui/src/tui/app/commands.rs:160-179 | crates/jcode-tui/src/tui/app/commands_auto_poke_errors.rs:3-73 \u2014 These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"baa1b7cd29704a06a2b1a078a8b62622d21c04a865c2675ea74a1d0e32044af8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/jcode-tui/src/tui/app/onboarding_flow.rs:632-637 | crates/jcode-tui/src/tui/app/onboarding_repair.rs:96-101 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/onboarding_flow.rs"},"region":{"startLine":632}}}],"partialFingerprints":{"codehealthFindingId/v1":"692ea59a64f8ac7f0e98b00506d6ce0f269a6d86ecc5fd47db6deb2996ab86a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/jcode-app-core/src/server/runtime_commands.rs:26-32 | crates/jcode-app-core/src/server/runtime_special_commands.rs:8-14 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/runtime_commands.rs"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b33bb898cb33d30cb442c21b35e1d9a95b53d5669380a770fa6acaa9b2262ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/jcode-import-core/src/lib.rs:454-459 | crates/jcode-tui/src/tui/session_picker/loading.rs:1002-1007 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-import-core/src/lib.rs"},"region":{"startLine":454}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e55812419230265e4a7c8abe16839d69a0ee463fcf2d81cce699231819a0a1e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/jcode-tui/src/tui/app/helpers.rs:401-409 | crates/jcode-tui/src/tui/info_widget_usage.rs:724-732 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/helpers.rs"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"c35eb282d7b29d2092b7bbf82235ea74ed4bbdf8af8e70f47972cc91fa314417"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/jcode-base/src/auth/claude.rs:738-749 | crates/jcode-voice/src/dictation.rs:293-304 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/claude.rs"},"region":{"startLine":738}}}],"partialFingerprints":{"codehealthFindingId/v1":"7232d662615aacb0bcd70bff5d87a018ea4c5361bc8faa89698ac97e501f2425"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/jcode-base/src/auth/muse.rs:974-982 | crates/jcode-usage-types/src/lib.rs:263-272 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/muse.rs"},"region":{"startLine":974}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c17f047e32e017a3388541b7bda15a16606902fe7ddabfddee6414676c63310"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/jcode-base/src/config.rs:828-835 | crates/jcode-base/src/goal.rs:18-26 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/config.rs"},"region":{"startLine":828}}}],"partialFingerprints":{"codehealthFindingId/v1":"55f77dfb11cae791c78506037d6a626ee81a97cc691a04f9b40c341ed641a1d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 8\u002B corresponding lines): crates/jcode-base/src/session/render.rs:264-271 | crates/jcode-message-types/src/lib.rs:677-684 | crates/jcode-tui/src/tui/ui_tools/batch.rs:171-178 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/render.rs"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"50f15f0354c90b96a512ccda4af39738b5f31227bc9da23ba003979ac788eefa"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/jcode-compaction-core/src/lib.rs:908-917 | crates/jcode-tui/src/tui/session_picker/loading_search_text.rs:21-27 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-compaction-core/src/lib.rs"},"region":{"startLine":908}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d66886aa19cd1be85f427b87f48a9674fef76ae84383728192a69b8d20fe87d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 7\u002B corresponding lines): crates/jcode-harness-api-server/src/lib.rs:622-628 | crates/jcode-harness-api/src/client.rs:47-53 | src/cli/acp.rs:360-367 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/lib.rs"},"region":{"startLine":622}}}],"partialFingerprints":{"codehealthFindingId/v1":"3940bd607bba1c9c430dd95a0661db01c59b3d66ea6142f80c92aeffd1f0f7c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): crates/jcode-tui-mermaid/src/lib.rs:71-78 | crates/jcode-tui-mermaid/src/mermaid_model.rs:148-152 \u2014 These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/lib.rs"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"a19261ec47d38c627a18df8ec7705d7d651a2f2429dd27ac5665f86650569146"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/jcode-app-core/src/tool/bg.rs:106-114 | crates/jcode-task-types/src/lib.rs:444-452 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/bg.rs"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"571c4f67f121c733443e1344fc9f753cbfe7db6ffda74cd063ce717b4d9cbca2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/jcode-app-core/src/tool/bridge_reload.rs:36-41 | crates/jcode-tui/src/tui/app/helpers.rs:1008-1013 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/bridge_reload.rs"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"c434a619de5cee11f23addf7ea7a806934009e9f1a3c0b5dd38425f3ac4d0049"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/jcode-app-core/src/tool/discover.rs:75-84 | crates/jcode-base/src/subscription_catalog.rs:383-393 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/discover.rs"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"30fbec715831882a01f98d052c0b79ed93b07f7023ea7f7f7689c367ea4b4609"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/jcode-base/src/provider/antigravity.rs:40-48 | crates/jcode-provider-cursor-runtime/src/lib.rs:440-445 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/antigravity.rs"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c8a7b88d6ce9e6c781e9d0cad989bf63f3d0c1ea879b1e3a030aa63932de2ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/jcode-app-core/src/catchup.rs:266-273 | crates/jcode-app-core/src/overnight.rs:1040-1046 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/catchup.rs"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb6f7babf97c6d2c59b2ee3b420458e25c4eb26ae548143f6e1f60699ddbf0e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/jcode-base/src/applets.rs:257-262 | crates/jcode-base/src/embedding.rs:163-168 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/applets.rs"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d3caa6afaf6d52afe1a5497af416b3e8c29d76d35af25d6ab14df0762f815b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 6\u002B corresponding lines): crates/jcode-base/src/provider_catalog.rs:1319-1325 | crates/jcode-build-meta/src/lib.rs:65-70 | crates/jcode-build-support/src/paths.rs:353-359 | crates/jcode-provider-bedrock/src/lib.rs:277-283 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider_catalog.rs"},"region":{"startLine":1319}}}],"partialFingerprints":{"codehealthFindingId/v1":"75e5fe9d22b054a3f5fd2968753501bafa3b59e45469cb8e081b2786dc30bb73"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/jcode-logging/src/lib.rs:316-322 | crates/jcode-app-core/src/tool/codemode.rs:125-131 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-logging/src/lib.rs"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d21d5d4c22f286ea0c469312878eccd7ef604abc2bb748489a7950e5a4cd274"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/jcode-tui/src/tui/ui_tests/mod.rs:196-204 | src/bin/tui_bench.rs:826-834 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tests/mod.rs"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"bebb9314573c9b6f360309ab330d2690332465f5ca5756ee6026af6081d77268"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 11\u002B corresponding lines): crates/jcode-app-core/src/mobile_push.rs:384-394 | crates/jcode-app-core/src/tool/webfetch.rs:200-211 | crates/jcode-app-core/src/tool/websearch.rs:677-688 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/mobile_push.rs"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"7543e2d3da74784a0c85086f5c7f0890ff43a5cedbaeab4895e7b11049b3d60b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 4\u002B corresponding lines): crates/jcode-base/src/provider/catalog_memo.rs:60-63 | crates/jcode-tui-markdown/src/markdown_incremental.rs:419-422 | crates/jcode-tui/src/tui/app/commands_cloud.rs:288-291 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/catalog_memo.rs"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"075f1adaae4feaf97eacd2c900d10e5f6907b128b4b2c33926cafd159f9674e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): crates/jcode-base/src/registry.rs:113-117 | crates/jcode-base/src/skill.rs:574-578 \u2014 These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/registry.rs"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"2df8c8a36e8354ab0ab61eaa1b76b5807f048ad17ddc71933e00ec17bd70e1a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/jcode-logging/src/watchdog.rs:114-119 | src/cli/commands.rs:2771-2777 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-logging/src/watchdog.rs"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4505ae770e08b374dff6f1cd1c11fada04d0cdae71adc8fe83b8b28ae7bb1b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/jcode-provider-grok-build-runtime/src/lib.rs:108-117 | crates/jcode-provider-openai-runtime/src/openai_stream_diagnostics.rs:38-49 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-grok-build-runtime/src/lib.rs"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"780c3334592ca3ddbedf37f2df37b37768f2117e7609809fffe270a84e488392"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/jcode-base/src/memory_rerank.rs:92-98 | crates/jcode-sdk/src/structured.rs:512-519 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory_rerank.rs"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0aa3d8a2affddb791aabe3ad996397ed3e09f4d4b15baea6cfba830e890f229"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/jcode-provider-antigravity-runtime/src/lib.rs:45-52 | crates/jcode-provider-gemini-runtime/src/lib.rs:1044-1051 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-antigravity-runtime/src/lib.rs"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"371ae6972ec57b5ad6b9f30879c31050867a5713a1fb69c73ac3eddf9fccac5a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): src/cli/hot_exec.rs:8-14 | src/cli/terminal.rs:517-524 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/hot_exec.rs"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"d01de782425e9747eb42af0ac5e1f4ebabb3b2dd77508e7bb30fe2b55f2abdf3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/jcode-base/src/usage/anthropic_reset.rs:78-85 | crates/jcode-base/src/usage/openai_reset.rs:294-301 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/anthropic_reset.rs"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5f842a73216008512db3b87c24060c55893f1bbf6e65a51865f131d54ea3d7e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/jcode-session-types/src/lib.rs:975-984 | crates/jcode-tui/src/tui/core.rs:23-29 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-session-types/src/lib.rs"},"region":{"startLine":975}}}],"partialFingerprints":{"codehealthFindingId/v1":"4228712446eb3715ab06223de02ef64c5430356d1a6e1ee5d8d9ecf2254c52b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/jcode-app-core/src/tool/selfdev/mod.rs:238-245 | crates/jcode-build-support/src/storage_helpers.rs:100-107 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/selfdev/mod.rs"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b9aca636cc6af1b7f2af9856bbbcb5079c354f7c766d92549a1c332c09d106f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/jcode-base/src/auth/google.rs:414-420 | crates/jcode-base/src/auth/oauth.rs:547-553 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/google.rs"},"region":{"startLine":414}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c9200ad61df6543e42836c7bf59f3016bc1ded075c7c1918ae514986a01b52e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/jcode-tui/src/tui/ui_diagram_pane.rs:480-486 | crates/jcode-tui/src/tui/ui_pinned.rs:504-512 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_diagram_pane.rs"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"aeac6342b73e3e757691a1735b3580bb8635d4a258411f8e61ec8a094746be5e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): crates/jcode-app-core/src/server/turn_failover.rs:41-44 | crates/jcode-tui/src/tui/app/model_context.rs:651-654 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/turn_failover.rs"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3ddb31a51eb45272b6c937d95fa9a515389cca99026f9994a52e9ab96b9be7c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/jcode-base/src/applets.rs:25-31 | crates/jcode-base/src/side_panel.rs:373-379 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/applets.rs"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"987a05b2138213100510eef292e4cadb6faf0ca3b53bbe81e738854d9cdefdc6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/jcode-base/src/auth/account_store.rs:229-239 | crates/jcode-tui-messages/src/message.rs:599-607 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/account_store.rs"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"37cb10b886f86e2fa5e16b4a4b368420b1df6ce5b5d8805bd559e28d0bca6f5a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/jcode-base/src/auth/refresh_state.rs:192-198 | crates/jcode-base/src/goal.rs:571-576 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/refresh_state.rs"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"d17ee3284657761787046d549a8b30e144e6bebf593cb8faa20164a3ad29ac88"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/jcode-core/src/id.rs:201-207 | crates/jcode-provider-doctor/src/provider_e2e.rs:280-286 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-core/src/id.rs"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d97d50cc5db512aba2affd628dfb4e56eecd207c944262aaaa5d45ebbd93c21"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/jcode-app-core/src/agents_status.rs:337-347 | crates/jcode-tui/src/tui/session_picker/preview_io.rs:6-14 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agents_status.rs"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca41ad7f36ac4abe387b84350fe329850bfc8baf1c677645aba90a6865a87f27"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/jcode-base/src/browser.rs:1296-1301 | crates/jcode-base/src/browser_update.rs:94-99 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/browser.rs"},"region":{"startLine":1296}}}],"partialFingerprints":{"codehealthFindingId/v1":"786005c16145d7c87cd65c10f44bf317e5bd9b430ba26c7fb73beded12d8d7c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/jcode-tui/src/tui/app.rs:2842-2850 | crates/jcode-tui/src/tui/app/model_context.rs:640-648 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app.rs"},"region":{"startLine":2842}}}],"partialFingerprints":{"codehealthFindingId/v1":"f86b14a5ca6e16de0af559564820832d865901ee7fc82d3a6c6dcadcfb23e652"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): crates/jcode-tui/src/tui/session_picker/transcript_search/text_cache.rs:148-151 | crates/jcode-tui/src/tui/session_picker/transcript_search/token_cache.rs:228-231 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/transcript_search/text_cache.rs"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc29432b08cc108426f050f142be8392b6a500107b0943edab14c87dfa05ba61"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/jcode-storage/src/active_pids.rs:326-332 | src/cli/commands/menubar.rs:48-53 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-storage/src/active_pids.rs"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9cab7b03ee613421d5dd52bb92f56360e5829cb1fbedce4772c7312d043c0d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/jcode-tui-markdown/src/lib.rs:502-508 | crates/jcode-tui-mermaid/src/lib.rs:1497-1503 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/lib.rs"},"region":{"startLine":502}}}],"partialFingerprints":{"codehealthFindingId/v1":"623c8239655406bdf1cef12e1739aea416f496bf5e7c6bb818bb0362ed68e4ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/jcode-tui-mermaid/src/mermaid_runtime.rs:111-120 | crates/jcode-tui/src/tui/ui_prepare.rs:2957-2966 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_runtime.rs"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"43143b7322219bf0e000d5f607b6b0ec4256cf41d7037b40d4548d8b235539ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/jcode-tui/src/tui/app/commands.rs:1413-1420 | crates/jcode-tui/src/tui/app/inline_interactive/helpers.rs:26-32 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":1413}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ceab58a4e3a4f891979e133e86886f60361f80cdbc8331472a8583a53b6472e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/jcode-app-core/src/mission.rs:58-64 | crates/jcode-app-core/src/server/reload_recovery.rs:215-221 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/mission.rs"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"274492a0bf69a0b95e13d01e4dff01594b36d1d5b491476a312e38e1161cf57d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/jcode-provider-core/src/fingerprint.rs:101-107 | crates/jcode-tui/src/tui/app.rs:2909-2916 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/fingerprint.rs"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e1995e16daf62930098af1b99f96755af8e04483abee23b1a744fcb2871f547"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): crates/jcode-tui/src/tui/ui_memory_estimates.rs:34-36 | crates/jcode-tui/src/tui/ui_pinned.rs:213-215 \u2014 These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_memory_estimates.rs"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8c8aaa43b280cc25bc8890343d2fe9d159700f1365c1c99699a23662f56ae79"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): crates/jcode-tui/src/tui/ui_memory_estimates.rs:38-41 | crates/jcode-tui/src/tui/ui_pinned.rs:217-220 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_memory_estimates.rs"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0a67b45f4a5419ce1a974d638c934073a1c2c31b324068ec52d90535fc46d58"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): crates/jcode-app-core/src/perf.rs:501-504 | crates/jcode-tui/src/tui/ui_frame_metrics.rs:906-910 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/perf.rs"},"region":{"startLine":501}}}],"partialFingerprints":{"codehealthFindingId/v1":"cba86fab7ff336bbe740d0614fc9a06c70824cce97d73a565fa47b904282a90c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 4\u002B corresponding lines): crates/jcode-app-core/src/server/client_comm_channels.rs:16-19 | crates/jcode-app-core/src/server/client_comm_context.rs:15-18 | crates/jcode-app-core/src/server/client_comm_message.rs:19-22 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_comm_channels.rs"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd981b37c778b0ae3f3bb8c9b79857384269f92d9febbe0393f4148b1cdce63c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/jcode-app-core/src/tool/browser.rs:1099-1105 | src/cli/commands/provider_setup.rs:587-594 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/browser.rs"},"region":{"startLine":1099}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3827a5c088bdd7e46ea657a27daf71bb05f6d17d947ffad8741d98f24cbf08b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/jcode-base/src/todo.rs:210-216 | crates/jcode-build-support/src/storage_helpers.rs:234-241 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/todo.rs"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"f28de3b5e58b313900c4ea4f8657273ff5261170ef6c9d0d4ba37720e0c45351"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/jcode-tui-account-picker/src/lib.rs:61-70 | crates/jcode-tui-usage-overlay/src/lib.rs:75-83 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/lib.rs"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"48d3991820bd5c3157d2610ca496001bea527eb70653b6f09ef5c32b54bae158"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/jcode-tui/src/tui/cloud_latency.rs:56-65 | src/cli/ssh_transport/timing.rs:20-26 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/cloud_latency.rs"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"d81b27b2af5270c1fc7153eb290f7c676ccaaa41fa8c2de2f53edb5dfc4acf99"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/jcode-base/src/auth/codex.rs:122-129 | crates/jcode-base/src/auth/gemini.rs:218-225 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/codex.rs"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c21c1a1697376cd5015bd59de3f3928b0a94757109006dbae220cdfa0aa9caf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): crates/jcode-base/src/client_focus.rs:12-15 | crates/jcode-schema-dialect/src/quirks.rs:94-97 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/client_focus.rs"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"81351dc83d2fb7f98f9d1b68ff867e7312fd94cf6c8657eaca36a13a09b10e4c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): crates/jcode-base/src/provider/models.rs:198-203 | src/cli/commands.rs:403-407 \u2014 These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/models.rs"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"724b0be5b5a6d9b077b6ca8d2a387c80384e277a95df07d5a87315e97a4b68a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/jcode-provider-cursor-runtime/src/agent_transport.rs:238-243 | crates/jcode-provider-cursor-runtime/src/wire.rs:49-54 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/agent_transport.rs"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"5517e4280e2735d2ceee8cf5ff03bf4f716b4f27f662b385de81570fcb543544"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/jcode-app-core/src/catchup.rs:476-483 | crates/jcode-sdk/src/launch.rs:798-805 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/catchup.rs"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2e42ecfdf7ec3a00d3e93bdd9ca3409fa9c5699b71be1fb64e7d9466eac1987"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): crates/jcode-app-core/src/server/swarm_persistence.rs:237-243 | crates/jcode-tui/src/tui/mod.rs:329-333 \u2014 These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/swarm_persistence.rs"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"1696a8f58dbdd008b0852397f940d8daf5ee8ad4fe62335bd1d7a2fa632c916e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): crates/jcode-app-core/src/tool/session_search.rs:565-568 | crates/jcode-tui/src/tui/app.rs:159-164 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/session_search.rs"},"region":{"startLine":565}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f48f6445d9870af8c5df60d48a9a55513b9b38867f268a0f5b0ebc8c8516e42"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 5\u002B corresponding lines): crates/jcode-base/src/copilot_usage.rs:12-16 | crates/jcode-base/src/model_pricing.rs:64-69 | crates/jcode-base/src/provider_activity.rs:84-88 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/copilot_usage.rs"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1924567e7bf28dc506797b03d1a1b70be11b6fa78ca3ca1b1ad25cb3003859a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): src/cli/commands/menubar.rs:527-530 | src/cli/macos_notification_broker.rs:96-100 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands/menubar.rs"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"57b3620430029a4bdb700d4219723a8602120f4d33b1199ad7d8faadd9328723"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 7\u002B corresponding lines): crates/jcode-app-core/src/mission.rs:119-127 | crates/jcode-base/src/auth/gemini.rs:290-296 | crates/jcode-build-support/src/storage_helpers.rs:110-116 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/mission.rs"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a515abee464fd812df1b631afc2c4addc4828871f6ed4e47442538d4edba4ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): crates/jcode-app-core/src/notifications.rs:393-395 | crates/jcode-base/src/auth/transfer.rs:701-703 \u2014 These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/notifications.rs"},"region":{"startLine":393}}}],"partialFingerprints":{"codehealthFindingId/v1":"e143c6e36514538d43eda8a72777db3743f23d4fa6462c9b9426c1b85448db82"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 3\u002B corresponding lines): crates/jcode-app-core/src/server/util.rs:211-213 | crates/jcode-base/src/memory/cache.rs:32-34 | crates/jcode-build-support/src/paths.rs:145-149 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/util.rs"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2655314e9b74b9e7011b30d45664d841163aca36d07d0067512797de28b2514"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): crates/jcode-base/src/auth/mod.rs:1552-1557 | crates/jcode-tui/src/tui/app/commands.rs:3138-3142 \u2014 These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/mod.rs"},"region":{"startLine":1552}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6cd52e41305edce1595a1ca6c5612e518f10e87565dfcc5182a1beea868bc57"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 6\u002B corresponding lines): crates/jcode-base/src/mcp/remote.rs:321-327 | crates/jcode-base/src/provider/mod.rs:1817-1822 | crates/jcode-base/src/provider/registry.rs:55-61 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mcp/remote.rs"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8eb02a2aeb70947b5be6ba4c906ac48884fd73c11f508c01eb757517e54c47c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): crates/jcode-core/src/id.rs:6-10 | crates/jcode-memory-types/src/lib.rs:303-307 \u2014 These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-core/src/id.rs"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"595d3b1b273e64030ec2d6ffb42455c4ea405fde3b389e653b1af1160bbadd87"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 9\u002B corresponding lines): crates/jcode-provider-openai-runtime/src/lib.rs:751-762 | crates/jcode-provider-openai-runtime/src/openai_tests/models_state.rs:697-705 | crates/jcode-provider-openai-runtime/src/openai_tests/websocket_prewarm.rs:1-9 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/lib.rs"},"region":{"startLine":751}}}],"partialFingerprints":{"codehealthFindingId/v1":"5014a418610795287d696ce23b600a789504e574076547aa8e18cd0480e0d34a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): crates/jcode-tui-style/src/color.rs:240-243 | crates/jcode-tui-workspace/src/color_support.rs:202-205 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-style/src/color.rs"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"835d546cb46195a6557425b83789b6eb36cadd8063369bd7dc8126f8a04b29a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): crates/jcode-tui/src/tui/info_widget_frame.rs:22-24 | crates/jcode-tui/src/tui/ui_header.rs:63-65 \u2014 These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_frame.rs"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"49604a5b1da7fcbff107f8190cafa4d40996a58319ede3dd72154dfca3d2dbd4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/jcode-tui/src/tui/info_widget_frame.rs:32-37 | crates/jcode-tui/src/tui/ui_todo_changes.rs:296-301 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_frame.rs"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"927a32e7314782726f428b7faad79515b200b8be4716f21a36494bc5770df480"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/jcode-app-core/src/server/socket.rs:7-12 | crates/jcode-harness-api/src/sockets.rs:76-81 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/socket.rs"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c5503a2278370ce4378e427f1d44430d248b38b6c6c18dd798eb2566dd20514"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): crates/jcode-app-core/src/server/state.rs:42-46 | crates/jcode-base/src/auth/commands.rs:48-52 \u2014 These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/state.rs"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"176a558dce0756858f378707cb408203b97c757cce9f07a62ab473a651188c68"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/jcode-tui/src/tui/ui_frame_metrics.rs:215-220 | crates/jcode-tui/src/tui/ui_smoothness.rs:120-125 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_frame_metrics.rs"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"82b688684ac75706190a2fb15ce866b8b314083e5c5cef8973496b19da104498"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/jcode-message-types/src/lib.rs:551-560 | crates/jcode-provider-metadata/src/lib.rs:313-319 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-message-types/src/lib.rs"},"region":{"startLine":551}}}],"partialFingerprints":{"codehealthFindingId/v1":"f92a796c84289641f1ed2cbc5fee6460c0fa95148da51a44ae9a7a739e7502e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (247 lines \u00D7 2): crates/jcode-tui-markdown/src/markdown_render_full.rs:158-404 | crates/jcode-tui-markdown/src/markdown_render_lazy.rs:135-381 \u2014 before extracting anything, compare \u0060crates/jcode-tui-markdown/src/markdown_render_full.rs\u0060 and \u0060crates/jcode-tui-markdown/src/markdown_render_lazy.rs\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 868 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-markdown/src/markdown_render_full.rs:158\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_full.rs"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf4fdca29cac03adaded80873f5ed53fb78788bc64cba69925f9ef90809ea015"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (337\u2013342 lines \u00D7 2): crates/jcode-tui-markdown/src/markdown_render_full.rs:505-846 | crates/jcode-tui-markdown/src/markdown_render_lazy.rs:484-820 \u2014 before extracting anything, compare \u0060crates/jcode-tui-markdown/src/markdown_render_full.rs\u0060 and \u0060crates/jcode-tui-markdown/src/markdown_render_lazy.rs\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 868 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-markdown/src/markdown_render_full.rs:505\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_full.rs"},"region":{"startLine":505}}}],"partialFingerprints":{"codehealthFindingId/v1":"d107666fa7c8f77cc53766cf5432bad5ab1907f733db3e5f7b996a17f448d4fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (92 lines \u00D7 2): crates/jcode-app-core/src/usage_openai.rs:317-408 | crates/jcode-base/src/usage/openai_helpers.rs:350-441 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/usage_openai.rs\u0060 and \u0060crates/jcode-base/src/usage/openai_helpers.rs\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/usage_openai.rs:317\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_openai.rs"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b08b8b1afd7d2cc2cfc2c0d80ed5df37a28876777de86c6dc5b3a59225b1a28"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (88\u201389 lines \u00D7 2): crates/jcode-tui-markdown/src/markdown_render_full.rs:903-991 | crates/jcode-tui-markdown/src/markdown_render_lazy.rs:873-960 \u2014 before extracting anything, compare \u0060crates/jcode-tui-markdown/src/markdown_render_full.rs\u0060 and \u0060crates/jcode-tui-markdown/src/markdown_render_lazy.rs\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 868 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-markdown/src/markdown_render_full.rs:903\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_full.rs"},"region":{"startLine":903}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5bbdda0f2c8c355198d5f55e88ed0d7549c49500ba385844352fe6466bfde0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (65\u201367 lines \u00D7 2): crates/jcode-provider-antigravity-runtime/src/lib.rs:685-751 | crates/jcode-provider-gemini-runtime/src/lib.rs:858-922 \u2014 before extracting anything, compare \u0060crates/jcode-provider-antigravity-runtime/src/lib.rs\u0060 and \u0060crates/jcode-provider-gemini-runtime/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 137 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-antigravity-runtime/src/lib.rs:685\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-antigravity-runtime/src/lib.rs"},"region":{"startLine":685}}}],"partialFingerprints":{"codehealthFindingId/v1":"188e89c6cd505b171ffbac44b25cb4db5019879dec0c258e680c9c4990805164"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (53\u201355 lines \u00D7 2): src/cli/tui_launch.rs:778-832 | src/cli/tui_launch.rs:837-889 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/cli/tui_launch.rs:778\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/tui_launch.rs"},"region":{"startLine":778}}}],"partialFingerprints":{"codehealthFindingId/v1":"25a222d5cb59fe769d3370fd0c9fafe0d8e30810c0ae6c6a96863cf73cdd3766"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (48\u201354 lines \u00D7 2): crates/jcode-base/src/background.rs:524-577 | crates/jcode-base/src/background.rs:751-798 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/background.rs"},"region":{"startLine":524}}}],"partialFingerprints":{"codehealthFindingId/v1":"f89fc8a9c2fa7c248518d611695706d4273307de5694a79c55ff8a4fbb952cec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (52\u201353 lines \u00D7 2): crates/jcode-tui-markdown/src/markdown_render_full.rs:848-900 | crates/jcode-tui-markdown/src/markdown_render_lazy.rs:821-872 \u2014 before extracting anything, compare \u0060crates/jcode-tui-markdown/src/markdown_render_full.rs\u0060 and \u0060crates/jcode-tui-markdown/src/markdown_render_lazy.rs\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 868 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-markdown/src/markdown_render_full.rs:848\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_full.rs"},"region":{"startLine":848}}}],"partialFingerprints":{"codehealthFindingId/v1":"5162071af9fc18d7acd96a1fb615df6d29bdca1d6bc1fa0ba034121d7f0f8e82"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (51\u201352 lines \u00D7 2): crates/jcode-tui-markdown/src/markdown_render_full.rs:105-156 | crates/jcode-tui-markdown/src/markdown_render_lazy.rs:84-134 \u2014 before extracting anything, compare \u0060crates/jcode-tui-markdown/src/markdown_render_full.rs\u0060 and \u0060crates/jcode-tui-markdown/src/markdown_render_lazy.rs\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 868 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-markdown/src/markdown_render_full.rs:105\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_full.rs"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d4a6802ad9811b0975559953996de1530a4cef0ba7707b2b38f9b1f3ae37e32"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (45\u201346 lines \u00D7 2): crates/jcode-provider-anthropic-runtime/src/lib.rs:1339-1384 | crates/jcode-provider-anthropic-runtime/src/lib.rs:1785-1829 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-anthropic-runtime/src/lib.rs:1339\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic-runtime/src/lib.rs"},"region":{"startLine":1339}}}],"partialFingerprints":{"codehealthFindingId/v1":"32c1ad905173b716fd5f3c41b32fbecb84bf104445f40781c6917ea0ad2737e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (45 lines \u00D7 2): crates/jcode-import-core/src/lib.rs:404-448 | crates/jcode-tui/src/tui/session_picker/loading.rs:752-796 \u2014 before extracting anything, compare \u0060crates/jcode-import-core/src/lib.rs\u0060 and \u0060crates/jcode-tui/src/tui/session_picker/loading.rs\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-import-core/src/lib.rs"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"25b964c4465cfbfbfaa072ad40f1cef46abfe93e08bb6a62e6b3840e113a1a97"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (45 lines \u00D7 2): src/cli/commands.rs:2880-2924 | src/cli/commands.rs:2998-3042 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/cli/commands.rs:2880\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":2880}}}],"partialFingerprints":{"codehealthFindingId/v1":"92a0868bfb7fbe2c062b5f60a63e9ef77b98cfd14744af8f854260610ed122ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (42 lines \u00D7 2): crates/jcode-app-core/src/server/client_lifecycle.rs:1429-1470 | crates/jcode-app-core/src/server/client_lifecycle.rs:1491-1532 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/client_lifecycle.rs:1429\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_lifecycle.rs"},"region":{"startLine":1429}}}],"partialFingerprints":{"codehealthFindingId/v1":"10d82006f62633a3ac5482dfbe072e75704b10a9d08c7a2e1e8de92e692a2f75"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (41\u201342 lines \u00D7 2): crates/jcode-tui/src/tui/ui.rs:950-990 | crates/jcode-tui/src/tui/ui.rs:1001-1042 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui.rs:1001\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui.rs"},"region":{"startLine":950}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b99b310863b11127f0c6d61e90db650eed51b91b8ed66a9056b38a70e855bc3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (39\u201341 lines \u00D7 3): crates/jcode-tui-account-picker/src/overlay.rs:403-443 | crates/jcode-tui-usage-overlay/src/lib.rs:387-425 | crates/jcode-tui/src/tui/login_picker.rs:291-331 \u2014 before extracting anything, compare \u0060crates/jcode-tui-account-picker/src/overlay.rs\u0060 and \u0060crates/jcode-tui-usage-overlay/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay.rs"},"region":{"startLine":403}}}],"partialFingerprints":{"codehealthFindingId/v1":"f00ae2332a722e4776b3d4156955b6c26e7997cec2dcaab31cb213883340522e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (37\u201341 lines \u00D7 2): crates/jcode-provider-doctor/src/live_provider_probes.rs:826-866 | crates/jcode-provider-doctor/src/live_provider_probes.rs:1154-1190 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-doctor/src/live_provider_probes.rs:826\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/live_provider_probes.rs"},"region":{"startLine":826}}}],"partialFingerprints":{"codehealthFindingId/v1":"bec468915c73cea90dba899f2fdf61ec4f5e727c7c55abf73c3afa0ceaba924c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (40 lines \u00D7 2): crates/jcode-tui-style/src/color.rs:95-134 | crates/jcode-tui-workspace/src/color_support.rs:64-103 \u2014 before extracting anything, compare \u0060crates/jcode-tui-style/src/color.rs\u0060 and \u0060crates/jcode-tui-workspace/src/color_support.rs\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 228 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-style/src/color.rs"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"269def2ce01673edc0f81c184b2e9979b0b76973503fdf32af24f30e6cda87ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (39 lines \u00D7 2): crates/jcode-tui/src/tui/app/auth_account_picker.rs:708-746 | crates/jcode-tui/src/tui/app/auth_account_picker.rs:991-1029 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/auth_account_picker.rs:708\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker.rs"},"region":{"startLine":708}}}],"partialFingerprints":{"codehealthFindingId/v1":"da846f51663c48d9cd261e72d4dc7ada17ed59e24e86f027319e4149195280aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (37 lines \u00D7 2): crates/jcode-app-core/src/telemetry_state.rs:127-163 | crates/jcode-telemetry-core/src/state_support.rs:125-161 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/telemetry_state.rs\u0060 and \u0060crates/jcode-telemetry-core/src/state_support.rs\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/telemetry_state.rs"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbee10aca530c60c9c1ebc53be5ddf11620fee221dd357d1104dcc6092c371bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (37 lines \u00D7 2): crates/jcode-app-core/src/tool/apply_patch.rs:486-522 | crates/jcode-app-core/src/tool/patch.rs:478-514 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/apply_patch.rs:486\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/apply_patch.rs"},"region":{"startLine":486}}}],"partialFingerprints":{"codehealthFindingId/v1":"f74bdfdc72ba3a64a5e4e7a368e840672c9947c0400202a40a971668ac275529"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (37 lines \u00D7 2): crates/jcode-provider-anthropic-runtime/src/lib.rs:1283-1319 | crates/jcode-provider-anthropic-runtime/src/lib.rs:1729-1765 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-anthropic-runtime/src/lib.rs:1283\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic-runtime/src/lib.rs"},"region":{"startLine":1283}}}],"partialFingerprints":{"codehealthFindingId/v1":"e69481543a5e0aa8cea5d952f725dfaebfa98fc2606f0ba4f2893adf40d94ec0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (37 lines \u00D7 2): crates/jcode-tui/src/tui/app/turn.rs:523-559 | crates/jcode-tui/src/tui/app/turn.rs:1525-1561 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/turn.rs:523\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/turn.rs"},"region":{"startLine":523}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a4f22c6988f8e79dcb466d251cb21484a4d8f3447c99fee4b2848019d6da4b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (37 lines \u00D7 2): crates/jcode-tui/src/tui/session_picker.rs:404-440 | crates/jcode-tui/src/tui/session_picker.rs:566-602 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker.rs"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"3532a9ad576c6ce0af587132f0bd701df742317de830e39ed79e6c8a13ed35ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (53 lines \u00D7 2): crates/jcode-app-core/src/server/client_comm_channels.rs:147-199 | crates/jcode-app-core/src/server/client_comm_channels.rs:232-284 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/client_comm_channels.rs:147\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_comm_channels.rs"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e903c61d40d36edf85a7d24fbf605be5c8c21de2fee13e4dc6b20c125348f76"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (32\u201336 lines \u00D7 2): crates/jcode-tui-mermaid/src/mermaid_widget.rs:127-162 | crates/jcode-tui-mermaid/src/mermaid_widget.rs:381-412 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-mermaid/src/mermaid_widget.rs:127\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_widget.rs"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"301efcf2303497193f2b5217cbde9aac620ab7789463856f8b933b82538687ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (35 lines \u00D7 2): crates/jcode-app-core/src/session_launch.rs:674-708 | crates/jcode-app-core/src/session_launch.rs:802-836 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/session_launch.rs:674\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-app-core/src/session_launch.rs:709\u0060 calls \u0060apply_runtime_env\u0060 and \u0060crates/jcode-app-core/src/session_launch.rs:837\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/session_launch.rs"},"region":{"startLine":674}}}],"partialFingerprints":{"codehealthFindingId/v1":"82ead8ce1e3948b0347bb80990135982c271b7709dde02de24bd0b94617be736"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 2): crates/jcode-app-core/src/usage_openai.rs:139-172 | crates/jcode-base/src/usage/openai_helpers.rs:164-197 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/usage_openai.rs\u0060 and \u0060crates/jcode-base/src/usage/openai_helpers.rs\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_openai.rs"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"96842ce20fa77dcc70ffe8d852ee1460202f0fd4ee753d43e255185e4272a1df"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33 lines \u00D7 3): src/cli/commands.rs:2911-2943 | src/cli/commands.rs:3029-3061 | src/cli/commands.rs:3226-3258 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/cli/commands.rs:2911\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":2911}}}],"partialFingerprints":{"codehealthFindingId/v1":"707937dff022f8559810278b4a58cc6ea1da079d21dacbdafa536a5d85103f8e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33 lines \u00D7 2): crates/jcode-base/src/provider/openrouter.rs:252-284 | crates/jcode-provider-openrouter-runtime/src/lib.rs:332-364 \u2014 before extracting anything, compare \u0060crates/jcode-base/src/provider/openrouter.rs\u0060 and \u0060crates/jcode-provider-openrouter-runtime/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/openrouter.rs"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e00ec0d05123c3e6b44bd2dff403bbe7ecdeefec6bfb92dd8a061f9064a335d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33 lines \u00D7 2): crates/jcode-telemetry-core/src/lib.rs:386-418 | crates/jcode-telemetry-core/src/lib.rs:2023-2055 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lib.rs"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"de80f02cb0733f00f89a3ab81f682a576eb00a514e3936dc06acedc002e24ff7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote/reconnect.rs:118-150 | crates/jcode-tui/src/tui/app/remote/reconnect.rs:164-196 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/remote/reconnect.rs:118\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/reconnect.rs"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b1f9a6741497fed24ae9d32bb86517e46d349abf9b7a9c19b4c20beab7063bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (32 lines \u00D7 3): crates/jcode-telemetry-core/src/lib.rs:1635-1666 | crates/jcode-telemetry-core/src/lifecycle.rs:51-82 | crates/jcode-telemetry-core/src/lifecycle.rs:233-264 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lib.rs"},"region":{"startLine":1635}}}],"partialFingerprints":{"codehealthFindingId/v1":"9719be19200a620cc0e4dbfc446a9f83887c9345b15c79d53f532144e0654944"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (32 lines \u00D7 2): crates/jcode-app-core/src/server/client_lifecycle.rs:2843-2874 | crates/jcode-app-core/src/server/client_lightweight_control.rs:638-669 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/server/client_lifecycle.rs\u0060 and \u0060crates/jcode-app-core/src/server/client_lightweight_control.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 84 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/client_lifecycle.rs:2843\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_lifecycle.rs"},"region":{"startLine":2843}}}],"partialFingerprints":{"codehealthFindingId/v1":"cefc84852472d704f98e452f5fdecdd5a2e6334284d657fb94f050a743dfcfce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (32 lines \u00D7 2): crates/jcode-render-core/src/preprocess.rs:870-901 | crates/jcode-tui-markdown/src/markdown_text_preprocess.rs:67-98 \u2014 before extracting anything, compare \u0060crates/jcode-render-core/src/preprocess.rs\u0060 and \u0060crates/jcode-tui-markdown/src/markdown_text_preprocess.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-render-core/src/preprocess.rs:870\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/preprocess.rs"},"region":{"startLine":870}}}],"partialFingerprints":{"codehealthFindingId/v1":"337bf01eb77973f353f507cdea524a28958d5535843d9d5e4d31a2d20c5c32ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (36\u201337 lines \u00D7 4): crates/jcode-base/src/embedding_stub.rs:50-85 | crates/jcode-embedding/src/lib.rs:49-84 | crates/jcode-memory-types/src/graph.rs:52-87 | crates/jcode-memory-types/src/lib.rs:874-910 \u2014 before extracting anything, compare \u0060crates/jcode-base/src/embedding_stub.rs\u0060 and \u0060crates/jcode-embedding/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/embedding_stub.rs:50\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-base/src/embedding_stub.rs:49\u0060 calls \u0060debug\u0060 and \u0060crates/jcode-embedding/src/lib.rs:48\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/embedding_stub.rs"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"74717aa1ade96e9283a8696a7876e17e2f4b52dcf1fd508ca6796a440798923b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): crates/jcode-app-core/src/agent/status.rs:88-117 | crates/jcode-app-core/src/agent/turn_execution.rs:1593-1622 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/agent/status.rs\u0060 and \u0060crates/jcode-app-core/src/agent/turn_execution.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/agent/status.rs:88\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-app-core/src/agent/turn_execution.rs:1590\u0060 calls \u0060trim_start\u0060, \u0060starts_with\u0060 and \u0060crates/jcode-app-core/src/agent/status.rs:87\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/status.rs"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8ca1c6047334dbeab2ac8e3023ef13b0a3fdcb137ef763bad47bc0aad9f9fb4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29\u201330 lines \u00D7 2): crates/jcode-app-core/src/tool/mcp.rs:442-470 | crates/jcode-base/src/mcp/tool.rs:85-114 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/mcp.rs:442\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/mcp.rs"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"53d468c8ba0127c6d29e9efc83b8c63b0cee1707f0eed93c623b516d7d4587be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): crates/jcode-render-core/src/preprocess.rs:795-824 | crates/jcode-tui-markdown/src/markdown_text_preprocess.rs:16-45 \u2014 before extracting anything, compare \u0060crates/jcode-render-core/src/preprocess.rs\u0060 and \u0060crates/jcode-tui-markdown/src/markdown_text_preprocess.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-render-core/src/preprocess.rs:795\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/preprocess.rs"},"region":{"startLine":795}}}],"partialFingerprints":{"codehealthFindingId/v1":"a974f7daf6afb3392ee4f1751e9a6f0d5ad6a8015434c590bbbdccbe9e0778dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): crates/jcode-tui/src/tui/app/debug.rs:32-61 | src/bin/tui_bench.rs:162-191 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/debug.rs:32\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug.rs"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"4212af2d6002c9fb7810cb49adbf6d4710ee05935c58f90a8b7e6269adac9781"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29\u201330 lines \u00D7 2): crates/jcode-tui/src/tui/app/inline_interactive.rs:2917-2945 | crates/jcode-tui/src/tui/app/inline_interactive.rs:3034-3063 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/inline_interactive.rs:2917\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":2917}}}],"partialFingerprints":{"codehealthFindingId/v1":"c46f397b008bd55f16128d5328bc5c0d7c3decd4c32a948b79e1da6bc29c7ab1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 3): crates/jcode-app-core/src/usage_display.rs:140-167 | crates/jcode-base/src/usage/display.rs:147-174 | crates/jcode-tui-usage-overlay/src/lib.rs:744-771 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/usage_display.rs\u0060 and \u0060crates/jcode-base/src/usage/display.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_display.rs"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc1ca7bb81212c21e4442bc77fbb58cdfd408893e934a22e42a985cf91bd53f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): crates/jcode-app-core/src/server/input_shell_output.rs:20-47 | crates/jcode-tui/src/tui/app/input/shell_commands.rs:20-47 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/input_shell_output.rs"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"7984bc56d1b41956119d9a6b2eb32c40ef4f1118efaa5deca9d3d8e12c31c7bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): crates/jcode-provider-doctor/src/live_provider_probes.rs:935-962 | crates/jcode-provider-doctor/src/live_provider_probes.rs:1566-1593 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-doctor/src/live_provider_probes.rs:935\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/live_provider_probes.rs"},"region":{"startLine":935}}}],"partialFingerprints":{"codehealthFindingId/v1":"03d0a2088fed8d4ed6276bab39a8dcb5b86ccafe228d8d282bedd337336566e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 3): crates/jcode-tui/src/tui/app/commands.rs:323-349 | crates/jcode-tui/src/tui/app/commands_improve.rs:403-429 | crates/jcode-tui/src/tui/app/commands_overnight.rs:81-107 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"049bcdc43bcd4867c16f58b7aabe689e23da9dd2d57d8adf2fc48ea3f8cc5543"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2): crates/jcode-app-core/src/server/client_lifecycle.rs:3235-3261 | crates/jcode-app-core/src/server/client_lightweight_control.rs:1007-1033 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/server/client_lifecycle.rs\u0060 and \u0060crates/jcode-app-core/src/server/client_lightweight_control.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 84 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/client_lifecycle.rs:3235\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_lifecycle.rs"},"region":{"startLine":3235}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5de601a01afd31ebd926b030f7e40eec9f2e0c58e5c76644352f5b1c2fc094d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26\u201327 lines \u00D7 2): crates/jcode-app-core/src/usage_openai.rs:81-106 | crates/jcode-base/src/usage/openai_helpers.rs:87-113 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/usage_openai.rs\u0060 and \u0060crates/jcode-base/src/usage/openai_helpers.rs\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/usage_openai.rs:81\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_openai.rs"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"703aff6244c6804b9e383fca6864f61ac268a97aa275e0ba0f2931967777bd5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2): crates/jcode-base/src/background.rs:469-495 | crates/jcode-base/src/background.rs:687-713 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/background.rs:469\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-base/src/background.rs:496\u0060 calls \u0060clone\u0060 and \u0060crates/jcode-base/src/background.rs:714\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/background.rs"},"region":{"startLine":469}}}],"partialFingerprints":{"codehealthFindingId/v1":"e017fb5f1e798208fc3d411a6ffd41cc5a6657bef827da19161248fbe01b22d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25\u201327 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote.rs:462-488 | crates/jcode-tui/src/tui/app/remote.rs:1798-1822 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote.rs"},"region":{"startLine":462}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa0d7ae19109a3c54765200e2f9f8d31ea8474235fccce36f8d9a568491381e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 3): crates/jcode-app-core/src/tool/apply_patch.rs:432-457 | crates/jcode-app-core/src/tool/edit.rs:351-376 | crates/jcode-app-core/src/tool/write.rs:213-238 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/apply_patch.rs"},"region":{"startLine":432}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cc1ff5d7efc17ea5bd2e7e2fb215c15d70944b3af3c60a9806feb032ae643df"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201326 lines \u00D7 3): crates/jcode-provider-doctor/src/live_provider_probes.rs:826-851 | crates/jcode-provider-doctor/src/live_provider_probes.rs:1154-1175 | crates/jcode-provider-doctor/src/live_provider_probes.rs:1346-1367 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-doctor/src/live_provider_probes.rs:826\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-provider-doctor/src/live_provider_probes.rs:825\u0060 calls \u0060build_native_claude_provider\u0060 and \u0060crates/jcode-provider-doctor/src/live_provider_probes.rs:1345\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/live_provider_probes.rs"},"region":{"startLine":826}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcba27b0b62c50a82d1994fd201e12c639cca29bfbfe1aa9cc837c33529e3fa2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): crates/jcode-app-core/src/usage_display.rs:36-61 | crates/jcode-base/src/usage/display.rs:39-64 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/usage_display.rs\u0060 and \u0060crates/jcode-base/src/usage/display.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/usage_display.rs:36\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_display.rs"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e9e1b20bef5dd3a78666fd00535b91a5da5e013b16ad479ac4d3ba025b42b4a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u201326 lines \u00D7 3): crates/jcode-base/src/session/crash.rs:39-42 | crates/jcode-base/src/session/crash.rs:79-103 | crates/jcode-base/src/session/crash.rs:215-240 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/session/crash.rs:79\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-base/src/session/crash.rs:77\u0060 calls \u0060path\u0060, \u0060extension\u0060, \u0060unwrap_or\u0060 and \u0060crates/jcode-base/src/session/crash.rs:39\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/crash.rs"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddb470ea8b0b1c585104871adc59080fc98f7af1130fc6f8e73eeec46a3bb460"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): crates/jcode-render-core/src/preprocess.rs:904-929 | crates/jcode-tui-markdown/src/markdown_text_preprocess.rs:101-126 \u2014 before extracting anything, compare \u0060crates/jcode-render-core/src/preprocess.rs\u0060 and \u0060crates/jcode-tui-markdown/src/markdown_text_preprocess.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 88 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-render-core/src/preprocess.rs:904\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/preprocess.rs"},"region":{"startLine":904}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4c29f82b59799bafbcf6661003b529b427b308cba75607ef9de9a06c983ed79"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): crates/jcode-tui/src/tui/session_picker/loading.rs:2505-2530 | crates/jcode-tui/src/tui/session_picker/loading.rs:2592-2617 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading.rs"},"region":{"startLine":2505}}}],"partialFingerprints":{"codehealthFindingId/v1":"4aeb399643bd8eafbc8f31a634d8fa4d26ad7c9df950baa651e1e56c6c4f0d36"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24\u201326 lines \u00D7 2): crates/jcode-tui/src/tui/ui_messages.rs:2366-2389 | crates/jcode-tui/src/tui/ui_messages.rs:3130-3155 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_messages.rs:2366\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":2366}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e3360cdc20f6346025beb916511a46bba6c36292bdccc60b0760c14d0ad9af9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24\u201325 lines \u00D7 3): crates/jcode-tui/src/tui/session_picker.rs:430-453 | crates/jcode-tui/src/tui/session_picker.rs:495-519 | crates/jcode-tui/src/tui/session_picker.rs:592-615 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/session_picker.rs:495\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker.rs"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccfb378a9ba7e5af0b0b48f13fdb9443d5fa9fc9c67408f2e2d35063d483aad9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): crates/jcode-app-core/src/server/client_lifecycle.rs:1732-1756 | crates/jcode-app-core/src/server/client_lifecycle.rs:1764-1788 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/client_lifecycle.rs:1732\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_lifecycle.rs"},"region":{"startLine":1732}}}],"partialFingerprints":{"codehealthFindingId/v1":"ade1785c92ce1be89da41f84a0bbb3ab5576b0773e201721dc265bf46f3f2f22"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): crates/jcode-app-core/src/server/client_lifecycle.rs:2997-3021 | crates/jcode-app-core/src/server/client_lightweight_control.rs:778-802 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/server/client_lifecycle.rs\u0060 and \u0060crates/jcode-app-core/src/server/client_lightweight_control.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 84 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/client_lifecycle.rs:2997\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_lifecycle.rs"},"region":{"startLine":2997}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5eb47c02245f4949729d28f2cd5a65148d59e12085b01cdedc6731493baf92e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23\u201325 lines \u00D7 2): crates/jcode-app-core/src/server/jade_relay.rs:1090-1112 | crates/jcode-app-core/src/server/spawn_model_selection.rs:7-31 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/jade_relay.rs"},"region":{"startLine":1090}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9d69ef5d626609a96c6dabb3628bc61b2ed29309169c0d1e58a9fcd8ff5d285"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): crates/jcode-app-core/src/telemetry_state.rs:40-64 | crates/jcode-telemetry-core/src/state_support.rs:46-70 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/telemetry_state.rs\u0060 and \u0060crates/jcode-telemetry-core/src/state_support.rs\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/telemetry_state.rs"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"93d5094cfc7f68456313a5fa25d8a7295600b3bb17b0f1f07fe67bd6adc41600"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24\u201325 lines \u00D7 2): crates/jcode-base/src/session.rs:791-814 | crates/jcode-base/src/session.rs:850-874 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session.rs"},"region":{"startLine":791}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0a85c7d95ae3ee1dcb056adac536c41952c8a2c828549cbbd35927115bd5bf6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201325 lines \u00D7 2): crates/jcode-provider-bedrock/src/lib.rs:406-427 | crates/jcode-schema-dialect/src/dialect.rs:351-375 \u2014 before extracting anything, compare \u0060crates/jcode-provider-bedrock/src/lib.rs\u0060 and \u0060crates/jcode-schema-dialect/src/dialect.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-bedrock/src/lib.rs:406\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-bedrock/src/lib.rs"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"f762c2ef90d3f13a5477da5b854c2dde7a9b757e7dd3f14cf5d9483c75826479"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31\u201333 lines \u00D7 2): crates/jcode-provider-openrouter-runtime/src/lib.rs:2663-2695 | crates/jcode-provider-openrouter-runtime/src/lib.rs:2717-2747 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/lib.rs"},"region":{"startLine":2663}}}],"partialFingerprints":{"codehealthFindingId/v1":"5632c450320cac3101f59e3470845ceb52a8d3093c0fad4b3f46cc3e5e7d649a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201325 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote/key_handling.rs:1679-1703 | crates/jcode-tui/src/tui/app/remote/key_handling/key_events.rs:270-289 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/remote/key_handling.rs:1679\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/key_handling.rs"},"region":{"startLine":1679}}}],"partialFingerprints":{"codehealthFindingId/v1":"e781bbfcd66445fe62c4074db5e37c04e3686caa8aabbd20892abd6dce43aa0e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201324 lines \u00D7 2): crates/jcode-app-core/src/server/client_session.rs:1554-1574 | crates/jcode-app-core/src/server/client_session.rs:2033-2056 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_session.rs"},"region":{"startLine":1554}}}],"partialFingerprints":{"codehealthFindingId/v1":"e36114b81d628c04a5ef981873a1d6a536ff22bdab33fb605cec6a2c5ce0f75b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): crates/jcode-app-core/src/server/client_state.rs:1307-1330 | crates/jcode-app-core/src/server/comm_sync.rs:30-53 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-app-core/src/server/client_state.rs:1306\u0060 calls \u0060read\u0060 and \u0060crates/jcode-app-core/src/server/comm_sync.rs:29\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_state.rs"},"region":{"startLine":1307}}}],"partialFingerprints":{"codehealthFindingId/v1":"1de089f25589ffed7810ced747b6d35a0a030a8dee8ca17cb5a4b48c59054ae0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): crates/jcode-app-core/src/tool/computer/input.rs:161-184 | crates/jcode-app-core/src/tool/computer/input.rs:210-233 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/computer/input.rs"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"814eeb6096d30dba755ebdaa81b5b2d4026c84f08bde71e897f816e203cc596e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23\u201324 lines \u00D7 2): crates/jcode-provider-antigravity-runtime/src/lib.rs:368-390 | crates/jcode-provider-gemini-runtime/src/lib.rs:527-550 \u2014 before extracting anything, compare \u0060crates/jcode-provider-antigravity-runtime/src/lib.rs\u0060 and \u0060crates/jcode-provider-gemini-runtime/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 137 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-antigravity-runtime/src/lib.rs:368\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-antigravity-runtime/src/lib.rs"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"144a48e6223924a7e9c4862513fa38c816b0c151ce32c504df83d08796e3df48"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): crates/jcode-tui/src/tui/ui.rs:1113-1136 | crates/jcode-tui/src/tui/ui.rs:1434-1457 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060key\u0060 to \u0060\u0026BodyCacheKey\u0060 in one and \u0060\u0026FullPrepCacheKey\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui.rs"},"region":{"startLine":1113}}}],"partialFingerprints":{"codehealthFindingId/v1":"15fef65b02e72827f11afa4ff10595a3695e15f99d3c4d08d0e68498e940840b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): crates/jcode-tui/src/tui/ui_pinned.rs:835-858 | crates/jcode-tui/src/tui/ui_pinned.rs:905-928 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_pinned.rs:835\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_pinned.rs"},"region":{"startLine":835}}}],"partialFingerprints":{"codehealthFindingId/v1":"e80063488c59209d43dec5c8e9a1f733e0cafa445d1842902eba487c093773ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201323 lines \u00D7 3): crates/jcode-provider-doctor/src/live_provider_probes.rs:853-874 | crates/jcode-provider-doctor/src/live_provider_probes.rs:1177-1198 | crates/jcode-provider-doctor/src/live_provider_probes.rs:1368-1390 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-doctor/src/live_provider_probes.rs:853\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/live_provider_probes.rs"},"region":{"startLine":853}}}],"partialFingerprints":{"codehealthFindingId/v1":"43399363b1f2a1ba260a49550c2eeae81f2521d3587e2dfe974fb0354dbea92e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): crates/jcode-app-core/src/message_notifications.rs:23-45 | crates/jcode-base/src/message/notifications.rs:84-106 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/message_notifications.rs\u0060 and \u0060crates/jcode-base/src/message/notifications.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/message_notifications.rs"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"e24326da88b8865ad0eb6af48d42f2794be72e917280f42ac684b6f84d54a718"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): crates/jcode-app-core/src/server/background_tasks.rs:135-157 | crates/jcode-app-core/src/server/background_tasks.rs:222-244 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/background_tasks.rs:135\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/background_tasks.rs"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"805f06752cbe9f540535b2741fdb5a8d7dcc871aa84a6ee64e1b1ab7179e765a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): crates/jcode-app-core/src/tool/bg.rs:117-139 | crates/jcode-tui/src/tui/ui_tools.rs:128-150 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/bg.rs"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd832f5deb1d62f542c02928ce9469b3dee739ee311e0d7bfccf718fcb898a27"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201323 lines \u00D7 2): crates/jcode-base/src/prompt.rs:409-431 | crates/jcode-base/src/prompt.rs:548-569 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/prompt.rs"},"region":{"startLine":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"9203fb7ce96252d932fd030176e7451dfe0127b37c4778d300a4f2e8c90d4b45"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): crates/jcode-base/src/session.rs:360-382 | crates/jcode-base/src/session.rs:401-423 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note what the matched lines are: every one of them assigns one field to another, so the block is a hand-written mapper between two data shapes rather than behaviour with a helper inside it. Extracting one shared function only works if both sites map the SAME pair of types in the same direction \u2014 check that first, because inverse or differently-typed mappers have no single function they can both call. Where they do not, the moves that exist are a generated or reflective mapper, a common embedded/base type the fields live on once, or accepting the run and covering it with a test that fails when a field is added to one side only."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session.rs"},"region":{"startLine":360}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c5040f54b4bb1967126a996c044f1369efcc3c7c9b81f2c680005150f334aff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): crates/jcode-tui-mermaid/src/mermaid_viewport.rs:1364-1386 | crates/jcode-tui-mermaid/src/mermaid_widget.rs:342-364 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-mermaid/src/mermaid_viewport.rs:1364\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_viewport.rs"},"region":{"startLine":1364}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea9276a4ec5119839d8728d2f8fdfda1d0a0b33f154be484b55aa79eab8ce22a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201323 lines \u00D7 2): crates/jcode-tui/src/tui/app/onboarding_graph.rs:211-233 | crates/jcode-tui/src/tui/app/onboarding_graph.rs:249-269 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/onboarding_graph.rs:211\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/onboarding_graph.rs"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"27f10d4685dcd7d50d8ea30870ad2a3496e01f139e0b4f55251709e1c1331eb0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 3): crates/jcode-tui-account-picker/src/overlay.rs:310-331 | crates/jcode-tui-usage-overlay/src/lib.rs:334-355 | crates/jcode-tui/src/tui/login_picker.rs:205-226 \u2014 before extracting anything, compare \u0060crates/jcode-tui-account-picker/src/overlay.rs\u0060 and \u0060crates/jcode-tui-usage-overlay/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-account-picker/src/overlay.rs:310\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay.rs"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe4840ec77b61b4a8728c2f63c24f84a0cad652a79849852efe15f3f9ec7ec26"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): crates/jcode-app-core/src/server/client_lifecycle.rs:1665-1686 | crates/jcode-app-core/src/server/client_lifecycle.rs:1948-1969 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/client_lifecycle.rs:1665\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_lifecycle.rs"},"region":{"startLine":1665}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b54556128bf6a29d5880a5a8d923657632dcd293871c1d768f7d5d72eabd26d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201322 lines \u00D7 2): crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs:1727-1748 | crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs:1769-1787 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs:1727\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs"},"region":{"startLine":1727}}}],"partialFingerprints":{"codehealthFindingId/v1":"84268b01145cf6709d9eac5fcf541d19d7a889398b3777fc09213df9e2b51b8a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): crates/jcode-provider-openrouter/src/lib.rs:570-591 | crates/jcode-provider-openrouter/src/lib.rs:604-625 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-provider-openrouter/src/lib.rs:592\u0060 calls \u0060is_empty\u0060 and \u0060crates/jcode-provider-openrouter/src/lib.rs:626\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter/src/lib.rs"},"region":{"startLine":570}}}],"partialFingerprints":{"codehealthFindingId/v1":"2372e0d0d39afd0f1fdd402106406d669a7fcb2468c6698df0681ed912744a7a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): crates/jcode-tui-anim/src/lib.rs:241-263 | crates/jcode-tui-anim/src/lib.rs:347-369 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-anim/src/lib.rs:241\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-anim/src/lib.rs"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"8eafb4c8df1d61b3df7cd100a86816651d22844e4e487838b55f7f7e9221316e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201322 lines \u00D7 2): crates/jcode-tui-markdown/src/markdown_wrap.rs:275-296 | crates/jcode-tui-markdown/src/markdown_wrap.rs:398-418 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-markdown/src/markdown_wrap.rs:275\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_wrap.rs"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"43479b8756e9cab9f7d1141e6f4cb18a4b327e40e8b0dff42e630cfc13779d6a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): crates/jcode-tui-style/src/color.rs:168-191 | crates/jcode-tui-workspace/src/color_support.rs:130-153 \u2014 before extracting anything, compare \u0060crates/jcode-tui-style/src/color.rs\u0060 and \u0060crates/jcode-tui-workspace/src/color_support.rs\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 228 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-style/src/color.rs"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e64cf432797dcc2d5fa2c1abb30e15511431a7fe353645e4f8f30cec3ec08d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): crates/jcode-tui/src/tui/session_picker/loading.rs:2723-2744 | crates/jcode-tui/src/tui/session_picker/loading/pi_sessions.rs:255-276 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/session_picker/loading.rs\u0060 and \u0060crates/jcode-tui/src/tui/session_picker/loading/pi_sessions.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading.rs"},"region":{"startLine":2723}}}],"partialFingerprints":{"codehealthFindingId/v1":"56ad57dfe3d97dbe2d0fdef38a0d11eedf87457c49bc16fed7ac5d2779201780"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): crates/jcode-tui/src/tui/ui.rs:1218-1239 | crates/jcode-tui/src/tui/ui.rs:1243-1264 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui.rs:1218\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui.rs"},"region":{"startLine":1218}}}],"partialFingerprints":{"codehealthFindingId/v1":"26fe68711d3ba2240f39dc542a54e6f1dd4e65561218cccc117f7d4adca5df0f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): crates/jcode-tui/src/tui/ui_messages.rs:2567-2588 | crates/jcode-tui/src/tui/ui_messages.rs:2719-2740 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_messages.rs:2567\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":2567}}}],"partialFingerprints":{"codehealthFindingId/v1":"de16be6dca8c7bd302674bdff60952bbea51cc338413225ffb4b3794bce063ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): src/cli/commands.rs:267-288 | src/cli/commands.rs:489-510 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/cli/commands.rs:267\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2e09310fbec4b90e281df43d65ef0350c06ad56da97a6cd2479bf00f39a8126"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 3): crates/jcode-app-core/src/server/client_lifecycle.rs:1701-1721 | crates/jcode-app-core/src/server/client_lifecycle.rs:1742-1762 | crates/jcode-app-core/src/server/client_lifecycle.rs:1774-1794 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/client_lifecycle.rs:1701\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-app-core/src/server/client_lifecycle.rs:1722\u0060 calls \u0060Some\u0060, \u0060try_available_models_snapshot\u0060 and \u0060crates/jcode-app-core/src/server/client_lifecycle.rs:1763\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_lifecycle.rs"},"region":{"startLine":1701}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b52e5e8e753fa6a5ff8844ab175672841f4d6ec96dfe649da30cc9b61e0d0a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201321 lines \u00D7 3): crates/jcode-setup-hints/src/lib.rs:2392-2408 | crates/jcode-tui-style/src/color.rs:61-81 | crates/jcode-tui-workspace/src/color_support.rs:32-50 \u2014 before extracting anything, compare \u0060crates/jcode-setup-hints/src/lib.rs\u0060 and \u0060crates/jcode-tui-style/src/color.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-setup-hints/src/lib.rs:2392\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/lib.rs"},"region":{"startLine":2392}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad54cadadc16cde274deb61bb2ba2501464e7d68c250e0b7cf8173bcd7806fca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201321 lines \u00D7 3): crates/jcode-tui/src/tui/app/inline_interactive.rs:1213-1233 | crates/jcode-tui/src/tui/app/inline_interactive.rs:1529-1548 | crates/jcode-tui/src/tui/app/inline_interactive.rs:2260-2279 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060self\u0060 to \u0060\u0026mut\u0060 in one and \u0060super) fn poll_model_picker_load(\u0026mut\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-tui/src/tui/app/inline_interactive.rs:1549\u0060 calls \u0060clone\u0060 and \u0060crates/jcode-tui/src/tui/app/inline_interactive.rs:1235\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":1213}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee980f8fdb4f0ad6fd7e6a69f89cf628bd439c87745e8df7dce72d578b0fe32b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): crates/jcode-app-core/src/tool/discover.rs:612-632 | crates/jcode-app-core/src/tool/discover.rs:638-658 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/discover.rs:612\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/discover.rs"},"region":{"startLine":612}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1ca23d79bb8424dd4e13641b8944e8fcbfae3671db1374a7a360e61096a927c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): crates/jcode-base/src/provider/openrouter.rs:106-126 | crates/jcode-provider-openrouter-runtime/src/lib.rs:111-131 \u2014 before extracting anything, compare \u0060crates/jcode-base/src/provider/openrouter.rs\u0060 and \u0060crates/jcode-provider-openrouter-runtime/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/provider/openrouter.rs:106\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/openrouter.rs"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"f028a21363e6481345bf866800a9a526cccfc70d40e38196d3d303a7b37f6bff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): crates/jcode-base/src/session.rs:816-836 | crates/jcode-base/src/session.rs:876-896 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/session.rs:816\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session.rs"},"region":{"startLine":816}}}],"partialFingerprints":{"codehealthFindingId/v1":"a47dc817e4276faeb01f2e376ce840d21f23437cdced0d8c7c0fd564731ca68a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): crates/jcode-base/src/usage/model.rs:10-30 | crates/jcode-tui/src/tui/app/helpers.rs:891-911 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/model.rs"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"11dc82fb8261ee21e7c5bb7a03425865e04cc7d3aa82d7b9d734dd9ca55a4635"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): crates/jcode-import-core/src/lib.rs:378-398 | crates/jcode-tui/src/tui/session_picker/loading.rs:722-742 \u2014 before extracting anything, compare \u0060crates/jcode-import-core/src/lib.rs\u0060 and \u0060crates/jcode-tui/src/tui/session_picker/loading.rs\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-import-core/src/lib.rs"},"region":{"startLine":378}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3725328e1e8425a97063ba50c46bd423b580a743983725d49304126fd306136"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): crates/jcode-provider-cursor-runtime/src/agent_transport.rs:658-678 | crates/jcode-provider-cursor-runtime/src/agent_transport.rs:683-703 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/agent_transport.rs"},"region":{"startLine":658}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0318d400e11dd02ada96f99a2500fc5e9a2c77e989dbba35ebeac70f922fcee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201321 lines \u00D7 2): crates/jcode-telemetry-core/src/lib.rs:1729-1749 | crates/jcode-telemetry-core/src/lib.rs:1766-1785 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-telemetry-core/src/lib.rs:1729\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lib.rs"},"region":{"startLine":1729}}}],"partialFingerprints":{"codehealthFindingId/v1":"9761725d638a9e5bb9283255a3508f0ea0699de32c97bed73270637d5863351a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201321 lines \u00D7 2): crates/jcode-tui-anim/src/lib.rs:196-205 | crates/jcode-tui-anim/src/lib.rs:286-306 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-anim/src/lib.rs"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"138fed2993253a2523c352c616ec298a554e94865f201ef613ff4a37bcef6a64"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): crates/jcode-tui-mermaid/src/mermaid_widget.rs:222-242 | crates/jcode-tui-mermaid/src/mermaid_widget.rs:464-484 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-mermaid/src/mermaid_widget.rs:222\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_widget.rs"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6e8cc6a3331e2a2e5d799b3abb79e1bb536ad4d42a91fc9e113546ff9c6272f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201321 lines \u00D7 2): crates/jcode-tui/src/tui/app/commands.rs:2057-2075 | crates/jcode-tui/src/tui/app/commands.rs:2136-2156 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":2057}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d3814105c33cb7dd24903f46085895f94476558191785a9b1b2a94777a4c894"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 3): crates/jcode-import-core/src/lib.rs:1045-1064 | crates/jcode-tui/src/tui/session_picker/loading.rs:2784-2803 | crates/jcode-tui/src/tui/session_picker/loading.rs:2832-2851 \u2014 before extracting anything, compare \u0060crates/jcode-import-core/src/lib.rs\u0060 and \u0060crates/jcode-tui/src/tui/session_picker/loading.rs\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-import-core/src/lib.rs"},"region":{"startLine":1045}}}],"partialFingerprints":{"codehealthFindingId/v1":"5663acca1084a890f14e0cbd7d66dfed7544024c155697eab121acaba8c67530"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): crates/jcode-app-core/src/server/client_lifecycle.rs:3331-3350 | crates/jcode-app-core/src/server/client_lifecycle.rs:3437-3456 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/client_lifecycle.rs:3331\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_lifecycle.rs"},"region":{"startLine":3331}}}],"partialFingerprints":{"codehealthFindingId/v1":"16dc1410c9176d65160fd94acf1179bf6e643d03d9f34e611a8cf2e562b68ab2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201320 lines \u00D7 2): crates/jcode-app-core/src/server/client_session.rs:1460-1479 | crates/jcode-app-core/src/server/client_session.rs:1640-1658 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/client_session.rs:1460\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_session.rs"},"region":{"startLine":1460}}}],"partialFingerprints":{"codehealthFindingId/v1":"2882e8f7fbcdd0b9f68321ff416f87222d29b4dfddcce2d058334daafb9027ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): crates/jcode-app-core/src/server/comm_control.rs:1731-1750 | crates/jcode-app-core/src/server/comm_control.rs:1774-1793 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-app-core/src/server/comm_control.rs:1729\u0060 calls \u0060Some\u0060, \u0060requester_owns_target\u0060 and \u0060crates/jcode-app-core/src/server/comm_control.rs:1773\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_control.rs"},"region":{"startLine":1731}}}],"partialFingerprints":{"codehealthFindingId/v1":"0121af6f4cd2a0b08a0b5e104b7f44f6ae2b5e580b5d6365615db1968996a242"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): crates/jcode-base/src/background.rs:1017-1036 | crates/jcode-base/src/background.rs:1072-1091 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/background.rs"},"region":{"startLine":1017}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d1f57bceb226bbb0f211d05479f5b19471431ac66fbcf41ce25c96bbb85da46"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201320 lines \u00D7 2): crates/jcode-base/src/compaction.rs:1018-1036 | crates/jcode-base/src/compaction.rs:1042-1061 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/compaction.rs:1018\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/compaction.rs"},"region":{"startLine":1018}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1b8ccfc75f8ed27152b5f38f404e468af8898fd6e3e8ed40084bfcfcda8943b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201320 lines \u00D7 2): crates/jcode-base/src/import.rs:202-221 | crates/jcode-base/src/import.rs:273-291 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/import.rs:202\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/import.rs"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"45b6dae7cc7f13e18c491a6a4d98327698e18827b6bf6b224b47cebf612e2bde"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201320 lines \u00D7 2): crates/jcode-base/src/import.rs:1239-1257 | crates/jcode-tui/src/tui/session_picker/loading/pi_sessions.rs:177-196 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/import.rs:1239\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/import.rs"},"region":{"startLine":1239}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b18fb708fe9fe27de79247669a646d34a549f8a77fcf537792ae1979d9c431e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201320 lines \u00D7 2): crates/jcode-provider-core/src/transport.rs:60-79 | scripts/repro/tls-bad-record-mac/src/main.rs:40-55 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/transport.rs"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"df4b829583dc29159d26f5e126b46711d9883468ca77504dcc0d5b17a799817f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): crates/jcode-tui-markdown/src/markdown_render_full.rs:72-91 | crates/jcode-tui-markdown/src/markdown_render_lazy.rs:60-79 \u2014 before extracting anything, compare \u0060crates/jcode-tui-markdown/src/markdown_render_full.rs\u0060 and \u0060crates/jcode-tui-markdown/src/markdown_render_lazy.rs\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 868 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-tui-markdown/src/markdown_render_full.rs:69\u0060 calls \u0060default\u0060 and \u0060crates/jcode-tui-markdown/src/markdown_render_lazy.rs:57\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_full.rs"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7e5ab9624e2d80599304fb18910c64d96f840f0dc5fae96df23d8542175e31e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): crates/jcode-tui-markdown/src/markdown_render_full.rs:1049-1068 | crates/jcode-tui-markdown/src/markdown_render_lazy.rs:962-981 \u2014 before extracting anything, compare \u0060crates/jcode-tui-markdown/src/markdown_render_full.rs\u0060 and \u0060crates/jcode-tui-markdown/src/markdown_render_lazy.rs\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 868 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_full.rs"},"region":{"startLine":1049}}}],"partialFingerprints":{"codehealthFindingId/v1":"40118035025fbd62d123fa024b08deeed27bd11b55f73fa91090c794cc54fc3d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): crates/jcode-tui/src/tui/app/auth.rs:803-822 | crates/jcode-tui/src/tui/app/auth.rs:1087-1106 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth.rs"},"region":{"startLine":803}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe52462049097a37fd059cf4cd9d55f8a6a7c390a4e631a4bd673fa6a6ba483b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote.rs:503-522 | crates/jcode-tui/src/tui/app/remote.rs:1827-1846 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote.rs"},"region":{"startLine":503}}}],"partialFingerprints":{"codehealthFindingId/v1":"7198666a56665aaa330de1c135c6d23e03f8388d9858f612ec292368eec7d3b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 3): crates/jcode-telemetry-core/src/lib.rs:1668-1686 | crates/jcode-telemetry-core/src/lifecycle.rs:105-123 | crates/jcode-telemetry-core/src/lifecycle.rs:292-310 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lib.rs"},"region":{"startLine":1668}}}],"partialFingerprints":{"codehealthFindingId/v1":"af674661c9ab6706e8dc927423a2de68347fa0d8089a32f89c3ddc7cf8b49fb2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201319 lines \u00D7 3): crates/jcode-tui/src/tui/app/turn.rs:214-231 | crates/jcode-tui/src/tui/app/turn.rs:532-550 | crates/jcode-tui/src/tui/app/turn.rs:1534-1552 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/turn.rs:214\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/turn.rs"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac2363bb091993d7443aa7a2e24da11681f1219c260bf204d1d0f6badd7e840c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): crates/jcode-app-core/src/server/client_session.rs:1428-1446 | crates/jcode-app-core/src/server/client_session.rs:1619-1637 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_session.rs"},"region":{"startLine":1428}}}],"partialFingerprints":{"codehealthFindingId/v1":"bca3c44202416ef34a0c39cf4f2eceebc079a75dbc713dc43b29c06f62718285"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): crates/jcode-app-core/src/server/debug_swarm_write.rs:355-373 | crates/jcode-app-core/src/server/debug_swarm_write.rs:463-481 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/debug_swarm_write.rs:355\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_swarm_write.rs"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"e44b6c3cf3ae6b1fdf7c73fb69d2684dabc70045c4693bdc9a0d6ceda67ddc9d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): crates/jcode-app-core/src/usage_openai.rs:243-261 | crates/jcode-base/src/usage/openai_helpers.rs:268-286 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/usage_openai.rs\u0060 and \u0060crates/jcode-base/src/usage/openai_helpers.rs\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_openai.rs"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"56b46a07d0c9a6074e1d0a07a5a6a38e3cb53bfb2a4eba98a975d0354b637705"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): crates/jcode-base/src/auth/oauth.rs:1126-1144 | crates/jcode-base/src/auth/oauth.rs:1277-1295 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/auth/oauth.rs:1126\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/oauth.rs"},"region":{"startLine":1126}}}],"partialFingerprints":{"codehealthFindingId/v1":"34b27ffd2d0aa86655f61ab39501d87062b77a893f44cf46c1cbb5a75952ecf3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201319 lines \u00D7 2): crates/jcode-render-core/src/preprocess.rs:71-88 | crates/jcode-render-core/src/preprocess.rs:143-161 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-render-core/src/preprocess.rs:71\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/preprocess.rs"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"52eee809e4e0901985df9114da874d66d581338b1db4cad25a7a3f7c4a8023e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): crates/jcode-render-core/src/preprocess.rs:511-529 | crates/jcode-render-core/src/preprocess.rs:621-639 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-render-core/src/preprocess.rs:511\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-render-core/src/preprocess.rs:640\u0060 calls \u0060push_str\u0060 and \u0060crates/jcode-render-core/src/preprocess.rs:530\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/preprocess.rs"},"region":{"startLine":511}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ce11855f0c50fcebcd1ee8c6bd0ab2517aeee18803076947b1c121ffccd9e20"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): crates/jcode-telemetry-core/src/lib.rs:419-437 | crates/jcode-telemetry-core/src/lib.rs:2077-2095 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lib.rs"},"region":{"startLine":419}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3e40b64a1a3a56acb561fda9be0f8b48f44b073c198b8a8ee5da441347a8ea2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201319 lines \u00D7 2): crates/jcode-tui/src/tui/ui.rs:1324-1337 | crates/jcode-tui/src/tui/ui.rs:1491-1509 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui.rs:1324\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060key\u0060 to \u0060\u0026BodyCacheKey\u0060 in one and \u0060FullPrepCacheKey\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui.rs"},"region":{"startLine":1324}}}],"partialFingerprints":{"codehealthFindingId/v1":"59dd33696a03e36af9349493bbfac3ed82343f8d55d33bfad782833ad6e93f0f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201319 lines \u00D7 2): crates/jcode-tui/src/tui/ui.rs:3171-3189 | crates/jcode-tui/src/tui/ui.rs:3249-3266 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui.rs:3171\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui.rs"},"region":{"startLine":3171}}}],"partialFingerprints":{"codehealthFindingId/v1":"83b624c1da064bc4f9f23e314e2d71efb7d2fa2cb2ff690bb914a7d87975f1f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): crates/jcode-tui/src/video_export.rs:144-162 | crates/jcode-tui/src/video_export.rs:222-240 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/video_export.rs:144\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/video_export.rs"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad8a0185e3f450583638eda4576a8a037358c088fc68d2897f59cbf75b38947d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 3): crates/jcode-tui-account-picker/src/overlay.rs:338-355 | crates/jcode-tui-usage-overlay/src/lib.rs:356-373 | crates/jcode-tui/src/tui/login_picker.rs:227-244 \u2014 before extracting anything, compare \u0060crates/jcode-tui-account-picker/src/overlay.rs\u0060 and \u0060crates/jcode-tui-usage-overlay/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay.rs"},"region":{"startLine":338}}}],"partialFingerprints":{"codehealthFindingId/v1":"459ce3b6c37ddee11f37f3c86f04809fd1c0fc7d2932187e55e0d6fae25d5b34"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 3): crates/jcode-tui-mermaid/src/mermaid_inline.rs:168-185 | crates/jcode-tui-mermaid/src/mermaid_inline.rs:221-237 | crates/jcode-tui-mermaid/src/mermaid_runtime.rs:753-769 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-mermaid/src/mermaid_inline.rs:168\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-tui-mermaid/src/mermaid_runtime.rs:751\u0060 calls \u0060open\u0060, \u0060ok\u0060, \u0060dimensions\u0060 and \u0060crates/jcode-tui-mermaid/src/mermaid_inline.rs:165\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_inline.rs"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"4add7856ebc7b515090934dc92d73ec6728a225d9847632737ca4f7dc8b2cdda"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/jcode-app-core/src/message_notifications.rs:168-185 | crates/jcode-base/src/message/notifications.rs:530-547 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/message_notifications.rs\u0060 and \u0060crates/jcode-base/src/message/notifications.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/message_notifications.rs:168\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/message_notifications.rs"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd91a9d709a4034349d1b05ef7e53622326161ce48a16bb0347ea6cdb6009ca3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/jcode-app-core/src/server/client_lifecycle.rs:997-1014 | crates/jcode-app-core/src/server/client_lifecycle.rs:3285-3302 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_lifecycle.rs"},"region":{"startLine":997}}}],"partialFingerprints":{"codehealthFindingId/v1":"9452e43272051e07d9ed703fc64bfa7e80e429a355421213ee2cb5c6d726416c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/jcode-app-core/src/server/client_session.rs:48-65 | crates/jcode-app-core/src/server/client_state.rs:720-737 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/client_session.rs:48\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_session.rs"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"48869d5fd04b891cad852cd73f4d04ebf540121eba42ed7e1bce5e83e4574352"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/jcode-app-core/src/usage_openai.rs:264-281 | crates/jcode-base/src/usage/openai_helpers.rs:289-306 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/usage_openai.rs\u0060 and \u0060crates/jcode-base/src/usage/openai_helpers.rs\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_openai.rs"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"0905bfff0309673e301d31c931db46a88bc91aacf14a653fa9ee522aac217615"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 2): crates/jcode-base/src/sidecar.rs:921-937 | crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs:1944-1961 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/sidecar.rs"},"region":{"startLine":921}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1e3b0bbd7bdb8acf806830d11143d17929e35c124186a234e4d646649bf909f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/jcode-provider-copilot/src/lib.rs:167-184 | crates/jcode-provider-openrouter/src/request.rs:227-244 \u2014 before extracting anything, compare \u0060crates/jcode-provider-copilot/src/lib.rs\u0060 and \u0060crates/jcode-provider-openrouter/src/request.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-copilot/src/lib.rs:167\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-copilot/src/lib.rs"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"874d39cbccf64a68d8e60aa72b23235178d17d69543e2b4ed7a503beb3d86e57"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/jcode-provider-doctor/src/live_provider_probes.rs:769-786 | crates/jcode-provider-doctor/src/live_provider_probes.rs:1097-1114 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/live_provider_probes.rs"},"region":{"startLine":769}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c6f297773e291393eaf7bd2eeb5656a9fbac7822f69465c8252b5a641238413"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/jcode-tui-render/src/swarm_gallery.rs:838-855 | crates/jcode-tui-render/src/swarm_gallery.rs:1186-1203 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-render/src/swarm_gallery.rs:838\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/swarm_gallery.rs"},"region":{"startLine":838}}}],"partialFingerprints":{"codehealthFindingId/v1":"3074b14be2968b83ee4ff9be9af05e9d29f480380d4f622da51b75d6afd1ad60"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/jcode-tui-style/src/color.rs:200-217 | crates/jcode-tui-workspace/src/color_support.rs:162-179 \u2014 before extracting anything, compare \u0060crates/jcode-tui-style/src/color.rs\u0060 and \u0060crates/jcode-tui-workspace/src/color_support.rs\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 228 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-style/src/color.rs"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"f362ef839fd2bc571b57f9165caf3907e056c6dc3f60e0fa58d9b072cdd203ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/jcode-tui-tool-display/src/lib.rs:161-178 | crates/jcode-tui/src/tui/ui_tools.rs:282-299 \u2014 before extracting anything, compare \u0060crates/jcode-tui-tool-display/src/lib.rs\u0060 and \u0060crates/jcode-tui/src/tui/ui_tools.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-tool-display/src/lib.rs"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"a76d9d0469f02545226ea60d64c934e78161b688121e0d721ab8b88a7d7b57d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/jcode-tui/src/tui/app/commands_improve.rs:498-515 | crates/jcode-tui/src/tui/app/commands_improve.rs:567-584 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/commands_improve.rs:498\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_improve.rs"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef76c46a8b6e5973e6de25d31b57c51281582bdcd57b9f0dbfdf53ba443eb9cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/jcode-tui/src/tui/app/debug.rs:437-454 | crates/jcode-tui/src/tui/memory_profile.rs:280-297 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/app/debug.rs\u0060 and \u0060crates/jcode-tui/src/tui/memory_profile.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug.rs"},"region":{"startLine":437}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a2ee1574e1625d166d8f00cc74fb1141885b17bd1e0b83bd462c493efa9498c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): crates/jcode-tui/src/tui/session_picker/loading/pi_sessions.rs:42-60 | crates/jcode-tui/src/tui/session_picker/loading/pi_sessions.rs:127-145 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading/pi_sessions.rs"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"42640dd106532d49e87ae6a2c1642f788a188e4b8ca70bf155576241a4432df3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/jcode-voice/src/lib.rs:482-499 | crates/jcode-voice/src/streaming_capture.rs:324-341 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-voice/src/lib.rs:482\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-voice/src/streaming_capture.rs:342\u0060 calls \u0060mark\u0060 and \u0060crates/jcode-voice/src/lib.rs:500\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-voice/src/lib.rs"},"region":{"startLine":482}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca9405e7c911a14f10fd49255a488e16c368c25968381217759655b32c0d4d8f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/jcode-app-core/src/server/client_lifecycle.rs:2498-2514 | crates/jcode-app-core/src/server/client_lifecycle.rs:2528-2544 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/client_lifecycle.rs:2498\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-app-core/src/server/client_lifecycle.rs:2497\u0060 calls \u0060handle_notify_session\u0060 and \u0060crates/jcode-app-core/src/server/client_lifecycle.rs:2527\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_lifecycle.rs"},"region":{"startLine":2498}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0aa86ce43a46c7b4efc60b64b7cf64699654f9c3b68c8922a15c30d3163442e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/jcode-app-core/src/server/client_lifecycle_logging.rs:15-31 | crates/jcode-tui/src/tui/backend.rs:597-613 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/client_lifecycle_logging.rs:15\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_lifecycle_logging.rs"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"942e26d66c5ca6617ac4813fc8376e0b551f2780ff39988f05748aac4f6e4af8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/jcode-app-core/src/server/debug_swarm_read.rs:418-434 | crates/jcode-app-core/src/server/debug_swarm_read.rs:458-474 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/debug_swarm_read.rs:418\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-app-core/src/server/debug_swarm_read.rs:455\u0060 calls \u0060contains\u0060 and \u0060crates/jcode-app-core/src/server/debug_swarm_read.rs:415\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_swarm_read.rs"},"region":{"startLine":418}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9481dad6ece22adb4c3f556f7304592488d2d419fd49a56d13ce0040a095cdf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/jcode-app-core/src/usage_openai.rs:175-191 | crates/jcode-base/src/usage/openai_helpers.rs:200-216 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/usage_openai.rs\u0060 and \u0060crates/jcode-base/src/usage/openai_helpers.rs\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_openai.rs"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cfbf1b331d0f9536d1ce84fc642f8bd59b4405698acebbac59dbb57327e6bb7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/jcode-base/src/auth/antigravity.rs:239-255 | crates/jcode-base/src/auth/gemini.rs:365-381 \u2014 before extracting anything, compare \u0060crates/jcode-base/src/auth/antigravity.rs\u0060 and \u0060crates/jcode-base/src/auth/gemini.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/auth/antigravity.rs:239\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/antigravity.rs"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"28f40689c0b77041710fcf91b57ebf0287f8c0b29788b4de24b2e550a1e62813"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/jcode-base/src/import.rs:1041-1057 | crates/jcode-tui/src/tui/session_picker/loading.rs:2373-2389 \u2014 before extracting anything, compare \u0060crates/jcode-base/src/import.rs\u0060 and \u0060crates/jcode-tui/src/tui/session_picker/loading.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/import.rs:1041\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/import.rs"},"region":{"startLine":1041}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b640dff8770536d18fcededa94979355407d6890afcb06abe448040931497f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): crates/jcode-base/src/platform.rs:410-426 | crates/jcode-desktop-open/src/lib.rs:81-96 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/platform.rs:410\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060cmd\u0060 to \u0060\u0026mut std::process::Command\u0060 in one and \u0060\u0026mut Command\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/platform.rs"},"region":{"startLine":410}}}],"partialFingerprints":{"codehealthFindingId/v1":"c98088d7cecd32463fe2c066f7e168ea9f843dfd24b6c55c3918aeabd7ae8d8d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): crates/jcode-base/src/provider/dispatch.rs:84-99 | crates/jcode-base/src/provider/dispatch.rs:222-238 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/provider/dispatch.rs:84\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/dispatch.rs"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"faa7203f10180d6358e8f9ce5783da9439800cd7fbfd4a0e83d3eb1324304897"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): crates/jcode-base/src/provider/dispatch.rs:114-129 | crates/jcode-base/src/provider/dispatch.rs:264-280 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/provider/dispatch.rs:114\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/dispatch.rs"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd77e4a061ffe98ec8b6d638a8d31a96df33c18471c37a8e18e5d72b74df139a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): crates/jcode-base/src/provider/dispatch.rs:131-146 | crates/jcode-base/src/provider/dispatch.rs:287-303 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/provider/dispatch.rs:131\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/dispatch.rs"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecdc23671168887c5937e955624fed2677fd2ed8d24b6899b81c1297f5ba4881"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): crates/jcode-base/src/session.rs:1603-1618 | crates/jcode-base/src/session.rs:1634-1650 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/session.rs:1603\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session.rs"},"region":{"startLine":1603}}}],"partialFingerprints":{"codehealthFindingId/v1":"48c82237dc54977a8dde4b87820482a06a304ef93a7793146d0a5456972f49ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/jcode-base/src/usage/api_keys.rs:155-171 | crates/jcode-base/src/usage/api_keys.rs:195-211 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/usage/api_keys.rs:155\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/api_keys.rs"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"a99f11cb2c3eaa7106d25da703725aa6dea4731d40d8bdc95d51ff45cecf1223"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201317 lines \u00D7 2): crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs:1220-1236 | crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs:1245-1258 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs"},"region":{"startLine":1220}}}],"partialFingerprints":{"codehealthFindingId/v1":"310b6c05b53677e501d5d737d3abd05d3aa2036c9ef460db8fd244a38d7d300d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/jcode-tui-account-picker/src/overlay.rs:376-392 | crates/jcode-tui/src/tui/login_picker.rs:265-281 \u2014 before extracting anything, compare \u0060crates/jcode-tui-account-picker/src/overlay.rs\u0060 and \u0060crates/jcode-tui/src/tui/login_picker.rs\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 204 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-account-picker/src/overlay.rs:376\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay.rs"},"region":{"startLine":376}}}],"partialFingerprints":{"codehealthFindingId/v1":"708bbca61dd496874ff447ae30ccafab42138e76863f83498c9ae07195ce237a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): crates/jcode-tui-style/src/color.rs:253-280 | crates/jcode-tui-workspace/src/color_support.rs:215-242 \u2014 before extracting anything, compare \u0060crates/jcode-tui-style/src/color.rs\u0060 and \u0060crates/jcode-tui-workspace/src/color_support.rs\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 228 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-style/src/color.rs"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"197e66f1127b9179836cee7402198e52144fcbae8542c8b381f33d4d2d287f9a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u201317 lines \u00D7 3): crates/jcode-tui-account-picker/src/overlay.rs:52-54 | crates/jcode-tui-usage-overlay/src/lib.rs:251-267 | crates/jcode-tui/src/tui/login_picker.rs:149-165 \u2014 before extracting anything, compare \u0060crates/jcode-tui-account-picker/src/overlay.rs\u0060 and \u0060crates/jcode-tui-usage-overlay/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-usage-overlay/src/lib.rs:251\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-tui-usage-overlay/src/lib.rs:251\u0060 calls \u0060capacity\u0060 and \u0060crates/jcode-tui-account-picker/src/overlay.rs:52\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay.rs"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"65608194cfb403a4aa0ed029e28b0c861d1bac5b42e25255a8424c0090a7521e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/jcode-tui/src/tui/app/auth_account_picker_saved_accounts.rs:369-385 | crates/jcode-tui/src/tui/app/auth_account_picker_saved_accounts.rs:432-448 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/auth_account_picker_saved_accounts.rs:369\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker_saved_accounts.rs"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e1b9cfbf755d8cfbb01ed823a319f908c3b242f67d31ee6ae02e401af6db98e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/jcode-tui/src/tui/app/commands_improve.rs:306-322 | crates/jcode-tui/src/tui/app/commands_improve.rs:353-369 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/commands_improve.rs:306\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_improve.rs"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"89c488c8a0619e6f22186b1b43a041cd140a1437215805015809f97d84bdd459"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/jcode-tui/src/tui/app/inline_interactive.rs:3581-3597 | crates/jcode-tui/src/tui/app/inline_interactive.rs:3606-3622 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/inline_interactive.rs:3581\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":3581}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b78e55ea6db2cc7be002e90bf692088ebe46a8ed126ec73ba441262d7082773"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/jcode-tui/src/tui/app/local.rs:308-324 | crates/jcode-tui/src/tui/app/remote.rs:831-847 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/app/local.rs\u0060 and \u0060crates/jcode-tui/src/tui/app/remote.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/local.rs:308\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/local.rs"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"11437f317bb5803dac488e6261f21e99f52f8d5492457a0021c01bf802b7355d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/jcode-tui/src/tui/app/local.rs:532-548 | crates/jcode-tui/src/tui/app/local.rs:593-609 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/local.rs:532\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060task\u0060 to \u0060BackgroundTaskCompleted\u0060 in one and \u0060crate::bus::BackgroundTaskStalled\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/local.rs"},"region":{"startLine":532}}}],"partialFingerprints":{"codehealthFindingId/v1":"01cc48e5acf2ff64400be47cf84a99f509de4a089924125f2441556daa816133"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote/key_handling.rs:784-799 | crates/jcode-tui/src/tui/app/remote/key_handling.rs:811-827 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/remote/key_handling.rs:784\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/key_handling.rs"},"region":{"startLine":784}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cef3394c4e16bb5310d21c7ca19bbd14a78eb343a32283b67e709ae3bffe9f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote/key_handling.rs:1642-1658 | crates/jcode-tui/src/tui/app/tui_lifecycle_runtime.rs:823-839 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/remote/key_handling.rs:1642\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-tui/src/tui/app/remote/key_handling.rs:1641\u0060 calls \u0060set_premium_mode\u0060 and \u0060crates/jcode-tui/src/tui/app/tui_lifecycle_runtime.rs:822\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/key_handling.rs"},"region":{"startLine":1642}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec42c0a0cea0c11477062a3903d47250871298c4c6214f1a024b60e69e323a45"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote/key_handling.rs:1739-1755 | crates/jcode-tui/src/tui/app/remote/key_handling.rs:1895-1911 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/key_handling.rs"},"region":{"startLine":1739}}}],"partialFingerprints":{"codehealthFindingId/v1":"53aa632d6a9f6fa550e7543fbb92b94f15101d7cde10242dd18f875aa1155fae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/jcode-tui/src/tui/app/state_ui_storage.rs:278-294 | crates/jcode-tui/src/tui/app/state_ui_storage.rs:384-411 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/state_ui_storage.rs:278\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui_storage.rs"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e982d10cbd787cc8dd98857a21e6d46f0c816ec56ccd53d3ade98e9efd54d63"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/jcode-tui/src/tui/cloud_git.rs:224-240 | src/cli/ssh_transport.rs:368-384 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/cloud_git.rs"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1e3606ae3bf9bf3f89ff40e0be25bf1f4e4495312c82b3a36baa4bcc9305d38"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201317 lines \u00D7 2): crates/jcode-tui/src/tui/session_picker/loading.rs:2204-2220 | crates/jcode-tui/src/tui/session_picker/loading.rs:2780-2790 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/session_picker/loading.rs:2204\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading.rs"},"region":{"startLine":2204}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d661492cc1ff7abd7520b901c0aa0556567612f4b80f4238d9952078e090ad1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): crates/jcode-tui/src/tui/ui.rs:2436-2451 | crates/jcode-tui/src/tui/ui.rs:2457-2473 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui.rs:2457\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui.rs"},"region":{"startLine":2436}}}],"partialFingerprints":{"codehealthFindingId/v1":"4da45f5b7c4707d29c7a7f45a12cd579663df6abf3287b37dd0d33ce7d08d4b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): crates/jcode-tui/src/tui/ui/copy_selection.rs:264-280 | crates/jcode-tui/src/tui/ui/copy_selection.rs:448-463 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui/copy_selection.rs:264\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui/copy_selection.rs"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b33c8617dbd34529556751b18e3e6cb2c627dbf2a51134870987a0c4fa4a69a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/jcode-tui/src/tui/ui_file_diff.rs:10-26 | crates/jcode-tui/src/tui/ui_pinned_selection.rs:10-26 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/ui_file_diff.rs\u0060 and \u0060crates/jcode-tui/src/tui/ui_pinned_selection.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_file_diff.rs:10\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_file_diff.rs"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"bff2619f848890793a2e54eee704d1b0dc1ef074619572ea14dde6547a61242c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/jcode-tui/src/tui/ui_inline_image.rs:1113-1129 | crates/jcode-tui/src/tui/ui_prepare.rs:233-249 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_inline_image.rs:1113\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_inline_image.rs"},"region":{"startLine":1113}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdd45202600bb00303784a23dc10816e78cca3d513f69fd5fb79892827182059"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/jcode-tui/src/tui/ui_messages.rs:1729-1745 | crates/jcode-tui/src/tui/ui_messages.rs:2109-2125 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_messages.rs:1729\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":1729}}}],"partialFingerprints":{"codehealthFindingId/v1":"921835bed8e7505f3d74abecc7ba1ac7a24d738aa00a3fde9a576633513b1798"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201317 lines \u00D7 2): crates/jcode-tui/src/tui/ui_prepare.rs:587-600 | crates/jcode-tui/src/tui/ui_prepare.rs:1079-1095 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_prepare.rs:587\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_prepare.rs"},"region":{"startLine":587}}}],"partialFingerprints":{"codehealthFindingId/v1":"33b9138585447d6ba55502495a41e6494db97bc8a8525e16c71ffa173ab3aebc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): crates/jcode-tui/src/tui/ui_prepare.rs:2705-2721 | crates/jcode-tui/src/tui/ui_prepare.rs:2836-2851 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_prepare.rs:2705\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_prepare.rs"},"region":{"startLine":2705}}}],"partialFingerprints":{"codehealthFindingId/v1":"d24f875be31f7e99e4cc7b2378e4e66fee1824ec6a5e09b618951826bc5dd396"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): src/bin/memory_recall_bench.rs:496-512 | src/bin/memory_recall_bench.rs:2279-2295 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/bin/memory_recall_bench.rs:496\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":496}}}],"partialFingerprints":{"codehealthFindingId/v1":"92ddb68f24189674841f4a049614f1ce5bfe62896ec8927ea86ea8b4e9209a39"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201317 lines \u00D7 2): src/cli/acp.rs:631-647 | src/cli/acp.rs:761-775 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/cli/acp.rs:631\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/acp.rs"},"region":{"startLine":631}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a7258a1b13eff82c6e57ccb98dc82c39e4d8a2944fd83b093103d4cab6b6464"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201317 lines \u00D7 2): src/cli/acp.rs:1522-1536 | src/cli/acp.rs:1544-1560 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/cli/acp.rs:1522\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/acp.rs"},"region":{"startLine":1522}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd05161e77f9dd6488aee78c4366a3ea4d9e75118e8d31262b9eacdbce6d772e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): crates/jcode-app-core/src/tool/agentgrep/context.rs:963-978 | crates/jcode-app-core/src/tool/agentgrep/context.rs:985-1000 | crates/jcode-app-core/src/tool/agentgrep/context.rs:1007-1022 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/agentgrep/context.rs:963\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/agentgrep/context.rs"},"region":{"startLine":963}}}],"partialFingerprints":{"codehealthFindingId/v1":"7aa026f3b378d84c870cc9fc0096340fe54ec07e5acc364088178615e8b3d95a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): crates/jcode-base/src/provider/dispatch.rs:233-248 | crates/jcode-base/src/provider/dispatch.rs:275-290 | crates/jcode-base/src/provider/dispatch.rs:298-313 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/provider/dispatch.rs:233\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/dispatch.rs"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d057413548bd76a6b8653e50957aeb9ac92a16a137db2057b26e64e0b88266b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): crates/jcode-tui/src/tui/app/auth_account_picker.rs:641-656 | crates/jcode-tui/src/tui/app/auth_account_picker.rs:676-691 | crates/jcode-tui/src/tui/app/auth_account_picker.rs:959-974 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/auth_account_picker.rs:641\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker.rs"},"region":{"startLine":641}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7f7756f8acc2039419283ee5e6bfc6830b7f2128398da9d172cb3a249b940a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): crates/jcode-tui/src/tui/app/turn.rs:399-414 | crates/jcode-tui/src/tui/app/turn.rs:462-477 | crates/jcode-tui/src/tui/app/turn.rs:1257-1272 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/turn.rs:399\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-tui/src/tui/app/turn.rs:416\u0060 calls \u0060clone\u0060 and \u0060crates/jcode-tui/src/tui/app/turn.rs:480\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/turn.rs"},"region":{"startLine":399}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ab94f4455c1031152c8d3670708c78f17cb004fe693f117775abc3ed1ac79dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): crates/jcode-tui/src/tui/ui_file_diff.rs:26-41 | crates/jcode-tui/src/tui/ui_overlays.rs:118-133 | crates/jcode-tui/src/tui/ui_pinned_selection.rs:26-41 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/ui_file_diff.rs\u0060 and \u0060crates/jcode-tui/src/tui/ui_pinned_selection.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_file_diff.rs:26\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_file_diff.rs"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"69d915fc8dade20d3c93d404d0d51fdf92fc50cd444fd83fd7d949caebb2b043"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201328 lines \u00D7 3): crates/jcode-tui/src/tui/ui_inline_interactive.rs:939-966 | crates/jcode-tui/src/tui/ui_inline_interactive.rs:1018-1045 | crates/jcode-tui/src/tui/ui_input/command_suggestions.rs:94-113 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_inline_interactive.rs:939\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_inline_interactive.rs"},"region":{"startLine":939}}}],"partialFingerprints":{"codehealthFindingId/v1":"03a684dcdf5e0c4d7aa288fa7c90792cf7c29f20575fe72fde375ef38feedaad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/jcode-app-core/src/server/client_processing.rs:568-583 | crates/jcode-app-core/src/server/client_processing.rs:679-694 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/client_processing.rs:568\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_processing.rs"},"region":{"startLine":568}}}],"partialFingerprints":{"codehealthFindingId/v1":"5553d59d853c16cea0ac394bea0a9672332d1b4caa17a5e62fbec2bc6b18feb2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/jcode-app-core/src/server/comm_plan.rs:176-191 | crates/jcode-app-core/src/server/comm_plan.rs:542-557 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/comm_plan.rs:176\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_plan.rs"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebb70c00cc0e9583dc6a2f1f9b9ab821f451c1c511267e863f940776e9a13944"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/jcode-app-core/src/server/debug_session_admin.rs:178-193 | crates/jcode-app-core/src/server/swarm.rs:1231-1246 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/debug_session_admin.rs:178\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_session_admin.rs"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccb5f77d067a376b3ef16fc7e6698cbfbbe9d6180b5bcaced58b3ffdc840ded4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/jcode-app-core/src/server/reload_trace.rs:17-32 | crates/jcode-message-types/src/lib.rs:599-614 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-message-types/src/lib.rs:599\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/reload_trace.rs"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cf20aee9bae50434e7dc77a6a2f4fba0c7e029d4dc2752b0d8c6dc12e7a8c14"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201316 lines \u00D7 2): crates/jcode-app-core/src/tool/skill.rs:344-359 | crates/jcode-tui/src/tui/app/state_ui.rs:1871-1884 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/skill.rs:344\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-tui/src/tui/app/state_ui.rs:1886\u0060 calls \u0060push_str\u0060 and \u0060crates/jcode-app-core/src/tool/skill.rs:359\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/skill.rs"},"region":{"startLine":344}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e1f2ab02a7f7340911c55e25fb390279247699c27337e761cc9e6eec678456f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/jcode-app-core/src/usage_display.rs:99-114 | crates/jcode-base/src/usage/display.rs:106-121 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/usage_display.rs\u0060 and \u0060crates/jcode-base/src/usage/display.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_display.rs"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb1af67bccab626b4a17242830c5f2c2b5ba0ba9fc1f5f38d425775717f52f0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/jcode-app-core/src/usage_openai.rs:219-234 | crates/jcode-base/src/usage/openai_helpers.rs:244-259 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/usage_openai.rs\u0060 and \u0060crates/jcode-base/src/usage/openai_helpers.rs\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_openai.rs"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"624ab82f5334e4e11bf7348730053e148b0e0ce8f62df7ca96d7238ae9b780d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201316 lines \u00D7 2): crates/jcode-base/src/auth/oauth_callback_io.rs:147-159 | crates/jcode-base/src/auth/oauth_callback_io.rs:263-278 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/auth/oauth_callback_io.rs:147\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/oauth_callback_io.rs"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"7558495bfe4e351d933c6060e76bb6140389c509c2f4dd2eb85e50532bf4d609"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/jcode-base/src/provider/openrouter.rs:287-302 | crates/jcode-provider-openrouter-runtime/src/lib.rs:367-382 \u2014 before extracting anything, compare \u0060crates/jcode-base/src/provider/openrouter.rs\u0060 and \u0060crates/jcode-provider-openrouter-runtime/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/provider/openrouter.rs:287\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/openrouter.rs"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"92888583b035a060929306f4d00002b8b10ab5bcef6ba12b03d56f0a13794c8a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): crates/jcode-embedding/src/lib.rs:144-160 | crates/jcode-embedding/src/lib.rs:302-317 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-embedding/src/lib.rs"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f440277c184efcf16aeb0050ecb7abba74315db45a8769c984642cc3c070a61"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): crates/jcode-provider-antigravity-runtime/src/lib.rs:631-645 | crates/jcode-provider-gemini-runtime/src/lib.rs:748-763 \u2014 before extracting anything, compare \u0060crates/jcode-provider-antigravity-runtime/src/lib.rs\u0060 and \u0060crates/jcode-provider-gemini-runtime/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 137 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-antigravity-runtime/src/lib.rs:631\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-antigravity-runtime/src/lib.rs"},"region":{"startLine":631}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ba67d4bc3dc7ee65af4decfc4faf4fa1f5d69206ffe1b22ca91cc598a0c6ab2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201316 lines \u00D7 2): crates/jcode-tui-core/src/keybind.rs:66-78 | crates/jcode-tui/src/tui/keybind.rs:589-604 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-core/src/keybind.rs:66\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-core/src/keybind.rs"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb3cb775d07ef407a6266b9cae6b76de8254c44b534fda8d9e7bfd055ca5b857"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/jcode-tui-render/src/swarm_gallery.rs:409-424 | crates/jcode-tui-render/src/swarm_gallery.rs:481-496 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/swarm_gallery.rs"},"region":{"startLine":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"062dd271231a0c0ef7a28ba7d3afa1f6fff71d205f297c4b41a6fde15b3947c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/jcode-tui-style/src/theme_mode.rs:85-100 | crates/jcode-tui/src/bin/replay_frames.rs:38-53 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-style/src/theme_mode.rs"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b60441e7e6ea580aa0445fc598fc06c4dcbe70aa12f07b5888ddd3bed936cd9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/jcode-tui/src/tui/app/auth.rs:1301-1316 | crates/jcode-tui/src/tui/app/auth.rs:1707-1722 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/auth.rs:1301\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth.rs"},"region":{"startLine":1301}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7fa7d771a30850ac21dba7c0846d9abdc5db23d8c9b01b7dc05d9f4f2653021"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201316 lines \u00D7 2): crates/jcode-tui/src/tui/app/model_context.rs:1123-1138 | crates/jcode-tui/src/tui/app/remote/key_handling.rs:168-181 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/model_context.rs:1123\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/model_context.rs"},"region":{"startLine":1123}}}],"partialFingerprints":{"codehealthFindingId/v1":"98bcf1dddebf92f37ea43ef4121f4934329e6a4d400256f954f3340fef65c2f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote/input_dispatch.rs:296-311 | crates/jcode-tui/src/tui/app/remote/input_dispatch.rs:318-333 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/remote/input_dispatch.rs:296\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/input_dispatch.rs"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ebb7cba015cbe1d189e40df0f766ae8be97c9558c379664fa39b2a792a695cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote/key_handling.rs:1795-1810 | crates/jcode-tui/src/tui/app/remote/key_handling.rs:1951-1966 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/key_handling.rs"},"region":{"startLine":1795}}}],"partialFingerprints":{"codehealthFindingId/v1":"184c5a8376270942fb8e5b0be399b05019dc1dffb1970127fbae397bb00146dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): crates/jcode-tui/src/tui/app/run_shell.rs:864-879 | crates/jcode-tui/src/tui/app/run_shell.rs:1254-1268 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/run_shell.rs:864\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-tui/src/tui/app/run_shell.rs:861\u0060 calls \u0060tick\u0060, \u0060handle_tick\u0060 and \u0060crates/jcode-tui/src/tui/app/run_shell.rs:1252\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/run_shell.rs"},"region":{"startLine":864}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0b215eee302ccfcd0bf08d2295016725d33b50d41674e6a4eb806862675815b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): crates/jcode-tui/src/tui/login_picker.rs:723-747 | crates/jcode-tui/src/tui/login_picker.rs:798-822 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/login_picker.rs:723\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/login_picker.rs"},"region":{"startLine":723}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb08ba99f7d6c9af26dedda8d47014954070963fd8c9fcd025bc9f909e81dc56"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/jcode-tui/src/tui/ui.rs:2608-2623 | crates/jcode-tui/src/tui/ui.rs:2635-2650 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui.rs"},"region":{"startLine":2608}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d6c4a6a1aa9d28cbb9194eed49a54d9deb8a37e1c07f4a13dc66296f0b5d515"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201316 lines \u00D7 2): src/cli/acp.rs:514-527 | src/cli/acp.rs:569-584 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/cli/acp.rs:514\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/acp.rs"},"region":{"startLine":514}}}],"partialFingerprints":{"codehealthFindingId/v1":"025656a5c8ebd38a6be4cb3832c7c2d4f385467854293ddf9d28bbf6ae49ca32"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 4): crates/jcode-app-core/src/tool/computer/keys.rs:84-97 | crates/jcode-render-core/src/math.rs:202-216 | crates/jcode-render-core/src/math.rs:238-252 | crates/jcode-tui-core/src/korean_input.rs:45-58 \u2014 there are 4 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-render-core/src/math.rs:202\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/computer/keys.rs"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b52549673c427500cbf07a4e573374d2806ebe70a430323fcf55bc189ced1fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): crates/jcode-app-core/src/tool/gmail.rs:382-396 | crates/jcode-app-core/src/tool/gmail.rs:462-476 | crates/jcode-app-core/src/tool/gmail.rs:535-549 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/gmail.rs"},"region":{"startLine":382}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ccac9bffa60c272505a98026e60d15f2ab104e9c52fef731c85c675bfc8de17"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u201315 lines \u00D7 4): crates/jcode-app-core/src/tool/read.rs:406-420 | crates/jcode-base/src/provider/image_clamp.rs:409-422 | crates/jcode-terminal-image/src/display.rs:234-248 | crates/jcode-tui-mermaid/src/lib.rs:1514-1516 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/tool/read.rs\u0060 and \u0060crates/jcode-base/src/provider/image_clamp.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/read.rs:406\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-app-core/src/tool/read.rs:406\u0060 calls \u0060Some\u0060 and \u0060crates/jcode-tui-mermaid/src/lib.rs:1514\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/read.rs"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8d102eaf091caab7b152c3ecbee65247bab5ebbd043a7e2d0b8b2698b0838f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): crates/jcode-provider-doctor/src/live_provider_probes.rs:796-810 | crates/jcode-provider-doctor/src/live_provider_probes.rs:1124-1138 | crates/jcode-provider-doctor/src/live_provider_probes.rs:1315-1329 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-doctor/src/live_provider_probes.rs:796\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/live_provider_probes.rs"},"region":{"startLine":796}}}],"partialFingerprints":{"codehealthFindingId/v1":"151827cab73e5cc77dea213da2b6d882bd5aa2f95504dafc2d81fc43d5d3d732"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): crates/jcode-tui/src/tui/app/auth_account_picker.rs:535-549 | crates/jcode-tui/src/tui/app/auth_account_picker.rs:589-603 | crates/jcode-tui/src/tui/app/auth_account_picker.rs:931-945 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/auth_account_picker.rs:535\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker.rs"},"region":{"startLine":535}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f250df66aece38f91a283a77204574d12509fb0e3417cf4bf6cf42e8713aefd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): crates/jcode-tui/src/tui/app/model_context.rs:400-414 | crates/jcode-tui/src/tui/app/model_context.rs:672-686 | crates/jcode-tui/src/tui/app/model_context.rs:935-949 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060self\u0060 to \u0060\u0026mut\u0060 in one and \u0060super) fn offer_fallback_after_error(\u0026mut\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/model_context.rs"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5c73254e4da0d922e1781daf0d022e07e8d7a9b3279cc52c392fa515f9f69ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): crates/jcode-app-core/src/agent/turn_execution.rs:1424-1437 | crates/jcode-app-core/src/agent/turn_execution.rs:1453-1467 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/agent/turn_execution.rs:1453\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/turn_execution.rs"},"region":{"startLine":1424}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fc6d2f6863d42d542d7811510cfc57a1059953cbd264848b6167a27eb47c1af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-app-core/src/agent/turn_execution.rs:1495-1509 | src/cli/tui_launch.rs:31-45 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/agent/turn_execution.rs:1495\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/turn_execution.rs"},"region":{"startLine":1495}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebc2dfc712fb68cda285efd74dda9e344470dca1f4c7dd014270584fec579729"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-app-core/src/server.rs:989-1003 | crates/jcode-app-core/src/server.rs:1091-1105 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server.rs:989\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server.rs"},"region":{"startLine":989}}}],"partialFingerprints":{"codehealthFindingId/v1":"d99a05f5940957584ace374639db190e4e74fc9c22928f3d189517b2bf1dbe5b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-app-core/src/server/client_comm_context.rs:100-114 | crates/jcode-app-core/src/server/client_comm_message.rs:337-351 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_comm_context.rs"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6d1e13a6e717879c8068d9c949f94cf3b3222b480fbb29701bd9c6b4ae72146"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-app-core/src/server/client_lifecycle.rs:968-982 | crates/jcode-app-core/src/server/client_lifecycle.rs:1226-1240 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/client_lifecycle.rs:968\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_lifecycle.rs"},"region":{"startLine":968}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e2b8acbc4348880c00ce566fbaf412f6184f110474f850aaedc4a02bef021e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-app-core/src/server/client_lifecycle.rs:1188-1202 | crates/jcode-app-core/src/server/client_lifecycle.rs:1298-1312 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/client_lifecycle.rs:1188\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_lifecycle.rs"},"region":{"startLine":1188}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cd77c4749a2eef2b2f772800f834058313c77669602ff70faa3e1702c9035ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-app-core/src/server/comm_plan.rs:380-394 | crates/jcode-app-core/src/server/comm_plan.rs:618-632 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/comm_plan.rs:380\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_plan.rs"},"region":{"startLine":380}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e26c9c7572871320ef7313b5318469df482dc2c427a6b32f044c972be174892"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): crates/jcode-app-core/src/server/provider_control.rs:203-217 | crates/jcode-app-core/src/server/provider_control.rs:316-329 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/provider_control.rs:203\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-app-core/src/server/provider_control.rs:315\u0060 calls \u0060provider_model\u0060 and \u0060crates/jcode-app-core/src/server/provider_control.rs:203\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/provider_control.rs"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"39d2c8ed92fde2ec06addd0479b0cee9667c6aa3edea5232f5c515076094cce5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): crates/jcode-app-core/src/tool/webfetch.rs:308-321 | crates/jcode-app-core/src/tool/webfetch.rs:390-404 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/webfetch.rs:308\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/webfetch.rs"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"4caf9139e8a6feaf7b0804578c6a1f4e7002f3678198fe6972f17d38bc46966c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-app-core/src/usage_display.rs:13-27 | crates/jcode-base/src/usage/display.rs:13-27 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/usage_display.rs\u0060 and \u0060crates/jcode-base/src/usage/display.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_display.rs"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0b3a9117d7e4fb1993ab06548f8e5efd9c8d76b0470c261a1c937350a712956"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201315 lines \u00D7 2): crates/jcode-base/src/auth/oauth_callback_io.rs:133-145 | crates/jcode-base/src/auth/oauth_callback_io.rs:247-261 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/auth/oauth_callback_io.rs:133\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/oauth_callback_io.rs"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"112a55f23b41d644e84e00afb8de52c2ce0294e4a7a4e6c830ba55ddd9c138da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-base/src/cloud_environment.rs:341-355 | crates/jcode-base/src/cloud_environment.rs:480-494 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/cloud_environment.rs:341\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/cloud_environment.rs"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2779d6cff6a007cf3072ce35664068dfb5f37bded38168f5d2e2f51d4f9b4f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-base/src/memory.rs:1231-1245 | crates/jcode-base/src/memory.rs:1293-1307 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/memory.rs:1231\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory.rs"},"region":{"startLine":1231}}}],"partialFingerprints":{"codehealthFindingId/v1":"07a688950079b1a4ba7e539687225bfb16f8f9e3576b7834232716fcebc2d803"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201315 lines \u00D7 2): crates/jcode-base/src/platform.rs:389-397 | crates/jcode-build-support/src/platform_support.rs:39-53 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/platform.rs:389\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/platform.rs"},"region":{"startLine":389}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6706020d32a7efbfe0add1e034712d42341614722ac6f5075fb59fe632774df"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-base/src/usage/api_keys.rs:704-718 | crates/jcode-base/src/usage/api_keys.rs:742-756 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/usage/api_keys.rs:704\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/api_keys.rs"},"region":{"startLine":704}}}],"partialFingerprints":{"codehealthFindingId/v1":"50cd40e3ddd180af960e17d076103021074157ee9da0ae0a77014c168930303f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-command-risk/src/lib.rs:261-275 | crates/jcode-command-risk/src/lib.rs:339-353 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-command-risk/src/lib.rs"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf42af1fdbbff486fda8b454e9a7e18630a1a15676847e9e3241a7e171c5b0d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201315 lines \u00D7 2): crates/jcode-provider-bedrock/src/lib.rs:431-445 | crates/jcode-schema-dialect/src/dialect.rs:383-394 \u2014 before extracting anything, compare \u0060crates/jcode-provider-bedrock/src/lib.rs\u0060 and \u0060crates/jcode-schema-dialect/src/dialect.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-bedrock/src/lib.rs"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3aaacc3d6461367cf6d40ba53fd0bdbb70f94a0461fb2dda83d470d434c060c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs:1205-1219 | crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs:1714-1728 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs:1205\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs"},"region":{"startLine":1205}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ddc927da39bc308cd67e1fac7162098fb3b24132308488f42dc7c3c17b9571d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-provider-openrouter-runtime/src/openrouter_provider_impl.rs:308-323 | crates/jcode-provider-openrouter-runtime/src/openrouter_provider_impl.rs:939-953 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-openrouter-runtime/src/openrouter_provider_impl.rs:308\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/openrouter_provider_impl.rs"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c72f4596d23940ce0860ff0c42ff64688ceabc839aa6a1d76d9355aefa1d128"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-render-core/src/math.rs:197-211 | crates/jcode-render-core/src/math.rs:218-232 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-render-core/src/math.rs:197\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/math.rs"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"8057fdedc5423ee4ef8a640f830c98418c87e296affc05f2560d33f5c3765903"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-render-core/src/preprocess.rs:90-104 | crates/jcode-render-core/src/preprocess.rs:163-177 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-render-core/src/preprocess.rs:90\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/preprocess.rs"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ccd9a7e5d6387f1e8012193a2ff36f9aa7e2287edcb76af53a52813d4d1dcbc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-tui-mermaid/src/debug.rs:59-73 | crates/jcode-tui-mermaid/src/lib.rs:1581-1595 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/debug.rs"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"732c0ec0685737bc5c0a5c2c4e38dd99c762f77766c0622c704cd73b17d367d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): crates/jcode-tui-mermaid/src/mermaid_cache_render.rs:1231-1245 | crates/jcode-tui-mermaid/src/mermaid_cache_render.rs:1288-1301 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-mermaid/src/mermaid_cache_render.rs:1288\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-tui-mermaid/src/mermaid_cache_render.rs:1285\u0060 calls \u0060Ok\u0060, \u0060remove\u0060 and \u0060crates/jcode-tui-mermaid/src/mermaid_cache_render.rs:1230\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_cache_render.rs"},"region":{"startLine":1231}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f39f602a234b36f4d453aa80d6d26fb4a0aa51a8166f855391281d10764b4d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201315 lines \u00D7 2): crates/jcode-tui-mermaid/src/mermaid_widget.rs:250-264 | crates/jcode-tui-mermaid/src/mermaid_widget.rs:489-501 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-mermaid/src/mermaid_widget.rs:250\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_widget.rs"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcedc61794d980b5c89fb7c9c6711e81c4aae54e17e5871aaa7cae5cf58367ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/jcode-tui-style/src/color.rs:223-238 | crates/jcode-tui-workspace/src/color_support.rs:185-200 \u2014 before extracting anything, compare \u0060crates/jcode-tui-style/src/color.rs\u0060 and \u0060crates/jcode-tui-workspace/src/color_support.rs\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 228 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-style/src/color.rs"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb0b755f46c1862db86fe929ee0a9332baaa1c6e84df3f740a5dc4841faa65fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-tui-tool-display/src/lib.rs:127-141 | crates/jcode-tui/src/tui/ui_tools.rs:232-246 \u2014 before extracting anything, compare \u0060crates/jcode-tui-tool-display/src/lib.rs\u0060 and \u0060crates/jcode-tui/src/tui/ui_tools.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-tool-display/src/lib.rs"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"069d826913f56b26a9d5d9c33a36bafa72d33dca8bdf45b668f4fd4009985969"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-tui-tool-display/src/lib.rs:144-158 | crates/jcode-tui/src/tui/ui_tools.rs:249-263 \u2014 before extracting anything, compare \u0060crates/jcode-tui-tool-display/src/lib.rs\u0060 and \u0060crates/jcode-tui/src/tui/ui_tools.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-tool-display/src/lib.rs"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"af2026ea3527e7fea342798b1f06597017087f5ab20bb9f1a37139c8ffb4e56c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-tui/src/tui/app/commands.rs:1932-1946 | crates/jcode-tui/src/tui/app/remote/key_handling.rs:1100-1114 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/app/commands.rs\u0060 and \u0060crates/jcode-tui/src/tui/app/remote/key_handling.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/commands.rs:1932\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":1932}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4cd957152252279fa793cbe06118ca73373d4bb37a490b79fcbd0920ae7258d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-tui/src/tui/app/commands.rs:1999-2013 | crates/jcode-tui/src/tui/app/remote/key_handling.rs:1256-1270 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/app/commands.rs\u0060 and \u0060crates/jcode-tui/src/tui/app/remote/key_handling.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/commands.rs:1999\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":1999}}}],"partialFingerprints":{"codehealthFindingId/v1":"acb230a3dc0b47b5eb9dcfff5d03b1957ac9bd28c6cda41c444936daac6f724f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote.rs:2260-2290 | crates/jcode-tui/src/tui/app/remote/key_handling/key_events.rs:458-488 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/app/remote.rs\u0060 and \u0060crates/jcode-tui/src/tui/app/remote/key_handling/key_events.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/remote.rs:2260\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote.rs"},"region":{"startLine":2260}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f6502c843f50fedc891b2354861e168d2867084c6dbd1308e2b15156f572e35"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): crates/jcode-tui/src/tui/info_widget_usage.rs:75-89 | crates/jcode-tui/src/tui/info_widget_usage.rs:215-228 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_usage.rs"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"5eb781b5a5a4a70da8ece7668406c076a08f53d0eeb83474b80008bfcbde95de"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-tui/src/tui/redraw_schedule.rs:512-526 | crates/jcode-tui/src/tui/redraw_schedule.rs:678-692 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/redraw_schedule.rs:512\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/redraw_schedule.rs"},"region":{"startLine":512}}}],"partialFingerprints":{"codehealthFindingId/v1":"5672e2bb9705fa6afa242ff35fe27f25407e58a5b34fbfa4fb5315d4c7fb81ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-tui/src/tui/ui_inline_interactive.rs:983-997 | crates/jcode-tui/src/tui/ui_inline_interactive.rs:1092-1106 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-tui/src/tui/ui_inline_interactive.rs:1089\u0060 calls \u0060push\u0060, \u0060styled\u0060 and \u0060crates/jcode-tui/src/tui/ui_inline_interactive.rs:982\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_inline_interactive.rs"},"region":{"startLine":983}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3feda43af7792d9fd8606235a24289242d7130908dadc47ef7d51663ef9a04e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-tui/src/tui/ui_overlays.rs:54-68 | crates/jcode-tui/src/tui/ui_overlays.rs:717-731 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_overlays.rs"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a652fd0e0da138698e89cda51900ad1a5092a0ec8c3df4b4cbbd39209017093"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-tui/src/tui/ui_tools/patch_summary.rs:23-37 | crates/jcode-tui/src/tui/ui_tools/patch_summary.rs:53-67 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_tools/patch_summary.rs:23\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tools/patch_summary.rs"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"88c333f127d630648606ef5dfd39cb0dac5d35b0423e69f2baf8df413910c73e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 3): crates/jcode-app-core/src/agent/status.rs:94-107 | crates/jcode-app-core/src/agent/turn_execution.rs:1599-1612 | crates/jcode-base/src/memory_agent.rs:55-67 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/agent/status.rs\u0060 and \u0060crates/jcode-app-core/src/agent/turn_execution.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/memory_agent.rs:55\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/status.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"24e951df7f2224e40820a3b1f7f52eb6c2113159c9ec4797b79cbbfce4df544e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): crates/jcode-app-core/src/server/provider_control.rs:206-219 | crates/jcode-app-core/src/server/provider_control.rs:318-331 | crates/jcode-app-core/src/server/provider_control.rs:450-463 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/provider_control.rs:206\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-app-core/src/server/provider_control.rs:315\u0060 calls \u0060provider_model\u0060 and \u0060crates/jcode-app-core/src/server/provider_control.rs:203\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/provider_control.rs"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"06c26e9312c70db6766c2dc549e77a4602caa92b5c24a8d2fa868ec64c381f1b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201314 lines \u00D7 3): crates/jcode-tui-account-picker/src/overlay.rs:504-517 | crates/jcode-tui-usage-overlay/src/lib.rs:512-522 | crates/jcode-tui/src/tui/login_picker.rs:410-423 \u2014 before extracting anything, compare \u0060crates/jcode-tui-account-picker/src/overlay.rs\u0060 and \u0060crates/jcode-tui-usage-overlay/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-account-picker/src/overlay.rs:504\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay.rs"},"region":{"startLine":504}}}],"partialFingerprints":{"codehealthFindingId/v1":"464d51fec470263a9aacec69324c29031e6adbeabca745b755ffc16e49bbabd4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): crates/jcode-tui-account-picker/src/overlay_render.rs:263-276 | crates/jcode-tui-usage-overlay/src/lib.rs:850-863 | crates/jcode-tui/src/tui/login_picker.rs:848-861 \u2014 before extracting anything, compare \u0060crates/jcode-tui-account-picker/src/overlay_render.rs\u0060 and \u0060crates/jcode-tui-usage-overlay/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay_render.rs"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e012880d639b034fafd093289cbeb942420930b02055cee8ac4d44a0f7387f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 3): crates/jcode-tui/src/tui/mod.rs:1671-1684 | crates/jcode-tui/src/tui/mod.rs:1686-1699 | crates/jcode-tui/src/tui/mod.rs:1972-1984 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/mod.rs"},"region":{"startLine":1671}}}],"partialFingerprints":{"codehealthFindingId/v1":"6471bcf718207de0ffadccf0862a41093f1d572e2689f29412997185dd0e2fbd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-app-core/src/server/client_lifecycle.rs:1066-1079 | crates/jcode-app-core/src/server/client_lifecycle.rs:1087-1100 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/client_lifecycle.rs:1066\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_lifecycle.rs"},"region":{"startLine":1066}}}],"partialFingerprints":{"codehealthFindingId/v1":"4dd262620e468c500fec02bbccf8af4be49718b11f0e37ab13fb3844343f6f1e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): crates/jcode-app-core/src/server/group_transfer.rs:396-408 | crates/jcode-app-core/src/server/group_transfer.rs:609-622 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/group_transfer.rs:609\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/group_transfer.rs"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fab76b3f07ee909266c79872d7019a7aef4f8ddfa15ce9c98a1bcd55afcdc83"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-app-core/src/session_launch.rs:710-723 | crates/jcode-app-core/src/session_launch.rs:837-850 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/session_launch.rs:710\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/session_launch.rs"},"region":{"startLine":710}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f1d7a435d829ef9ec1ed5f2c376be1e5254c7557d96c16211fb7e634894065d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-app-core/src/session_launch.rs:725-738 | crates/jcode-app-core/src/session_launch.rs:851-864 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/session_launch.rs:725\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/session_launch.rs"},"region":{"startLine":725}}}],"partialFingerprints":{"codehealthFindingId/v1":"36f6f0191dc31ee79707f06e678e4a28d40da07f1fb050c7bc04d29362b65a81"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): crates/jcode-app-core/src/tool/ambient.rs:436-449 | crates/jcode-tui-permissions/src/lib.rs:681-693 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/ambient.rs:436\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060map\u0060 to \u0060\u0026Map\u003CString, Value\u003E\u0060 in one and \u0060Option\u003C\u0026Map\u003CString, Value\u003E\u003E\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/ambient.rs"},"region":{"startLine":436}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ea5d6b81424009a19205f661412ce05a0b90842ecb38ca8750f9bb20f825c33"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): crates/jcode-app-core/src/tool/session_search.rs:1380-1392 | crates/jcode-app-core/src/tool/session_search.rs:1511-1524 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/session_search.rs:1380\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/session_search.rs"},"region":{"startLine":1380}}}],"partialFingerprints":{"codehealthFindingId/v1":"0307355e585cf698cb6c0facc8df8ea619c0074a1f8947d6e8249823cc1a4421"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-app-core/src/usage_display.rs:73-86 | crates/jcode-base/src/usage/display.rs:80-93 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/usage_display.rs\u0060 and \u0060crates/jcode-base/src/usage/display.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_display.rs"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"604cf098adb7c6123a195b4416bbaa7ff87f7cd4db3ffebcb18a41694ebf749f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-app-core/src/usage_openai.rs:288-301 | crates/jcode-base/src/usage/openai_helpers.rs:313-326 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/usage_openai.rs\u0060 and \u0060crates/jcode-base/src/usage/openai_helpers.rs\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_openai.rs"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"e142a91b8caeb22208e0d942d4e31eb08926de3a7f9511d984f47e69749a6e6b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-base/src/auth/transfer.rs:370-383 | crates/jcode-base/src/auth/transfer.rs:1190-1203 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/auth/transfer.rs:370\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/transfer.rs"},"region":{"startLine":370}}}],"partialFingerprints":{"codehealthFindingId/v1":"75a3bb9ac6ec9fab13ee33efb726d1478cf266e2b00361cc9d7f51c37c20cf18"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-base/src/client_input.rs:36-49 | crates/jcode-tui/src/tui/app/state_ui.rs:471-484 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/client_input.rs:36\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/client_input.rs"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"b71e73d55e290ba62ae9b7a825d2d68a86527d0cff3b5afbd967fb3e5c69b2ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): crates/jcode-base/src/embedding_stub.rs:191-203 | crates/jcode-embedding/src/lib.rs:388-401 \u2014 before extracting anything, compare \u0060crates/jcode-base/src/embedding_stub.rs\u0060 and \u0060crates/jcode-embedding/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/embedding_stub.rs:191\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/embedding_stub.rs"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"d723499ed33b17a29ecc680e7908b788e90e6cc9b90dc8378081497d05ef5f00"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-base/src/import.rs:1135-1148 | crates/jcode-import-core/src/lib.rs:683-696 \u2014 before extracting anything, compare \u0060crates/jcode-base/src/import.rs\u0060 and \u0060crates/jcode-import-core/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/import.rs:1135\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/import.rs"},"region":{"startLine":1135}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff871fdc570ea457a524b1c27e85e2a0480c622e399556966d29ee9a54c6c8ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-base/src/provider/mod.rs:1712-1725 | crates/jcode-base/src/provider/mod.rs:2259-2272 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/mod.rs"},"region":{"startLine":1712}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea3e17a83e08ee4c20bdca957042762b62d0d62447706fd5df8f1c6681642380"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-base/src/provider/models.rs:687-700 | crates/jcode-base/src/provider/models.rs:723-736 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/provider/models.rs:687\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/models.rs"},"region":{"startLine":687}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb2190aba3ac06beb130e7ff6f9bd39d4fd31c2146817ff19a3a37bba0dfb293"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-base/src/provider/openrouter.rs:220-233 | crates/jcode-provider-openrouter-runtime/src/lib.rs:300-313 \u2014 before extracting anything, compare \u0060crates/jcode-base/src/provider/openrouter.rs\u0060 and \u0060crates/jcode-provider-openrouter-runtime/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/openrouter.rs"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7dde89e75c49d483a765402464f430c9473b2069d00a5b9f9240c515c4e996a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-base/src/provider_activity.rs:136-149 | crates/jcode-base/src/provider_activity.rs:213-226 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider_activity.rs"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba6aa35660c61bf4662302a1d3c3b03939107e01d22c05d0b0ab59c75f8e3c4a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201314 lines \u00D7 2): crates/jcode-base/src/provider_catalog.rs:981-994 | crates/jcode-base/src/provider_catalog.rs:1120-1131 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/provider_catalog.rs:981\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider_catalog.rs"},"region":{"startLine":981}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b906e257474b4ea90edded46449ce49b0450f44a9bc0f2e5e892d402d8778ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-base/src/usage/accessors.rs:458-471 | crates/jcode-base/src/usage/accessors.rs:514-527 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/usage/accessors.rs:458\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/accessors.rs"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"fce126285591f7beebc3bfee991f67cf0efeb59c881f6393e3460b6ebf190dec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-compaction-core/src/lib.rs:283-296 | crates/jcode-compaction-core/src/lib.rs:306-319 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-compaction-core/src/lib.rs"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4e8c66f70b46041ccdd2f505293885070d4afd171707e63f7b4ec7db8f90fd8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-provider-anthropic-runtime/src/lib.rs:1991-2004 | crates/jcode-provider-anthropic-runtime/src/lib.rs:2023-2036 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-anthropic-runtime/src/lib.rs:1991\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic-runtime/src/lib.rs"},"region":{"startLine":1991}}}],"partialFingerprints":{"codehealthFindingId/v1":"5be6a7f7449c3ab28f4ee54d4f0d53bced7e49cf24804fb77090539693428ecb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-provider-cursor-runtime/src/agent_transport.rs:638-651 | crates/jcode-provider-cursor-runtime/src/wire.rs:76-89 \u2014 before extracting anything, compare \u0060crates/jcode-provider-cursor-runtime/src/agent_transport.rs\u0060 and \u0060crates/jcode-provider-cursor-runtime/src/wire.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/agent_transport.rs"},"region":{"startLine":638}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d849dee899e6b39d05e59b300963fab33c5f37ae50d4a24b6d389a419aefdd4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-swarm-core/src/lib.rs:282-295 | crates/jcode-swarm-core/src/lib.rs:304-317 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-swarm-core/src/lib.rs:282\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-swarm-core/src/lib.rs:303\u0060 calls \u0060keys\u0060, \u0060cloned\u0060, \u0060collect\u0060 and \u0060crates/jcode-swarm-core/src/lib.rs:281\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-swarm-core/src/lib.rs"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e06e8811c055b4575bdb5e673e704ad0a5dda049eeb4efc3fdc517d9f5541c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-tui-account-picker/src/overlay.rs:583-596 | crates/jcode-tui/src/tui/login_picker.rs:476-489 \u2014 before extracting anything, compare \u0060crates/jcode-tui-account-picker/src/overlay.rs\u0060 and \u0060crates/jcode-tui/src/tui/login_picker.rs\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 204 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-account-picker/src/overlay.rs:583\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay.rs"},"region":{"startLine":583}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f58b7e5053a333ad66803dbf53bda98422a527361ac3d9961cd35d372580a9a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-tui-anim/src/lib.rs:438-451 | crates/jcode-tui-anim/src/lib.rs:460-473 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-anim/src/lib.rs:438\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-anim/src/lib.rs"},"region":{"startLine":438}}}],"partialFingerprints":{"codehealthFindingId/v1":"82535443a5f74637540dbc280ce50799dff828a0af2bdb6becf47dac213dcbf9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-tui-usage-overlay/src/lib.rs:460-473 | crates/jcode-tui/src/tui/login_picker.rs:366-379 \u2014 before extracting anything, compare \u0060crates/jcode-tui-usage-overlay/src/lib.rs\u0060 and \u0060crates/jcode-tui/src/tui/login_picker.rs\u0060 as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 200 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-usage-overlay/src/lib.rs:460\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-usage-overlay/src/lib.rs"},"region":{"startLine":460}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2ecb1fdaefacd54c6a877787c741130e1284fbe91c4fab82b3d9924490d8757"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-tui/src/tui/app/auth_account_commands.rs:36-49 | crates/jcode-tui/src/tui/app/auth_account_commands.rs:61-74 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/auth_account_commands.rs:36\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_commands.rs"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c39d56386ba0aad1c15473f339cc5f531f0c9c8827f60cd8844fa54d5cb64e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-tui/src/tui/app/commands.rs:1849-1862 | crates/jcode-tui/src/tui/app/remote/key_handling.rs:1344-1357 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/app/commands.rs\u0060 and \u0060crates/jcode-tui/src/tui/app/remote/key_handling.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":1849}}}],"partialFingerprints":{"codehealthFindingId/v1":"5aaf5eed91640c9be85df975eace9d99fe5f38a0cb116f13a619587afa5ef653"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-tui/src/tui/app/inline_interactive.rs:1250-1263 | crates/jcode-tui/src/tui/app/inline_interactive.rs:1352-1365 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":1250}}}],"partialFingerprints":{"codehealthFindingId/v1":"12fcea76ed67138d4772582673769d924ec6c20d8f2368c6b102c65cd472c66e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote/key_handling.rs:1775-1788 | crates/jcode-tui/src/tui/app/remote/key_handling.rs:1931-1944 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/remote/key_handling.rs:1775\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/key_handling.rs"},"region":{"startLine":1775}}}],"partialFingerprints":{"codehealthFindingId/v1":"00f34136aea82d32c8014b2150bb4d4aeea3ffcf5bc01bd2d1814f78d61d8558"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-tui/src/tui/app/turn.rs:888-901 | crates/jcode-tui/src/tui/app/turn.rs:1190-1203 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/turn.rs:888\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/turn.rs"},"region":{"startLine":888}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd6b5ce3f99a7f8be20d84dea2d3d66ecf5dacc3b825b7ae5e20946fdec2dca6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-tui/src/tui/info_widget_usage.rs:113-126 | crates/jcode-tui/src/tui/info_widget_usage.rs:263-276 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/info_widget_usage.rs:113\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-tui/src/tui/info_widget_usage.rs:110\u0060 calls \u0060as_deref\u0060 and \u0060crates/jcode-tui/src/tui/info_widget_usage.rs:262\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_usage.rs"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a9a9006f6be22ad14aad5f420836a26d4b7038e1cea6878aa24307715956d4e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201314 lines \u00D7 2): crates/jcode-tui/src/tui/keybind.rs:95-108 | crates/jcode-tui/src/tui/keybind.rs:144-154 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/keybind.rs:95\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/keybind.rs"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"aef55c1e27409efdf16cb238f2b14b080275f3bfd3152171df85d4a98f4f0224"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): crates/jcode-tui/src/tui/session_picker.rs:534-547 | crates/jcode-tui/src/tui/session_picker.rs:777-789 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker.rs"},"region":{"startLine":534}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bd026f8dea3634347d9372db4f4ce7c758702b1cae85b11313e4cdb1dfdbf29"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-tui/src/tui/session_picker/filter.rs:484-497 | crates/jcode-tui/src/tui/session_picker/filter.rs:660-673 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/filter.rs"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dabcf1eb07855944337aabef12c0c308e531fb110bad8013fe833578314acac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): crates/jcode-tui/src/tui/ui_overlays.rs:105-119 | crates/jcode-tui/src/tui/ui_viewport.rs:913-928 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_overlays.rs:105\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_overlays.rs"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1b2468626cfdd28bb5c4a350073d952af7ddf6fab81aca0d495017ae5f43146"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): crates/jcode-tui/src/tui/ui_prepare.rs:2671-2684 | crates/jcode-tui/src/tui/ui_prepare.rs:2802-2814 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_prepare.rs:2671\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_prepare.rs"},"region":{"startLine":2671}}}],"partialFingerprints":{"codehealthFindingId/v1":"23482a6a5732eb942258f50ce6ebf8688160d9b0a9434d9736658ab7de9bc215"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): src/bin/memory_recall_bench.rs:471-486 | src/bin/memory_recall_bench.rs:2255-2270 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":471}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e33de09e8a5b3a4e69dc8d648f369e4a14dd2afb8190c89c72831d472494d26"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): crates/jcode-tui/src/tui/app/remote/server_events.rs:3053-3065 | crates/jcode-tui/src/tui/app/remote/server_events.rs:3169-3181 | crates/jcode-tui/src/tui/app/remote/server_events.rs:3216-3228 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/remote/server_events.rs:3053\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/server_events.rs"},"region":{"startLine":3053}}}],"partialFingerprints":{"codehealthFindingId/v1":"3670b305d9c473377d43c8edaac5c3413f4f2b870f90c8c49b18277f13540bd5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-app-core/src/message_notifications.rs:157-169 | crates/jcode-base/src/message/notifications.rs:514-526 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/message_notifications.rs\u0060 and \u0060crates/jcode-base/src/message/notifications.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/message_notifications.rs:157\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-base/src/message/notifications.rs:511\u0060 calls \u0060parse_background_task_header_label\u0060 and \u0060crates/jcode-app-core/src/message_notifications.rs:155\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/message_notifications.rs"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"adfcfb00d1eff5bddf69ade9d8659a29e9be99dffb40ff88b7b4252a536c1f34"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-app-core/src/server.rs:812-824 | crates/jcode-app-core/src/server.rs:912-924 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server.rs:812\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server.rs"},"region":{"startLine":812}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdb4aa0ac27b001e01c75f3676e104715c25c103f8e455916a8aa951f9f50781"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-app-core/src/server/client_lifecycle.rs:677-689 | crates/jcode-app-core/src/server/client_lifecycle.rs:855-867 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/client_lifecycle.rs:677\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_lifecycle.rs"},"region":{"startLine":677}}}],"partialFingerprints":{"codehealthFindingId/v1":"d40875584a2b3fc1f3fe112553014c83acb2e5ff53aee76b3c2076a636827fa6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201313 lines \u00D7 2): crates/jcode-app-core/src/server/client_lifecycle.rs:1160-1172 | crates/jcode-app-core/src/server/client_lifecycle.rs:2452-2461 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-app-core/src/server/client_lifecycle.rs:1173\u0060 calls \u0060clone\u0060 and \u0060crates/jcode-app-core/src/server/client_lifecycle.rs:2462\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_lifecycle.rs"},"region":{"startLine":1160}}}],"partialFingerprints":{"codehealthFindingId/v1":"e992645d4d654d74e75ff3882aa8028e6a13808ea40f0dcc787e2df1d678c05c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-app-core/src/server/jade_relay.rs:360-372 | crates/jcode-app-core/src/server/jade_relay.rs:714-726 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/jade_relay.rs"},"region":{"startLine":360}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e18f3ac2a541d9675cedc0a1fda5407f1ff4466c0f749253d1839057c77b384"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-app-core/src/server/runtime.rs:156-168 | crates/jcode-app-core/src/server/runtime.rs:192-204 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/runtime.rs:156\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/runtime.rs"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"e23d8b0dab7bf4caa4d2c669a9002b60120f50630bb2a2aefe8f6521871a33e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-app-core/src/tool/ambient.rs:421-433 | crates/jcode-tui-permissions/src/lib.rs:665-677 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-permissions/src/lib.rs:665\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060map\u0060 to \u0060\u0026Map\u003CString, Value\u003E\u0060 in one and \u0060Option\u003C\u0026Map\u003CString, Value\u003E\u003E\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/ambient.rs"},"region":{"startLine":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1ac3712e454c483318d72f23546c0f8c1689f1a9ef2b8b6888aa93b8dd3b6a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-app-core/src/tool/bash.rs:1135-1150 | crates/jcode-app-core/src/tool/bash.rs:1193-1205 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/bash.rs"},"region":{"startLine":1135}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fcbafb9359edcbd68b50f2eeb8dd69be09587800287deaa43853ee0d76bf166"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-app-core/src/tool/bash.rs:1166-1178 | crates/jcode-app-core/src/tool/bash.rs:1209-1221 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/bash.rs:1166\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/bash.rs"},"region":{"startLine":1166}}}],"partialFingerprints":{"codehealthFindingId/v1":"97651f3981b083204e98aeee35b89c930cc75cd2ad5aac896af87b724f60f7c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-app-core/src/tool/discover.rs:1018-1030 | crates/jcode-app-core/src/tool/discover.rs:1209-1221 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/discover.rs:1018\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/discover.rs"},"region":{"startLine":1018}}}],"partialFingerprints":{"codehealthFindingId/v1":"474da58f5df67430c7a49399b169660b2a63e6a2e4374f4734390034cb1f26af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-app-core/src/usage_openai.rs:39-51 | crates/jcode-base/src/usage/openai_helpers.rs:45-57 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/usage_openai.rs\u0060 and \u0060crates/jcode-base/src/usage/openai_helpers.rs\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_openai.rs"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad437a32467a766d733506d39d25e5fc0a81709b1726feed2d168d506c057851"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201313 lines \u00D7 2): crates/jcode-base/src/auth/oauth_callback_io.rs:121-131 | crates/jcode-base/src/auth/oauth_callback_io.rs:233-245 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/auth/oauth_callback_io.rs:121\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/oauth_callback_io.rs"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a54f95bb623fbd368219fef6f3419f03050ffd8bbe3ae43b1d0b28a89e8c7a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-base/src/compaction.rs:454-466 | crates/jcode-base/src/compaction.rs:1738-1750 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/compaction.rs:454\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/compaction.rs"},"region":{"startLine":454}}}],"partialFingerprints":{"codehealthFindingId/v1":"b473df2789bab1aed6b2e155a4cb6bc1f4395a1c5ca264d37a32dc0cd7bfe650"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-base/src/compaction.rs:1088-1100 | crates/jcode-base/src/compaction.rs:1104-1116 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/compaction.rs"},"region":{"startLine":1088}}}],"partialFingerprints":{"codehealthFindingId/v1":"336eee8113912a2899b1755f4927ef1757534295a37f923bb4ba8500212a58fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201313 lines \u00D7 2): crates/jcode-base/src/memory.rs:796-808 | src/bin/memory_recall_bench.rs:197-207 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/memory.rs:796\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060scored\u0060 to \u0060Vec\u003C(MemoryEntry, f32)\u003E\u0060 in one and \u0060Vec\u003C(String, f32)\u003E\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory.rs"},"region":{"startLine":796}}}],"partialFingerprints":{"codehealthFindingId/v1":"8511f4e2f43bba15c16b683a652e916206bf4de79e09d1a586e9992b61a2e646"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-base/src/memory_rerank.rs:277-289 | crates/jcode-base/src/memory_rerank.rs:399-411 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory_rerank.rs"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"18849196e7be7bac3bb6b1fa46a0c802f82f2c00aa65455944b6fe7299063416"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-base/src/provider_catalog.rs:1005-1017 | crates/jcode-base/src/provider_catalog.rs:1141-1153 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/provider_catalog.rs:1005\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider_catalog.rs"},"region":{"startLine":1005}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce66c7927de319cb8c01eef8f3208bff86140c81cab5cf8b508ebb1b11b2b981"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-import-core/src/lib.rs:1105-1117 | crates/jcode-session-types/src/lib.rs:622-634 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-import-core/src/lib.rs"},"region":{"startLine":1105}}}],"partialFingerprints":{"codehealthFindingId/v1":"11b28ad1fd70c5f9e92f6217acda36ed70eb91764be36cee1fa78529e51f709c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-provider-anthropic-runtime/src/lib.rs:1321-1333 | crates/jcode-provider-anthropic-runtime/src/lib.rs:1767-1779 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-anthropic-runtime/src/lib.rs:1321\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic-runtime/src/lib.rs"},"region":{"startLine":1321}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2823f979282c7e837e9fde434f7ca09afbca8a102cbd3425b20f91c5da46466"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-provider-core/src/catalog_refresh.rs:60-72 | crates/jcode-provider-core/src/catalog_refresh.rs:74-86 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-core/src/catalog_refresh.rs:60\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/catalog_refresh.rs"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2765f846fe7636c405f5f440c4fbf655f9bb9238bf151e7dec4b2cd8787e254"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-provider-openai-runtime/src/openai_provider_impl.rs:208-220 | crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs:936-948 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-openai-runtime/src/openai_provider_impl.rs:208\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-provider-openai-runtime/src/openai_provider_impl.rs:222\u0060 calls \u0060get\u0060 and \u0060crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs:949\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_provider_impl.rs"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"b72983fd517b0544408cd1f2b82b4ea3eddd643744ff286720496a300006c4c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-provider-openai/src/stream.rs:433-445 | crates/jcode-provider-openai/src/stream.rs:452-464 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai/src/stream.rs"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"197550a0aa90f57b6ef6a189be39dbdaa53434d45e716ab2d698c3c63a1b59b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-tui-account-picker/src/overlay.rs:360-372 | crates/jcode-tui/src/tui/login_picker.rs:249-261 \u2014 before extracting anything, compare \u0060crates/jcode-tui-account-picker/src/overlay.rs\u0060 and \u0060crates/jcode-tui/src/tui/login_picker.rs\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 204 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-account-picker/src/overlay.rs:360\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay.rs"},"region":{"startLine":360}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8299f7e766b2d028af4d1bb8bbc0a27f9311bbaea2665cc0a85f6fc11dc15a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-tui-mermaid/src/mermaid_widget.rs:266-278 | crates/jcode-tui-mermaid/src/mermaid_widget.rs:514-526 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-mermaid/src/mermaid_widget.rs:266\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_widget.rs"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"de082107c55bd2b08554ed831e97afe084baeb07fdebf9d3beb8b005b2adc365"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-tui-render/src/lib.rs:87-99 | crates/jcode-tui-render/src/lib.rs:137-149 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-render/src/lib.rs:87\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/lib.rs"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"172262163732759ec937aa03f4cf2b8726124b919306e7ed1920ad3e502126f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-tui-render/src/swarm_gallery.rs:895-908 | crates/jcode-tui-render/src/swarm_gallery.rs:1239-1252 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/swarm_gallery.rs"},"region":{"startLine":895}}}],"partialFingerprints":{"codehealthFindingId/v1":"37c2ba769176e6221f8e379bf7267fa2c49ee38b7ff05e369786b8207faaa14e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-tui-render/src/swarm_gallery.rs:1296-1308 | crates/jcode-tui-render/src/swarm_gallery.rs:1394-1406 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-tui-render/src/swarm_gallery.rs:1294\u0060 calls \u0060sort_members_for_display\u0060, \u0060min\u0060 and \u0060crates/jcode-tui-render/src/swarm_gallery.rs:1393\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/swarm_gallery.rs"},"region":{"startLine":1296}}}],"partialFingerprints":{"codehealthFindingId/v1":"da1f82dbb680dc72da0336a4c4189fe48e696553b3aa8dd02d5e0c4935686e17"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): crates/jcode-tui/src/tui/app/commands_desktop.rs:89-101 | src/cli/companion_autostart.rs:64-75 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_desktop.rs"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"95dc9c110f0319e19ac1ad4854f14127297a55f4caf92f5996c3b38013bf50f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-tui/src/tui/app/local.rs:143-155 | crates/jcode-tui/src/tui/app/remote.rs:233-245 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/app/local.rs\u0060 and \u0060crates/jcode-tui/src/tui/app/remote.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/local.rs"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"079dff707b8fa7f728e76ff78645bb7c3855415dc289b409624c3a87c086d58c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-tui/src/tui/app/observe.rs:301-313 | crates/jcode-tui/src/tui/app/split_view.rs:315-327 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/app/observe.rs\u0060 and \u0060crates/jcode-tui/src/tui/app/split_view.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/observe.rs"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"81e6a779ad2cab6ad03a6921d48bc34c231c2bc12cc4df537fb08f6daeaf97d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote/reconnect.rs:349-361 | crates/jcode-tui/src/tui/app/remote/reconnect.rs:641-653 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/remote/reconnect.rs:349\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/reconnect.rs"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9441e5514b191449223bb55cecd1337a1cde940aad7ece934ba1191747a3654"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): crates/jcode-tui/src/tui/app/runtime_memory.rs:129-141 | crates/jcode-tui/src/tui/app/runtime_memory.rs:166-177 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/runtime_memory.rs:129\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-tui/src/tui/app/runtime_memory.rs:177\u0060 calls \u0060append_runtime_memory_sample\u0060, \u0060mark_attribution_heartbeat_pending\u0060 and \u0060crates/jcode-tui/src/tui/app/runtime_memory.rs:141\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/runtime_memory.rs"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff47fa88444e4203ffb59d6f52c22118188c1aa7bccd16d55fb318bec5ce4596"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-tui/src/tui/session_picker/loading.rs:2212-2224 | crates/jcode-tui/src/tui/session_picker/loading.rs:2412-2424 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading.rs"},"region":{"startLine":2212}}}],"partialFingerprints":{"codehealthFindingId/v1":"3de0cda21be4000c674f6d27dc0999de128772706aa11dfd198e1140245135ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-tui/src/tui/ui/copy_selection.rs:227-239 | crates/jcode-tui/src/tui/ui/copy_selection.rs:417-429 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui/copy_selection.rs"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"417bb8c0d5cca72ddfb1cefac4b874e47fe6589ebfcdfc99d155ca20a482fea3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): crates/jcode-tui/src/tui/ui_input.rs:949-960 | crates/jcode-tui/src/tui/ui_input.rs:1047-1059 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_input.rs:949\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_input.rs"},"region":{"startLine":949}}}],"partialFingerprints":{"codehealthFindingId/v1":"f77abe974769b4111aa37c9feb6b0894f5f1f725bea05975d6f323db8a9db817"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-tui/src/tui/ui_memory_estimates.rs:14-26 | crates/jcode-tui/src/tui/ui_pinned.rs:193-205 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_memory_estimates.rs"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b2015cc6ed5f4a63c14372e25319da2283ea1a5a5861d16d8e234c7e03ca986"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-tui/src/tui/ui_prepare.rs:1849-1861 | crates/jcode-tui/src/tui/ui_prepare.rs:2534-2546 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_prepare.rs"},"region":{"startLine":1849}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dd1f438ebf2f461b67c7b382da9ce687e5e1538bdba14dc8143ec2d4b79955f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201313 lines \u00D7 2): src/bin/memory_recall_bench.rs:1742-1751 | src/bin/memory_recall_bench.rs:1941-1953 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":1742}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8a74f3caa9eda6ac93efb8f1a2c718d87dc21f533cda4cb637d30a949f95b0a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): src/cli/login/scriptable.rs:493-504 | src/cli/login/scriptable.rs:544-556 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/cli/login/scriptable.rs:493\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/login/scriptable.rs"},"region":{"startLine":493}}}],"partialFingerprints":{"codehealthFindingId/v1":"98a1f9e91814cca20bd35ec57a2626addd5d1620e66e207afda7939bc3398148"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): src/cli/terminal.rs:408-420 | src/cli/terminal.rs:432-444 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/terminal.rs"},"region":{"startLine":408}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfc3e57b1ce79837dde48220cbf7afb725bf0351073130cd23ca16449f318cff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): src/cli/tui_launch.rs:358-370 | src/cli/tui_launch.rs:486-498 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/cli/tui_launch.rs:358\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060src/cli/tui_launch.rs:483\u0060 calls \u0060as_deref\u0060, \u0060unwrap_or\u0060, \u0060session_icon\u0060 and \u0060src/cli/tui_launch.rs:356\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/tui_launch.rs"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c7bb6987dc26f49c400596f9e8d80124e2576e878b1e830fea5ff9e25bc6ff8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 4): crates/jcode-app-core/src/perf.rs:366-377 | crates/jcode-setup-hints/src/lib.rs:2391-2400 | crates/jcode-tui-style/src/color.rs:60-70 | crates/jcode-tui-workspace/src/color_support.rs:31-41 \u2014 before extracting anything, compare \u0060crates/jcode-setup-hints/src/lib.rs\u0060 and \u0060crates/jcode-tui-style/src/color.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/perf.rs"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee58999689447a92c78d820a9ea53434989ca0c42f55800e72ed84711008815f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): crates/jcode-app-core/src/tool/read.rs:425-436 | crates/jcode-base/src/provider/image_clamp.rs:426-437 | crates/jcode-terminal-image/src/display.rs:253-264 | crates/jcode-tui-mermaid/src/mermaid_inline.rs:298-309 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/tool/read.rs\u0060 and \u0060crates/jcode-base/src/provider/image_clamp.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/read.rs:425\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/read.rs"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"632de17b3aa70101e836c2279f74459df87e0732e385babf8e72fa89df030505"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): crates/jcode-base/src/import.rs:1464-1475 | crates/jcode-import-core/src/lib.rs:1045-1056 | crates/jcode-tui/src/tui/session_picker/loading.rs:2784-2795 | crates/jcode-tui/src/tui/session_picker/loading.rs:2832-2843 \u2014 before extracting anything, compare \u0060crates/jcode-base/src/import.rs\u0060 and \u0060crates/jcode-import-core/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/import.rs:1464\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/import.rs"},"region":{"startLine":1464}}}],"partialFingerprints":{"codehealthFindingId/v1":"d451353fac72b662cc1a6ceb81a42d1ad1aea312763c078f65334b07214f1623"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): crates/jcode-app-core/src/server/client_actions.rs:290-301 | crates/jcode-app-core/src/server/client_actions.rs:488-499 | crates/jcode-app-core/src/server/client_actions.rs:503-514 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/client_actions.rs:290\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_actions.rs"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb1295034acf876bda47634635ace7978039470526ce4c2eea51536416615c43"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 3): crates/jcode-app-core/src/server/comm_control.rs:456-466 | crates/jcode-app-core/src/server/comm_control.rs:598-609 | crates/jcode-app-core/src/server/comm_control.rs:653-664 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/comm_control.rs:456\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_control.rs"},"region":{"startLine":456}}}],"partialFingerprints":{"codehealthFindingId/v1":"f07a94683f73172322eb5cb2761806000ae55b704dd1bd8859d7b8521dda7740"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): crates/jcode-build-support/src/storage_helpers.rs:121-132 | crates/jcode-build-support/src/storage_helpers.rs:137-148 | crates/jcode-build-support/src/storage_helpers.rs:153-164 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-build-support/src/storage_helpers.rs:121\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-build-support/src/storage_helpers.rs"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"69d22c34754304536702e0e96f6cc255af216c532aca59a26dc6befed89b4357"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): crates/jcode-tui-account-picker/src/overlay.rs:463-474 | crates/jcode-tui-usage-overlay/src/lib.rs:445-456 | crates/jcode-tui/src/tui/login_picker.rs:351-362 \u2014 before extracting anything, compare \u0060crates/jcode-tui-account-picker/src/overlay.rs\u0060 and \u0060crates/jcode-tui-usage-overlay/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-account-picker/src/overlay.rs:463\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay.rs"},"region":{"startLine":463}}}],"partialFingerprints":{"codehealthFindingId/v1":"946ee58e61a1f6e41198b9022f149c3c3e4f4db8dc0a7cbdc3cd585f69bf22d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): crates/jcode-tui/src/tui/app/turn.rs:890-901 | crates/jcode-tui/src/tui/app/turn.rs:1192-1203 | crates/jcode-tui/src/tui/app/turn.rs:1216-1227 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/turn.rs:890\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/turn.rs"},"region":{"startLine":890}}}],"partialFingerprints":{"codehealthFindingId/v1":"1425119ec56e819361e8c6831734d2f82d9b905b5bb60855e37828e41bbef765"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-app-core/src/notifications.rs:818-829 | crates/jcode-setup-hints/src/cli_launch_hints.rs:367-378 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/notifications.rs\u0060 and \u0060crates/jcode-setup-hints/src/cli_launch_hints.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/notifications.rs:818\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/notifications.rs"},"region":{"startLine":818}}}],"partialFingerprints":{"codehealthFindingId/v1":"8def065792b3f23662a9693c16a36b4fde29e913e1877f135e0523bbc47c5458"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-app-core/src/server.rs:2155-2166 | crates/jcode-app-core/src/server.rs:2211-2222 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server.rs:2155\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server.rs"},"region":{"startLine":2155}}}],"partialFingerprints":{"codehealthFindingId/v1":"16d04be1a53000af76c09989eb4ef309b5835838ba71497455be3847ebb4f386"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-app-core/src/server/debug_jobs.rs:96-107 | crates/jcode-app-core/src/server/debug_jobs.rs:128-139 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/debug_jobs.rs:96\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_jobs.rs"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"918a6e1958150149d38c3a9e7735f708313677e95166615a27c9efb9bfb83e5a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-app-core/src/session_active_pids.rs:36-47 | crates/jcode-storage/src/active_pids.rs:205-216 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/session_active_pids.rs\u0060 and \u0060crates/jcode-storage/src/active_pids.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/session_active_pids.rs"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"791d746c74fdf766feaf0bf1a6646cc9ef0e887d7810953c5e00304ea6300bd9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-app-core/src/telemetry_state.rs:110-121 | crates/jcode-telemetry-core/src/state_support.rs:108-119 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/telemetry_state.rs\u0060 and \u0060crates/jcode-telemetry-core/src/state_support.rs\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/telemetry_state.rs"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf9422b786aefd3388fb21b6926b1322c6decc3ee4c24995a9686b83b4a8dc98"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-app-core/src/telemetry_state.rs:267-278 | crates/jcode-telemetry-core/src/state_support.rs:310-321 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/telemetry_state.rs\u0060 and \u0060crates/jcode-telemetry-core/src/state_support.rs\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/telemetry_state.rs"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"93a4bb64730e2b9d0333515c9196ae358806c05af8ee8b7b446db870b03de1cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/jcode-app-core/src/tool/bash.rs:335-352 | crates/jcode-app-core/src/tool/bash.rs:355-372 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/bash.rs:335\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/bash.rs"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"398b821b49ccb9276193b1bd14a8588fa0226ab48b7f639bf078b124a1eb26ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-app-core/src/tool/communicate.rs:910-921 | crates/jcode-app-core/src/tool/communicate.rs:1002-1013 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/communicate.rs:910\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/communicate.rs"},"region":{"startLine":910}}}],"partialFingerprints":{"codehealthFindingId/v1":"a373eeed84ad1b097b46993c2d86c012b97e546a53fab46e1776434c8205feed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 2): crates/jcode-app-core/src/tool/discover.rs:1120-1129 | crates/jcode-app-core/src/tool/discover.rs:1406-1417 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/discover.rs:1120\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/discover.rs"},"region":{"startLine":1120}}}],"partialFingerprints":{"codehealthFindingId/v1":"f515c609b8fd5115685494fe4d3d65397500e9ea282dbe03025dafc5c428d9bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-app-core/src/usage_openai.rs:205-216 | crates/jcode-base/src/usage/openai_helpers.rs:230-241 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/usage_openai.rs\u0060 and \u0060crates/jcode-base/src/usage/openai_helpers.rs\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_openai.rs"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"caea44e3e415deaaea3cc7ca0c14b281ba2e6f53cdde2fc703a814e741e786ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-base/src/cache_tracker.rs:136-147 | crates/jcode-base/src/cache_tracker.rs:166-177 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/cache_tracker.rs:136\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-base/src/cache_tracker.rs:165\u0060 calls \u0060unwrap_or\u0060 and \u0060crates/jcode-base/src/cache_tracker.rs:133\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/cache_tracker.rs"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"49c4504e7544ea16b253a1b7c3367ff0efda4cdaae2c753b15423c4aa066733c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 2): crates/jcode-base/src/hooks.rs:311-320 | crates/jcode-base/src/hooks.rs:567-578 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/hooks.rs:311\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/hooks.rs"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"33413ec4a7cc3a91a9a7117e121858db00178ac75f6ce5933ab2fdd187facb0a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-base/src/mcp/oauth.rs:553-564 | crates/jcode-base/src/mcp/oauth.rs:1143-1156 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mcp/oauth.rs"},"region":{"startLine":553}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dcbded3678cf30f11424935786b8e619b5e9325cedde78faa85fd0743809ac6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-base/src/platform.rs:175-186 | crates/jcode-build-support/src/platform_support.rs:19-30 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/platform.rs"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c19e8e2a9861eef01fed106026beeb92ea37194efd2243b3acb0cb6b78f690c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): crates/jcode-base/src/provider_activity_oauth.rs:175-185 | crates/jcode-base/src/provider_activity_oauth.rs:283-294 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/provider_activity_oauth.rs:283\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider_activity_oauth.rs"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b823ee4ab176b10b7fb1e23920a0586896fa78444390e1b0ce31cc285ff7e51"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-base/src/safety.rs:224-235 | crates/jcode-base/src/safety.rs:455-466 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/safety.rs"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"64d0af5f311173f54fc6cc2feb4b3705ec7ded23b1d0465185dc3514244b6d11"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 2): crates/jcode-harness-api-server/src/translate.rs:521-532 | crates/jcode-harness-api-server/src/translate.rs:540-549 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/translate.rs"},"region":{"startLine":521}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a3460c8e8057072f756132c6fb25ccbd57711d1e3756f9d5fa8b5056af8c5e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201312 lines \u00D7 2): crates/jcode-harness-api-server/src/translate.rs:2409-2420 | crates/jcode-harness-api-server/src/translate.rs:2800-2808 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-harness-api-server/src/translate.rs:2409\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/translate.rs"},"region":{"startLine":2409}}}],"partialFingerprints":{"codehealthFindingId/v1":"3284d0aaa7136f93b155b26bd474a980c0bce73b920ceecb847b8a3e92a8faed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-message-types/src/lib.rs:499-510 | crates/jcode-message-types/src/lib.rs:531-542 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-message-types/src/lib.rs:499\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-message-types/src/lib.rs"},"region":{"startLine":499}}}],"partialFingerprints":{"codehealthFindingId/v1":"73a384aedcd7ab0f5ddd0e59f69c356520241df323e23e918b81b814e9dc71b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-provider-core/src/transport.rs:34-45 | scripts/repro/tls-bad-record-mac/src/main.rs:27-38 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/transport.rs"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"5424c3d722a40a9328b348d1e4eb544effcdcc43cbf2459cb7cd7d9e6d74f221"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-provider-cursor-runtime/src/agent_transport.rs:582-593 | crates/jcode-provider-cursor-runtime/src/wire.rs:102-113 \u2014 before extracting anything, compare \u0060crates/jcode-provider-cursor-runtime/src/agent_transport.rs\u0060 and \u0060crates/jcode-provider-cursor-runtime/src/wire.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-cursor-runtime/src/agent_transport.rs:582\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/agent_transport.rs"},"region":{"startLine":582}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e695547abb6a4a8d3c02bd6dab07d7eb65eb9c466d0c0c098c927268a881058"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-provider-cursor-runtime/src/agent_transport.rs:1094-1105 | crates/jcode-provider-cursor-runtime/src/agent_transport.rs:1151-1162 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-cursor-runtime/src/agent_transport.rs:1094\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/agent_transport.rs"},"region":{"startLine":1094}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d28745df5c3035c4523fa1598b054b4706eef6033db67582bb7b09de8f6e7af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-setup-hints/src/keymap/chord.rs:70-81 | crates/jcode-setup-hints/src/keymap/chord.rs:92-103 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-setup-hints/src/keymap/chord.rs:70\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/keymap/chord.rs"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"71a15ce93cd71dce929cdb47b03258be3fb3609177e00e4fb3743378fed8b2e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-telemetry-core/src/lib.rs:2631-2642 | crates/jcode-telemetry-core/src/lib.rs:2644-2655 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lib.rs"},"region":{"startLine":2631}}}],"partialFingerprints":{"codehealthFindingId/v1":"87abbbbfb56e0b0e79517cfaca7cde44c14191503ad6100be6c34d1b71ef3a33"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): crates/jcode-tui-markdown/src/markdown_render_full.rs:419-430 | crates/jcode-tui-markdown/src/markdown_render_lazy.rs:395-405 \u2014 before extracting anything, compare \u0060crates/jcode-tui-markdown/src/markdown_render_full.rs\u0060 and \u0060crates/jcode-tui-markdown/src/markdown_render_lazy.rs\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 868 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-markdown/src/markdown_render_full.rs:419\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_full.rs"},"region":{"startLine":419}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fc79671c203b76b82ab08d2a7d01522522544fe0c2ddced4545b70eeb426b0e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): crates/jcode-tui-mermaid/src/lib.rs:1092-1103 | crates/jcode-tui-mermaid/src/lib.rs:1197-1207 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-mermaid/src/lib.rs:1092\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/lib.rs"},"region":{"startLine":1092}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c777195ec2cfda5fd1c0f4e23682a2cd17162a831f57a9ca1b3a1cbac0a6849"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-tui-render/src/swarm_gallery.rs:1423-1435 | crates/jcode-tui-render/src/swarm_gallery.rs:1519-1531 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-render/src/swarm_gallery.rs:1423\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/swarm_gallery.rs"},"region":{"startLine":1423}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a4b81214f46c29df898baf10feb4e65412fdba1e3b2609c17cf23f6bbafa77b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): crates/jcode-tui-style/src/color.rs:312-337 | crates/jcode-tui-workspace/src/color_support.rs:274-299 \u2014 before extracting anything, compare \u0060crates/jcode-tui-style/src/color.rs\u0060 and \u0060crates/jcode-tui-workspace/src/color_support.rs\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 228 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-style/src/color.rs"},"region":{"startLine":312}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c88414ea2f14df4adc35fefeb0ccea7c4b55cf5d5f1466cd73f9313c069fe6d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-tui/src/tui/app/commands.rs:905-916 | crates/jcode-tui/src/tui/app/remote/key_handling.rs:430-441 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/app/commands.rs\u0060 and \u0060crates/jcode-tui/src/tui/app/remote/key_handling.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/commands.rs:905\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":905}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cef0ecf544993586b877af6b3453d5e561a39756d4b77962b659ae59258c86f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-tui/src/tui/app/debug_profile.rs:802-813 | crates/jcode-tui/src/tui/memory_profile.rs:155-166 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_profile.rs"},"region":{"startLine":802}}}],"partialFingerprints":{"codehealthFindingId/v1":"167a193f3952a8ed7bd60a892c7912d6794cb4a93ce1ad6a2a24c8db4ccd288c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-tui/src/tui/app/inline_interactive.rs:4063-4074 | crates/jcode-tui/src/tui/app/model_context.rs:1017-1028 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":4063}}}],"partialFingerprints":{"codehealthFindingId/v1":"f59ad51303983623871a1446664e9452f3404013ccdfc9918e68bda4939aa7b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote/reconnect.rs:649-660 | crates/jcode-tui/src/tui/app/remote/reconnect.rs:687-698 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/remote/reconnect.rs:649\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-tui/src/tui/app/remote/reconnect.rs:701\u0060 calls \u0060submitted_during_backoff\u0060 and \u0060crates/jcode-tui/src/tui/app/remote/reconnect.rs:661\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/reconnect.rs"},"region":{"startLine":649}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc6aa295f612b7c7620b006dec5bbe6ee4485c07655e1239708875e443fa3a27"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote/server_events.rs:255-266 | crates/jcode-tui/src/tui/app/remote/server_events.rs:445-455 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/remote/server_events.rs:255\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/server_events.rs"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc9dbdd3a843167aef8e61ed6d19d7c00b3f9177bea91e7179bd47be71b11614"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-tui/src/tui/session_picker/loading.rs:2707-2718 | crates/jcode-tui/src/tui/session_picker/loading/pi_sessions.rs:239-250 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/session_picker/loading.rs\u0060 and \u0060crates/jcode-tui/src/tui/session_picker/loading/pi_sessions.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/session_picker/loading.rs:2707\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading.rs"},"region":{"startLine":2707}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e3247ac41e21e19fe262a1d9074eba4a9dee2dc1328f7f846ef5df5eacb7c6d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): crates/jcode-tui/src/tui/ui_header.rs:788-799 | crates/jcode-tui/src/tui/ui_header.rs:803-813 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_header.rs:788\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_header.rs"},"region":{"startLine":788}}}],"partialFingerprints":{"codehealthFindingId/v1":"0dc21ea48b4786dfba48760a8fb7b495ad85c98464c9ccee390505a478affedf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-tui/src/tui/ui_messages.rs:2810-2821 | crates/jcode-tui/src/tui/ui_messages.rs:2885-2896 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_messages.rs:2810\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":2810}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d4d88bee643c60b3111f4c69c0515da6bc9d8a5a20fc341d279e0a90a6740d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 2): crates/jcode-tui/src/tui/ui_viewport.rs:815-826 | crates/jcode-tui/src/tui/ui_viewport.rs:888-897 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_viewport.rs:815\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_viewport.rs"},"region":{"startLine":815}}}],"partialFingerprints":{"codehealthFindingId/v1":"9276e40dd1c799d020bf0f565859e7dbbd9e6abb80e1826046dc112ddc2e0421"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): src/bin/memory_recall_bench.rs:520-531 | src/bin/memory_recall_bench.rs:2296-2306 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":520}}}],"partialFingerprints":{"codehealthFindingId/v1":"92b93fa5aeab339a645b5aebc2b51ed4a5dff4bcd6c813c5f0251a45d6eef5d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): src/bin/memory_recall_bench.rs:878-889 | src/bin/memory_recall_bench.rs:1197-1207 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":878}}}],"partialFingerprints":{"codehealthFindingId/v1":"e279f9e60a33788a7ecea71b90637257118df3ed3ffa1459152a6c8e0bb1eb62"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): src/bin/memory_recall_bench.rs:1484-1495 | src/bin/memory_recall_bench.rs:1622-1633 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/bin/memory_recall_bench.rs:1484\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":1484}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d6c4c8b32145ad780e5e00f421698caa04b619221f30f73c6d18395324b57b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): src/cli/commands/provider_setup.rs:473-484 | src/cli/commands/provider_setup.rs:488-498 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/cli/commands/provider_setup.rs:473\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands/provider_setup.rs"},"region":{"startLine":473}}}],"partialFingerprints":{"codehealthFindingId/v1":"229af8352f4073b8655fd3a67af33454b95a31e631d40d2cad2dedbefb82c78a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): crates/jcode-tui/src/tui/app/auth_account_picker.rs:491-501 | crates/jcode-tui/src/tui/app/auth_account_picker.rs:764-774 | crates/jcode-tui/src/tui/app/auth_account_picker_saved_accounts.rs:289-299 | crates/jcode-tui/src/tui/app/auth_account_picker_saved_accounts.rs:335-345 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/app/auth_account_picker.rs\u0060 and \u0060crates/jcode-tui/src/tui/app/auth_account_picker_saved_accounts.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker.rs"},"region":{"startLine":491}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc35562df10455c243968febc9e25b0b0ce27763999c70f58be4ad1a5b3dea48"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): crates/jcode-tui/src/tui/app/auth_account_picker.rs:553-563 | crates/jcode-tui/src/tui/app/auth_account_picker.rs:899-909 | crates/jcode-tui/src/tui/app/auth_account_picker_saved_accounts.rs:225-235 | crates/jcode-tui/src/tui/app/auth_account_picker_saved_accounts.rs:396-406 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/app/auth_account_picker.rs\u0060 and \u0060crates/jcode-tui/src/tui/app/auth_account_picker_saved_accounts.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker.rs"},"region":{"startLine":553}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5bddb4b44642d1e2b8ccddf5dcef5c8e880b5c734c19171b636b8abd1476759"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): crates/jcode-tui/src/tui/keybind.rs:650-660 | crates/jcode-tui/src/tui/keybind.rs:667-677 | crates/jcode-tui/src/tui/keybind.rs:684-694 | crates/jcode-tui/src/tui/keybind.rs:701-711 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/keybind.rs:650\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/keybind.rs"},"region":{"startLine":650}}}],"partialFingerprints":{"codehealthFindingId/v1":"09cbe44d8ebf7d113a44ccbb5afd816aa82c56aabd7bce9dae859988d7fbad66"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): src/cli/acp.rs:559-569 | src/cli/acp.rs:612-622 | src/cli/acp.rs:712-722 | src/cli/acp.rs:732-742 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/acp.rs"},"region":{"startLine":559}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f4eddef11484b9fc15b7482232463d023c095e5a430920e17d5661cf5162321"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 3): crates/jcode-import-core/src/lib.rs:740-749 | crates/jcode-tui/src/tui/session_picker/loading/pi_sessions.rs:38-49 | crates/jcode-tui/src/tui/session_picker/loading/pi_sessions.rs:123-134 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-import-core/src/lib.rs"},"region":{"startLine":740}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e28da845eefd1a725bdd9f5a3ca5a11468a06cd8b03365ad35591467844985b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): crates/jcode-provider-doctor/src/live_provider_probes.rs:769-779 | crates/jcode-provider-doctor/src/live_provider_probes.rs:1097-1107 | crates/jcode-provider-doctor/src/live_provider_probes.rs:1288-1298 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-doctor/src/live_provider_probes.rs:769\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-provider-doctor/src/live_provider_probes.rs:768\u0060 calls \u0060build_native_claude_provider\u0060 and \u0060crates/jcode-provider-doctor/src/live_provider_probes.rs:1287\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/live_provider_probes.rs"},"region":{"startLine":769}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d675f7d3366f80202c7546dc0e5fd95629bd2b58fa8bf45f9cc14e279700569"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 3): src/cli/tui_launch.rs:757-766 | src/cli/tui_launch.rs:790-800 | src/cli/tui_launch.rs:848-858 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/cli/tui_launch.rs:757\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/tui_launch.rs"},"region":{"startLine":757}}}],"partialFingerprints":{"codehealthFindingId/v1":"055c9cb78f9824e26a5de3a00884456f7817d953bf1232ed65e0abee12ec5fb9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201311 lines \u00D7 2): crates/jcode-app-core/src/ambient/prompt.rs:124-134 | crates/jcode-app-core/src/ambient/runner.rs:342-350 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/ambient/prompt.rs:124\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/ambient/prompt.rs"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"06388435830b1d8c0c607808a4b24b8719191ed3ef70c7fa2bdece4d0df71d8e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-app-core/src/ambient/runner.rs:958-968 | crates/jcode-app-core/src/ambient/runner.rs:985-995 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/ambient/runner.rs"},"region":{"startLine":958}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d1876874c30ed685aec7b308aa866d44a52d514fcf899754b5dbd13256c51cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): crates/jcode-app-core/src/notifications.rs:807-816 | crates/jcode-setup-hints/src/cli_launch_hints.rs:356-366 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/notifications.rs\u0060 and \u0060crates/jcode-setup-hints/src/cli_launch_hints.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/notifications.rs:807\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/notifications.rs"},"region":{"startLine":807}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d7e08c9c35f165166bea464a27372a16f603ec9f90e5527a0dfca72516c0b08"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-app-core/src/server/client_actions.rs:406-416 | crates/jcode-app-core/src/server/client_actions.rs:428-438 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/client_actions.rs:406\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_actions.rs"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"19ddfa23425a4b926df31a17e5b0ff62116ea4e8655320ab4eeb729e9c126ee9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-app-core/src/server/client_state.rs:938-948 | crates/jcode-app-core/src/server/client_state.rs:1268-1278 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_state.rs"},"region":{"startLine":938}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c7fb0112d70eec10788ce3ffeca2bb3c87c5ccdfd958572289176f5a87281bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-app-core/src/server/comm_control.rs:1465-1475 | crates/jcode-app-core/src/server/comm_plan.rs:527-537 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/server/comm_control.rs\u0060 and \u0060crates/jcode-app-core/src/server/comm_plan.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/comm_control.rs:1465\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-app-core/src/server/comm_plan.rs:538\u0060 calls \u0060push\u0060 and \u0060crates/jcode-app-core/src/server/comm_control.rs:1476\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_control.rs"},"region":{"startLine":1465}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5c3a025b18f5398eb4bb6c80bf0a2bc4f8b432d16d4a42ad0fe8cc7ec1422a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-app-core/src/server/comm_plan.rs:281-291 | crates/jcode-app-core/src/server/comm_plan.rs:301-311 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/comm_plan.rs:281\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_plan.rs"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f0ac758a29f743a35132a77af1d1fe8880038761a92a68846e7aa78b4f94368"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-app-core/src/server/jade_relay.rs:369-379 | crates/jcode-app-core/src/server/jade_relay.rs:767-777 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/jade_relay.rs:369\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/jade_relay.rs"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"19772094adfeb66069bee2d3ec0d2cc438c31cd221331057ebc6a30be735b7a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-app-core/src/server/reload.rs:43-53 | crates/jcode-base/src/mobile_runner.rs:312-322 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/reload.rs:43\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/reload.rs"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"44f76e365e4b215eed13f9ef39193c350596b2e8eac5701313498ec62b015c79"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-app-core/src/tool/ambient.rs:361-371 | crates/jcode-app-core/src/tool/ambient.rs:896-906 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/ambient.rs:361\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/ambient.rs"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"d999ee4bbab909054ae724920ddbbbf0d0bc08622e4f95fe1f96e0bb7655d81f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-app-core/src/tool/bridge_reload.rs:129-139 | crates/jcode-app-core/src/tool/desktop_selfdev.rs:331-341 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/bridge_reload.rs"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"04d3d680add02f22cb7f110fafbb2a6d0e821fd683caa44e4638db1acb1f6093"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-app-core/src/tool/discover.rs:1182-1192 | crates/jcode-app-core/src/tool/discover.rs:1263-1273 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/discover.rs:1182\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/discover.rs"},"region":{"startLine":1182}}}],"partialFingerprints":{"codehealthFindingId/v1":"9beae028dc0f87d58f9ef397662da32a8419e5d79718060c01db90d33cd059ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-base/src/auth/codex.rs:541-551 | crates/jcode-base/src/auth/codex.rs:554-564 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/codex.rs"},"region":{"startLine":541}}}],"partialFingerprints":{"codehealthFindingId/v1":"4870340e562d9879a509f9600fa0047eff65a0bb3361f7036b47180939aeb921"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201311 lines \u00D7 2): crates/jcode-base/src/auth/oauth_callback_io.rs:111-119 | crates/jcode-base/src/auth/oauth_callback_io.rs:221-231 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/auth/oauth_callback_io.rs:111\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/oauth_callback_io.rs"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f022d26c4fafed5edbd1e68c89f979fae86d28142811ac9d09ea50076838e82"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): crates/jcode-base/src/embedding_stub.rs:215-224 | crates/jcode-embedding/src/lib.rs:409-419 \u2014 before extracting anything, compare \u0060crates/jcode-base/src/embedding_stub.rs\u0060 and \u0060crates/jcode-embedding/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/embedding_stub.rs:215\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/embedding_stub.rs"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2b70cf2949951b6db0e9e55b3f44a3962854f273e9eec4bfa91a57563264bfd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-base/src/gmail.rs:297-307 | crates/jcode-base/src/gmail.rs:429-439 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/gmail.rs:297\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/gmail.rs"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"96b9c8e55134811a8bb5b91b0be59a744f90d88cad08568178df459e2546a990"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201311 lines \u00D7 2): crates/jcode-compaction-core/src/lib.rs:617-625 | crates/jcode-compaction-core/src/lib.rs:639-649 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-compaction-core/src/lib.rs:617\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-compaction-core/src/lib.rs"},"region":{"startLine":617}}}],"partialFingerprints":{"codehealthFindingId/v1":"2545d7982c4595eb9c2391d0e5d610b48a97424e1071a30efc7d837b2cea09ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-harness-api/src/sockets.rs:54-64 | crates/jcode-storage/src/lib.rs:143-153 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-storage/src/lib.rs:143\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api/src/sockets.rs"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"18b96c0b08cd9d2264c4ed1c42ca51c114501923a21ebb7ae407f593b2d252da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201311 lines \u00D7 2): crates/jcode-provider-anthropic-runtime/src/error_classification.rs:41-51 | crates/jcode-provider-copilot-runtime/src/routing.rs:37-45 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic-runtime/src/error_classification.rs"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"67af2cf1530c19dc4d41e8c257d9f3fb7d7042ceba7bf67342a4f63aad4ea95c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-provider-anthropic-runtime/src/lib.rs:276-286 | crates/jcode-provider-anthropic-runtime/src/lib.rs:300-310 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-anthropic-runtime/src/lib.rs:276\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-provider-anthropic-runtime/src/lib.rs:299\u0060 calls \u0060json\u0060 and \u0060crates/jcode-provider-anthropic-runtime/src/lib.rs:275\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic-runtime/src/lib.rs"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ba6322335bb5cbba75a80b04fad96bec555df6dabb32ba2d4ee2db7454e2061"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-provider-antigravity-runtime/src/lib.rs:469-479 | crates/jcode-provider-gemini-runtime/src/lib.rs:621-631 \u2014 before extracting anything, compare \u0060crates/jcode-provider-antigravity-runtime/src/lib.rs\u0060 and \u0060crates/jcode-provider-gemini-runtime/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 137 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-antigravity-runtime/src/lib.rs:469\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-antigravity-runtime/src/lib.rs"},"region":{"startLine":469}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf6c9f1a25fae505c9117acc42ad21afe364e7b93bedee8548b2a3b539b435e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-provider-antigravity/src/lib.rs:240-250 | crates/jcode-provider-gemini/src/lib.rs:602-612 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060models\u0060 to \u0060impl IntoIterator\u003CItem = String\u003E\u0060 in one and \u0060Vec\u003CString\u003E\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-antigravity/src/lib.rs"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"97a281b747740bf00788a7cbe7a491cb68c0e530b0b6f747f9ca4ce1a1b54642"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-provider-env/src/lib.rs:107-118 | crates/jcode-provider-env/src/lib.rs:193-204 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-env/src/lib.rs"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d899147e43cc8bb013166a4ccd6d1e39869e3e47c1726903e81165e489f0cb9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201311 lines \u00D7 2): crates/jcode-provider-openai-runtime/src/lib.rs:423-433 | crates/jcode-tui/src/tui/ui_input.rs:873-881 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_input.rs:873\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/lib.rs"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad927d59c82a9c4f963d0bfc85d5c7fa75d5e87012cb1d1a36565a6125eeeabd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs:1068-1078 | crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs:1587-1596 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs:1068\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs"},"region":{"startLine":1068}}}],"partialFingerprints":{"codehealthFindingId/v1":"6358398709ce9a52322764ddb6cbfc42f2638c3122e253a65b1fab5b45479edf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-telemetry-core/src/lib.rs:1008-1018 | crates/jcode-telemetry-core/src/lib.rs:1029-1039 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-telemetry-core/src/lib.rs:1008\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060state\u0060 to \u0060\u0026mut SessionTelemetry\u0060 in one and \u0060\u0026mut TurnTelemetry\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lib.rs"},"region":{"startLine":1008}}}],"partialFingerprints":{"codehealthFindingId/v1":"43ec2bce4fcd2de39cb605a1a6cce37b982684bd412af1a3621b2af5b75259e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-telemetry-core/src/lifecycle.rs:174-186 | crates/jcode-usage-types/src/lib.rs:167-179 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lifecycle.rs"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"402261b794149a9ab5ef7d68dc0ce6baf504fdfd4e20d58b8908111e50a95e1b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-tui-core/src/keybind.rs:89-99 | crates/jcode-tui/src/tui/keybind.rs:615-625 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-core/src/keybind.rs:89\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-core/src/keybind.rs"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"9229e831a6c58ff14f27e36b24a91177a445014b3e00fd46b304836eebcebb35"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-tui-markdown/src/markdown_render_full.rs:58-68 | crates/jcode-tui-markdown/src/markdown_render_lazy.rs:47-57 \u2014 before extracting anything, compare \u0060crates/jcode-tui-markdown/src/markdown_render_full.rs\u0060 and \u0060crates/jcode-tui-markdown/src/markdown_render_lazy.rs\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 868 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-tui-markdown/src/markdown_render_full.rs:69\u0060 calls \u0060default\u0060 and \u0060crates/jcode-tui-markdown/src/markdown_render_lazy.rs:60\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_full.rs"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"c81db5e4b6a2f1874457bcae452ee16d2b624cd7483d9fbd6f25fb73902b96de"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): crates/jcode-tui-markdown/src/markdown_render_support.rs:361-371 | crates/jcode-tui-render/src/memory_tiles.rs:131-140 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-markdown/src/markdown_render_support.rs:361\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-tui-render/src/memory_tiles.rs:141\u0060 calls \u0060is_empty\u0060, \u0060push\u0060 and \u0060crates/jcode-tui-markdown/src/markdown_render_support.rs:373\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_support.rs"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"250f4c722f78792f908771f949a99ea1f4ba0bf28b5d05857c3f31ec6eea1b83"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): crates/jcode-tui-render/src/swarm_gallery.rs:397-407 | crates/jcode-tui-render/src/swarm_gallery.rs:452-461 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/swarm_gallery.rs"},"region":{"startLine":397}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3065cf370341b389beb2440888383107d53055163438fa423ba010e83baa0c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-tui/src/tui/app/commands.rs:878-888 | crates/jcode-tui/src/tui/app/input.rs:2763-2773 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/commands.rs:878\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":878}}}],"partialFingerprints":{"codehealthFindingId/v1":"acba0fd42399ac3b654a0fbbb655146618b1fc17392101bc4936aca84810046a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-tui/src/tui/app/commands.rs:2101-2111 | crates/jcode-tui/src/tui/app/remote/key_handling/rewind.rs:19-29 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":2101}}}],"partialFingerprints":{"codehealthFindingId/v1":"964bc8dd7b9638041573481c92ebca75aee602790fe8bb838046970eaaba6d2a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-tui/src/tui/app/commands_improve.rs:238-248 | crates/jcode-tui/src/tui/app/commands_improve.rs:271-281 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/commands_improve.rs:238\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_improve.rs"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9a8d2ab9b808072051e795164ef0a7f0bd53967d19373b6071dcbca32dd5a40"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-tui/src/tui/app/helpers_rate_limit_parse.rs:48-58 | crates/jcode-tui/src/tui/app/helpers_rate_limit_parse.rs:109-119 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/helpers_rate_limit_parse.rs:48\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/helpers_rate_limit_parse.rs"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"8826d760f8c1bd8c419243074041c1773530db9664e37eaa2e3698087f4c6ee1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-tui/src/tui/app/local.rs:236-246 | crates/jcode-tui/src/tui/app/remote.rs:790-800 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/app/local.rs\u0060 and \u0060crates/jcode-tui/src/tui/app/remote.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/local.rs"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7424567bf4c8523061ace94b84986ab6d45c4d28c15941c00d3140bfe87f0c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-tui/src/tui/app/model_context_commands.rs:199-209 | crates/jcode-tui/src/tui/app/model_context_commands.rs:227-237 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/model_context_commands.rs:199\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/model_context_commands.rs"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"cac34db0b7d39b0923ca727f6126050244f2072ea8e40a8a009f31c141a19d02"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote/key_handling/key_events.rs:466-476 | crates/jcode-tui/src/tui/app/remote/key_handling/key_events.rs:613-623 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/remote/key_handling/key_events.rs:466\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/key_handling/key_events.rs"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"73c7b046c7406121b87267f02931930b854fb9e2d1ecb4efd37fb47080e0488a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-tui/src/tui/app/state_ui_input_helpers.rs:1602-1613 | crates/jcode-tui/src/tui/app/state_ui_input_helpers.rs:1663-1673 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/state_ui_input_helpers.rs:1602\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui_input_helpers.rs"},"region":{"startLine":1602}}}],"partialFingerprints":{"codehealthFindingId/v1":"acc12fa94a2f26d7a1a48f662c756b01b88daa0f99347fc401602de72a53db86"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-tui/src/tui/app/state_ui_messages.rs:89-99 | src/bin/tui_bench.rs:637-647 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui_messages.rs"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"499eb3c91d27a58a3a3e69f37695cce9e1e475d0126a772cbf36945d08dbef17"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-tui/src/tui/app/turn.rs:263-273 | crates/jcode-tui/src/tui/app/turn.rs:363-373 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/turn.rs:263\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/turn.rs"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"7aa87fc5318c5226515fdd0307c7f212374b40382b64874e66bb959b8e866c14"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-tui/src/tui/app/turn.rs:1352-1362 | crates/jcode-tui/src/tui/app/turn.rs:1680-1690 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/turn.rs:1352\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/turn.rs"},"region":{"startLine":1352}}}],"partialFingerprints":{"codehealthFindingId/v1":"dde1c2ac5cfd7fee4ea766113b551e43020cdf93b7353e1181b95bd2e877a8d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): crates/jcode-tui/src/tui/session_picker/loading.rs:2534-2544 | crates/jcode-tui/src/tui/session_picker/loading.rs:2618-2627 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/session_picker/loading.rs:2534\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading.rs"},"region":{"startLine":2534}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a0655affd3391d2428aa3775ac067ab1713ccb5d0d95e29624c3d59829a6ec7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-tui/src/tui/ui_diagram_pane.rs:641-651 | crates/jcode-tui/src/tui/ui_diagram_pane.rs:678-688 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_diagram_pane.rs"},"region":{"startLine":641}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf4ec8932da2028d342a5e62bd9bff9dd2ced11cb84497ae3ebe6e91fbaade41"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): crates/jcode-tui/src/tui/ui_messages.rs:3745-3755 | crates/jcode-tui/src/tui/ui_messages.rs:3773-3782 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_messages.rs:3745\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":3745}}}],"partialFingerprints":{"codehealthFindingId/v1":"64ce988008217c3d36b1b4a190cd10712160ac0165d762ad9766a9a52f8ccf6b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): crates/jcode-tui/src/tui/ui_viewport.rs:978-988 | crates/jcode-tui/src/tui/ui_viewport.rs:1176-1185 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_viewport.rs:978\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_viewport.rs"},"region":{"startLine":978}}}],"partialFingerprints":{"codehealthFindingId/v1":"38b733b058a42eb43b6a6c64b89c5fa3ccf1d44f43cae65cf47d397696ebc73c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src/bin/memory_recall_bench.rs:1220-1230 | src/bin/memory_recall_bench.rs:1458-1468 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/bin/memory_recall_bench.rs:1220\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":1220}}}],"partialFingerprints":{"codehealthFindingId/v1":"468908f7ff3fcbce776822274d5cb389d34e705dd60820191a51c20997e5f361"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src/cli/acp.rs:926-936 | src/cli/acp.rs:1005-1015 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/cli/acp.rs:926\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/acp.rs"},"region":{"startLine":926}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2210619bfa7b6a5221a55c386461a0f0fcb8a105e09693b9fcc4078b63c1459"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src/cli/commands.rs:353-363 | src/cli/commands.rs:388-398 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/cli/commands.rs:353\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":353}}}],"partialFingerprints":{"codehealthFindingId/v1":"906054e8038c85cb7af5caa603a942e74dd1e1d3c8558edcb1668dda83da6a9e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 8): crates/jcode-provider-cursor-runtime/src/wire.rs:711-720 | crates/jcode-provider-cursor-runtime/src/wire.rs:732-740 | crates/jcode-provider-cursor-runtime/src/wire.rs:769-777 | crates/jcode-provider-cursor-runtime/src/wire.rs:844-852 | crates/jcode-provider-cursor-runtime/src/wire.rs:874-883 | crates/jcode-provider-cursor-runtime/src/wire.rs:893-902 | crates/jcode-provider-cursor-runtime/src/wire.rs:919-928 | crates/jcode-provider-cursor-runtime/src/wire.rs:937-946 \u2014 all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-cursor-runtime/src/wire.rs:711\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-provider-cursor-runtime/src/wire.rs:740\u0060 calls \u0060to_string\u0060, \u0060to_vec\u0060 and \u0060crates/jcode-provider-cursor-runtime/src/wire.rs:720\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/wire.rs"},"region":{"startLine":711}}}],"partialFingerprints":{"codehealthFindingId/v1":"79acbb432e0d8b56b15d546334d75dc2110c3f87630b30c6ce9cb845ff871c4b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 6): crates/jcode-provider-doctor/src/live_provider_probes.rs:805-814 | crates/jcode-provider-doctor/src/live_provider_probes.rs:903-912 | crates/jcode-provider-doctor/src/live_provider_probes.rs:1133-1142 | crates/jcode-provider-doctor/src/live_provider_probes.rs:1223-1232 | crates/jcode-provider-doctor/src/live_provider_probes.rs:1324-1333 | crates/jcode-provider-doctor/src/live_provider_probes.rs:1415-1424 \u2014 all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-doctor/src/live_provider_probes.rs:805\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-provider-doctor/src/live_provider_probes.rs:1220\u0060 calls \u0060with_evidence\u0060 and \u0060crates/jcode-provider-doctor/src/live_provider_probes.rs:804\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/live_provider_probes.rs"},"region":{"startLine":805}}}],"partialFingerprints":{"codehealthFindingId/v1":"53b971f7bc176eacfc622b45e9bd1719864d201cb28909fa6b25edb14d0279fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): crates/jcode-app-core/src/tool/session_search.rs:867-876 | crates/jcode-app-core/src/tool/session_search.rs:939-948 | crates/jcode-app-core/src/tool/session_search.rs:1146-1155 | crates/jcode-app-core/src/tool/session_search.rs:1252-1261 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/session_search.rs:867\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/session_search.rs"},"region":{"startLine":867}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e752f7f3c552206ac1c972b5a4c937840063dc8ff2c86dee5cd77a7933386d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): crates/jcode-provider-cursor-runtime/src/wire.rs:751-760 | crates/jcode-provider-cursor-runtime/src/wire.rs:793-802 | crates/jcode-provider-cursor-runtime/src/wire.rs:805-814 | crates/jcode-provider-cursor-runtime/src/wire.rs:817-826 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-cursor-runtime/src/wire.rs:751\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/wire.rs"},"region":{"startLine":751}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5837a263d82021460f90ab7ac039ac8e5be5551bb9a66948420f76b04e820d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): crates/jcode-tui-render/src/lib.rs:88-97 | crates/jcode-tui-render/src/lib.rs:138-147 | crates/jcode-tui-render/src/swarm_tiles.rs:318-327 | crates/jcode-tui/src/tui/info_widget_usage.rs:458-467 \u2014 there are 4 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/lib.rs"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6ee5908d27fcf7bd89f2936617b2b829e6cf280cd93c8990cec020468257c43"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): src/bin/memory_recall_bench.rs:1231-1240 | src/bin/memory_recall_bench.rs:1469-1478 | src/bin/memory_recall_bench.rs:1601-1610 | src/bin/memory_recall_bench.rs:1867-1876 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":1231}}}],"partialFingerprints":{"codehealthFindingId/v1":"e20a9f4d2959e5a0c5bb78599fb6fa65ab960a6fc905deddcd78b27d5d6b94e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): crates/jcode-app-core/src/server/client_lifecycle.rs:1188-1202 | crates/jcode-app-core/src/server/client_lifecycle.rs:1298-1312 | crates/jcode-app-core/src/server/client_lifecycle.rs:2472-2481 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/client_lifecycle.rs:1188\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_lifecycle.rs"},"region":{"startLine":1188}}}],"partialFingerprints":{"codehealthFindingId/v1":"83846d2510ea11e3fd6f1b78deecdc60d1ca57c128f6e2324a846f5d51c424c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): crates/jcode-app-core/src/usage_display.rs:117-126 | crates/jcode-base/src/usage/display.rs:124-133 | crates/jcode-tui-usage-overlay/src/lib.rs:732-741 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/usage_display.rs\u0060 and \u0060crates/jcode-base/src/usage/display.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_display.rs"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"af7415663d63c5ea066d146f4e05dac0a73b90fb9e3c77836ef7c4ad0602c9b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): crates/jcode-app-core/src/usage_openai.rs:109-118 | crates/jcode-base/src/usage/openai_helpers.rs:112-121 | crates/jcode-base/src/usage/openai_helpers.rs:123-132 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/usage_openai.rs\u0060 and \u0060crates/jcode-base/src/usage/openai_helpers.rs\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/usage_openai.rs:109\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_openai.rs"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c845e9b1219052c4994d8f110bcae5e585ff255446aa054fb61f960668f6f49"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): crates/jcode-base/src/auth/antigravity.rs:542-551 | crates/jcode-base/src/auth/gemini.rs:585-594 | crates/jcode-base/src/auth/gemini.rs:599-608 \u2014 before extracting anything, compare \u0060crates/jcode-base/src/auth/antigravity.rs\u0060 and \u0060crates/jcode-base/src/auth/gemini.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/auth/antigravity.rs:542\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/antigravity.rs"},"region":{"startLine":542}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c98a13a9aaf55ffb1e43bff895a6588d099f0138a8cb2c8f236e2f491ac0bf0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): crates/jcode-base/src/prompt.rs:926-936 | crates/jcode-base/src/prompt.rs:981-991 | crates/jcode-base/src/prompt.rs:1026-1036 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/prompt.rs"},"region":{"startLine":926}}}],"partialFingerprints":{"codehealthFindingId/v1":"00da72271e5201ac94290e33b91b072a82aa321698944c538123d8c7f9742aed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): crates/jcode-base/src/provider/dispatch.rs:94-103 | crates/jcode-base/src/provider/dispatch.rs:124-133 | crates/jcode-base/src/provider/dispatch.rs:141-150 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/provider/dispatch.rs:94\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/dispatch.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"694952f08cd8aaf0be3aecb5fae32824f502a2005054f8ac88ce487c9ad9ee8d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): crates/jcode-tui-account-picker/src/overlay.rs:476-485 | crates/jcode-tui-usage-overlay/src/lib.rs:458-467 | crates/jcode-tui/src/tui/login_picker.rs:364-373 \u2014 before extracting anything, compare \u0060crates/jcode-tui-account-picker/src/overlay.rs\u0060 and \u0060crates/jcode-tui-usage-overlay/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-account-picker/src/overlay.rs:476\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay.rs"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f097f85a920c5d5929c84bca0d369fa52638ab3bb376c25b3e36893b51e547c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): crates/jcode-tui-permissions/src/lib.rs:120-129 | crates/jcode-tui-permissions/src/lib.rs:445-454 | crates/jcode-tui-permissions/src/lib.rs:474-483 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-permissions/src/lib.rs:120\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-permissions/src/lib.rs"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"56d313d47aa704a6d14c19cef2c979d37789d39b043765ca5feb98515c43c8e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u201310 lines \u00D7 3): crates/jcode-tui/src/tui/app/remote/reconnect.rs:355-361 | crates/jcode-tui/src/tui/app/remote/reconnect.rs:647-656 | crates/jcode-tui/src/tui/app/remote/reconnect.rs:685-694 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/remote/reconnect.rs:355\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/reconnect.rs"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"e55c842db5f7f245201f34a1d4168226c7c1d7eea8b2ce7db20fbe47ad97d7d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): crates/jcode-tui/src/tui/app/runtime_memory.rs:81-90 | crates/jcode-tui/src/tui/app/runtime_memory.rs:131-140 | crates/jcode-tui/src/tui/app/runtime_memory.rs:168-177 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/runtime_memory.rs:81\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-tui/src/tui/app/runtime_memory.rs:179\u0060 calls \u0060mark_attribution_heartbeat_pending\u0060 and \u0060crates/jcode-tui/src/tui/app/runtime_memory.rs:141\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/runtime_memory.rs"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b0cb71b587a6a17391d4b1af53b88d9e462cbaefd5a909f7970e616bc0e0b34"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): crates/jcode-tui/src/tui/ui_messages.rs:3568-3577 | crates/jcode-tui/src/tui/ui_messages.rs:3748-3757 | crates/jcode-tui/src/tui/ui_messages.rs:3775-3784 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":3568}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b1de11106942c0090c0d498a827a10a3d9bb47eb42dac07bb220b24d46cbbc2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-app-core/src/agent/status.rs:78-87 | crates/jcode-app-core/src/agent/turn_execution.rs:1580-1589 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/agent/status.rs\u0060 and \u0060crates/jcode-app-core/src/agent/turn_execution.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/agent/status.rs:78\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-app-core/src/agent/turn_execution.rs:1590\u0060 calls \u0060trim_start\u0060, \u0060starts_with\u0060 and \u0060crates/jcode-app-core/src/agent/status.rs:88\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/status.rs"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd84210e221c29223184940c8b44a1f89e83da9ae374814b22d6a6a88849ca54"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-app-core/src/server/client_actions.rs:818-827 | crates/jcode-tui/src/tui/app/commands.rs:378-387 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/server/client_actions.rs\u0060 and \u0060crates/jcode-tui/src/tui/app/commands.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060session\u0060 to \u0060\u0026Session\u0060 in one and \u0060\u0026crate::session::Session\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_actions.rs"},"region":{"startLine":818}}}],"partialFingerprints":{"codehealthFindingId/v1":"97d3238771702de64739fe200b3dbf9407885fc494c56f53c873bb8d3bc25a37"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): crates/jcode-app-core/src/server/client_session.rs:1868-1876 | crates/jcode-app-core/src/server/debug_session_admin.rs:207-216 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/debug_session_admin.rs:207\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_session.rs"},"region":{"startLine":1868}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb59a66d901275e9e8ad27a13acf8bb427bfdf85d7e59cf0b36354aa3a07a6e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-app-core/src/server/debug_swarm_write.rs:375-384 | crates/jcode-app-core/src/server/debug_swarm_write.rs:483-492 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/debug_swarm_write.rs:375\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_swarm_write.rs"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"056bb9e9a03622fbe6957040324460c06e02f6b03e1884d2fca3e47d1576af58"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-app-core/src/telemetry_state.rs:83-92 | crates/jcode-telemetry-core/src/state_support.rs:81-90 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/telemetry_state.rs\u0060 and \u0060crates/jcode-telemetry-core/src/state_support.rs\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/telemetry_state.rs"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a510a74e605232eeae7662320db1a840f6a7697af467cd2bbf233a60c5ca2ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-app-core/src/tool/discover.rs:1053-1062 | crates/jcode-app-core/src/tool/discover.rs:1247-1256 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/discover.rs:1053\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/discover.rs"},"region":{"startLine":1053}}}],"partialFingerprints":{"codehealthFindingId/v1":"626c0594c702bc25abb97460383103a56004d92ad6fb593d1245e5db6829ce19"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-app-core/src/tool/read.rs:457-466 | crates/jcode-app-core/src/tool/read.rs:511-520 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/read.rs"},"region":{"startLine":457}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a0859bb5b7cc9bc81a3fef2a652581870719a6c0fd3237ca54bef68627e8a48"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-app-core/src/tool/remote_exec.rs:145-154 | crates/jcode-app-core/src/tool/remote_exec.rs:354-363 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/remote_exec.rs:145\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/remote_exec.rs"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"af9943eb7b89e5bc112d412203d12ac417b4d7d9ebe752bc36b39c5ce40cdead"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-app-core/src/tool/session_search.rs:1114-1123 | crates/jcode-app-core/src/tool/session_search.rs:1228-1237 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/session_search.rs:1114\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/session_search.rs"},"region":{"startLine":1114}}}],"partialFingerprints":{"codehealthFindingId/v1":"80c362b9b18ec65e20b994266e9bcbad7fccc7d8fd3ff0c35be0cdde34a855cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): crates/jcode-base/src/auth/google.rs:388-397 | crates/jcode-base/src/auth/oauth.rs:740-748 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/google.rs"},"region":{"startLine":388}}}],"partialFingerprints":{"codehealthFindingId/v1":"3313d15de8cb6739c3af77e64bd4c094ff4e3fa6f95312cc10d28d6da78f5144"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-base/src/auth/refresh_state.rs:289-298 | crates/jcode-base/src/auth/validation.rs:62-71 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/refresh_state.rs"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"a129fb653b943fbb610e2cb36b8c5fcd23f5d8961a640e836d912ba0529a88d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-base/src/background.rs:206-215 | crates/jcode-base/src/background.rs:301-310 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/background.rs:206\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-base/src/background.rs:299\u0060 calls \u0060output_path_for\u0060, \u0060read_to_string\u0060, \u0060unwrap_or_default\u0060 and \u0060crates/jcode-base/src/background.rs:204\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/background.rs"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"9682cc78060cf0c0afecfef87e6dae2ecce859294b80905390b57f8aa91a7a37"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-base/src/browser.rs:1221-1230 | crates/jcode-base/src/browser.rs:1266-1275 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/browser.rs"},"region":{"startLine":1221}}}],"partialFingerprints":{"codehealthFindingId/v1":"7532b7a2abdda28203e173aad6f174f46276cd7c398ced3b5afe8ad2c0ed9a0d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-base/src/cloud_environment.rs:309-318 | crates/jcode-base/src/cloud_environment.rs:452-461 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/cloud_environment.rs"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9718f74e2e2ec70d9cd0551417280465aa2a85e18e40c7c5336bee9d82dd770"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-base/src/compaction.rs:962-971 | crates/jcode-base/src/compaction.rs:1177-1186 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/compaction.rs:962\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/compaction.rs"},"region":{"startLine":962}}}],"partialFingerprints":{"codehealthFindingId/v1":"80449fba189765cbf18ba58d0d4faca9eb32438f573048be201c814fab89c291"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-base/src/memory.rs:492-501 | crates/jcode-base/src/memory.rs:513-522 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory.rs"},"region":{"startLine":492}}}],"partialFingerprints":{"codehealthFindingId/v1":"94763153fb077398f1018b0f844923dd55ac7f5263b2b7e6b70555240fae1584"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-base/src/memory/pending.rs:590-599 | crates/jcode-base/src/memory/pending.rs:645-654 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory/pending.rs"},"region":{"startLine":590}}}],"partialFingerprints":{"codehealthFindingId/v1":"95b6de2c5f350202fdd96d34acf3b8f0bcac63643047e30b796e4d4c0d69cdba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-base/src/prompt.rs:392-401 | crates/jcode-base/src/prompt.rs:529-540 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/prompt.rs:392\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/prompt.rs"},"region":{"startLine":392}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfd5d0fe2be30ec9f766bc410b3b387bed0bd68dd4ad2d5210eacf711cd0f431"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-base/src/provider/mod.rs:1726-1735 | crates/jcode-base/src/provider/mod.rs:2249-2258 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/mod.rs"},"region":{"startLine":1726}}}],"partialFingerprints":{"codehealthFindingId/v1":"d796d9c8a96a0d46362591db00bade5ce538e633847d54a61d698a416e05b099"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-base/src/provider/mod.rs:2972-2981 | crates/jcode-base/src/provider/startup.rs:302-311 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/provider/mod.rs:2972\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/mod.rs"},"region":{"startLine":2972}}}],"partialFingerprints":{"codehealthFindingId/v1":"b003f645fcbb02202b3c2fb01ee428ae73738e550870bfb508268b51edd85501"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-base/src/provider_activity_oauth.rs:247-256 | crates/jcode-base/src/provider_activity_oauth.rs:370-379 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/provider_activity_oauth.rs:247\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider_activity_oauth.rs"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cd29bab96a3d4bcdc2c94aa50417e298d96c7eb18fd2654bf0d5b2d9f006dd5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-base/src/session/prewarm.rs:102-111 | crates/jcode-storage/src/active_pids.rs:147-156 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/session/prewarm.rs:102\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/prewarm.rs"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"93bcf4a58ecd544bed5bc1bc4364bb7f3ba4dac4583305599711a74db986bac1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-base/src/skill.rs:481-490 | crates/jcode-base/src/skill.rs:656-665 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/skill.rs:481\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/skill.rs"},"region":{"startLine":481}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ef8b1fa5abcc640dbad31e7a7c0c0eb1c2c09b247989e78c3993e547d9c7e40"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-base/src/usage/api_keys.rs:339-348 | crates/jcode-base/src/usage/api_keys.rs:394-403 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/usage/api_keys.rs:339\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/api_keys.rs"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"31c832e453f890bb7bc26e81c9096d4bcd6b0ffa2406f433687440b35871dfc4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-base/src/usage/api_keys.rs:443-452 | crates/jcode-base/src/usage/api_keys.rs:613-622 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/usage/api_keys.rs:443\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/api_keys.rs"},"region":{"startLine":443}}}],"partialFingerprints":{"codehealthFindingId/v1":"4192f246b9c0dcffadead540babf256b2fb30429636c6a03ee58a15d0dfa81e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-harness-api-server/src/translate.rs:2979-2988 | crates/jcode-harness-api-server/src/translate.rs:2995-3004 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/translate.rs"},"region":{"startLine":2979}}}],"partialFingerprints":{"codehealthFindingId/v1":"b56705c978ace05077d42f9ce2b4561bd7abd1bf0d55ffad2c5eb71ddf4d5428"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-provider-anthropic-runtime/src/error_classification.rs:44-53 | crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs:2001-2011 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic-runtime/src/error_classification.rs"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed8c7af06c723bdf2c9d32568015d7e00aa20f4cbbf48883411139d720b02e7e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-provider-cursor-runtime/src/agent_transport.rs:598-607 | crates/jcode-provider-cursor-runtime/src/wire.rs:132-141 \u2014 before extracting anything, compare \u0060crates/jcode-provider-cursor-runtime/src/agent_transport.rs\u0060 and \u0060crates/jcode-provider-cursor-runtime/src/wire.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-cursor-runtime/src/agent_transport.rs:598\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/agent_transport.rs"},"region":{"startLine":598}}}],"partialFingerprints":{"codehealthFindingId/v1":"46c65661197b0231febc31dbb1c7d48014b419fd882ed86ecfb5e308161d4446"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-provider-cursor-runtime/src/agent_transport.rs:1210-1219 | crates/jcode-provider-cursor-runtime/src/agent_transport.rs:1297-1306 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-cursor-runtime/src/agent_transport.rs:1210\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/agent_transport.rs"},"region":{"startLine":1210}}}],"partialFingerprints":{"codehealthFindingId/v1":"0aa656a4aed4ef84800420b94a15c079664c7377eafcedad6c7316eef6e09748"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs:1995-2004 | scripts/repro/tls-bad-record-mac/src/main.rs:79-87 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs"},"region":{"startLine":1995}}}],"partialFingerprints":{"codehealthFindingId/v1":"57cb76fa1824d1c2d635d039960efa9b038ebde7fc7b65fbbc2fed401b8b8021"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-sdk/src/auth.rs:647-656 | crates/jcode-sdk/src/launch.rs:757-766 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-sdk/src/auth.rs:647\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-sdk/src/auth.rs"},"region":{"startLine":647}}}],"partialFingerprints":{"codehealthFindingId/v1":"f86588b2887f083e02b004a9117b01bc783c8a4e804d1510cebefda2f3f5dd2f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-tui-mermaid/src/mermaid_viewport.rs:1129-1138 | crates/jcode-tui-mermaid/src/mermaid_viewport.rs:1542-1551 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-mermaid/src/mermaid_viewport.rs:1129\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_viewport.rs"},"region":{"startLine":1129}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a67bdb7fe199f33ab9058783f28b5660dd474deaefcd0d3f926caf7cf82187a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-tui-mermaid/src/mermaid_viewport.rs:1572-1581 | crates/jcode-tui-mermaid/src/mermaid_widget.rs:266-275 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-mermaid/src/mermaid_viewport.rs:1572\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_viewport.rs"},"region":{"startLine":1572}}}],"partialFingerprints":{"codehealthFindingId/v1":"5585a9e2587d1f56b1190dc52ba079f14b992ae24903287427f2483beef46401"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-tui-mermaid/src/mermaid_widget.rs:190-199 | crates/jcode-tui-mermaid/src/mermaid_widget.rs:446-455 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-mermaid/src/mermaid_widget.rs:190\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_widget.rs"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d64d21db7b82dcbabc9b6ef87598fa62d3a03dc6cdf097f873841b9506b82ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-tui-render/src/swarm_gallery.rs:187-196 | crates/jcode-tui/src/tui/ui_input.rs:2106-2115 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060tokens\u0060 to \u0060u64\u0060 in one and \u0060usize\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/swarm_gallery.rs"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb1c975e3657e64c72239564576e9089511ba5bf922bc4531f63064d49cb0bca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-tui/src/tui/app/auth_account_picker.rs:754-763 | crates/jcode-tui/src/tui/app/auth_account_picker.rs:889-898 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/auth_account_picker.rs:754\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker.rs"},"region":{"startLine":754}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae6ea3ab0d491532725fdb40c7b53147bef17d575915027c772266bdf7a82f71"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): crates/jcode-tui/src/tui/app/input.rs:3766-3775 | crates/jcode-tui/src/tui/app/input.rs:3832-3840 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060self\u0060 to \u0060super) fn clear_streaming_render_state(\u0026mut\u0060 in one and \u0060super) fn take_streaming_text(\u0026mut\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":3766}}}],"partialFingerprints":{"codehealthFindingId/v1":"93382d2d664e583e97324bca6e9a815dfd627352082ebd68c36da9c3b695e08a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-tui/src/tui/app/model_context_commands.rs:153-162 | crates/jcode-tui/src/tui/app/model_context_commands.rs:172-181 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/model_context_commands.rs"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"94b6640126d8ca4b668ae072f952f2a85449d64ced37fb33af0c33eabfd21603"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote/key_handling.rs:1760-1769 | crates/jcode-tui/src/tui/app/remote/key_handling.rs:1916-1925 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/remote/key_handling.rs:1760\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/key_handling.rs"},"region":{"startLine":1760}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd3f8cf755a90b9cc5e7a93cd8af219d7bce98dcd7fa1c33de8a573c06949cd8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote/key_handling.rs:2070-2079 | crates/jcode-tui/src/tui/app/remote/key_handling/key_events.rs:712-721 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/remote/key_handling.rs:2070\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/key_handling.rs"},"region":{"startLine":2070}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0409cd7e94391bd8114e5c5e495078dde3ad4a7f8d8bc7e39cc1860aa7e274c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-tui/src/tui/app/tui_lifecycle_runtime.rs:732-741 | crates/jcode-tui/src/tui/app/tui_lifecycle_runtime.rs:751-760 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/tui_lifecycle_runtime.rs:732\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tui_lifecycle_runtime.rs"},"region":{"startLine":732}}}],"partialFingerprints":{"codehealthFindingId/v1":"d692b3289746927e62a08ee00a20555efd623f86eb9f0ee1be58154e543c3abc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): crates/jcode-tui/src/tui/session_picker/transcript_search/text_cache.rs:177-185 | crates/jcode-tui/src/tui/session_picker/transcript_search/text_cache.rs:190-199 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/transcript_search/text_cache.rs"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"21a82f070343b2935d9887573b34539f2dccaa5b46197e0d019f0e0b03590192"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): crates/jcode-tui/src/tui/ui_frame_metrics.rs:1243-1252 | crates/jcode-tui/src/tui/ui_header.rs:598-606 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_frame_metrics.rs"},"region":{"startLine":1243}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3e934aea79821dc8e2c8bb6554dbc55b44f93783ae394d624723fd0a036c140"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-tui/src/tui/ui_inline_interactive.rs:20-29 | crates/jcode-tui/src/tui/ui_messages/usage.rs:752-761 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_inline_interactive.rs"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ad62f2c1366e38be01d87e67668ad2d8bbbc5fcfbd07d02bde0dfe18a3554d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-tui/src/tui/ui_messages.rs:2544-2556 | crates/jcode-tui/src/tui/ui_messages.rs:2688-2700 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":2544}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb6320a6300830a68c3e70ba239652a1650b4fc760bf94eb61e55462348ff13d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-tui/src/tui/ui_prepare.rs:2693-2702 | crates/jcode-tui/src/tui/ui_prepare.rs:2823-2832 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_prepare.rs:2693\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_prepare.rs"},"region":{"startLine":2693}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3ab6487451ae589245974da8d5fc89974942cf00696e8ca4fc15965004b5b10"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-tui/src/tui/ui_tools.rs:1058-1067 | crates/jcode-tui/src/tui/ui_tools.rs:1495-1504 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tools.rs"},"region":{"startLine":1058}}}],"partialFingerprints":{"codehealthFindingId/v1":"e93d458d4ba65b73bbefa4eea533c6e8e1035b892aedc21f4209e1549d2548a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-tui/src/tui/ui_tools/patch_summary.rs:11-20 | crates/jcode-tui/src/tui/ui_tools/patch_summary.rs:92-101 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_tools/patch_summary.rs:11\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tools/patch_summary.rs"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5433515ab46245ef9229e17d4a0190dba317ee69e1e64f531740bf9bbc732a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src/cli/commands.rs:1655-1664 | src/cli/commands.rs:1770-1779 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":1655}}}],"partialFingerprints":{"codehealthFindingId/v1":"db175d4ecda96f54345636a708d21cf78d3542fd79b82b5ce663d67038ba558e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src/cli/login/device_login.rs:115-124 | src/cli/login/device_login.rs:149-158 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/cli/login/device_login.rs:115\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/login/device_login.rs"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"7163beaac8770fb1fc7996aab7a7be841b3d5393dfed38af81bd53d37688252e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 5): crates/jcode-provider-cursor-runtime/src/agent_transport.rs:1222-1230 | crates/jcode-provider-cursor-runtime/src/agent_transport.rs:1233-1241 | crates/jcode-provider-cursor-runtime/src/agent_transport.rs:1254-1262 | crates/jcode-provider-cursor-runtime/src/agent_transport.rs:1265-1273 | crates/jcode-provider-cursor-runtime/src/agent_transport.rs:1276-1284 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-cursor-runtime/src/agent_transport.rs:1222\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/agent_transport.rs"},"region":{"startLine":1222}}}],"partialFingerprints":{"codehealthFindingId/v1":"7513dad3a1d487eda0e776dab580aca9efab608bbd4bfbb21214e7bbaf27ac82"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): crates/jcode-tui/src/tui/app/remote/key_handling.rs:931-939 | crates/jcode-tui/src/tui/app/remote/key_handling.rs:988-996 | crates/jcode-tui/src/tui/app/remote/key_handling.rs:1023-1031 | crates/jcode-tui/src/tui/app/remote/key_handling.rs:1058-1066 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/remote/key_handling.rs:931\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/key_handling.rs"},"region":{"startLine":931}}}],"partialFingerprints":{"codehealthFindingId/v1":"bffdefda5ea430759abfb091f58cc0959e93565eef8e29c1dce2ab3024ac17ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): crates/jcode-tui/src/tui/app/state_ui.rs:531-539 | crates/jcode-tui/src/tui/app/state_ui.rs:541-549 | crates/jcode-tui/src/tui/app/state_ui.rs:551-559 | crates/jcode-tui/src/tui/app/state_ui.rs:583-591 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/state_ui.rs:531\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui.rs"},"region":{"startLine":531}}}],"partialFingerprints":{"codehealthFindingId/v1":"29247f5e117b4874f0d0345bc2f8273157d9c524c544bc8a044565a78bd6583c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/jcode-app-core/src/agent/status.rs:10-19 | crates/jcode-app-core/src/agent/status.rs:154-162 | crates/jcode-app-core/src/agent/turn_execution.rs:264-272 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/agent/status.rs\u0060 and \u0060crates/jcode-app-core/src/agent/turn_execution.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 64 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/status.rs"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"252e4a1ffce374807ea28f1ba38c61a43340ef182799ee138a1abaf6900fb572"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/jcode-app-core/src/channel.rs:228-237 | crates/jcode-app-core/src/channel.rs:437-446 | crates/jcode-app-core/src/channel.rs:699-707 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/channel.rs:228\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/channel.rs"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"99813563165c62163bf8ca98ecfd13a424e9fb3289bd7c1d5038fbc929da8253"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/jcode-app-core/src/notifications.rs:806-814 | crates/jcode-app-core/src/notifications.rs:821-829 | crates/jcode-setup-hints/src/cli_launch_hints.rs:370-378 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/notifications.rs\u0060 and \u0060crates/jcode-setup-hints/src/cli_launch_hints.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/notifications.rs:806\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-app-core/src/notifications.rs:820\u0060 calls \u0060arg\u0060 and \u0060crates/jcode-app-core/src/notifications.rs:805\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/notifications.rs"},"region":{"startLine":806}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c08f6225d1ca2e73e15b849949ca1d36e05784e848455c8e98ab495e1a142eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/jcode-app-core/src/server/debug_swarm_read.rs:416-424 | crates/jcode-app-core/src/server/debug_swarm_read.rs:456-464 | crates/jcode-app-core/src/server/debug_swarm_read.rs:482-490 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/debug_swarm_read.rs:416\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-app-core/src/server/debug_swarm_read.rs:455\u0060 calls \u0060contains\u0060 and \u0060crates/jcode-app-core/src/server/debug_swarm_read.rs:415\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_swarm_read.rs"},"region":{"startLine":416}}}],"partialFingerprints":{"codehealthFindingId/v1":"5595b67f3932a0dfd6450bc8a9fbb0ef83cda5a41a3684af7752da4544372038"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/jcode-app-core/src/server/jade_relay.rs:366-374 | crates/jcode-app-core/src/server/jade_relay.rs:720-728 | crates/jcode-app-core/src/server/jade_relay.rs:764-772 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/jade_relay.rs:366\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/jade_relay.rs"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"da288e10d887aa8dbb60b2329a1dbd13c6f07ec2f7ec38a2c22de1e3a71a9273"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/jcode-app-core/src/session_launch.rs:703-711 | crates/jcode-app-core/src/session_launch.rs:718-726 | crates/jcode-app-core/src/session_launch.rs:733-741 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/session_launch.rs:703\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/session_launch.rs"},"region":{"startLine":703}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba1e74b5c386733dbdcfa0daa57431c271c8f104d862ef2dfc7da5ce38fea08b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/jcode-app-core/src/telemetry_state.rs:270-278 | crates/jcode-telemetry-core/src/state_support.rs:313-321 | crates/jcode-tui/src/tui/app/support.rs:77-85 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/telemetry_state.rs\u0060 and \u0060crates/jcode-telemetry-core/src/state_support.rs\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/telemetry_state.rs"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8e829fc6ccbeb0787472bdb31ca8bb3ce4ae207c447dd437e1c6577c3f96472"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/jcode-provider-doctor/src/live_provider_probes.rs:887-895 | crates/jcode-provider-doctor/src/live_provider_probes.rs:1211-1219 | crates/jcode-provider-doctor/src/live_provider_probes.rs:1403-1411 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-doctor/src/live_provider_probes.rs:887\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/live_provider_probes.rs"},"region":{"startLine":887}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf754d8312bd853b56297c472e797255e31470c2decf99b9819ac111bab1a857"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 3): crates/jcode-tui/src/tui/app/inline_interactive.rs:4061-4068 | crates/jcode-tui/src/tui/app/model_context.rs:43-51 | crates/jcode-tui/src/tui/app/model_context.rs:1015-1023 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/inline_interactive.rs:4061\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060self\u0060 to \u0060super) fn finalize_model_switch(\u0026mut\u0060 in one and \u0060super) fn apply_pending_fallback_offer(\u0026mut\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":4061}}}],"partialFingerprints":{"codehealthFindingId/v1":"62edcd4a64e9d1aec95e4cd801801ded472ba7a6dea77091f511fce946ccb6b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 3): crates/jcode-tui/src/tui/app/remote/server_events.rs:255-262 | crates/jcode-tui/src/tui/app/remote/server_events.rs:444-452 | crates/jcode-tui/src/tui/app/remote/server_events.rs:471-479 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/server_events.rs"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dccedb9a35d5c47589a68b3a3a185112aef0f01753e9f4b3603e9c64c349b20"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/jcode-tui/src/tui/app/turn.rs:283-291 | crates/jcode-tui/src/tui/app/turn.rs:887-895 | crates/jcode-tui/src/tui/app/turn.rs:1189-1197 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-tui/src/tui/app/turn.rs:292\u0060 calls \u0060reset_status_spinner_interval\u0060 and \u0060crates/jcode-tui/src/tui/app/turn.rs:896\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/turn.rs"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"8405a0156d344873c33646cb09f7c800b6b261ce9e2e4c29d62c0ecaaf066b07"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/jcode-tui/src/tui/session_picker.rs:420-428 | crates/jcode-tui/src/tui/session_picker.rs:485-493 | crates/jcode-tui/src/tui/session_picker.rs:582-590 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-tui/src/tui/session_picker.rs:494\u0060 calls \u0060Some\u0060, \u0060to_string\u0060, \u0060default\u0060 and \u0060crates/jcode-tui/src/tui/session_picker.rs:429\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker.rs"},"region":{"startLine":420}}}],"partialFingerprints":{"codehealthFindingId/v1":"c866a45e945995a1cfdd8b3370f7ea8cb25d18351dfe632044c405a11bd3499b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): src/cli/commands.rs:606-614 | src/cli/commands.rs:859-867 | src/cli/commands.rs:1149-1157 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/cli/commands.rs:606\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060src/cli/commands.rs:870\u0060 calls \u0060display\u0060 and \u0060src/cli/commands.rs:1160\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":606}}}],"partialFingerprints":{"codehealthFindingId/v1":"016beb4b2ca13b5735342d1faf6185c957de19385205b12ac59399c5b101f6c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-app-core/src/agent/status.rs:5-13 | crates/jcode-app-core/src/agent/status.rs:179-187 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/agent/status.rs:5\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/status.rs"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"adc0fce7f12c8f1feb30164bc8c223bb1bffb7993b9d456c7a2e2561ff3b05dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-app-core/src/ambient/runner.rs:205-213 | crates/jcode-tui/src/tui/app/helpers.rs:1748-1756 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/ambient/runner.rs"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"3646fd449cc9962f7ec136e5970b53290c14f7ff81e0277be44b34423d7b0048"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): crates/jcode-app-core/src/server/comm_control.rs:995-1003 | crates/jcode-app-core/src/server/comm_session.rs:1287-1294 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_control.rs"},"region":{"startLine":995}}}],"partialFingerprints":{"codehealthFindingId/v1":"68e7513fc1447dd9f868906ec7b06711bd018b7471a8ae747a0715c17352790a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-app-core/src/server/comm_session.rs:879-887 | crates/jcode-app-core/src/server/comm_sync.rs:400-409 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/comm_session.rs:879\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_session.rs"},"region":{"startLine":879}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dd6765188501a169e42441977b9bec6c7aa5556a9ba091a7df7bab3ca6d0488"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-app-core/src/server/debug_server_state.rs:737-745 | crates/jcode-app-core/src/server/debug_server_state.rs:747-755 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/debug_server_state.rs:737\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_server_state.rs"},"region":{"startLine":737}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1c70da1fcd65d12c5d188a0b1f7b81c35a9bcb97872d42dcbc75e2017b72929"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): crates/jcode-app-core/src/server/provider_control.rs:186-193 | crates/jcode-tui/src/tui/app/model_context.rs:1066-1074 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/provider_control.rs"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"3905809e9ee7b0c8c91eedf200ecfe7937376ae036df98e6a18faff5f82c1a33"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20139 lines \u00D7 2): crates/jcode-app-core/src/server/runtime_ssh_host.rs:321-327 | crates/jcode-app-core/src/server/runtime_ssh_host.rs:361-369 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/runtime_ssh_host.rs"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"04a5d3e1603f69c0ca2a1c9b3afea9494952940ead655a77959a504d7e81b3ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-app-core/src/session_launch.rs:530-538 | crates/jcode-app-core/src/session_launch.rs:789-797 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/session_launch.rs"},"region":{"startLine":530}}}],"partialFingerprints":{"codehealthFindingId/v1":"fea2bf8cb11754abc989fa8d1d7e9c8bbe211d1f5d998839cc5a040542cf079f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): crates/jcode-app-core/src/session_window.rs:105-113 | crates/jcode-tui/src/tui/window_visibility.rs:276-283 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/session_window.rs"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"40d5edc113e4d3d26b62ee206aeef82a881bb0849dc869f5a031bb7b9188ecbb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-app-core/src/tool/agentgrep/context.rs:836-844 | crates/jcode-app-core/src/tool/agentgrep/context.rs:871-879 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060known\u0060 to \u0060AgentGrepKnownFile\u0060 in one and \u0060AgentGrepKnownSymbol\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/agentgrep/context.rs"},"region":{"startLine":836}}}],"partialFingerprints":{"codehealthFindingId/v1":"108c20b13d8b5dd788e2555a5c8dfe66393e61245ae2fed14404e092c28cbb00"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-app-core/src/tool/browser.rs:429-437 | crates/jcode-app-core/src/tool/browser.rs:448-456 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/browser.rs"},"region":{"startLine":429}}}],"partialFingerprints":{"codehealthFindingId/v1":"154ac04edb48392ad5df78f0f7ff393931f5a3fa9d5bf9110b62080ec7ea465a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-app-core/src/tool/session_search.rs:1482-1490 | crates/jcode-app-core/src/tool/session_search.rs:1738-1746 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/session_search.rs:1482\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060messages\u0060 to \u0060\u0026[ExternalMessageRecord]\u0060 in one and \u0060\u0026[StoredMessage]\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/session_search.rs"},"region":{"startLine":1482}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfa2904dfb210c2e2c7835a8108f7c1ddc21dc7ccd4b08274717cef7e67275ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-app-core/src/tool/todo.rs:1274-1282 | crates/jcode-app-core/src/tool/todo_names.rs:20-28 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/todo.rs:1274\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/todo.rs"},"region":{"startLine":1274}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e37d5ac6509ed087a32fdbd8e637dd3140817a389f1b30d7aeffb845e12a15b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-app-core/src/usage_openai.rs:194-202 | crates/jcode-base/src/usage/openai_helpers.rs:219-227 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/usage_openai.rs\u0060 and \u0060crates/jcode-base/src/usage/openai_helpers.rs\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_openai.rs"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"c578bce6fa4f4b4ac6327c35b231fb715df26a853d5d8c3f9b8d179a3a7a0b5c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-base/src/import.rs:1117-1125 | crates/jcode-tui/src/tui/session_picker/loading.rs:2414-2424 \u2014 before extracting anything, compare \u0060crates/jcode-base/src/import.rs\u0060 and \u0060crates/jcode-tui/src/tui/session_picker/loading.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/import.rs:1117\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-base/src/import.rs:1116\u0060 calls \u0060json_line_has_message_role\u0060 and \u0060crates/jcode-tui/src/tui/session_picker/loading.rs:2413\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/import.rs"},"region":{"startLine":1117}}}],"partialFingerprints":{"codehealthFindingId/v1":"986a2d62eb80154ac877dc17a54ac756162dfe6fa243483efc558d4c66f3c3aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-base/src/mcp/manager.rs:521-529 | crates/jcode-base/src/mcp/manager.rs:552-560 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mcp/manager.rs"},"region":{"startLine":521}}}],"partialFingerprints":{"codehealthFindingId/v1":"014fbea1c305ad4f0b427ee796b3ccf9a2b72d2a06dc6381f97a52af8d975c12"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): crates/jcode-base/src/memory/activity.rs:187-194 | crates/jcode-base/src/memory/activity.rs:241-249 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/memory/activity.rs:187\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory/activity.rs"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"e08b6317a511c049d4d7521df16bbd5222e158315e35ca405403d4a0285ef27c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-base/src/prompt.rs:22-30 | crates/jcode-base/src/prompt.rs:84-92 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/prompt.rs:22\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/prompt.rs"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce88db195efa07f48119e44fade9051c0f2024a554110c0fb6ba7a160528fd6a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20139 lines \u00D7 2): crates/jcode-base/src/provider/mod.rs:1837-1845 | crates/jcode-base/src/provider/mod.rs:2057-2063 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/provider/mod.rs:1837\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/mod.rs"},"region":{"startLine":1837}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7f9e57f39e595613c70e486fe04320fd64362a74d9009d2fd6bd8708cc411a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-base/src/safety.rs:385-393 | crates/jcode-base/src/safety.rs:421-429 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/safety.rs"},"region":{"startLine":385}}}],"partialFingerprints":{"codehealthFindingId/v1":"c03d9852173c5b22ebc35abdce461b25a94d1052b47ad27640d5afab4cdd95cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-base/src/safety.rs:397-405 | crates/jcode-base/src/safety.rs:446-454 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/safety.rs"},"region":{"startLine":397}}}],"partialFingerprints":{"codehealthFindingId/v1":"19235ae2ac94fa3ae1a2aa850bb279684b0ae183c55ea2351e7b5025319d3215"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): crates/jcode-base/src/session/prewarm.rs:108-116 | crates/jcode-storage/src/active_pids.rs:98-105 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/session/prewarm.rs:108\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060pid\u0060 to \u0060u32\u0060 in one and \u0060u32) -\u003E (usize\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/prewarm.rs"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"655ec28ce05647ffecb800ccef8c5746bc908001360a63c28ab7d78b18adb6a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-base/src/subscription_api.rs:291-299 | crates/jcode-base/src/subscription_api.rs:516-524 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/subscription_api.rs:291\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/subscription_api.rs"},"region":{"startLine":291}}}],"partialFingerprints":{"codehealthFindingId/v1":"935beef2f3ba538faa90b40bd65f4d72df9691872d7a587c0c87dd9bed0f5148"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-import-core/src/lib.rs:866-874 | crates/jcode-tui/src/tui/session_picker/loading.rs:2643-2651 \u2014 before extracting anything, compare \u0060crates/jcode-import-core/src/lib.rs\u0060 and \u0060crates/jcode-tui/src/tui/session_picker/loading.rs\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-import-core/src/lib.rs"},"region":{"startLine":866}}}],"partialFingerprints":{"codehealthFindingId/v1":"56f9475840043b9f014fe4f6a217998c75355130af4a1511cdbfde817ae6ac89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): crates/jcode-provider-copilot-runtime/src/lib.rs:111-131 | crates/jcode-provider-copilot-runtime/src/lib.rs:148-168 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-copilot-runtime/src/lib.rs"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"dda73ecf8c5a54717f4fa552431e9e6dc623035e89ef3d56a475358b8db462bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-provider-copilot/src/lib.rs:142-150 | crates/jcode-provider-openrouter/src/request.rs:190-198 \u2014 before extracting anything, compare \u0060crates/jcode-provider-copilot/src/lib.rs\u0060 and \u0060crates/jcode-provider-openrouter/src/request.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-copilot/src/lib.rs:142\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-copilot/src/lib.rs"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"924e37e8458e33d047ca2e3c1d73cbb4896fec1db2b7ef82f0d190be8ddc5f12"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-provider-core/src/fallback_pick.rs:142-161 | crates/jcode-provider-core/src/fallback_pick.rs:468-476 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-provider-core/src/fallback_pick.rs:477\u0060 calls \u0060route_pool_key\u0060, \u0060and_then\u0060, \u0060iter\u0060 and \u0060crates/jcode-provider-core/src/fallback_pick.rs:163\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/fallback_pick.rs"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"c277fdbe85d6773317a307edd37b157a19aff5390af67886f11c78a9154f031e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-provider-doctor/src/live_provider_probes.rs:164-172 | crates/jcode-provider-doctor/src/live_provider_probes.rs:232-240 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-doctor/src/live_provider_probes.rs:164\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/live_provider_probes.rs"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ed7a9b61decf8bb05af98e047a757809fa4270d785503df4b43433154579833"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-provider-openrouter-runtime/src/lib.rs:666-674 | crates/jcode-provider-openrouter-runtime/src/lib.rs:774-782 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-openrouter-runtime/src/lib.rs:666\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/lib.rs"},"region":{"startLine":666}}}],"partialFingerprints":{"codehealthFindingId/v1":"eae935f8f589f1f4e0f98d3fcdfce4fc85d551b2c5f64e984b956c40e113c214"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): crates/jcode-render-core/src/markdown.rs:504-511 | crates/jcode-render-core/src/markdown.rs:519-527 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-render-core/src/markdown.rs:504\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/markdown.rs"},"region":{"startLine":504}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fc2b56b579845fad73812b6a0b99093cfed59bf8ae78a79b3ad923577c8ee32"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-render-core/src/math.rs:614-622 | crates/jcode-render-core/src/preprocess.rs:666-674 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-render-core/src/math.rs:614\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/math.rs"},"region":{"startLine":614}}}],"partialFingerprints":{"codehealthFindingId/v1":"903254e9ea10ab7c9736e2d4dfe130142532cf574627cb0da2cd3a3e77e1b417"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-setup-hints/src/lib.rs:1738-1746 | crates/jcode-setup-hints/src/lib.rs:1795-1803 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-setup-hints/src/lib.rs:1738\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-setup-hints/src/lib.rs:1806\u0060 calls \u0060name\u0060 and \u0060crates/jcode-setup-hints/src/lib.rs:1749\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/lib.rs"},"region":{"startLine":1738}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba9562d2bc369da6c8a2690a8a96578137c15e4d5060f8b06e095729a39e69b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-todo-policy/src/lib.rs:564-572 | crates/jcode-todo-policy/src/lib.rs:587-595 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-todo-policy/src/lib.rs:564\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-todo-policy/src/lib.rs"},"region":{"startLine":564}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3381c2e8a0fb557bf983643f91e2f30b5394557c6b74f93cd54fe8a429ee968"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20139 lines \u00D7 2): crates/jcode-tui-markdown/src/markdown_render_full.rs:494-502 | crates/jcode-tui-markdown/src/markdown_render_lazy.rs:475-480 \u2014 before extracting anything, compare \u0060crates/jcode-tui-markdown/src/markdown_render_full.rs\u0060 and \u0060crates/jcode-tui-markdown/src/markdown_render_lazy.rs\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 868 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-markdown/src/markdown_render_full.rs:494\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_full.rs"},"region":{"startLine":494}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e5bcc20c929dd36a945d821e8692cbaec9360ee094e3a582f0158199d7973ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-tui-render/src/lib.rs:78-86 | crates/jcode-tui-render/src/lib.rs:127-135 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-render/src/lib.rs:78\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/lib.rs"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"f77bc072682e218a071b5b4f6047c4cfc98f752ae809b6fab29a1c1fd493501b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-tui/src/tui/app/auth_account_picker_saved_accounts.rs:349-357 | crates/jcode-tui/src/tui/app/auth_account_picker_saved_accounts.rs:409-418 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/auth_account_picker_saved_accounts.rs:349\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-tui/src/tui/app/auth_account_picker_saved_accounts.rs:346\u0060 calls \u0060anthropic_account_use\u0060, \u0060as_deref\u0060 and \u0060crates/jcode-tui/src/tui/app/auth_account_picker_saved_accounts.rs:406\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker_saved_accounts.rs"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"474095d1279cb34390c8842a50299ca2a9bcb3d9282bc6e54769404ae9e07124"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): crates/jcode-tui/src/tui/app/debug.rs:369-376 | crates/jcode-tui/src/tui/memory_profile.rs:211-219 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/app/debug.rs\u0060 and \u0060crates/jcode-tui/src/tui/memory_profile.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/debug.rs:369\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug.rs"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"148f7d10ded5d9f0bea91abcf93bcf723ca55ad89831f644f2b253c56d0a8721"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-tui/src/tui/app/inline_interactive.rs:214-222 | crates/jcode-tui/src/tui/app/inline_interactive.rs:266-274 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/inline_interactive.rs:214\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060store\u0060 to \u0060\u0026ModelPickerUsageStore\u0060 in one and \u0060\u0026ModelPickerFavoritesStore\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a69c8bbb8d19dbb2d5343605c30948f867cd22a96e56e12700d3d4118481d4d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote.rs:2327-2335 | crates/jcode-tui/src/tui/app/remote/key_handling/key_events.rs:772-780 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/app/remote.rs\u0060 and \u0060crates/jcode-tui/src/tui/app/remote/key_handling/key_events.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/remote.rs:2327\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote.rs"},"region":{"startLine":2327}}}],"partialFingerprints":{"codehealthFindingId/v1":"89f21e0633d86d9a6391c5dba8c10be09c55ca64d518bd943b4f392fd187b327"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote.rs:2361-2369 | crates/jcode-tui/src/tui/app/remote/key_handling/key_events.rs:814-822 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/app/remote.rs\u0060 and \u0060crates/jcode-tui/src/tui/app/remote/key_handling/key_events.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/remote.rs:2361\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote.rs"},"region":{"startLine":2361}}}],"partialFingerprints":{"codehealthFindingId/v1":"317e2c140ff63f98caee7a0cc74ad7e4fa83fe78cc1371179c3691146955e87f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-tui/src/tui/app/state_ui_input_helpers.rs:1583-1593 | crates/jcode-tui/src/tui/app/state_ui_input_helpers.rs:1647-1655 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/state_ui_input_helpers.rs:1583\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui_input_helpers.rs"},"region":{"startLine":1583}}}],"partialFingerprints":{"codehealthFindingId/v1":"efb3d33bfaa09b66b9bf8f081b652f7f93d7d2fd36df431e589338b37c443891"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-tui/src/tui/app/turn.rs:179-187 | crates/jcode-tui/src/tui/app/turn.rs:1480-1488 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/turn.rs:179\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/turn.rs"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb0150d5c864ee0780d5bafe96d44fc5e6d336d36128d6b82fb55bbfa12b1a23"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): crates/jcode-tui/src/tui/app/turn.rs:255-262 | crates/jcode-tui/src/tui/app/turn.rs:350-358 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/turn.rs:255\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-tui/src/tui/app/turn.rs:359\u0060 calls \u0060flush_smooth_frame\u0060, \u0060apply_stream_ops\u0060, \u0060poll_compaction_completion\u0060 and \u0060crates/jcode-tui/src/tui/app/turn.rs:263\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/turn.rs"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5ac1c2c3bf9b187b9140682f93f1901a7c3aab4b27205cd56250a4976161e21"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-tui/src/tui/app/turn.rs:427-435 | crates/jcode-tui/src/tui/app/turn.rs:1500-1508 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/turn.rs:427\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/turn.rs"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"6aeb3e4479684e5be11b46193aea2fc8fb150224b38d45f469cf2020f0a9e25f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-tui/src/tui/login_picker.rs:682-690 | crates/jcode-tui/src/tui/login_picker.rs:757-765 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/login_picker.rs:682\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/login_picker.rs"},"region":{"startLine":682}}}],"partialFingerprints":{"codehealthFindingId/v1":"76c4e194272c8efa1396939e13727ebd3fd8569090c72bc47053c994d288796e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-tui/src/tui/session_picker.rs:550-558 | crates/jcode-tui/src/tui/session_picker.rs:793-801 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/session_picker.rs:550\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker.rs"},"region":{"startLine":550}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc4998b0322abbbadeb5e64161716286ca3a59301fa874c55fa6da6d68cf0323"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-tui/src/tui/session_picker/loading.rs:1127-1135 | crates/jcode-tui/src/tui/session_picker/loading.rs:1245-1253 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/session_picker/loading.rs:1127\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading.rs"},"region":{"startLine":1127}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b0488f152f509f0dcf94e23bae4b1de64d5e846398c8a9abe1e5c8622b34576"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-tui/src/tui/session_picker/loading.rs:2307-2315 | crates/jcode-tui/src/tui/session_picker/loading/pi_sessions.rs:60-68 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/session_picker/loading.rs\u0060 and \u0060crates/jcode-tui/src/tui/session_picker/loading/pi_sessions.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/session_picker/loading.rs:2307\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading.rs"},"region":{"startLine":2307}}}],"partialFingerprints":{"codehealthFindingId/v1":"e337d777b275610db3eb6530784744c27eba398a86fde064979da451c38a2a46"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-tui/src/tui/ui_diff.rs:79-87 | crates/jcode-tui/src/tui/ui_diff.rs:180-188 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_diff.rs:79\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_diff.rs"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"c32f7b337a629f1b616d84894d3e3e03bb254b8904d9811708a193ee7c6953b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-tui/src/tui/ui_messages.rs:1820-1828 | crates/jcode-tui/src/tui/ui_messages.rs:1882-1890 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":1820}}}],"partialFingerprints":{"codehealthFindingId/v1":"f287b226cfdc49010fd67b89895b7c1846747d6c78e20633691e129241ba46f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-tui/src/tui/ui_messages.rs:4460-4469 | crates/jcode-tui/src/tui/ui_prepare.rs:1594-1602 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_messages.rs:4460\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":4460}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1ee2b49dcdcece6469584c565bbd23d6a2223656ad6a653b9a617f8848f5973"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-tui/src/tui/ui_messages/discovery.rs:207-215 | crates/jcode-tui/src/tui/ui_messages/gmail_drafts.rs:76-84 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_messages/discovery.rs:207\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages/discovery.rs"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef4c54b0021b9e9211c3a44bdf04f55114c6cb128a13b5fecd7d337eb40b7bff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-tui/src/tui/ui_tools.rs:1140-1148 | crates/jcode-tui/src/tui/ui_tools.rs:1231-1239 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_tools.rs:1140\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tools.rs"},"region":{"startLine":1140}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ccc41ede8f3b6bfae8557c2a1dfdebaaba15d8b8e8ffe122800bf24cdfdfef7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): src/bin/memory_recall_bench.rs:2611-2619 | src/bin/memory_recall_bench.rs:2621-2628 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/bin/memory_recall_bench.rs:2611\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":2611}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cd1665da82d50193f1aad6f459be70bebab7c81dbdbb67732d7d6f8418f07be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src/bin/tui_bench.rs:682-690 | src/bin/tui_bench.rs:747-755 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/bin/tui_bench.rs:682\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/tui_bench.rs"},"region":{"startLine":682}}}],"partialFingerprints":{"codehealthFindingId/v1":"92c56b6fa3ac07b116ab24272e519dcb2cb87f70531740892176448eb88aa489"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src/cli/hot_exec.rs:184-192 | src/cli/hot_exec.rs:223-231 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/hot_exec.rs"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac7aebcec54a21d92d1142e610f27f32e0321f4593a1123c190f3508e502c6d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 5): crates/jcode-tui/src/tui/keybind.rs:67-74 | crates/jcode-tui/src/tui/keybind.rs:650-657 | crates/jcode-tui/src/tui/keybind.rs:667-674 | crates/jcode-tui/src/tui/keybind.rs:684-691 | crates/jcode-tui/src/tui/keybind.rs:701-708 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/keybind.rs:67\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/keybind.rs"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3b1842889c270c61e2ff52287a3122fc2f5e0ccadfbb72c4f1287cf7d992446"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): crates/jcode-app-core/src/server/debug_swarm_read.rs:416-423 | crates/jcode-app-core/src/server/debug_swarm_read.rs:456-463 | crates/jcode-app-core/src/server/debug_swarm_read.rs:482-489 | crates/jcode-app-core/src/server/debug_swarm_read.rs:517-524 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-app-core/src/server/debug_swarm_read.rs:455\u0060 calls \u0060contains\u0060 and \u0060crates/jcode-app-core/src/server/debug_swarm_read.rs:415\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_swarm_read.rs"},"region":{"startLine":416}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a4da8c0bae63383fe83a553b4dd4de2c13801f289c46e284b751b5f4eede10a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): crates/jcode-app-core/src/tool/read.rs:410-417 | crates/jcode-base/src/provider/image_clamp.rs:413-420 | crates/jcode-terminal-image/src/display.rs:238-245 | crates/jcode-tui-mermaid/src/mermaid_inline.rs:280-287 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/tool/read.rs\u0060 and \u0060crates/jcode-base/src/provider/image_clamp.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/read.rs:410\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/read.rs"},"region":{"startLine":410}}}],"partialFingerprints":{"codehealthFindingId/v1":"38ce335a98ccdaa94e3553ea1139ad01dcc639e4dcaa396029b30bcc47a44654"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): crates/jcode-provider-cursor-runtime/src/agent_transport.rs:1244-1251 | crates/jcode-provider-cursor-runtime/src/agent_transport.rs:1309-1316 | crates/jcode-provider-cursor-runtime/src/agent_transport.rs:1341-1348 | crates/jcode-provider-cursor-runtime/src/agent_transport.rs:1351-1358 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-cursor-runtime/src/agent_transport.rs:1244\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/agent_transport.rs"},"region":{"startLine":1244}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bb48b14c97da010599631f7801e8a27e43bc2b13db7ccbc547e358871be2338"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): crates/jcode-tui/src/tui/app/inline_interactive.rs:1212-1219 | crates/jcode-tui/src/tui/app/inline_interactive.rs:1528-1535 | crates/jcode-tui/src/tui/app/inline_interactive.rs:1686-1693 | crates/jcode-tui/src/tui/app/inline_interactive.rs:2259-2266 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":1212}}}],"partialFingerprints":{"codehealthFindingId/v1":"a670354884a0b675c14ea89cce32eff9ee018dbdfeb9306c5ada6333bb79eb20"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/jcode-app-core/src/tool/agentgrep/context.rs:839-846 | crates/jcode-app-core/src/tool/agentgrep/context.rs:856-863 | crates/jcode-app-core/src/tool/agentgrep/context.rs:874-881 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/agentgrep/context.rs:839\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060known\u0060 to \u0060AgentGrepKnownFile\u0060 in one and \u0060AgentGrepKnownRegion\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/agentgrep/context.rs"},"region":{"startLine":839}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cd48eda1b6c4acadca98c40c8becd3bb9a6c266014038156bb4647e9e99fa28"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/jcode-base/src/auth/mod.rs:280-287 | crates/jcode-base/src/auth/mod.rs:309-316 | crates/jcode-base/src/auth/mod.rs:385-392 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/mod.rs"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c29cbdfcb9a4dbaea9b0f578e7204e0bc2f55dac16a4a9dfca2eadd98b2144e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5\u20138 lines \u00D7 3): crates/jcode-base/src/import.rs:1080-1087 | crates/jcode-import-core/src/lib.rs:653-657 | crates/jcode-tui/src/tui/session_picker/loading.rs:2291-2297 \u2014 before extracting anything, compare \u0060crates/jcode-base/src/import.rs\u0060 and \u0060crates/jcode-import-core/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/import.rs"},"region":{"startLine":1080}}}],"partialFingerprints":{"codehealthFindingId/v1":"04d680a06a73ad9eeac2efa858a4bcaacbb51409ed4426f4b72727cc6433081a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/jcode-core/src/panic_util.rs:2-9 | crates/jcode-tui-mermaid/src/lib.rs:195-202 | src/cli/terminal.rs:225-232 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-core/src/panic_util.rs"},"region":{"startLine":2}}}],"partialFingerprints":{"codehealthFindingId/v1":"edf60eb0bd58f6f0fc62ec0bd14448c98d69083c3978970759bc33b69a3e0647"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/jcode-provider-anthropic-runtime/src/error_classification.rs:43-51 | crates/jcode-provider-copilot-runtime/src/routing.rs:38-45 | crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs:2000-2009 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic-runtime/src/error_classification.rs"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"d14c7e72d68791f89b1c0ca6e751f9185117fe341ecbaacd43c074c7e691efc8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): crates/jcode-provider-copilot/src/lib.rs:78-87 | crates/jcode-provider-openai/src/request.rs:201-210 | crates/jcode-provider-openrouter/src/request.rs:81-90 \u2014 before extracting anything, compare \u0060crates/jcode-provider-copilot/src/lib.rs\u0060 and \u0060crates/jcode-provider-openrouter/src/request.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-copilot/src/lib.rs"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"22ee32563d0227c0d84c34382c08efecde6db5a1aad57fb213c7502b7ca08dbe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/jcode-setup-hints/src/lib.rs:874-882 | crates/jcode-setup-hints/src/lib.rs:1144-1152 | crates/jcode-setup-hints/src/lib.rs:1417-1425 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/lib.rs"},"region":{"startLine":874}}}],"partialFingerprints":{"codehealthFindingId/v1":"a80e72b0992bba7c5b59e03185b4545d7e2edfc5f64119be36f714de1841fd7b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/jcode-tui/src/tui/app/hotkey_feedback.rs:651-658 | crates/jcode-tui/src/tui/app/shortcut_hints.rs:144-151 | crates/jcode-tui/src/tui/app/swarm_hint.rs:43-50 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/hotkey_feedback.rs:651\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060state\u0060 to \u0060\u0026HotkeyUsageState\u0060 in one and \u0060\u0026ProficiencyState\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/hotkey_feedback.rs"},"region":{"startLine":651}}}],"partialFingerprints":{"codehealthFindingId/v1":"347c8d4f8a495ab825888267698e77041104692e85aea12cfeadf2b89d0a2033"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 3): crates/jcode-tui/src/tui/app/turn.rs:182-195 | crates/jcode-tui/src/tui/app/turn.rs:377-391 | crates/jcode-tui/src/tui/app/turn.rs:1483-1496 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/turn.rs:182\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/turn.rs"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c968330fef470746ff2f76596a10316e9b9f6ebe32980a5f575e427eb1f7b81"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/jcode-tui/src/tui/ui_input.rs:2332-2339 | crates/jcode-tui/src/tui/ui_overlays.rs:108-115 | crates/jcode-tui/src/tui/ui_viewport.rs:916-923 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_input.rs:2332\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_input.rs"},"region":{"startLine":2332}}}],"partialFingerprints":{"codehealthFindingId/v1":"4534344c48359f787a014271f5803b8d13214fc5699016378e4124ef95c7177e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-app-core/src/server/client_api.rs:109-116 | crates/jcode-app-core/src/server/client_api.rs:151-158 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/client_api.rs:151\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-app-core/src/server/client_api.rs:104\u0060 calls \u0060Ok\u0060, \u0060read_event\u0060 and \u0060crates/jcode-app-core/src/server/client_api.rs:149\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_api.rs"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2d4e37edbeca4adba595787bcba492528a5b7ef3ba2b77aa67b15afdd685a28"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-app-core/src/server/client_lifecycle.rs:1099-1106 | crates/jcode-app-core/src/server/request_watchdog.rs:86-93 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/client_lifecycle.rs:1099\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_lifecycle.rs"},"region":{"startLine":1099}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9cb81c8f805ea8f5eb41f662d4b29ac3f84e0c070fe28fac1077b6ff9a0c4a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-app-core/src/server/client_state.rs:904-911 | crates/jcode-app-core/src/server/client_state.rs:1229-1236 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_state.rs"},"region":{"startLine":904}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7709059232a3492dd0534114da026a609e115f9ee151fbb5bf7b4f2b8e37955"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-app-core/src/server/comm_control.rs:241-248 | crates/jcode-app-core/src/server/comm_control.rs:386-393 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/comm_control.rs:241\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-app-core/src/server/comm_control.rs:394\u0060 calls \u0060then_with\u0060, \u0060cmp\u0060 and \u0060crates/jcode-app-core/src/server/comm_control.rs:249\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_control.rs"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"c60cbd613a257b44a0c693652f12768cd4ae1fea56ec8747eb0a24dc9275685f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): crates/jcode-app-core/src/server/debug.rs:344-351 | crates/jcode-companion/src/server.rs:422-428 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/debug.rs:344\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug.rs"},"region":{"startLine":344}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe929fdefb86ed4d9c75fb5e6d9cbd2cdbdda44ec08bf4ece8e06181247fd0da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-app-core/src/server/debug_server_state.rs:863-870 | crates/jcode-app-core/src/server/debug_server_state.rs:917-925 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/debug_server_state.rs:863\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_server_state.rs"},"region":{"startLine":863}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a0fd648c45c42f2fc63e5e910352e122c8ae3a6287ec8fa3b535f7ab7e12874"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-app-core/src/server/debug_server_state.rs:916-923 | crates/jcode-app-core/src/server/debug_server_state.rs:932-939 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/debug_server_state.rs:916\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_server_state.rs"},"region":{"startLine":916}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ca00ab5ac10ece8bb372dd28c1b24e8a576921ed4757613ac2c0dfe86c9ff3d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-app-core/src/server/file_activity.rs:12-19 | crates/jcode-app-core/src/server/file_activity.rs:24-31 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/file_activity.rs"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a2ac5206c297d1998550d836c88bdc0b238af74e6b663cd8c9bc66b4949c2d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-app-core/src/server/live_turn.rs:250-257 | crates/jcode-app-core/src/server/live_turn.rs:272-279 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/live_turn.rs:250\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/live_turn.rs"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"e57aea89f48cecadd1f40aaef3a6dff7b81de28300c04192d5ff2d4e9cfb1d3f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-app-core/src/server/provider_control.rs:379-386 | crates/jcode-tui/src/tui/app/model_context.rs:118-125 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/provider_control.rs:379\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/provider_control.rs"},"region":{"startLine":379}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3479ac7b1af93f70b3832d21a49f24b228b0b44bd2328b24223d04f9cc768b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): crates/jcode-app-core/src/server/provider_control.rs:392-399 | crates/jcode-tui/src/tui/app/model_context.rs:133-139 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/provider_control.rs"},"region":{"startLine":392}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b080e754e0d4a37fda5dc7b9ac4a31704b4bad3764edb56f3fd3b986d0c170d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20138 lines \u00D7 2): crates/jcode-app-core/src/server/runtime_ssh_accounts.rs:171-176 | crates/jcode-tui/src/tui/app/usage_reset.rs:239-246 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/runtime_ssh_accounts.rs"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"14181dae0ff427fcd17a16ee7499bbfeb7591dbc5f9a6ddb238cbeee5f554eb8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-app-core/src/server/socket.rs:292-299 | src/cli/dispatch.rs:1108-1115 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/socket.rs:292\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/socket.rs"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf72ff837a60edc4f89be7ef4780d7d3efe138ff164151d30641bb96a85593d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-app-core/src/tool/bash.rs:1317-1324 | crates/jcode-app-core/src/tool/bash.rs:1330-1337 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/bash.rs:1317\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/bash.rs"},"region":{"startLine":1317}}}],"partialFingerprints":{"codehealthFindingId/v1":"86bb482ab06ae3aaae9d196b318b62db3fa44b4c0f15ff5500605d15002bc98d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-app-core/src/tool/webfetch.rs:331-338 | crates/jcode-app-core/src/tool/webfetch.rs:435-442 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-app-core/src/tool/webfetch.rs:444\u0060 calls \u0060Some\u0060, \u0060empty_bullets\u0060, \u0060replace_all\u0060 and \u0060crates/jcode-app-core/src/tool/webfetch.rs:340\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/webfetch.rs"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"7feda4e23be4772a3007ac5e59b2102ad4596bcf0f9c40e20f9c9ea3d9047775"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-base/src/auth/claude.rs:448-455 | crates/jcode-base/src/auth/claude.rs:478-485 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/auth/claude.rs:448\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/claude.rs"},"region":{"startLine":448}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b47a868e9aac07ab8c66015db2401f98e73cbd1080e90c618336ed88ddbaabc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-base/src/auth/codex.rs:315-322 | crates/jcode-base/src/auth/codex.rs:350-357 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/auth/codex.rs:315\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/codex.rs"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"937b421161200603d210ba18d027ee90cb756ed2ac030d2fc17097a885ef3e1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-base/src/cache_tracker.rs:105-112 | crates/jcode-base/src/cache_tracker.rs:177-184 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/cache_tracker.rs"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"a278c5178026d2b007c059fb5379db9840bde33eda40ea47d2a9fcd11ebd4701"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-base/src/companion_client.rs:94-101 | crates/jcode-base/src/companion_client.rs:105-112 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/companion_client.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"9820b32b635b19f3d3d5d96606b75719d5940fe48ce3402045a768654a1d2068"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-base/src/mcp/manager.rs:532-539 | crates/jcode-base/src/mcp/manager.rs:561-568 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mcp/manager.rs"},"region":{"startLine":532}}}],"partialFingerprints":{"codehealthFindingId/v1":"f15687b47b41429e720b91f76f0a29f397590c6e50175adc24205db342152e60"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): crates/jcode-base/src/memory_log.rs:416-422 | crates/jcode-logging/src/lib.rs:611-618 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/memory_log.rs:416\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory_log.rs"},"region":{"startLine":416}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6d3df51ff35453ee6993f1cd3cb81b353ce5004f38807cef1465bc8697c5c85"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-base/src/runtime_memory_log.rs:636-643 | crates/jcode-base/src/runtime_memory_log.rs:663-670 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/runtime_memory_log.rs"},"region":{"startLine":636}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2ebda1569afc3d675e5bbfe4e8af637313adfc44292a9410c3ec5a5a6017099"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-base/src/scratch_maintenance.rs:84-92 | crates/jcode-build-support/src/version_gc.rs:150-158 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/scratch_maintenance.rs"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6e1c96d60ab300942e352a5bdfd43134b472783a5a97dedc4a1dd13e2b6a65f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-base/src/subscription_api.rs:290-297 | crates/jcode-base/src/subscription_api.rs:432-439 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/subscription_api.rs:290\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/subscription_api.rs"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d6b994983843511859dcf8a8eccbdde4d9844df52d2be7487cda4b18d92e67a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-base/src/usage/api_keys.rs:143-150 | crates/jcode-base/src/usage/api_keys.rs:183-190 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/usage/api_keys.rs:143\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/api_keys.rs"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"80984942aa528f46654092695baf8c2da8daae9179e10c11ef4bca7ae14188fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-companion/src/server.rs:423-430 | src/cli/acp.rs:411-419 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-companion/src/server.rs:423\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-companion/src/server.rs"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a3885af1dfd2cb634b34952de8fa391603a3e2316f655bcf558e8248ee58245"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-core/src/util.rs:38-47 | crates/jcode-tui/src/tui/app/state_ui_count_format.rs:12-21 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-core/src/util.rs"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"24f6db26d64eb1c3c5375d86e0e5ff01843f6f8710cfb22eaa376571546fa874"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-harness-api-server/src/translate.rs:1883-1890 | crates/jcode-harness-api-server/src/translate.rs:2210-2217 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-harness-api-server/src/translate.rs:1883\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-harness-api-server/src/translate.rs:2218\u0060 calls \u0060session_modified_ms\u0060 and \u0060crates/jcode-harness-api-server/src/translate.rs:1891\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/translate.rs"},"region":{"startLine":1883}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f1525c79171f0aa222c21d7cd5a35d7e44f19c2a5c82d9049d931e85786f496"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-provider-cursor-runtime/src/agent_transport.rs:1287-1294 | crates/jcode-provider-cursor-runtime/src/agent_transport.rs:1361-1368 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-cursor-runtime/src/agent_transport.rs:1287\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/agent_transport.rs"},"region":{"startLine":1287}}}],"partialFingerprints":{"codehealthFindingId/v1":"87398403c2a9ad75156a47700dc368caa1f5e6726ceb4224464d63a6785e8d5f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-provider-cursor-runtime/src/wire.rs:425-432 | crates/jcode-provider-cursor-runtime/src/wire.rs:461-468 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/wire.rs"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab681d0104a21c5fbca8f1c43047ec2219cc5d2d4f61bdb50807c61b6197e30e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-provider-openai-runtime/src/openai_provider_impl.rs:198-205 | crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs:917-924 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_provider_impl.rs"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"0858d1b3a43da794ee71200e418d6929e843b463a76c77c12a83c8c6077a12f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-provider-openai/src/stream.rs:23-30 | crates/jcode-provider-openai/src/websocket_health.rs:64-71 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai/src/stream.rs"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"63d8a921531fe9f1972a4ad17bf89b7a899ba7573eff200f0f42e10b65b82332"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-provider-openrouter-runtime/src/lib.rs:2636-2643 | crates/jcode-provider-openrouter-runtime/src/lib.rs:2708-2715 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/lib.rs"},"region":{"startLine":2636}}}],"partialFingerprints":{"codehealthFindingId/v1":"39151abbaa4942623f59fa62a4c9a619d940db913ca797b59dc4f4c025fff7c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-provider-openrouter-runtime/src/lib.rs:2834-2841 | crates/jcode-provider-openrouter/src/lib.rs:734-741 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-openrouter-runtime/src/lib.rs:2834\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/lib.rs"},"region":{"startLine":2834}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c20e3da088ea1fc468aed83c27ce07c7d1b6e87176240454236bc0f3f43ed53"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): crates/jcode-provider-openrouter/src/lib.rs:529-536 | crates/jcode-provider-openrouter/src/lib.rs:639-645 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter/src/lib.rs"},"region":{"startLine":529}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec9824699905c23bb33a65779b26918781134a043b4fa4ffccd0a1182aa01b11"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): crates/jcode-sdk/src/cloud.rs:177-183 | src/cli/cloud_managed.rs:400-407 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-sdk/src/cloud.rs:177\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060reply\u0060 to \u0060\u0026ConnectReply\u0060 in one and \u0060\u0026Reply\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-sdk/src/cloud.rs"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"89af1fcee455425b8b0c08f5a07dfbfde9eb9d00bbba7a88a5ca8f1983832d1d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-tui-anim/src/lib.rs:596-604 | crates/jcode-tui-style/src/theme_mode.rs:221-229 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-anim/src/lib.rs"},"region":{"startLine":596}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8b727b9025816a79326e20d354214bb1c24c6c4109618ef8d817dcb9000e708"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-tui-markdown/src/markdown_latex_image.rs:423-430 | crates/jcode-voice/src/command_capture.rs:173-180 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-markdown/src/markdown_latex_image.rs:423\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_latex_image.rs"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"175e847d960a243aef7b1b79f266c25b74bf39717628ecc545578168be33c329"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): crates/jcode-tui-render/src/memory_tiles.rs:265-271 | crates/jcode-tui-render/src/memory_tiles.rs:277-284 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-render/src/memory_tiles.rs:265\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/memory_tiles.rs"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6cc5d34dca32178d55972764fe6ea14e38dba538a078162ea895907dac4a707"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-tui-render/src/swarm_gallery.rs:635-642 | crates/jcode-tui-render/src/swarm_gallery.rs:969-976 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-render/src/swarm_gallery.rs:635\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/swarm_gallery.rs"},"region":{"startLine":635}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb931863a03433e180c4cb01f2f963cdc0e77603cf394d6e8767a5e240a69d23"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-tui-render/src/swarm_gallery.rs:1413-1420 | crates/jcode-tui-render/src/swarm_gallery.rs:1509-1516 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-render/src/swarm_gallery.rs:1413\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/swarm_gallery.rs"},"region":{"startLine":1413}}}],"partialFingerprints":{"codehealthFindingId/v1":"c190125a85457441cd5a052f4ff670345c20504e0d83db64223a59ab6568b56c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-tui/src/tui/app/auth_account_picker.rs:1035-1042 | crates/jcode-tui/src/tui/app/remote/key_handling.rs:207-214 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/auth_account_picker.rs:1035\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060self\u0060 to \u0060crate) fn handle_account_picker_command( \u0026mut\u0060 in one and \u0060super) async fn handle_account_picker_command_remote( \u0026mut\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker.rs"},"region":{"startLine":1035}}}],"partialFingerprints":{"codehealthFindingId/v1":"342d7eea176939b60aeb892a8b0325e35f3c7df633fb21144cbf1355463726ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-tui/src/tui/app/helpers.rs:1359-1366 | crates/jcode-tui/src/tui/app/helpers.rs:1368-1375 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/helpers.rs:1359\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/helpers.rs"},"region":{"startLine":1359}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9e71ee92760d25f8f31ae189b64f03109e073ea9201349d7b6ce59914029d70"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): crates/jcode-tui/src/tui/app/inline_interactive.rs:3637-3644 | crates/jcode-tui/src/tui/app/inline_interactive.rs:3682-3688 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/inline_interactive.rs:3637\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":3637}}}],"partialFingerprints":{"codehealthFindingId/v1":"617ae2ea0b11c0f7a91cd21d36c9cf7335fe5ba575653d34b847e1c868706ff7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote.rs:1216-1223 | crates/jcode-tui/src/tui/app/remote.rs:1991-1998 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/remote.rs:1216\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-tui/src/tui/app/remote.rs:1214\u0060 calls \u0060flush\u0060, \u0060apply_stream_ops\u0060 and \u0060crates/jcode-tui/src/tui/app/remote.rs:1990\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote.rs"},"region":{"startLine":1216}}}],"partialFingerprints":{"codehealthFindingId/v1":"ece04a14e23ad1687b247ec0430b3da22cfbd40fdeaa6c18ae0faf42eaf55827"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote.rs:2337-2344 | crates/jcode-tui/src/tui/app/remote/key_handling/key_events.rs:782-789 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/app/remote.rs\u0060 and \u0060crates/jcode-tui/src/tui/app/remote/key_handling/key_events.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/remote.rs:2337\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote.rs"},"region":{"startLine":2337}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3136080eba71b2da0d164853511ceaf37c1a909a8408f733757c8d926467753"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote/key_handling.rs:739-746 | crates/jcode-tui/src/tui/app/remote/key_handling.rs:764-770 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/remote/key_handling.rs:739\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/key_handling.rs"},"region":{"startLine":739}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4233f531dee501388ca616ff422d617c13d39da0a886dea49303f874d86110c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote/server_events.rs:2151-2158 | crates/jcode-tui/src/tui/app/remote/server_events.rs:2623-2630 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/server_events.rs"},"region":{"startLine":2151}}}],"partialFingerprints":{"codehealthFindingId/v1":"55956f0eab374b8b7a51b528f87c17ba738fed8c90853950fd3c4b07ab6dc77e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-tui/src/tui/app/run_shell.rs:760-767 | crates/jcode-tui/src/tui/app/run_shell.rs:909-916 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-tui/src/tui/app/run_shell.rs:921\u0060 calls \u0060from_millis\u0060 and \u0060crates/jcode-tui/src/tui/app/run_shell.rs:768\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/run_shell.rs"},"region":{"startLine":760}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e3db5c8a8362ce3c408055cd6845d0cd66f677ae74fc1dfbd5929f918a08122"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-tui/src/tui/ui_diagram_pane.rs:704-711 | crates/jcode-tui/src/tui/ui_pinned_layout.rs:344-351 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_diagram_pane.rs"},"region":{"startLine":704}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b39042d2fe6569917e82899a10dea48c794c342ee62304283575b787c9b03f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-tui/src/tui/ui_input.rs:1285-1292 | crates/jcode-tui/src/tui/ui_viewport.rs:859-866 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_input.rs:1285\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_input.rs"},"region":{"startLine":1285}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb5a28843ffbd8ec704e5c91e5cdd500de101a7f8e3336650d5c4e9eb9323ac1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-tui/src/tui/ui_messages.rs:628-635 | crates/jcode-tui/src/tui/ui_messages.rs:3167-3174 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":628}}}],"partialFingerprints":{"codehealthFindingId/v1":"eba97e75e8a03658ad41c857eea5aab0a11ee4f39787e4d750c842dc02409210"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-tui/src/tui/ui_messages.rs:4221-4230 | crates/jcode-tui/src/tui/ui_tools.rs:1640-1649 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_messages.rs:4221\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":4221}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ece2586180839642de6815a3746a796909c6139ed00d537f42ce05b0f124162"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-tui/src/tui/ui_pinned.rs:1001-1008 | crates/jcode-tui/src/tui/ui_pinned.rs:1144-1151 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_pinned.rs:1001\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_pinned.rs"},"region":{"startLine":1001}}}],"partialFingerprints":{"codehealthFindingId/v1":"0690b485591dfd3c87027428c31a4523f1675a2cfad1e76ab507f66e77681c62"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-tui/src/tui/ui_prepare.rs:863-870 | crates/jcode-tui/src/tui/ui_tests/basic/frame_flicker.rs:282-290 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_prepare.rs:863\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_prepare.rs"},"region":{"startLine":863}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b501615ebbc4968a0427f6ad511834fe6fbbfc9a1532bbd758eb285585fe2dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-tui/src/tui/ui_prepare.rs:2657-2665 | crates/jcode-tui/src/tui/ui_prepare.rs:2778-2786 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-tui/src/tui/ui_prepare.rs:2788\u0060 calls \u0060with_capacity\u0060 and \u0060crates/jcode-tui/src/tui/ui_prepare.rs:2667\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_prepare.rs"},"region":{"startLine":2657}}}],"partialFingerprints":{"codehealthFindingId/v1":"23be0e1b6cbb4a96afbee036d62dd74ca336de3c799bff1f82c46c0fc045503d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-tui/src/tui/ui_tools.rs:638-645 | crates/jcode-tui/src/tui/ui_tools.rs:650-657 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_tools.rs:638\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tools.rs"},"region":{"startLine":638}}}],"partialFingerprints":{"codehealthFindingId/v1":"9193c27213f9ed5c182e87ee7a1afe4e9867bdc6cb35807f030947c839f67480"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-tui/src/tui/ui_tools/patch_summary.rs:43-50 | crates/jcode-tui/src/tui/ui_tools/patch_summary.rs:70-77 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_tools/patch_summary.rs:43\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tools/patch_summary.rs"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"811a7f461b3703d981b521ed67b756c9ebc2aae9fda5b8107324f37b5da916ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-tui/src/video_export.rs:409-416 | crates/jcode-tui/src/video_export.rs:419-426 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/video_export.rs:409\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/video_export.rs"},"region":{"startLine":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4d47088e539df504350011e75e3dad516ac30d2099c0c25dbb581ebffb26c28"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-voice/src/global/hotkey.rs:150-157 | crates/jcode-voice/src/global/hotkey.rs:561-568 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-voice/src/global/hotkey.rs:150\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-voice/src/global/hotkey.rs"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"d13b3cb2c03ce977e1dd2b74f1ee77e0dfa23dad7385aac859ae89a47b07a2f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src/bin/memory_recall_bench.rs:447-454 | src/bin/memory_recall_bench.rs:2191-2198 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":447}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b4ded14cdba095d8648e82d76ce5e36145fcd7da24b1ae21743f1badc428cdb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src/cli/commands.rs:1841-1848 | src/cli/commands.rs:1851-1858 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/cli/commands.rs:1841\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":1841}}}],"partialFingerprints":{"codehealthFindingId/v1":"973267ee0f69ddfbf1318787ccdfffb6db70218dfa1547166fdc460f977648d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): src/cli/login.rs:1113-1119 | src/cli/login/scriptable.rs:652-659 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/cli/login.rs:1113\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/login.rs"},"region":{"startLine":1113}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f152d21bf45fb06d44b75a5dfa2a6131b214fec6cc7907fc80e7a6a6138b254"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): src/cli/tui_launch.rs:736-743 | src/cli/tui_launch.rs:769-776 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/cli/tui_launch.rs:736\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/tui_launch.rs"},"region":{"startLine":736}}}],"partialFingerprints":{"codehealthFindingId/v1":"adb1a6364cb423303b1acf429f9ed1cd1e13295dd80869385b0f24110215721a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 6): crates/jcode-provider-cursor-runtime/src/wire.rs:715-721 | crates/jcode-provider-cursor-runtime/src/wire.rs:856-862 | crates/jcode-provider-cursor-runtime/src/wire.rs:878-884 | crates/jcode-provider-cursor-runtime/src/wire.rs:897-903 | crates/jcode-provider-cursor-runtime/src/wire.rs:923-929 | crates/jcode-provider-cursor-runtime/src/wire.rs:941-947 \u2014 all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-cursor-runtime/src/wire.rs:715\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/wire.rs"},"region":{"startLine":715}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac0cbfa3371d3fc506392b8fc8dbf9caeed830975635a956c18758fd84988c22"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 6): crates/jcode-tui-account-picker/src/overlay.rs:508-514 | crates/jcode-tui-account-picker/src/overlay.rs:584-590 | crates/jcode-tui-usage-overlay/src/lib.rs:513-519 | crates/jcode-tui-usage-overlay/src/lib.rs:598-604 | crates/jcode-tui/src/tui/login_picker.rs:414-420 | crates/jcode-tui/src/tui/login_picker.rs:477-483 \u2014 before extracting anything, compare \u0060crates/jcode-tui-account-picker/src/overlay.rs\u0060 and \u0060crates/jcode-tui-usage-overlay/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay.rs"},"region":{"startLine":508}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a30a92869d6c0c82a7e8e0d731dae6224e6c56a0ed9f20bbadc3eeb9fca4047"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 6): crates/jcode-tui/src/tui/ui_messages.rs:630-636 | crates/jcode-tui/src/tui/ui_messages.rs:2545-2551 | crates/jcode-tui/src/tui/ui_messages.rs:2689-2695 | crates/jcode-tui/src/tui/ui_messages.rs:2952-2958 | crates/jcode-tui/src/tui/ui_messages.rs:3169-3175 | crates/jcode-tui/src/tui/ui_messages/connection.rs:59-65 \u2014 there are 6 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":630}}}],"partialFingerprints":{"codehealthFindingId/v1":"88ceb86569798cbe04d4d110b86dd2971a31537efd731150ec614538e72107d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): crates/jcode-tui-account-picker/src/overlay.rs:462-468 | crates/jcode-tui-account-picker/src/overlay.rs:587-593 | crates/jcode-tui-usage-overlay/src/lib.rs:444-450 | crates/jcode-tui/src/tui/login_picker.rs:350-356 | crates/jcode-tui/src/tui/login_picker.rs:480-486 \u2014 before extracting anything, compare \u0060crates/jcode-tui-account-picker/src/overlay.rs\u0060 and \u0060crates/jcode-tui-usage-overlay/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-account-picker/src/overlay.rs:462\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay.rs"},"region":{"startLine":462}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b81fc6a4ee4e6906aea38b6aa9dbe918d8ca909b558f1fe2d1998ca18b4bd37"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 4): crates/jcode-base/src/auth/google.rs:389-395 | crates/jcode-base/src/auth/oauth.rs:223-228 | crates/jcode-base/src/auth/oauth.rs:254-260 | crates/jcode-base/src/auth/oauth.rs:741-746 \u2014 there are 4 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/auth/google.rs:389\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/google.rs"},"region":{"startLine":389}}}],"partialFingerprints":{"codehealthFindingId/v1":"a73693a2461497db2c808d810f5baa98eab8857c5f14ea60da9235657ca7b711"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): crates/jcode-tui/src/tui/app/auth_account_picker.rs:651-657 | crates/jcode-tui/src/tui/app/auth_account_picker.rs:686-692 | crates/jcode-tui/src/tui/app/auth_account_picker.rs:840-846 | crates/jcode-tui/src/tui/app/auth_account_picker.rs:969-975 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/auth_account_picker.rs:651\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker.rs"},"region":{"startLine":651}}}],"partialFingerprints":{"codehealthFindingId/v1":"a72393d4664e8a431005e98c35daee8b941c67476c16ce4ec03bfd1eb198f347"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/jcode-base/src/auth/codex.rs:542-548 | crates/jcode-base/src/auth/codex.rs:555-561 | crates/jcode-base/src/auth/codex.rs:573-579 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/codex.rs"},"region":{"startLine":542}}}],"partialFingerprints":{"codehealthFindingId/v1":"d969f3bd1742d16c7e835e1bf6030e9ad20334863505bbd3a985b954becf3bda"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/jcode-provider-bedrock/src/lib.rs:420-426 | crates/jcode-schema-dialect/src/dialect.rs:368-374 | crates/jcode-schema-dialect/src/dialect.rs:544-550 \u2014 before extracting anything, compare \u0060crates/jcode-provider-bedrock/src/lib.rs\u0060 and \u0060crates/jcode-schema-dialect/src/dialect.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-bedrock/src/lib.rs:420\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-bedrock/src/lib.rs"},"region":{"startLine":420}}}],"partialFingerprints":{"codehealthFindingId/v1":"1981053f66c9b094c60c2a7cb484ab1e69afdb474ae198a803d650721c73752a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/jcode-render-core/src/markdown.rs:199-205 | crates/jcode-tui-markdown/src/markdown_render_full.rs:82-88 | crates/jcode-tui-markdown/src/markdown_render_lazy.rs:70-76 \u2014 before extracting anything, compare \u0060crates/jcode-tui-markdown/src/markdown_render_full.rs\u0060 and \u0060crates/jcode-tui-markdown/src/markdown_render_lazy.rs\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 868 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/markdown.rs"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"981a7948e8d20b03f4e76e2e7a9f7648cfd19c48ff382aa9e6023b452ef162ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/jcode-tui/src/tui/app/turn.rs:429-435 | crates/jcode-tui/src/tui/app/turn.rs:488-494 | crates/jcode-tui/src/tui/app/turn.rs:1502-1508 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/turn.rs:429\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-tui/src/tui/app/turn.rs:437\u0060 calls \u0060display_turn_duration_secs\u0060 and \u0060crates/jcode-tui/src/tui/app/turn.rs:496\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/turn.rs"},"region":{"startLine":429}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5b30d0d967d4cb754b868e93042fc20b4a054c8f4b590e08488123280d3206a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-app-core/src/replay.rs:773-779 | crates/jcode-app-core/src/replay.rs:798-804 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/replay.rs"},"region":{"startLine":773}}}],"partialFingerprints":{"codehealthFindingId/v1":"889e89dd4115ec0bb21d8f3b33bdbe0572878892caec6f34e20a6856140a48fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-app-core/src/server/client_actions.rs:210-216 | crates/jcode-tui/src/tui/app/input/shell_commands.rs:52-59 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_actions.rs"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"8225eb21c1713650b6bfed3bc31bfb239486bf151e56b1fb29ec34ee2db59582"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-app-core/src/server/client_actions.rs:846-852 | crates/jcode-app-core/src/tool/selfdev/launch.rs:21-27 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_actions.rs"},"region":{"startLine":846}}}],"partialFingerprints":{"codehealthFindingId/v1":"f760573f0a60d66ba64df09cfb147ce3c3d407ff614a54a2820f5b451e58334a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-app-core/src/server/client_api.rs:127-134 | crates/jcode-app-core/src/server/client_api.rs:186-192 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/client_api.rs:127\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_api.rs"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2bc28a28fef4590c46a70c2b765a2ade1fcdab70bc6a514eed770b6a593c8e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-app-core/src/server/client_session.rs:817-823 | crates/jcode-app-core/src/server/swarm.rs:1286-1292 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/client_session.rs:817\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_session.rs"},"region":{"startLine":817}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf55352cd9fb8235b9031ac303527903599144822643686963b6bb7e5e16e250"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-app-core/src/server/client_state.rs:860-866 | crates/jcode-app-core/src/server/client_state.rs:1204-1210 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_state.rs"},"region":{"startLine":860}}}],"partialFingerprints":{"codehealthFindingId/v1":"842c20ccd0d2410895b55c9e01954b36f45079cfcd788e7b9d8f5731ee18e5d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-app-core/src/server/debug_swarm_write.rs:45-51 | crates/jcode-app-core/src/server/debug_swarm_write.rs:80-86 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_swarm_write.rs"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fea9af0fe774948c350175271c17d6b1324a5de8f452392deb7061508dc3c3f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-app-core/src/server/history_paging.rs:95-101 | crates/jcode-app-core/src/server/history_timing.rs:110-116 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/history_paging.rs:95\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/history_paging.rs"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"088e3e07396ac850298887ab00edc8843ef28ad39022fcc3268ae855a5bd9369"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-app-core/src/server/jade_relay.rs:333-339 | crates/jcode-app-core/src/server/jade_relay.rs:687-693 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/jade_relay.rs:333\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/jade_relay.rs"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e69730c4682f036994dd810eb4e16147de6d377734c101450abcc90b0919a86"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-app-core/src/server/runtime_ssh_host.rs:322-328 | crates/jcode-telemetry-core/src/usage_outbox.rs:75-81 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/runtime_ssh_host.rs"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"3db24927e4d2200eae5ef9107849367d1ab51413c11314f5258a023b6f72b49f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-app-core/src/session_active_pids.rs:22-32 | crates/jcode-storage/src/active_pids.rs:190-200 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/session_active_pids.rs\u0060 and \u0060crates/jcode-storage/src/active_pids.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/session_active_pids.rs"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d9e4be08b678aa4e85b8f5eebfc482cf9718661afafc7d724354b9a66c890da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-app-core/src/session_launch.rs:661-667 | crates/jcode-app-core/src/session_launch.rs:786-792 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/session_launch.rs"},"region":{"startLine":661}}}],"partialFingerprints":{"codehealthFindingId/v1":"3546cc3c69f56bae2981cc4ac23003115a60a068a669d91be9392c0abea2c41f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-app-core/src/telemetry_state.rs:293-299 | crates/jcode-telemetry-core/src/state_support.rs:342-348 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/telemetry_state.rs\u0060 and \u0060crates/jcode-telemetry-core/src/state_support.rs\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/telemetry_state.rs"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"a922fe430d83e75aab4a1aa7659ac7aabe145738cd6e4496d1202df068323b6d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-app-core/src/telemetry_state.rs:317-326 | crates/jcode-telemetry-core/src/state_support.rs:384-393 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/telemetry_state.rs\u0060 and \u0060crates/jcode-telemetry-core/src/state_support.rs\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/telemetry_state.rs"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"97e7f570bf490a212eb608e5a2f787875a4044ef3364c7271af6c1220f630a70"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-app-core/src/tool/apply_patch.rs:628-634 | crates/jcode-app-core/src/tool/apply_patch.rs:641-647 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/apply_patch.rs:628\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/apply_patch.rs"},"region":{"startLine":628}}}],"partialFingerprints":{"codehealthFindingId/v1":"73f0a4eebc006db7e8e25a913dff55f6622a9c4283fb917e334e5425b4e631c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-base/src/compaction.rs:953-959 | crates/jcode-base/src/compaction.rs:1169-1175 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/compaction.rs:953\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/compaction.rs"},"region":{"startLine":953}}}],"partialFingerprints":{"codehealthFindingId/v1":"f761e3833f0c66f7addf5ca00b6787bba28169b06f8af9bc9b45bf47b0bdeab1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-base/src/gmail.rs:401-407 | crates/jcode-base/src/google_calendar.rs:134-140 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/gmail.rs:401\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/gmail.rs"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"0dcceb796e636f87342131a48a760dda8c8e49260e4419cfcb780b2a30580bef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-base/src/import.rs:1383-1389 | crates/jcode-tui/src/tui/session_picker/loading.rs:2669-2675 \u2014 before extracting anything, compare \u0060crates/jcode-base/src/import.rs\u0060 and \u0060crates/jcode-tui/src/tui/session_picker/loading.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/import.rs"},"region":{"startLine":1383}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a443417eb02b09008fede7ae1f7cd48bd42027755326849a8c54cdeabb193a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-base/src/jev.rs:560-568 | crates/jcode-base/src/jev/laya.rs:21-27 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/jev.rs:560\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/jev.rs"},"region":{"startLine":560}}}],"partialFingerprints":{"codehealthFindingId/v1":"49a9227afafea7e93554b9019cd22035754a30551a583ebe42b95ef4748e539d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-base/src/provider_catalog.rs:971-981 | crates/jcode-base/src/provider_catalog.rs:1112-1118 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/provider_catalog.rs:971\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider_catalog.rs"},"region":{"startLine":971}}}],"partialFingerprints":{"codehealthFindingId/v1":"126011b6b0492933da6eb19fa657229bc911715d536706df21154d91c58265b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 2): crates/jcode-base/src/recent_session_index.rs:150-155 | crates/jcode-harness-api-server/src/translate.rs:3248-3254 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/recent_session_index.rs:150\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/recent_session_index.rs"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a1a357f55835acfb696336e2ab659a68433f20949125dd664cc1f3c59c1016b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-base/src/session/persistence.rs:220-226 | crates/jcode-tui/src/tui/session_picker/loading.rs:1686-1692 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/session/persistence.rs:220\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/persistence.rs"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bdf573cc7711b9b8e7110fad6d57b4655088cc338493e07d7c5143b46635b82"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-base/src/session/persistence.rs:405-411 | crates/jcode-base/src/session/persistence.rs:560-566 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/persistence.rs"},"region":{"startLine":405}}}],"partialFingerprints":{"codehealthFindingId/v1":"b91aa53683c4f5cfa5eda5cb886ed1ca7ddef6a3541d1697392d3af94d3afc47"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-base/src/subscription_api.rs:670-676 | crates/jcode-base/src/subscription_api.rs:691-697 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/subscription_api.rs:670\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/subscription_api.rs"},"region":{"startLine":670}}}],"partialFingerprints":{"codehealthFindingId/v1":"70329b96ff7e224e866192e6823d30a256e06b90d1525f88d4d3a1887af76687"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-base/src/usage/display.rs:178-184 | crates/jcode-tui-usage-overlay/src/lib.rs:775-781 \u2014 before extracting anything, compare \u0060crates/jcode-base/src/usage/display.rs\u0060 and \u0060crates/jcode-tui-usage-overlay/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/usage/display.rs:178\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/display.rs"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"12a87b6c78be9f23829f430feaa84d3e9e1e647ea05c25abbf90a70ad71c53f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-command-risk/src/lib.rs:241-247 | crates/jcode-command-risk/src/lib.rs:472-479 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-command-risk/src/lib.rs:241\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-command-risk/src/lib.rs"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"cff1059b65d4ceaf252325c3cd8c6c809462eea013d6f882ca9e500c0c4270d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-harness-api/src/sockets.rs:17-23 | crates/jcode-storage/src/lib.rs:111-117 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api/src/sockets.rs"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"91095d93fd1be13f999747cfb7b6b3f0d0a636a489ab7414f7643fe047016d36"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-overnight-core/src/lib.rs:312-318 | src/cli/acp.rs:1939-1945 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-overnight-core/src/lib.rs"},"region":{"startLine":312}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c27f4affbd35061f98a71745a32b044f683f27b18f12634cbba338ce022d15d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-provider-anthropic/src/lib.rs:345-351 | crates/jcode-provider-anthropic/src/lib.rs:403-409 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic/src/lib.rs"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"e04dd15168bd5c2ebe855acba4f5a07763164414539c90eb81a2185394fba6bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-provider-core/src/auth_mode.rs:215-221 | crates/jcode-provider-core/src/auth_mode.rs:234-240 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/auth_mode.rs"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e7fb3ace08f69eee221dff0c7b9a947bec8e4187a1db3f9a566292b79ba4405"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-provider-doctor/src/live_provider_probes.rs:176-182 | crates/jcode-provider-doctor/src/live_provider_probes.rs:245-251 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-doctor/src/live_provider_probes.rs:176\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/live_provider_probes.rs"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8d401cdaa2dabd32b7bc04c86952ab92af45067bf0bbbf06877788234da5b32"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs:1178-1190 | crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs:1684-1696 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs:1178\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs"},"region":{"startLine":1178}}}],"partialFingerprints":{"codehealthFindingId/v1":"97902cb2315975d727e384a7d321bf25bb5022b8ba939e2ae89701ff219e3300"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-provider-openai/src/stream.rs:1038-1044 | crates/jcode-provider-openrouter/src/stream.rs:549-555 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-openai/src/stream.rs:1038\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai/src/stream.rs"},"region":{"startLine":1038}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdcffaf60aa2bf25be1e51741b6f4a3cc88162c1d484dd3370ef23011cd36082"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-provider-openrouter-runtime/src/lib.rs:1417-1423 | crates/jcode-provider-openrouter-runtime/src/lib.rs:1432-1438 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-openrouter-runtime/src/lib.rs:1417\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/lib.rs"},"region":{"startLine":1417}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2304b8751e7a89b5a7aca1d4e5eb05909c722b86ffc1aec8c59453308137a50"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-telemetry-core/src/lib.rs:2507-2513 | crates/jcode-telemetry-core/src/lib.rs:2516-2522 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lib.rs"},"region":{"startLine":2507}}}],"partialFingerprints":{"codehealthFindingId/v1":"192ab85b7691997a0be3263649d14be724719d2abf8d8b5687f2a11624c7dbdf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-tui-markdown/src/markdown_render_support.rs:484-490 | crates/jcode-tui-markdown/src/markdown_render_support.rs:507-513 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_support.rs"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"63522926172047d4c3b48a90ecbb17e7dd3e5c1fbed31432c3cad7480603e5b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-tui/src/swarm_compose.rs:87-96 | crates/jcode-tui/src/tui/app/replay.rs:395-404 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-tui/src/swarm_compose.rs:83\u0060 calls \u0060or_else\u0060, \u0060first\u0060 and \u0060crates/jcode-tui/src/tui/app/replay.rs:391\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/swarm_compose.rs"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b601649250eac22b15eca41dd6607c5e5f83f67ccd86534d229a8ccdda8517f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-tui/src/tui/app/auth.rs:950-956 | crates/jcode-tui/src/tui/app/auth.rs:1206-1212 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-tui/src/tui/app/auth.rs:1205\u0060 calls \u0060redirect_uri\u0060 and \u0060crates/jcode-tui/src/tui/app/auth.rs:948\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth.rs"},"region":{"startLine":950}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d4221199422ad78e00a334d93beed9ffa7d3b6c8e22bd30db45d5a9f99c8303"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-tui/src/tui/app/auth.rs:3113-3119 | crates/jcode-tui/src/tui/app/auth.rs:3159-3165 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/auth.rs:3113\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth.rs"},"region":{"startLine":3113}}}],"partialFingerprints":{"codehealthFindingId/v1":"aecce8cfbe771bf96396680ef15f05494ac0144383c43d6d9a590c9871b35e25"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-tui/src/tui/app/commands.rs:1952-1958 | crates/jcode-tui/src/tui/app/remote/key_handling.rs:1123-1129 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/app/commands.rs\u0060 and \u0060crates/jcode-tui/src/tui/app/remote/key_handling.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-tui/src/tui/app/remote/key_handling.rs:1121\u0060 calls \u0060set_feature\u0060 and \u0060crates/jcode-tui/src/tui/app/commands.rs:1951\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":1952}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8c1532aeb5ee909746a5e9168cef4d049c91652130683197187d504aaa785b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-tui/src/tui/app/debug.rs:5-11 | src/bin/tui_bench.rs:42-48 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug.rs"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa5fd1502a253c327d47249eecbbaa31c72b8658c0a00e750061546e4b048b7b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-tui/src/tui/app/input.rs:2261-2267 | crates/jcode-tui/src/tui/app/remote/key_handling/key_events.rs:551-557 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/input.rs:2261\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":2261}}}],"partialFingerprints":{"codehealthFindingId/v1":"6201d51bc61ae97df6da795521ede3d4fee8af01a39b14a29d9366931927fd24"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-tui/src/tui/app/input.rs:4182-4188 | crates/jcode-tui/src/tui/app/input.rs:4265-4271 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":4182}}}],"partialFingerprints":{"codehealthFindingId/v1":"f85d905da6d249c27f3abf57323da5ae5bfc98f70a6373d2537d12fda83708fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-tui/src/tui/app/model_context_commands.rs:218-224 | crates/jcode-tui/src/tui/app/remote/key_handling.rs:804-810 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/model_context_commands.rs:218\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/model_context_commands.rs"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"89f67647e2528a6b6a849f51f5cf77a898af83c5681e7cc447859f86c90451a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote.rs:1214-1220 | crates/jcode-tui/src/tui/app/remote/server_events.rs:1053-1059 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/remote.rs:1214\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote.rs"},"region":{"startLine":1214}}}],"partialFingerprints":{"codehealthFindingId/v1":"05d8adde07db4bc6019d8c3fda0dadc558c7c5cb3d459948735e674cf7283d16"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote/key_handling.rs:1616-1622 | crates/jcode-tui/src/tui/app/remote/key_handling.rs:1632-1638 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/key_handling.rs"},"region":{"startLine":1616}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbb5079a7febde1d9bb35576a3712ef8f41f1ae3504fd672898bc30a6bfde0db"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote/server_events.rs:1189-1195 | crates/jcode-tui/src/tui/app/remote/server_events.rs:3034-3040 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/remote/server_events.rs:1189\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/server_events.rs"},"region":{"startLine":1189}}}],"partialFingerprints":{"codehealthFindingId/v1":"9aba9c154bf32de1d112178106a8c6d2ca3bac37410dc35d592e111e9b6496ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-tui/src/tui/login_picker.rs:702-708 | crates/jcode-tui/src/tui/login_picker.rs:777-783 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/login_picker.rs:702\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/login_picker.rs"},"region":{"startLine":702}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e7a5d561129ec287a4d4cc9d4c6e55c2127a76d9d34c1eaef6d0828831bb754"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-tui/src/tui/session_picker/loading.rs:902-908 | crates/jcode-tui/src/tui/session_picker/loading.rs:928-934 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/session_picker/loading.rs:902\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading.rs"},"region":{"startLine":902}}}],"partialFingerprints":{"codehealthFindingId/v1":"c68366241ca38d3be9b816357c363a6db98550b762dd8a3b9edfb4d984d23c77"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): crates/jcode-tui/src/tui/ui_inline.rs:72-84 | crates/jcode-tui/src/tui/ui_inline_interactive.rs:685-696 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_inline.rs:72\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_inline.rs"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf92990d74fd0ed16c8405adb29e72ac57bb477be4de3f68a11ee0c9b807c4c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-tui/src/tui/ui_inline_image.rs:435-441 | crates/jcode-tui/src/tui/ui_inline_image.rs:452-458 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_inline_image.rs:435\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_inline_image.rs"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"19c1d08cc0ab1d905d7bf35721d51f66f877ca2b92acd8832d836d21deb5628b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-tui/src/tui/ui_input.rs:1305-1311 | crates/jcode-tui/src/tui/ui_viewport.rs:868-874 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_input.rs:1305\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_input.rs"},"region":{"startLine":1305}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a36b46fdfceec66cf68f0b6c9336434fcf8f7ec81ae996527e1fca75dcde63c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-tui/src/tui/ui_onboarding.rs:681-687 | crates/jcode-tui/src/tui/ui_prepare.rs:774-780 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_onboarding.rs:681\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_onboarding.rs"},"region":{"startLine":681}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7dfb3666076e4ce37c8ef6bc854d09065acc7abb9e380331b2453f20438b978"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src/bin/memory_recall_bench.rs:2023-2029 | src/bin/memory_recall_bench.rs:2046-2052 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/bin/memory_recall_bench.rs:2023\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":2023}}}],"partialFingerprints":{"codehealthFindingId/v1":"3372335b8cd4604c144540b722a903c69750767ce8fe72acd9b01d4ae8b0821a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): crates/jcode-app-core/src/server/comm_session.rs:37-42 | crates/jcode-app-core/src/server/swarm_persistence.rs:36-41 | crates/jcode-app-core/src/server/swarm_persistence.rs:49-54 | crates/jcode-base/src/usage/flight.rs:16-21 \u2014 there are 4 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/comm_session.rs:37\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_session.rs"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"75a1b2936376fa7d618175ea04083168a2dad8c969c0c774715c511d8b2e00fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): crates/jcode-import-core/src/lib.rs:647-652 | crates/jcode-import-core/src/lib.rs:738-743 | crates/jcode-tui/src/tui/session_picker/loading.rs:2285-2290 | crates/jcode-tui/src/tui/session_picker/loading/pi_sessions.rs:36-41 \u2014 before extracting anything, compare \u0060crates/jcode-import-core/src/lib.rs\u0060 and \u0060crates/jcode-tui/src/tui/session_picker/loading.rs\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-import-core/src/lib.rs"},"region":{"startLine":647}}}],"partialFingerprints":{"codehealthFindingId/v1":"95bdc9cb48d91dfc3303d64ea61977aa447a3f38d6961e18f95e7324d123b44a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): crates/jcode-tui/src/tui/app/remote/key_handling.rs:739-744 | crates/jcode-tui/src/tui/app/remote/key_handling.rs:764-770 | crates/jcode-tui/src/tui/app/remote/key_handling.rs:789-794 | crates/jcode-tui/src/tui/app/remote/key_handling.rs:816-822 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/remote/key_handling.rs:764\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/key_handling.rs"},"region":{"startLine":739}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2799fdee2e6672a45e6d5769c100185cd5aa8cffdbe6838da544d73888f4518"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): crates/jcode-tui/src/tui/ui.rs:2612-2617 | crates/jcode-tui/src/tui/ui.rs:2639-2644 | crates/jcode-tui/src/tui/ui_file_diff.rs:17-22 | crates/jcode-tui/src/tui/ui_pinned_selection.rs:17-22 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/ui_file_diff.rs\u0060 and \u0060crates/jcode-tui/src/tui/ui_pinned_selection.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui.rs"},"region":{"startLine":2612}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc2dafb474806969674d756dba499eb7c436afc3df87f95b487297875e47f365"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/jcode-app-core/src/ambient/runner.rs:441-446 | crates/jcode-app-core/src/server/client_actions.rs:849-854 | crates/jcode-tui/src/tui/app/commands.rs:408-413 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/server/client_actions.rs\u0060 and \u0060crates/jcode-tui/src/tui/app/commands.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060parent\u0060 to \u0060\u0026Session\u0060 in one and \u0060\u0026crate::session::Session\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/ambient/runner.rs"},"region":{"startLine":441}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1684fed05926daab9e9613f7b59cb7e3335ec18036a5626c149492e95306379"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/jcode-provider-doctor/src/live_provider_probes.rs:177-182 | crates/jcode-provider-doctor/src/live_provider_probes.rs:246-251 | crates/jcode-provider-doctor/src/live_provider_probes.rs:361-366 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/live_provider_probes.rs"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8dfc3bb524ac68f8b30091d299b913a196e0e5c73704f4eca9ba2da72a65cdf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/jcode-tui/src/tui/app/observe.rs:182-187 | crates/jcode-tui/src/tui/app/split_view.rs:52-57 | crates/jcode-tui/src/tui/app/todos_view.rs:383-388 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/app/observe.rs\u0060 and \u0060crates/jcode-tui/src/tui/app/split_view.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/observe.rs:182\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/observe.rs"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"10e4e87febd759bbd9e57cbd5f8e0b5d59b5eba56ee530daf6a607edfeb1a20b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/jcode-tui/src/tui/ui_inline_image.rs:1097-1102 | crates/jcode-tui/src/tui/ui_inline_image.rs:1117-1122 | crates/jcode-tui/src/tui/ui_prepare.rs:237-242 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_inline_image.rs"},"region":{"startLine":1097}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd7a7168d9229985a3cdc4c34a4293d409c88a94ffc747da6569b8bab769f044"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-app-core/src/channel.rs:630-635 | crates/jcode-app-core/src/server/jade_relay.rs:1324-1329 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/channel.rs:630\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/channel.rs"},"region":{"startLine":630}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fa3cfc8334984df4a1f1b2e8a82652be09e035e9f7155a9fa45565180bd0150"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-app-core/src/server/client_actions.rs:842-847 | crates/jcode-tui/src/tui/app/commands.rs:402-407 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/server/client_actions.rs\u0060 and \u0060crates/jcode-tui/src/tui/app/commands.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060parent\u0060 to \u0060\u0026Session\u0060 in one and \u0060\u0026crate::session::Session\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-app-core/src/server/client_actions.rs:849\u0060 calls \u0060clone\u0060 and \u0060crates/jcode-tui/src/tui/app/commands.rs:409\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_actions.rs"},"region":{"startLine":842}}}],"partialFingerprints":{"codehealthFindingId/v1":"8eb8c8f6e9de7eada5e13a6d1e41de23438407e4e47f356694d6c906a251ced7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-app-core/src/server/comm_control.rs:1430-1435 | crates/jcode-app-core/src/server/comm_session.rs:614-619 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_control.rs"},"region":{"startLine":1430}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cbe4190e9dfd410b8da8778cb1bf876afc1fea51c8cf6b30ca51412f478a2fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-app-core/src/server/comm_control.rs:1974-1979 | crates/jcode-app-core/src/server/comm_control.rs:2000-2005 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/comm_control.rs:1974\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_control.rs"},"region":{"startLine":1974}}}],"partialFingerprints":{"codehealthFindingId/v1":"164b1efd71b1b243fd3edd8a251a6ce5986398820b344760536398a505fd87e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-app-core/src/server/debug_jobs.rs:88-93 | crates/jcode-app-core/src/server/debug_jobs.rs:117-122 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/debug_jobs.rs:88\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_jobs.rs"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"9236b9f469d02f1fa2fc2a5dc080c74db846fc1cfeb90c52dac05f6a5177d2f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-app-core/src/server/debug_server_state.rs:830-835 | crates/jcode-app-core/src/server/debug_server_state.rs:841-846 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_server_state.rs"},"region":{"startLine":830}}}],"partialFingerprints":{"codehealthFindingId/v1":"4943f646ed60f31b78f577d67c785b01e61b6161a8f28c3e6c77627f7848d623"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-app-core/src/server/debug_swarm_read.rs:239-245 | crates/jcode-app-core/src/server/debug_swarm_read.rs:315-321 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/debug_swarm_read.rs:239\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_swarm_read.rs"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3fb0755ea58bde92498b20ce9359e61f480088fcdbdba7c0faa7784d6391490"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-app-core/src/server/debug_swarm_read.rs:552-557 | crates/jcode-app-core/src/server/debug_swarm_read.rs:608-613 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/debug_swarm_read.rs:552\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_swarm_read.rs"},"region":{"startLine":552}}}],"partialFingerprints":{"codehealthFindingId/v1":"943e23d81ebcc6a38edacf634177556aaa44a1aec6952062f2569a8153841884"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-app-core/src/server/jade_relay.rs:319-324 | crates/jcode-app-core/src/server/jade_relay.rs:671-676 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/jade_relay.rs:319\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/jade_relay.rs"},"region":{"startLine":319}}}],"partialFingerprints":{"codehealthFindingId/v1":"a244e992dc3dd0ed72c1480d331b347d922216ef6f12c02c243decaffb090e65"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-app-core/src/tool/apply_patch.rs:144-149 | crates/jcode-app-core/src/tool/apply_patch.rs:224-229 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/apply_patch.rs"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd2f11c9a538ec3fd849e8f773178ec9791f39b8a2d1939393dacda1075eed96"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-app-core/src/tool/browser_request.rs:93-98 | crates/jcode-app-core/src/tool/browser_request.rs:192-197 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/browser_request.rs"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"876b6a4506415279cf33b381ae4096f97c7ba3db86ca430175e8cd7a4de592f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): crates/jcode-app-core/src/tool/conversation_search.rs:200-221 | crates/jcode-base/src/memory_agent.rs:54-75 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/conversation_search.rs:200\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/conversation_search.rs"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab42c1484bb090568784569d05e99c359cd986ca9e1190c282f588233132df82"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-app-core/src/tool/selfdev/mod.rs:249-255 | crates/jcode-base/src/goal.rs:546-552 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/selfdev/mod.rs:249\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/selfdev/mod.rs"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"e21bada33ae3ac5a3d61af25e16197e2524f1cf79c6f91cb57b8a42bdd31b163"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-base/src/background.rs:450-456 | crates/jcode-base/src/background.rs:664-670 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/background.rs"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed3dd4504618eb2524ad09daa885d670846794151b7e7a2367b731ac368d95cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-base/src/import.rs:162-167 | crates/jcode-base/src/import.rs:804-810 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/import.rs:162\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/import.rs"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"15e1d5c067942b939545c734e660ba3a67fe73aac9dc61a222daba035d44159e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-base/src/import.rs:1127-1132 | crates/jcode-import-core/src/lib.rs:677-682 \u2014 before extracting anything, compare \u0060crates/jcode-base/src/import.rs\u0060 and \u0060crates/jcode-import-core/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/import.rs:1127\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-base/src/import.rs:1133\u0060 calls \u0060get\u0060 and \u0060crates/jcode-import-core/src/lib.rs:683\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/import.rs"},"region":{"startLine":1127}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9d8e9dbaebd61fa19822b0429a00363cfb4564f9438924d14cc58f66cf69e23"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-base/src/mcp/client.rs:335-340 | crates/jcode-base/src/mcp/client.rs:379-384 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mcp/client.rs"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"fac8ca4de3e045985eb84075262beab750f4ef3d89dc4389858e4b0d730c50d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-base/src/mobile_sync.rs:596-603 | crates/jcode-tui/src/tui/session_picker/loading.rs:2954-2959 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/mobile_sync.rs:596\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mobile_sync.rs"},"region":{"startLine":596}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f6a58198347e562d625e6fbec4087f8853b5f03a327bceb13dbde20a0fb9392"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-base/src/platform.rs:156-161 | crates/jcode-base/src/skill.rs:210-216 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/platform.rs:156\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/platform.rs"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bbf9b1fd94ef2c4bd66933c87aa8259dd8886cd37b676bff591279d0348f590"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-base/src/provider/openrouter.rs:156-164 | crates/jcode-provider-openrouter-runtime/src/lib.rs:161-169 \u2014 before extracting anything, compare \u0060crates/jcode-base/src/provider/openrouter.rs\u0060 and \u0060crates/jcode-provider-openrouter-runtime/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/provider/openrouter.rs:156\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/openrouter.rs"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"e83b1e4ba102d8682521e2b66bbe38a2c7ef510e265004fe288573608d33ad24"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-base/src/provider/openrouter.rs:174-182 | crates/jcode-provider-openrouter-runtime/src/lib.rs:179-187 \u2014 before extracting anything, compare \u0060crates/jcode-base/src/provider/openrouter.rs\u0060 and \u0060crates/jcode-provider-openrouter-runtime/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/provider/openrouter.rs:174\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/openrouter.rs"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4d7cd971a6ada9f735e3209bc4d81cffbefa4c5ba0301964ea2fe7ff875bab1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-base/src/session/memory_profile.rs:92-97 | crates/jcode-tui/src/tui/memory_profile.rs:219-224 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/session/memory_profile.rs:92\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/memory_profile.rs"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa1c75b5ff5574f0a762b6419c55b01b2b6c79d2ced409caf20fd8da22482a18"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-base/src/skill.rs:711-717 | crates/jcode-base/src/skill/invocation.rs:30-36 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/skill.rs"},"region":{"startLine":711}}}],"partialFingerprints":{"codehealthFindingId/v1":"b43d9b28986eb0980c900a1ff6b7a7143af6cb699223b563d2b347eff90e7ee5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-compaction-core/src/lib.rs:776-782 | crates/jcode-compaction-core/src/lib.rs:855-861 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-compaction-core/src/lib.rs:776\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-compaction-core/src/lib.rs"},"region":{"startLine":776}}}],"partialFingerprints":{"codehealthFindingId/v1":"921ad40fba8044d7342839dd23467c7ed022cab033e217b8ea72720686058205"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-import-core/src/lib.rs:463-468 | crates/jcode-import-core/src/lib.rs:1121-1126 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-import-core/src/lib.rs:463\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-import-core/src/lib.rs"},"region":{"startLine":463}}}],"partialFingerprints":{"codehealthFindingId/v1":"50ee00142dba8a43872bcad72ac59d9d35fb583c4925aaea7947040898808b81"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-import-core/src/lib.rs:1125-1130 | crates/jcode-tui/src/tui/session_picker/loading.rs:861-867 \u2014 before extracting anything, compare \u0060crates/jcode-import-core/src/lib.rs\u0060 and \u0060crates/jcode-tui/src/tui/session_picker/loading.rs\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-import-core/src/lib.rs:1125\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-import-core/src/lib.rs"},"region":{"startLine":1125}}}],"partialFingerprints":{"codehealthFindingId/v1":"77a214626aeb822c3b7c7aa02fa3c1beae132bcb1ea0e0c0404d3b5f7a35005d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-provider-copilot/src/lib.rs:90-95 | crates/jcode-provider-openrouter/src/request.rs:97-103 \u2014 before extracting anything, compare \u0060crates/jcode-provider-copilot/src/lib.rs\u0060 and \u0060crates/jcode-provider-openrouter/src/request.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-copilot/src/lib.rs:90\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-copilot/src/lib.rs"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"993569f2b2f76439e06dedcb8fd54444cdb947719f83d20f04517e781e4bc1c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-provider-core/src/lib.rs:870-880 | crates/jcode-provider-core/src/lib.rs:914-919 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-provider-core/src/lib.rs:882\u0060 calls \u0060pool_idle_timeout\u0060, \u0060from_secs\u0060 and \u0060crates/jcode-provider-core/src/lib.rs:922\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/lib.rs"},"region":{"startLine":870}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d059c7da5c02268d37980c240ec2c7564a16df5b0059e7daf9d03dad161dead"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-provider-openrouter-runtime/src/openrouter_provider_impl.rs:776-782 | crates/jcode-provider-openrouter-runtime/src/openrouter_provider_impl.rs:788-794 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/openrouter_provider_impl.rs"},"region":{"startLine":776}}}],"partialFingerprints":{"codehealthFindingId/v1":"0898232821fdb2dd3c457d8a5e054addc3ae3b905e84028e680acfbe845ae78d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-tui-account-picker/src/overlay.rs:521-526 | crates/jcode-tui/src/tui/login_picker.rs:427-432 \u2014 before extracting anything, compare \u0060crates/jcode-tui-account-picker/src/overlay.rs\u0060 and \u0060crates/jcode-tui/src/tui/login_picker.rs\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 204 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-account-picker/src/overlay.rs:521\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay.rs"},"region":{"startLine":521}}}],"partialFingerprints":{"codehealthFindingId/v1":"b10e701bf6381045d453c9c7ab50a9c7714e8a4275cd1f3f685e55b875384955"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-tui-markdown/src/markdown_render_lazy.rs:465-470 | crates/jcode-tui-markdown/src/markdown_render_lazy.rs:475-481 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-markdown/src/markdown_render_lazy.rs:475\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_lazy.rs"},"region":{"startLine":465}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2633f9e288760bec0d211467e050303da87ca102982a39b1cd5f9a61987b809"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-tui-mermaid/src/lib.rs:1106-1112 | crates/jcode-tui-mermaid/src/lib.rs:1210-1216 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/lib.rs"},"region":{"startLine":1106}}}],"partialFingerprints":{"codehealthFindingId/v1":"506d2115af13b25b450ea3f4ee49856294f2623f26edf8c4ff71361d74416d69"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-tui-mermaid/src/mermaid_cache_render.rs:227-232 | crates/jcode-tui-mermaid/src/mermaid_cache_render.rs:396-401 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-mermaid/src/mermaid_cache_render.rs:227\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_cache_render.rs"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"736881a005dd1ee1783915306831d89b604199cceeae137906f07ce9c04dd245"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-tui/src/tui/app/commands.rs:3506-3511 | crates/jcode-tui/src/tui/app/remote/key_handling.rs:1592-1597 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/app/commands.rs\u0060 and \u0060crates/jcode-tui/src/tui/app/remote/key_handling.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/commands.rs:3506\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":3506}}}],"partialFingerprints":{"codehealthFindingId/v1":"a394981fba343efcd973b82bd2ac250b72061350a45b983972db37837e1416f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-tui/src/tui/app/commands_improve.rs:457-466 | crates/jcode-tui/src/tui/app/commands_improve.rs:526-535 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/commands_improve.rs:457\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_improve.rs"},"region":{"startLine":457}}}],"partialFingerprints":{"codehealthFindingId/v1":"c833be765674425a677ab1eefdd251d1deaf302d5cb56f0b5f9371bb6adc5a54"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-tui/src/tui/app/commands_improve.rs:604-609 | crates/jcode-tui/src/tui/app/commands_improve.rs:701-706 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_improve.rs"},"region":{"startLine":604}}}],"partialFingerprints":{"codehealthFindingId/v1":"f991d9c8ea1d986c53479eb050981be67f0da377bc3c74626e91667dd1af3366"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-tui/src/tui/info_widget_usage.rs:48-53 | crates/jcode-tui/src/tui/info_widget_usage.rs:58-63 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_usage.rs"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"1db1a83c237715341f6fe8107556f09d03635fb0e664e55f528b0d5c73009adf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-tui/src/tui/session_picker/filter.rs:159-164 | crates/jcode-tui/src/tui/session_picker/filter.rs:279-284 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060self\u0060 to \u0060super) fn rebuild_items_following(\u0026mut\u0060 in one and \u0060super) fn poll_transcript_search(\u0026mut\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-tui/src/tui/session_picker/filter.rs:166\u0060 calls \u0060iter\u0060, \u0060position\u0060 and \u0060crates/jcode-tui/src/tui/session_picker/filter.rs:285\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/filter.rs"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"e102f579ae3d518e2cb9b91c3d7f36e30058ce719b4d5f5568a335e788e808a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-tui/src/tui/session_picker/loading.rs:2956-2962 | src/cli/commands.rs:556-562 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading.rs"},"region":{"startLine":2956}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4bc4614c745eb336588a2c810154e71328942dca746b609f85f78df1f416344"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-tui/src/tui/ui_header/account_router.rs:222-227 | crates/jcode-tui/src/tui/ui_header/account_router.rs:302-307 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_header/account_router.rs:222\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_header/account_router.rs"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"699c1a5e0f0ee10d2af5a27ac25e9b3549e60706b88e853d2b9e782b85174352"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-tui/src/tui/ui_input.rs:1100-1105 | crates/jcode-tui/src/tui/ui_input.rs:1108-1113 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_input.rs"},"region":{"startLine":1100}}}],"partialFingerprints":{"codehealthFindingId/v1":"61e1e35f97799f97abe480982554c6058e6769a9ff5694f7ed02a89b079a9c03"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-tui/src/tui/ui_overlays.rs:224-229 | crates/jcode-tui/src/tui/ui_overlays.rs:761-766 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_overlays.rs"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0d508f9bdc498f26e476ee0b50b74c30ca4009946e2937ad99928274078e9c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src/cli/cloud_group_run.rs:118-123 | src/cli/cloud_move.rs:472-478 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/cli/cloud_group_run.rs:118\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_group_run.rs"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"47063e12eeb67d5d7fa423a432b07feff588d30455651d7cf2991fb40db05ce7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src/cli/cloud_move.rs:1625-1630 | src/cli/cloud_move.rs:2080-2085 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_move.rs"},"region":{"startLine":1625}}}],"partialFingerprints":{"codehealthFindingId/v1":"89dc12d825874c7b3267e4d51de676f42e665ecff18dfebc41b2fb5d5d146813"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5): src/bin/memory_recall_bench.rs:1229-1234 | src/bin/memory_recall_bench.rs:1467-1472 | src/bin/memory_recall_bench.rs:1599-1604 | src/bin/memory_recall_bench.rs:1842-1847 | src/bin/memory_recall_bench.rs:1865-1870 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/bin/memory_recall_bench.rs:1229\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":1229}}}],"partialFingerprints":{"codehealthFindingId/v1":"c92432cfd959b6b9969041c96190fa34df809e857d56803a6548238bf4d1c4e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/jcode-app-core/src/server/client_actions.rs:797-804 | crates/jcode-app-core/src/server/client_actions.rs:844-848 | src/cli/cloud_session_ops.rs:53-57 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_actions.rs"},"region":{"startLine":797}}}],"partialFingerprints":{"codehealthFindingId/v1":"810a5937624f814940d70f6fbde7aa46ca9fc7ecd38472af33aa915a2284e6eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/jcode-app-core/src/ssh_remote.rs:136-141 | crates/jcode-app-core/src/ssh_remote.rs:152-157 | crates/jcode-base/src/browser.rs:1177-1181 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/ssh_remote.rs:136\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-app-core/src/ssh_remote.rs:150\u0060 calls \u0060arg\u0060 and \u0060crates/jcode-app-core/src/ssh_remote.rs:134\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/ssh_remote.rs"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"de0e85a5e1241f582403d32871003a31f315b4b16029441b7373907763e7ec7c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/jcode-base/src/gmail.rs:568-573 | crates/jcode-base/src/gmail.rs:628-632 | crates/jcode-base/src/gmail.rs:682-687 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/gmail.rs"},"region":{"startLine":568}}}],"partialFingerprints":{"codehealthFindingId/v1":"be9916ad06045a4d482a164b1bca27bbf67e53799b9d2f64d867f0c4fdd850a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/jcode-base/src/session/memory_profile.rs:90-96 | crates/jcode-tui/src/tui/app/debug.rs:374-380 | crates/jcode-tui/src/tui/memory_profile.rs:217-223 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/app/debug.rs\u0060 and \u0060crates/jcode-tui/src/tui/memory_profile.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/session/memory_profile.rs:90\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/memory_profile.rs"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e305c3dae3d9b74e5139f8f34f058fdcf759bd1786138bc938fc0bd87e477ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/jcode-base/src/session/prewarm.rs:107-112 | crates/jcode-storage/src/active_pids.rs:98-102 | crates/jcode-storage/src/active_pids.rs:152-157 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/session/prewarm.rs:107\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/prewarm.rs"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"09135fe4db4f8db5791cb177c035774c09ebc974dbafec8bcaf91e1c51b9c832"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/jcode-base/src/transcript_sample.rs:424-430 | crates/jcode-base/src/transcript_sample.rs:448-454 | crates/jcode-base/src/transcript_sample.rs:576-582 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/transcript_sample.rs:424\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/transcript_sample.rs"},"region":{"startLine":424}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b2e4c3353a70245c0778ecdaa28bae665ceaf56b1158b4372a42049d7227e1a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/jcode-tui/src/tui/app/observe.rs:59-67 | crates/jcode-tui/src/tui/app/split_view.rs:31-39 | crates/jcode-tui/src/tui/app/todos_view.rs:362-370 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/app/observe.rs\u0060 and \u0060crates/jcode-tui/src/tui/app/split_view.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/observe.rs:59\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060self\u0060 to \u0060super) fn set_observe_mode_enabled(\u0026mut\u0060 in one and \u0060super) fn set_split_view_enabled(\u0026mut\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/observe.rs"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"f184ae87c6c4581691113039d78a7ce0170de1d21e3cf2b925c8bb3d21afbbe8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u20135 lines \u00D7 3): crates/jcode-app-core/src/server/comm_control.rs:439-443 | crates/jcode-app-core/src/server/comm_control.rs:584-587 | crates/jcode-app-core/src/server/comm_control.rs:640-644 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/comm_control.rs:439\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_control.rs"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"73b4a8b7f935468be186e1658a85d4b6cb8258ec9959455d65d008dc486e01c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/jcode-app-core/src/server/debug_swarm_write.rs:158-162 | crates/jcode-app-core/src/server/debug_swarm_write.rs:216-220 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_swarm_write.rs"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf35ae872a7afe8270ed0a4617c074746942fcf0b8059e5c5b1fa81286afb197"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-base/src/jev.rs:603-609 | crates/jcode-base/src/jev/laya.rs:76-82 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/jev.rs:603\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/jev.rs"},"region":{"startLine":603}}}],"partialFingerprints":{"codehealthFindingId/v1":"a570625d93449ef91f92b8b2b2e1d18503da9527fdff5b5bf3a99fdf9c6a83d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/jcode-base/src/todo.rs:533-537 | crates/jcode-base/src/todo.rs:538-542 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/todo.rs"},"region":{"startLine":533}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f45cb820ab2d15dd2a08a9f34d8272ab1e54afd8fbc98637a0f3fb41463d2f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/jcode-embedding/src/lib.rs:192-197 | crates/jcode-embedding/src/lib.rs:266-270 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-embedding/src/lib.rs:192\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-embedding/src/lib.rs"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e92f10e5e64351b509af295a65134242e7d2092f3d2cdb0d6208d01931eb005"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u20135 lines \u00D7 3): crates/jcode-provider-core/src/openai_schema.rs:45-47 | crates/jcode-provider-core/src/openai_schema.rs:179-183 | crates/jcode-schema-dialect/src/dialect.rs:304-308 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-core/src/openai_schema.rs:179\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/openai_schema.rs"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d6dda85fb1f98adca53038c09cfef83500f578fa3a736345bdaeac1f6360a04"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/jcode-provider-doctor/src/live_provider_probes.rs:1046-1050 | crates/jcode-provider-doctor/src/live_provider_probes.rs:1823-1827 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/live_provider_probes.rs"},"region":{"startLine":1046}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6c024bd767a90e4247bd6076b21e69a08b1c4eb0e76f137cd1a9d635ec4ccb7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/jcode-provider-openai/src/request.rs:441-447 | crates/jcode-provider-openrouter/src/request.rs:332-336 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-openai/src/request.rs:441\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai/src/request.rs"},"region":{"startLine":441}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bfa95baec1782fbb75b2dd7df4b1cb8143b9efa323ba03add9ef6b02263a124"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-provider-openrouter-runtime/src/opencode_go_responses.rs:266-271 | crates/jcode-provider-openrouter-runtime/src/opencode_go_responses.rs:280-285 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/opencode_go_responses.rs"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"58c8c9634a040fc6cdd86b7252cdfde40ccf1ac23ace2ff0cce5d7053c09c2c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-tui-account-picker/src/overlay_render.rs:240-245 | crates/jcode-tui/src/tui/login_picker.rs:621-626 \u2014 before extracting anything, compare \u0060crates/jcode-tui-account-picker/src/overlay_render.rs\u0060 and \u0060crates/jcode-tui/src/tui/login_picker.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-account-picker/src/overlay_render.rs:240\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-tui-account-picker/src/overlay_render.rs:246\u0060 calls \u0060Rgb\u0060 and \u0060crates/jcode-tui/src/tui/login_picker.rs:628\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay_render.rs"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"86093efcc18270071672d48b837a571e0c9610dc1fe3b217725b036cc40de289"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-tui-markdown/src/markdown_render_full.rs:30-35 | crates/jcode-tui-markdown/src/markdown_render_lazy.rs:22-27 \u2014 before extracting anything, compare \u0060crates/jcode-tui-markdown/src/markdown_render_full.rs\u0060 and \u0060crates/jcode-tui-markdown/src/markdown_render_lazy.rs\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 868 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_full.rs"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"627644a83948d53b48450d791a2d8cdedd412dbdf86b1517cbdc51c33a77257a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/jcode-tui-mermaid/src/mermaid_cache_render.rs:103-107 | crates/jcode-tui-mermaid/src/mermaid_cache_render.rs:130-134 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-mermaid/src/mermaid_cache_render.rs:103\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-tui-mermaid/src/mermaid_cache_render.rs:102\u0060 calls \u0060record_cache_stat_syscall\u0060 and \u0060crates/jcode-tui-mermaid/src/mermaid_cache_render.rs:129\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_cache_render.rs"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b05afdb267260ade35569568415605864673a0f4fdfaa54ddda21e7a24860b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/jcode-tui-render/src/swarm_gallery.rs:450-458 | crates/jcode-tui-render/src/swarm_gallery.rs:1081-1085 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-render/src/swarm_gallery.rs:450\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/swarm_gallery.rs"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6973de8d3a2fa363e8748a589e9f0f78ac5d729574497bcc502260cdaa3a0f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-tui/src/tui/app/commands.rs:3211-3216 | crates/jcode-tui/src/tui/app/commands.rs:3698-3703 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/commands.rs:3211\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":3211}}}],"partialFingerprints":{"codehealthFindingId/v1":"908b297b42c81b9f07881fa545be93906096456df54a15aca61012368cdb2f49"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/jcode-tui/src/tui/app/commands_improve.rs:641-645 | crates/jcode-tui/src/tui/app/commands_improve.rs:738-742 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_improve.rs"},"region":{"startLine":641}}}],"partialFingerprints":{"codehealthFindingId/v1":"318769ac4bc78a90f7c93de274e4c676499a02ff57a8635c32c17a184c45127f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/jcode-tui/src/tui/app/turn.rs:1626-1630 | crates/jcode-tui/src/tui/app/turn.rs:1638-1642 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/turn.rs:1626\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/turn.rs"},"region":{"startLine":1626}}}],"partialFingerprints":{"codehealthFindingId/v1":"a37dda5f772e29f74daaebe960144a1894f746b923df87a5cae50de277ff407d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-tui/src/tui/ui_header/account_router.rs:513-518 | crates/jcode-tui/src/tui/ui_inline_interactive.rs:335-340 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_header/account_router.rs"},"region":{"startLine":513}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a2af604f10b4e1575017053ea3828f470965a2f528e2953855eca486c7c0d10"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src/bin/memory_recall_bench.rs:1193-1198 | src/bin/memory_recall_bench.rs:1443-1448 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/bin/memory_recall_bench.rs:1193\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":1193}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7cf1a850751b211ebc44618525b1c3a546ac2d057c2ec5d4892b0aa8f5557c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src/bin/memory_recall_bench.rs:1531-1536 | src/bin/memory_recall_bench.rs:1671-1676 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/bin/memory_recall_bench.rs:1531\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":1531}}}],"partialFingerprints":{"codehealthFindingId/v1":"c068d69b9196a7217a9044d3e6ebe67d6716e5569f74e8240092d8ec026a2e55"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src/cli/cloud_managed.rs:476-480 | src/cli/cloud_managed.rs:490-494 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/cli/cloud_managed.rs:476\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_managed.rs"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"0aea3f42959ee8540c222549350134b4c70859734c6a5a3fd9637432f2f02ee8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): crates/jcode-app-core/src/agent/cache_request.rs:4-8 | crates/jcode-compaction-core/src/lib.rs:516-520 | crates/jcode-tui-markdown/src/markdown_math_copy.rs:48-52 | crates/jcode-tui/src/tui/app/cache_fingerprints.rs:3-7 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/cache_request.rs"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"b477f0c7555ca13f0ff14b984416d3abe4ae51876ef90ef649c01f5084b5fe5f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-app-core/src/agent/inline_tail.rs:170-179 | crates/jcode-session-types/src/lib.rs:964-973 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/inline_tail.rs"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ceb44fa65c1344f9664d963320ac1c12992c89df42e368ba23855296aec7b6b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-app-core/src/agent/response_recovery.rs:43-51 | crates/jcode-provider-core/src/lib.rs:655-663 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/response_recovery.rs"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"f46a11f7cc9771f6cb8385787108941c30eb47c61e7fdf85f779059cea62b9f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5): crates/jcode-app-core/src/agents_status.rs:75-80 | crates/jcode-tui/src/tui/app/hotkey_feedback.rs:666-671 | crates/jcode-tui/src/tui/app/shortcut_hints.rs:159-164 | crates/jcode-tui/src/tui/app/subscribe_nudge.rs:88-93 | src/cli/cloud_move.rs:383-388 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agents_status.rs"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"f510c11ac5505374e130ad519506b787593ba3af513c85c5b84bf15bdbee6bb7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-app-core/src/channel.rs:542-548 | crates/jcode-app-core/src/server/jade_relay.rs:55-61 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/channel.rs"},"region":{"startLine":542}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2b0e6cd155d3e69555f92f38a10b744ec2edfa428bbf55a4e27625b6f0a59ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-app-core/src/message_notifications.rs:57-62 | crates/jcode-base/src/message/notifications.rs:119-124 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/message_notifications.rs\u0060 and \u0060crates/jcode-base/src/message/notifications.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/message_notifications.rs"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9ea18f7be8c8473f1cdea5e6709026a8e80b540528f9f3fcab8df19fd7e3707"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-app-core/src/message_notifications.rs:64-74 | crates/jcode-base/src/message/notifications.rs:126-136 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/message_notifications.rs\u0060 and \u0060crates/jcode-base/src/message/notifications.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/message_notifications.rs"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed14ecc5d97664a26ebf417c4c2f5b9fc30726767ef5d3ff4fe991418746a1a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-app-core/src/message_notifications.rs:76-83 | crates/jcode-base/src/message/notifications.rs:138-145 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/message_notifications.rs\u0060 and \u0060crates/jcode-base/src/message/notifications.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/message_notifications.rs"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b2dbb9fe033ed457612ae89bc64cef358b5f04eac9884d334a2697188e58b8b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): crates/jcode-app-core/src/mission.rs:179-190 | crates/jcode-app-core/src/server/durable_state.rs:14-25 | crates/jcode-app-core/src/server/reload_recovery.rs:54-65 | crates/jcode-app-core/src/tool/selfdev/reload.rs:5-16 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/mission.rs"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"da33666025c7f30d7307346e30de24428b00f6462e203f26ffdeb5d42b46b86a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): crates/jcode-app-core/src/mobile_push.rs:676-683 | crates/jcode-app-core/src/server/background_tasks.rs:712-719 | crates/jcode-tui/src/tui/app/turn_notify.rs:373-380 | crates/jcode-tui/src/tui/ui_input.rs:1835-1842 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/mobile_push.rs"},"region":{"startLine":676}}}],"partialFingerprints":{"codehealthFindingId/v1":"53fa1c261bef0a29571836cae7c7287a5412c3704f37e4d5f8d17cf1f2b3f598"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-app-core/src/notifications.rs:576-582 | crates/jcode-setup-hints/src/cli_launch_hints.rs:320-326 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/notifications.rs\u0060 and \u0060crates/jcode-setup-hints/src/cli_launch_hints.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/notifications.rs"},"region":{"startLine":576}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5c86799b5226c4b105e1206103f71d18632974796d380988858ccfd1c47ab63"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-app-core/src/server/client_actions.rs:27-34 | crates/jcode-tui/src/tui/app/commands.rs:618-625 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/server/client_actions.rs\u0060 and \u0060crates/jcode-tui/src/tui/app/commands.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_actions.rs"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"f918d7dfd79481b897c04f1ea562f566d39f75e84eb1abea799a785aaef746ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-app-core/src/server/client_comm_context.rs:23-28 | crates/jcode-app-core/src/server/client_comm_message.rs:27-32 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/client_comm_context.rs:23\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_comm_context.rs"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd2dc329e2cc800855af1a06650da71a77e6fec6e72ac3e8cc6a3c9a3869df90"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/jcode-app-core/src/server/durable_state.rs:7-12 | crates/jcode-app-core/src/server/swarm_persistence.rs:140-145 | crates/jcode-tui/src/tui/ui_frame_metrics.rs:448-453 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/durable_state.rs"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e46e34166093c13d6af1f293e56939b69d0c90d09549eaf6334187515334a15"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/jcode-app-core/src/server/jade_relay.rs:109-117 | crates/jcode-base/src/auth/mod.rs:171-179 | src/cli/commands/menubar.rs:334-342 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/jade_relay.rs"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"435270271ca8c97d0b91bcbc3d54cb8a5a59c7bb82cba215cc7a18e610083486"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-app-core/src/session_active_pids.rs:7-12 | crates/jcode-storage/src/active_pids.rs:60-65 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/session_active_pids.rs\u0060 and \u0060crates/jcode-storage/src/active_pids.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/session_active_pids.rs"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e6e42653ffb8e373d19f531b25bed6d4a8ade9284874394e66bf05ea3773d0e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-app-core/src/telemetry_state.rs:102-107 | crates/jcode-telemetry-core/src/state_support.rs:100-105 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/telemetry_state.rs\u0060 and \u0060crates/jcode-telemetry-core/src/state_support.rs\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/telemetry_state.rs"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fe64d312d77c04d6f0907d33b3fc91daf80b33f35a661e2c14d9e4643293ae9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-app-core/src/telemetry_state.rs:236-241 | crates/jcode-telemetry-core/src/state_support.rs:233-238 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/telemetry_state.rs\u0060 and \u0060crates/jcode-telemetry-core/src/state_support.rs\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/telemetry_state.rs"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"00d8b1bbbba237e4f408e50a796d0df3a455748d712727b182a6dd061a97d692"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-app-core/src/telemetry_state.rs:249-254 | crates/jcode-telemetry-core/src/state_support.rs:246-251 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/telemetry_state.rs\u0060 and \u0060crates/jcode-telemetry-core/src/state_support.rs\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/telemetry_state.rs"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"73e20879ff95a657620aeaa4c51c51d0e75c3d286918328f66046d9c1e86ef8d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/jcode-app-core/src/telemetry_state.rs:328-332 | crates/jcode-telemetry-core/src/state_support.rs:395-399 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/telemetry_state.rs\u0060 and \u0060crates/jcode-telemetry-core/src/state_support.rs\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/telemetry_state.rs"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a8ea5dfdde8c69127f54d86f30a18af0bd0e2a2e6b743a1fd96529ad1d1b46f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/jcode-app-core/src/telemetry_state.rs:334-338 | crates/jcode-telemetry-core/src/state_support.rs:401-405 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/telemetry_state.rs\u0060 and \u0060crates/jcode-telemetry-core/src/state_support.rs\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/telemetry_state.rs"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"86d7530e9e2e9a90e4ff7faa7e374ba902a2c914fa8339dae67ca3dd88632927"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-app-core/src/telemetry_state.rs:352-358 | crates/jcode-telemetry-core/src/state_support.rs:419-425 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/telemetry_state.rs\u0060 and \u0060crates/jcode-telemetry-core/src/state_support.rs\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/telemetry_state.rs"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"54be1043d4859ff6acd5d9e57211c29682e3c96e1d0984bb17100da6b217bfc7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-app-core/src/tool/apply_patch.rs:80-92 | crates/jcode-app-core/src/tool/patch.rs:52-64 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/apply_patch.rs"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"73df9b5d937a4949cf287baee2177d75fe7e712c96d1ae8b46d441b02675dfba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-app-core/src/tool/todo.rs:693-698 | crates/jcode-todo-policy/src/lib.rs:541-546 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/todo.rs"},"region":{"startLine":693}}}],"partialFingerprints":{"codehealthFindingId/v1":"e16a6cd07017b70ccfa169045d7f2602ffca4fae3fa479039753686671687c47"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-app-core/src/usage_display.rs:88-96 | crates/jcode-base/src/usage/display.rs:95-103 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/usage_display.rs\u0060 and \u0060crates/jcode-base/src/usage/display.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_display.rs"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"77cbc7a10b174f640b104f35c31f37b456d905d3c288eb760b6ed0bb3ca1cc78"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-app-core/src/usage_display.rs:130-137 | crates/jcode-base/src/usage/display.rs:137-144 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/usage_display.rs\u0060 and \u0060crates/jcode-base/src/usage/display.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/usage_display.rs:130\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_display.rs"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"d18d81bfb708b43191b9119f135b7ffd52ad1cbc401e429f4211235139c1bdea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-app-core/src/usage_openai.rs:11-20 | crates/jcode-base/src/usage/openai_helpers.rs:17-26 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/usage_openai.rs\u0060 and \u0060crates/jcode-base/src/usage/openai_helpers.rs\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-base/src/usage/openai_helpers.rs:13\u0060 calls \u0060pub\u0060 and \u0060crates/jcode-app-core/src/usage_openai.rs:8\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_openai.rs"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"e804201af8b0f074d0dacf7889f7e46ed1e6a5ee53166a8db528998b12fcb5d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-app-core/src/usage_openai.rs:60-66 | crates/jcode-base/src/usage/openai_helpers.rs:66-72 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/usage_openai.rs\u0060 and \u0060crates/jcode-base/src/usage/openai_helpers.rs\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_openai.rs"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"c98860e7fe8b5209038bc24d3dc22da6b868df9a0533e4fff3d818c2645a06bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-app-core/src/usage_openai.rs:72-78 | crates/jcode-base/src/usage/openai_helpers.rs:78-84 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/usage_openai.rs\u0060 and \u0060crates/jcode-base/src/usage/openai_helpers.rs\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_openai.rs"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ed5e3949e75c8063bce2b15d2c38ad3ee06398ea1854cab98885a938ec21aa0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-app-core/src/usage_openai.rs:129-134 | crates/jcode-base/src/usage/openai_helpers.rs:154-159 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/usage_openai.rs\u0060 and \u0060crates/jcode-base/src/usage/openai_helpers.rs\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_openai.rs"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a67efa9cac1ede3dd6fcf4ca489750a9e25f50310c880ef02dc152367db97ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/jcode-app-core/src/usage_openai.rs:236-240 | crates/jcode-base/src/usage/openai_helpers.rs:261-265 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/usage_openai.rs\u0060 and \u0060crates/jcode-base/src/usage/openai_helpers.rs\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_openai.rs"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"506b29620a650d1000e86f8e98cb3e44ec57e728d743d1123c2efaf39fd7a1d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-app-core/src/usage_openai.rs:303-312 | crates/jcode-base/src/usage/openai_helpers.rs:328-337 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/usage_openai.rs\u0060 and \u0060crates/jcode-base/src/usage/openai_helpers.rs\u0060 as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 326 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_openai.rs"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"640af6a60bccba3aa50bb1cae9f82caf2cd0808da1cac63f0c344c454e177914"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-base/src/auth/antigravity.rs:53-59 | crates/jcode-provider-antigravity/src/lib.rs:199-205 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/antigravity.rs"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"eead37d9cdaefbebfcd18e16f904d4ec3d730b999268007a9adcc4ced672b7b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-base/src/auth/antigravity.rs:68-76 | crates/jcode-provider-antigravity/src/lib.rs:207-215 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/antigravity.rs"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a99fff752b65d3ccdaaaef1e9689ddfbf62d7ae134282648e9f86be51df8e02"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-base/src/auth/antigravity.rs:160-167 | crates/jcode-base/src/auth/gemini.rs:298-305 \u2014 before extracting anything, compare \u0060crates/jcode-base/src/auth/antigravity.rs\u0060 and \u0060crates/jcode-base/src/auth/gemini.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/antigravity.rs"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"11486cca4cbb6b1a4c8c62eb3bd7b8761920dd09e58f6b540d3fb5ff0d23bd0e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): crates/jcode-base/src/auth/azure.rs:15-21 | crates/jcode-base/src/provider/openrouter.rs:191-197 | crates/jcode-provider-openrouter-runtime/src/lib.rs:215-221 | crates/jcode-tui-mermaid/src/mermaid_runtime.rs:202-208 \u2014 before extracting anything, compare \u0060crates/jcode-base/src/provider/openrouter.rs\u0060 and \u0060crates/jcode-provider-openrouter-runtime/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/azure.rs"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"65b6e762346fc30f6daa48ef877085cc9f2d472296cb23bcb1f36ab63f071f47"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-base/src/auth/cursor.rs:148-155 | crates/jcode-base/src/auth/external.rs:115-122 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060source\u0060 to \u0060ExternalCursorAuthSource\u0060 in one and \u0060ExternalAuthSource\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/cursor.rs"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"6455072c90d2d56582e4f2e33f326f6714a26d94000db5562641d44dfdbfeb8d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-base/src/auth/gemini.rs:489-496 | crates/jcode-tui/src/tui/app/auth.rs:3460-3467 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/gemini.rs"},"region":{"startLine":489}}}],"partialFingerprints":{"codehealthFindingId/v1":"20087664f766cdcbdcdd693e3c6fdd86b3d23fb70617d2f5f6e6702c8bb5b71a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/jcode-base/src/auth/mod.rs:185-189 | crates/jcode-base/src/provider/models.rs:833-837 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/mod.rs"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c7a003ef07c4d12b3bb98756dd12eda084b48b62e3444a97f10a924cf34a758"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-base/src/auth/refresh_state.rs:144-149 | crates/jcode-base/src/auth/validation.rs:13-18 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/refresh_state.rs"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee829dce91549bd8edb9741d73781edadd7072ca1b2a78b5d1bd5ed7c869cfd9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): crates/jcode-base/src/embedding_stub.rs:37-41 | crates/jcode-embedding/src/lib.rs:37-41 | crates/jcode-memory-types/src/graph.rs:40-44 | crates/jcode-memory-types/src/lib.rs:862-866 \u2014 before extracting anything, compare \u0060crates/jcode-base/src/embedding_stub.rs\u0060 and \u0060crates/jcode-embedding/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 67 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/embedding_stub.rs"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae09171f0637d3d86f839d9c9ce30460e762715d55e0e2dc73efdb34b12abc95"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-base/src/hooks.rs:361-368 | crates/jcode-terminal-launch/src/lib.rs:598-605 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/hooks.rs"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"c51163cdd45076783562e55cf07a05f577d078d7abd02e5aa6d77d7cab56e108"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): crates/jcode-base/src/hooks.rs:370-379 | crates/jcode-core/src/util.rs:5-15 | crates/jcode-import-core/src/lib.rs:20-29 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/hooks.rs"},"region":{"startLine":370}}}],"partialFingerprints":{"codehealthFindingId/v1":"a321701a8437fe27a2f3c9f84ee61184592427c9caa7d0791fc92d65918294a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-base/src/memory_prompt.rs:7-12 | crates/jcode-base/src/memory_rerank.rs:100-105 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory_prompt.rs"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"52c24c99b064038ff1bf4379894c7b5c8dd0de8593bd17fcb40e019da75303b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-base/src/provider/openrouter.rs:93-102 | crates/jcode-provider-openrouter-runtime/src/lib.rs:98-107 \u2014 before extracting anything, compare \u0060crates/jcode-base/src/provider/openrouter.rs\u0060 and \u0060crates/jcode-provider-openrouter-runtime/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/openrouter.rs"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"b44ae020cccfff577777a5ac689ceae91edcc4a20da750357a65f16b4c1bb1f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-base/src/provider/openrouter.rs:212-217 | crates/jcode-provider-openrouter-runtime/src/lib.rs:292-297 \u2014 before extracting anything, compare \u0060crates/jcode-base/src/provider/openrouter.rs\u0060 and \u0060crates/jcode-provider-openrouter-runtime/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/openrouter.rs"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"8013d2873a9a7ee795069882b93c382d8a1d771a85b7f5a4ac6016c24fe6bf1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-base/src/provider_catalog.rs:902-914 | src/cli/commands/provider_setup.rs:393-405 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider_catalog.rs"},"region":{"startLine":902}}}],"partialFingerprints":{"codehealthFindingId/v1":"612a08bfaf015ebf5238fae0ad4189a5499148927bc0b0f18c02f6940c063046"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-base/src/session.rs:75-84 | crates/jcode-base/src/session/render.rs:55-63 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session.rs"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"103bbcf58633b19195c30e05de44b7e7ad9363c65241dee3a72ab7cc1d76137a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-overnight-core/src/lib.rs:452-459 | src/cli/commands.rs:929-936 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-overnight-core/src/lib.rs"},"region":{"startLine":452}}}],"partialFingerprints":{"codehealthFindingId/v1":"144206d4aa53ff91d6e9f6f71efc20158c0b256d2fac803b259eae5d35ca9126"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-productivity-core/src/dashboard.rs:33-39 | crates/jcode-tui/src/video_export.rs:869-875 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-productivity-core/src/dashboard.rs"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"631376924a342309800a9ab953761e3ecedf0dee0c35068ef1e408fce1ee01be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-provider-anthropic-runtime/src/native_web_search.rs:95-106 | crates/jcode-provider-openai-runtime/src/native_web_search.rs:96-107 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-anthropic-runtime/src/native_web_search.rs:95\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic-runtime/src/native_web_search.rs"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"1092c03757b8180188ab03a52f955805b97bd3d50ade517ecf2a187234ade9ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/jcode-provider-copilot-runtime/src/lib.rs:1006-1011 | crates/jcode-provider-openai-runtime/src/openai_provider_impl.rs:841-847 | crates/jcode-provider-openrouter-runtime/src/openrouter_provider_impl.rs:347-352 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-copilot-runtime/src/lib.rs"},"region":{"startLine":1006}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ade07fd08c125acce95459497e99d8ec7643346eb7a074b156db7802d339412"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-provider-cursor-runtime/src/agent_transport.rs:220-226 | crates/jcode-provider-cursor-runtime/src/wire.rs:31-37 \u2014 before extracting anything, compare \u0060crates/jcode-provider-cursor-runtime/src/agent_transport.rs\u0060 and \u0060crates/jcode-provider-cursor-runtime/src/wire.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/agent_transport.rs"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"49c0ffe8c38c8d1227dddcb253aa4ce28fd41fe0e77b89496f41cc6cc7073a52"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-provider-cursor-runtime/src/agent_transport.rs:229-235 | crates/jcode-provider-cursor-runtime/src/wire.rs:40-46 \u2014 before extracting anything, compare \u0060crates/jcode-provider-cursor-runtime/src/agent_transport.rs\u0060 and \u0060crates/jcode-provider-cursor-runtime/src/wire.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/agent_transport.rs"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b531725808ec995de256a584dfbf0c853eca42d7f8e2ef4937a7ddc8ac62225"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/jcode-tui-account-picker/src/overlay_render.rs:232-237 | crates/jcode-tui-usage-overlay/src/lib.rs:656-661 | crates/jcode-tui/src/tui/login_picker.rs:613-618 \u2014 before extracting anything, compare \u0060crates/jcode-tui-account-picker/src/overlay_render.rs\u0060 and \u0060crates/jcode-tui-usage-overlay/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay_render.rs"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea6a2bd5e326ff308c339f888b0786e60437be83a38b416fa4a9cd0fe2c306f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 3): crates/jcode-tui-account-picker/src/overlay_render.rs:278-295 | crates/jcode-tui-usage-overlay/src/lib.rs:865-882 | crates/jcode-tui/src/tui/login_picker.rs:863-880 \u2014 before extracting anything, compare \u0060crates/jcode-tui-account-picker/src/overlay_render.rs\u0060 and \u0060crates/jcode-tui-usage-overlay/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay_render.rs"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8a667cb212a26714968eaa84c6af9142740278a3cb733b6d192459a0d5fe344"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5): crates/jcode-tui-mermaid/src/lib.rs:758-763 | crates/jcode-tui-mermaid/src/lib.rs:1042-1047 | crates/jcode-tui-mermaid/src/lib.rs:1140-1145 | crates/jcode-tui-mermaid/src/mermaid_cache_render.rs:71-76 | crates/jcode-tui-mermaid/src/mermaid_cache_render.rs:380-385 \u2014 there are 5 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060key\u0060 to \u0060FittedSourceKey\u0060 in one and \u0060(u64, RenderProfile)\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/lib.rs"},"region":{"startLine":758}}}],"partialFingerprints":{"codehealthFindingId/v1":"50b32726c415de34d449466bbe053cb290dd92a55bcee047af28b4f08eba0c6f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-tui-mermaid/src/mermaid_inline.rs:187-197 | crates/jcode-tui-mermaid/src/mermaid_runtime.rs:812-822 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_inline.rs"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c9cf7d24773e9a8c5f9a1bca9f2832d156131ef99c7cd4a5f0d1f0e89a95783"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-tui-style/src/color.rs:140-146 | crates/jcode-tui-workspace/src/color_support.rs:109-115 \u2014 before extracting anything, compare \u0060crates/jcode-tui-style/src/color.rs\u0060 and \u0060crates/jcode-tui-workspace/src/color_support.rs\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 228 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-style/src/color.rs"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf68cf5b1693b241385bf50b8f34f3b0e2f51f0b396b86ac6e3fe30e22fe7b19"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-tui-style/src/color.rs:156-162 | crates/jcode-tui-workspace/src/color_support.rs:118-124 \u2014 before extracting anything, compare \u0060crates/jcode-tui-style/src/color.rs\u0060 and \u0060crates/jcode-tui-workspace/src/color_support.rs\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 228 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-style/src/color.rs"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a0528cb2704ce02aeebdba1af78d85824b9a7d10d61b42658e3e2488317a479"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-tui-style/src/color.rs:282-287 | crates/jcode-tui-workspace/src/color_support.rs:244-249 \u2014 before extracting anything, compare \u0060crates/jcode-tui-style/src/color.rs\u0060 and \u0060crates/jcode-tui-workspace/src/color_support.rs\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 228 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-style/src/color.rs"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"081666e22fa528ca93e39d7ccf6454f2f6338e85239e222ceee3b8ed84301a73"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-tui-style/src/color.rs:289-297 | crates/jcode-tui-workspace/src/color_support.rs:251-259 \u2014 before extracting anything, compare \u0060crates/jcode-tui-style/src/color.rs\u0060 and \u0060crates/jcode-tui-workspace/src/color_support.rs\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 228 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-style/src/color.rs"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"aac5ba4fef1338c6a01b482954fcb68011d2a4beb8a6fcdd2ccbb6fd439accdd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-tui-style/src/color.rs:303-309 | crates/jcode-tui-workspace/src/color_support.rs:265-271 \u2014 before extracting anything, compare \u0060crates/jcode-tui-style/src/color.rs\u0060 and \u0060crates/jcode-tui-workspace/src/color_support.rs\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 228 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-style/src/color.rs"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd265ba90555093d1154c9f4f1d62132e3ad88fceab8cf48d6e1a458d01e6f04"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-tui/src/tui/app.rs:2035-2041 | crates/jcode-tui/src/tui/app/tui_state.rs:1124-1130 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app.rs"},"region":{"startLine":2035}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbb2eb678b96fbbc9a4eccd068a275f1e91f04e552acf20179e49b1aec144447"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-tui/src/tui/app/debug.rs:339-345 | crates/jcode-tui/src/tui/memory_profile.rs:183-189 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/app/debug.rs\u0060 and \u0060crates/jcode-tui/src/tui/memory_profile.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 41 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug.rs"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e7a4fc06921e87c5b014658cd54a42fc2304e6c34f60ac1a87d21c8b004f837"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/jcode-tui/src/tui/app/observe.rs:322-327 | crates/jcode-tui/src/tui/app/split_view.rs:343-348 | crates/jcode-tui/src/tui/app/todos_view.rs:913-918 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/app/observe.rs\u0060 and \u0060crates/jcode-tui/src/tui/app/split_view.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/observe.rs"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"4056a2c7dd0f66258344b5cc524ecef394fc4214dc28e0b6ffc10913d12e7e83"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/jcode-tui/src/tui/app/remote/swarm_status_core.rs:36-41 | crates/jcode-tui/src/tui/info_widget_swarm_background.rs:125-130 | crates/jcode-tui/src/tui/info_widget_swarm_gallery.rs:20-25 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/swarm_status_core.rs"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"12962ff8b2dae7ae0231a811988fbbc33d63b6bd7986b831335201ce073821cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/jcode-tui/src/tui/session_picker/session_view.rs:315-319 | crates/jcode-tui/src/tui/ui_tests/mod.rs:453-457 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/session_view.rs"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f006b04500918f12d9a53612d285c51358cf7a67d5ca127a2de8789d225876f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-tui/src/tui/ui_inline_interactive.rs:68-77 | src/cli/commands/model_routes.rs:9-18 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_inline_interactive.rs"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fdbd9cc07425b9012da3165e65e96596ff8a05d4a1f082c032a2575b943a210"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src/cli/auth_test/probes.rs:47-53 | src/cli/commands/report_info.rs:692-698 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/auth_test/probes.rs"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb6d13220cc73cd7e82258dfa93c50ac71a04387205a32bd7c0a8eb08ccdcfe5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-app-core/src/ambient/persistence.rs:18-25 | crates/jcode-build-support/src/lib.rs:75-82 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/ambient/persistence.rs"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"c58097fd5e1bee87a8d9028cdbb8453a35e58aca7b85a16772673a2566d84405"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-app-core/src/catchup.rs:256-264 | crates/jcode-tui/src/tui/app/subscribe_nudge.rs:69-77 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/catchup.rs"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5b39c692a3c73dc864e452b6451df6eef25af2246c996cc700c09e0bbc5f11d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/jcode-app-core/src/session_active_pids.rs:14-18 | crates/jcode-storage/src/active_pids.rs:133-137 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/session_active_pids.rs\u0060 and \u0060crates/jcode-storage/src/active_pids.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/session_active_pids.rs"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"78294177c308e6d7b639dca070844f66e5ebf80a84feea80d1701a7a5e5eb3a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-base/src/auth/claude.rs:115-123 | crates/jcode-base/src/auth/codex.rs:74-82 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/claude.rs"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f14aac3236f67494ce637958ea2f5d0678e0c2a7ca52e622d354d6de778369d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-base/src/auth/claude.rs:125-134 | crates/jcode-base/src/auth/codex.rs:84-93 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/claude.rs"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"2953846bebdc5152c41492b83920b19d3b9a7270a7720949eeffe43a912b1165"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-base/src/auth/claude.rs:365-373 | crates/jcode-base/src/auth/codex.rs:229-237 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/claude.rs"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"4667e053a44b0243e06dc684a3d9ca36422a61b8d5779a2cb8e54f81663ec088"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-harness-api/src/edit_stats.rs:23-29 | crates/jcode-todo-policy/src/store.rs:40-46 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api/src/edit_stats.rs"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ae92b8aec0210ba77235a6648625a5b664c720a27550cd42fd78113db08076a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-tui/src/tui/app/cache_fingerprints.rs:40-48 | crates/jcode-tui/src/tui/app/state_ui_count_format.rs:1-9 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/cache_fingerprints.rs"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"9843b42ce48663e59da4a3305ab60696a7cda4298d5d6057d383b4fd11a022a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): crates/jcode-tui/src/tui/app/dictation.rs:168-174 | crates/jcode-tui/src/tui/app/input.rs:1846-1852 | crates/jcode-tui/src/tui/app/input.rs:1855-1861 | crates/jcode-tui/src/tui/app/input.rs:1868-1874 \u2014 there are 4 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/input.rs:1868\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/dictation.rs"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"97acdc361becd6c4b86eb8e9b1b4816e44912c4e6fea2a2fa7d7a2f49dbb290d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/jcode-tui/src/tui/app/hotkey_feedback.rs:643-648 | crates/jcode-tui/src/tui/app/shortcut_hints.rs:136-141 | crates/jcode-tui/src/tui/app/swarm_hint.rs:35-40 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/hotkey_feedback.rs"},"region":{"startLine":643}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a8fe05c3d28d7dc39ef0ac656b4eb796b501a4383e11ea8d45e201ebc0677ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/jcode-tui/src/tui/app/observe.rs:193-200 | crates/jcode-tui/src/tui/app/split_view.rs:63-70 | crates/jcode-tui/src/tui/app/todos_view.rs:394-401 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/app/observe.rs\u0060 and \u0060crates/jcode-tui/src/tui/app/split_view.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/observe.rs"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b88c797acd76631abbe65826ccd6405410794c1563c8f2be844ad038d60b546"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-tui/src/tui/app/observe.rs:202-211 | crates/jcode-tui/src/tui/app/todos_view.rs:431-440 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/app/observe.rs\u0060 and \u0060crates/jcode-tui/src/tui/app/todos_view.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/observe.rs"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"69fc602087164b063fa53c3babb7bb11e861feacbe2db3f5dc22fa48d5ce540f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-tui/src/tui/info_widget_cache.rs:218-226 | crates/jcode-tui/src/tui/ui_input.rs:488-496 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_cache.rs"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f3e64027c7d10c48e8ad1592c3f9a23731c580f98eead1ca635ff6b125cb839"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-tui/src/tui/session_picker/loading.rs:2496-2502 | crates/jcode-tui/src/tui/session_picker/loading/pi_sessions.rs:12-18 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/session_picker/loading.rs\u0060 and \u0060crates/jcode-tui/src/tui/session_picker/loading/pi_sessions.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/session_picker/loading/pi_sessions.rs:12\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading.rs"},"region":{"startLine":2496}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc325ece3ccf9c5b35105c5c4539f514e2042f4bac866ada93f09ac66b11c370"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 3): crates/jcode-tui/src/tui/app/state_ui_storage.rs:278-294 | crates/jcode-tui/src/tui/app/state_ui_storage.rs:345-371 | crates/jcode-tui/src/tui/app/state_ui_storage.rs:384-411 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/state_ui_storage.rs:278\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui_storage.rs"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"7007d9b21136b44964fe5baa2010be0c387132cd4b427c72108906e35683398d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/jcode-tui/src/tui/app/state_ui_storage.rs:224-231 | crates/jcode-tui/src/tui/app/state_ui_storage.rs:290-313 | crates/jcode-tui/src/tui/app/state_ui_storage.rs:360-387 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/state_ui_storage.rs:224\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui_storage.rs"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d7293c6d1fd6e0f4363d108667d3e4119f01a9818cb69dd27e1c5e44afbd77e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2): crates/jcode-app-core/src/server/client_actions.rs:891-917 | crates/jcode-app-core/src/server/client_actions.rs:1001-1027 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/client_actions.rs:891\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_actions.rs"},"region":{"startLine":891}}}],"partialFingerprints":{"codehealthFindingId/v1":"388ffa0cf37afcc080b92aef206ffb496278dd67a5a955a971e6fb7941cb623a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-provider-openai-runtime/src/openai_stream_http.rs:256-275 | crates/jcode-provider-openai-runtime/src/openai_stream_http.rs:340-354 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-provider-openai-runtime/src/openai_stream_http.rs:339\u0060 calls \u0060Err\u0060 and \u0060crates/jcode-provider-openai-runtime/src/openai_stream_http.rs:255\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_stream_http.rs"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"92d8d08518fdfeb529f490d992dfb930a70ebfdbfe52e17770b293148bcc0dff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 4): crates/jcode-app-core/src/server/client_actions.rs:888-906 | crates/jcode-app-core/src/server/client_actions.rs:942-960 | crates/jcode-app-core/src/server/client_actions.rs:975-993 | crates/jcode-app-core/src/server/client_actions.rs:998-1016 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_actions.rs"},"region":{"startLine":888}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f0f6fcaa439e343dc639812492d08430f0c686e092ee369016137f4c18993da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-provider-openai-runtime/src/lib.rs:1120-1138 | crates/jcode-provider-openrouter-runtime/src/lib.rs:1104-1118 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-openai-runtime/src/lib.rs:1120\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/lib.rs"},"region":{"startLine":1120}}}],"partialFingerprints":{"codehealthFindingId/v1":"05eeb934a86284c553d429332d8377ff1b56f989283f0565f34708757952bc64"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/jcode-app-core/src/tool/discover.rs:846-861 | crates/jcode-app-core/src/tool/discover.rs:932-949 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/discover.rs:846\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/discover.rs"},"region":{"startLine":846}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5c9d5cdafc3165c49c4fa472ea480c9c886cc2a2c0ef43c2883f0907b1c84b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/jcode-provider-doctor/src/live_provider_probes.rs:1287-1295 | crates/jcode-provider-doctor/src/live_provider_probes.rs:1345-1356 | crates/jcode-provider-doctor/src/live_provider_probes.rs:1448-1465 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-doctor/src/live_provider_probes.rs:1287\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/live_provider_probes.rs"},"region":{"startLine":1287}}}],"partialFingerprints":{"codehealthFindingId/v1":"9244c0b307858bd94b704afcee053a4077bc7582366fbf582f71af7ceef53767"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/jcode-provider-openai/src/request.rs:471-488 | crates/jcode-provider-openai/src/request.rs:645-662 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-openai/src/request.rs:471\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai/src/request.rs"},"region":{"startLine":471}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ebc6430581f64b1338f2986b6cd5f9523dcd46522867ec2602c6d23459ec63a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/jcode-app-core/src/tool/discover.rs:731-748 | crates/jcode-app-core/src/tool/discover.rs:909-926 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/discover.rs:731\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/discover.rs"},"region":{"startLine":731}}}],"partialFingerprints":{"codehealthFindingId/v1":"99e462148c95b2c01ae86bce83718b6be9da069b90a13f58a9ae1a12331f9338"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/jcode-app-core/src/server/comm_control.rs:1345-1360 | crates/jcode-app-core/src/server/comm_plan.rs:488-503 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/server/comm_control.rs\u0060 and \u0060crates/jcode-app-core/src/server/comm_plan.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/comm_control.rs:1345\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_control.rs"},"region":{"startLine":1345}}}],"partialFingerprints":{"codehealthFindingId/v1":"217975e0a132ac3b9acd0eaa8033a5cbe5c0f809f60af2f6608a8940654d7d15"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-provider-anthropic-runtime/src/lib.rs:2150-2165 | crates/jcode-provider-openrouter-runtime/src/openrouter_sse_stream.rs:146-160 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-anthropic-runtime/src/lib.rs:2150\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic-runtime/src/lib.rs"},"region":{"startLine":2150}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dba0919896711c10baed8fefbac2f5478833cb797f3bad46acfff15739c8667"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-base/src/provider/models_catalog.rs:53-64 | crates/jcode-base/src/provider/models_catalog.rs:102-117 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/provider/models_catalog.rs:53\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/models_catalog.rs"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"284fb996b48af32f3ec058b0b56fd935374bd51a3f6bd538f884a235adf306e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-app-core/src/tool/discover.rs:700-714 | crates/jcode-app-core/src/tool/discover.rs:879-893 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/discover.rs"},"region":{"startLine":700}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b478a75bf23d0282060ecc7c854f1a9f629458f7d72906dbb1d0ea3141ee8da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-tui/src/video_export.rs:977-991 | crates/jcode-tui/src/video_export.rs:993-1007 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/video_export.rs:977\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/video_export.rs"},"region":{"startLine":977}}}],"partialFingerprints":{"codehealthFindingId/v1":"af34c0d40852d6caf474ed98ac4a4ddf5c93804f57fabe34bc5ce6775f4f68b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-tui/src/tui/app/commands_cloud.rs:301-315 | crates/jcode-tui/src/tui/app/commands_cloud.rs:398-412 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_cloud.rs"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"635f6da64857f4a85d538c814430d13981889c1957924202eb5b178fe9c8bfc5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): src/cli/login.rs:419-433 | src/cli/login.rs:470-482 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/cli/login.rs:419\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/login.rs"},"region":{"startLine":419}}}],"partialFingerprints":{"codehealthFindingId/v1":"618ece68d1a07acc3111cba9db8d2bfa6da831a6a7134da391e4dda6c21874fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-setup-hints/src/windows_setup.rs:686-700 | crates/jcode-setup-hints/src/windows_setup.rs:755-769 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-setup-hints/src/windows_setup.rs:686\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/windows_setup.rs"},"region":{"startLine":686}}}],"partialFingerprints":{"codehealthFindingId/v1":"027d57633dd7ffd1ca73cfeea79c52088f9464dbb957ed97c9eb46b9536408a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-tui/src/tui/backend.rs:1575-1589 | crates/jcode-tui/src/tui/backend.rs:1602-1616 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/backend.rs:1575\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/backend.rs"},"region":{"startLine":1575}}}],"partialFingerprints":{"codehealthFindingId/v1":"08ccde5a9fd3af4d58b0326485f37942ba5ef0efbdc54eb29a542668c15e6ca3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-tui/src/tui/app/auth.rs:3064-3078 | crates/jcode-tui/src/tui/app/auth.rs:3087-3101 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/auth.rs:3064\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth.rs"},"region":{"startLine":3064}}}],"partialFingerprints":{"codehealthFindingId/v1":"7db04d1af4bfe9eb2c2e2634c32cb106f7cdd503f2fb5483157bcdd8147d1e34"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-app-core/src/tool/websearch.rs:231-244 | crates/jcode-app-core/src/tool/websearch.rs:343-357 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/websearch.rs:231\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-app-core/src/tool/websearch.rs:230\u0060 calls \u0060form\u0060, \u0060send\u0060 and \u0060crates/jcode-app-core/src/tool/websearch.rs:343\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/websearch.rs"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"129f268dd1bc372b20ff7e4334fae4506d1558e1a4087f6cf5fc864797e58a83"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-app-core/src/channel.rs:244-258 | crates/jcode-app-core/src/channel.rs:453-467 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/channel.rs:244\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/channel.rs"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3fd2a4ae23b3e52ecf1436285cf06dd2b891723d82e84f073c86c3252f976a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): src/cli/cloud_ephemeral.rs:96-109 | src/cli/cloud_managed.rs:64-77 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/cli/cloud_ephemeral.rs:96\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_ephemeral.rs"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"2625e042d9a5ba866c4697abcdfe144be935c1efa4be60cf9e8e2e02fc49dec7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201323 lines \u00D7 2): crates/jcode-base/src/prompt.rs:998-1019 | crates/jcode-base/src/prompt.rs:1043-1065 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/prompt.rs:998\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/prompt.rs"},"region":{"startLine":998}}}],"partialFingerprints":{"codehealthFindingId/v1":"918e70e672b6055994133f2917aa5591dd98ad99b0a149989e84f55c5459483f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-tui/src/video_export.rs:996-1009 | crates/jcode-tui/src/video_export.rs:1012-1025 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/video_export.rs:996\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/video_export.rs"},"region":{"startLine":996}}}],"partialFingerprints":{"codehealthFindingId/v1":"59e4566dca3d9a73bd32bd83618d71ec83dc2287591c3f0dce701468d9ee283f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-tui/src/tui/app/commands_improve.rs:482-495 | crates/jcode-tui/src/tui/app/commands_improve.rs:551-564 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/commands_improve.rs:482\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_improve.rs"},"region":{"startLine":482}}}],"partialFingerprints":{"codehealthFindingId/v1":"788ba8e3a9bd55845a5814921d5abb1ec089a1adf13517781acf57e7c1b5fa17"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-tui/src/tui/ui_prepare.rs:1491-1504 | crates/jcode-tui/src/tui/ui_prepare.rs:1633-1646 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_prepare.rs:1491\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_prepare.rs"},"region":{"startLine":1491}}}],"partialFingerprints":{"codehealthFindingId/v1":"54d32847d91a2ac96a12dee5589ac81940c97930611142d8c511f689ca3cf16f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-tui/src/tui/ui_frame_metrics.rs:1022-1035 | crates/jcode-tui/src/tui/ui_frame_metrics.rs:1050-1063 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_frame_metrics.rs:1022\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_frame_metrics.rs"},"region":{"startLine":1022}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e0863890254bab8781fe596cfc3e997e0943eed0d5fefb81e3e10db8b1ece17"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): src/bin/memory_recall_bench.rs:1259-1272 | src/bin/memory_recall_bench.rs:1615-1627 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/bin/memory_recall_bench.rs:1259\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":1259}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6787d1bb634004c6c36ba45f57987d63bc61d15ce9331bc71517d9eb0afe9f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/jcode-base/src/usage/provider_fetch.rs:292-305 | crates/jcode-base/src/usage/provider_fetch.rs:309-322 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/usage/provider_fetch.rs:292\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/provider_fetch.rs"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"27b74a011d65327615c8a3f374de0388bc5547d55a01606d13ade36791596291"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): src/cli/acp.rs:539-552 | src/cli/acp.rs:596-609 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/cli/acp.rs:539\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/acp.rs"},"region":{"startLine":539}}}],"partialFingerprints":{"codehealthFindingId/v1":"c388a01c7237efafa7dc73019d24a7b8011f08977e8d499385fc000dab460161"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-provider-env/src/lib.rs:91-103 | crates/jcode-provider-env/src/lib.rs:150-162 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-env/src/lib.rs:91\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-env/src/lib.rs"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fab0a91da11daded8faf3c9fb64eba10c2c190f226e1f6d4d8df93bebac886c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-base/src/provider/models_catalog.rs:207-216 | crates/jcode-base/src/provider/models_catalog.rs:342-354 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/provider/models_catalog.rs:207\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/models_catalog.rs"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b4282e3766bde05a8356e4bd65ca513e6e9bea4d8806347705646e6dfdd41c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-provider-openai-runtime/src/openai_stream_http.rs:17-27 | crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs:1430-1442 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-openai-runtime/src/openai_stream_http.rs:17\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_stream_http.rs"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ee51149d2de93cb438563068ea862b2a853cf1486b270e2d6ce4db907ce36ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-provider-bedrock/src/lib.rs:883-895 | crates/jcode-provider-bedrock/src/lib.rs:901-913 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-bedrock/src/lib.rs:883\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-bedrock/src/lib.rs"},"region":{"startLine":883}}}],"partialFingerprints":{"codehealthFindingId/v1":"2585e17a0fcb332a96c90a64a6256a1c4b114d7423c53b5781a2cffe91af443a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-provider-doctor/src/live_provider_probes.rs:964-976 | crates/jcode-provider-doctor/src/live_provider_probes.rs:1595-1607 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-doctor/src/live_provider_probes.rs:964\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/live_provider_probes.rs"},"region":{"startLine":964}}}],"partialFingerprints":{"codehealthFindingId/v1":"be6ccec25a864d512747459ffe7d88e9a66f519ac85eecfe4fdd5d6e00279d14"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-app-core/src/server/provider_control.rs:1206-1218 | crates/jcode-app-core/src/server/provider_control.rs:1233-1245 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/provider_control.rs:1206\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/provider_control.rs"},"region":{"startLine":1206}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c96665327d0555ac7f510b14331d441b73b3d45ef566da59459886e948e59be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-app-core/src/server.rs:1619-1631 | crates/jcode-app-core/src/server.rs:1665-1676 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server.rs:1619\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server.rs"},"region":{"startLine":1619}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce309a0ea824365b782872772b389b216f13ba6e06a14025c4d894513b95c352"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): crates/jcode-tui/src/tui/app/commands.rs:1112-1123 | crates/jcode-tui/src/tui/app/commands.rs:3742-3754 | crates/jcode-tui/src/tui/app/commands.rs:3788-3799 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":1112}}}],"partialFingerprints":{"codehealthFindingId/v1":"42a2ab97a87680b6c39d763c542b868499b50d557686128e44594629411598c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): crates/jcode-tui/src/tui/app/auth_account_picker.rs:615-627 | crates/jcode-tui/src/tui/app/auth_account_picker.rs:639-651 | crates/jcode-tui/src/tui/app/auth_account_picker.rs:957-969 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/auth_account_picker.rs:615\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker.rs"},"region":{"startLine":615}}}],"partialFingerprints":{"codehealthFindingId/v1":"41f9ea08b7e9fbad4d2068c72594b4c48e0b7c91ed7af847cdb967b48ed81b92"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-provider-gemini-runtime/src/lib.rs:376-388 | crates/jcode-provider-gemini-runtime/src/lib.rs:412-419 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-gemini-runtime/src/lib.rs:376\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-gemini-runtime/src/lib.rs"},"region":{"startLine":376}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfecfe7258d2fdd5f3ad938348995e7dfab7da8468eccf67dc5acbd2faa5cc25"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote.rs:1709-1720 | crates/jcode-tui/src/tui/app/remote/key_handling/update.rs:16-24 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/remote.rs:1709\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-tui/src/tui/app/remote/key_handling/update.rs:26\u0060 calls \u0060set_status_notice\u0060 and \u0060crates/jcode-tui/src/tui/app/remote.rs:1722\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote.rs"},"region":{"startLine":1709}}}],"partialFingerprints":{"codehealthFindingId/v1":"06f95ca87199dc420c101d97314dbf3abf749ef883a1e62805b653af429ccaa3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): crates/jcode-app-core/src/server/client_lifecycle.rs:920-930 | crates/jcode-app-core/src/server/client_lifecycle.rs:1063-1074 | crates/jcode-app-core/src/server/client_lifecycle.rs:1085-1095 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/client_lifecycle.rs:920\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_lifecycle.rs"},"region":{"startLine":920}}}],"partialFingerprints":{"codehealthFindingId/v1":"47ca69449eb28e48adb5f498c6fc7a7cb30e253c4cd81af4e6b7d47d09ab87ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote/reconnect.rs:296-307 | crates/jcode-tui/src/tui/app/remote/reconnect.rs:592-603 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/remote/reconnect.rs:296\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/reconnect.rs"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"319a8b0b76a16755625977175ae944c703ae2902060baaaf46ca09cacb47c176"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-base/src/auth/antigravity.rs:429-440 | crates/jcode-base/src/auth/gemini.rs:572-580 \u2014 before extracting anything, compare \u0060crates/jcode-base/src/auth/antigravity.rs\u0060 and \u0060crates/jcode-base/src/auth/gemini.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/auth/antigravity.rs:429\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/antigravity.rs"},"region":{"startLine":429}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a62622b469e320272ca644c765e4cbd4f09b6b515fbfa8d039d7e51168c9b34"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-provider-antigravity-runtime/src/lib.rs:425-436 | crates/jcode-provider-gemini-runtime/src/lib.rs:436-446 \u2014 before extracting anything, compare \u0060crates/jcode-provider-antigravity-runtime/src/lib.rs\u0060 and \u0060crates/jcode-provider-gemini-runtime/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 137 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-antigravity-runtime/src/lib.rs"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"e527b29fa3d5d84505898ef9bb93706e24933c05c15d55aa2079db2cea6b00a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-tui/src/tui/ui_onboarding.rs:462-473 | crates/jcode-tui/src/tui/ui_onboarding.rs:529-540 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_onboarding.rs:462\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_onboarding.rs"},"region":{"startLine":462}}}],"partialFingerprints":{"codehealthFindingId/v1":"e486de5c98b3b774ff1e66c15a0765c29b31908c9921e01d6f679c8d87760e8a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): crates/jcode-app-core/src/tool/discover.rs:1017-1028 | crates/jcode-app-core/src/tool/discover.rs:1208-1219 | crates/jcode-app-core/src/tool/discover.rs:1289-1300 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/discover.rs:1017\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/discover.rs"},"region":{"startLine":1017}}}],"partialFingerprints":{"codehealthFindingId/v1":"6320129b2a5dc42c3e14182365346d1b1f2e2f6fe2be388be497bf350b0f1147"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-tui/src/tui/app/auth/auth_muse.rs:94-102 | crates/jcode-tui/src/tui/app/auth/auth_muse.rs:143-154 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/auth/auth_muse.rs:143\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth/auth_muse.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ad7641e35688b9e6761a12941de8976a44e1e4eb98ebbdfd7fdc22c51dc606b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-base/src/auth/antigravity.rs:391-402 | crates/jcode-base/src/auth/gemini.rs:538-549 \u2014 before extracting anything, compare \u0060crates/jcode-base/src/auth/antigravity.rs\u0060 and \u0060crates/jcode-base/src/auth/gemini.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-base/src/auth/antigravity.rs:403\u0060 calls \u0060fetch_project_id\u0060, \u0060ok\u0060 and \u0060crates/jcode-base/src/auth/gemini.rs:550\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/antigravity.rs"},"region":{"startLine":391}}}],"partialFingerprints":{"codehealthFindingId/v1":"e41c86aa0a9e3ce41391cd18084110f5374fb6e5ea9efc8017495b3ad657a05e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-provider-openrouter-runtime/src/lib.rs:793-804 | crates/jcode-provider-openrouter-runtime/src/lib.rs:2113-2124 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-openrouter-runtime/src/lib.rs:793\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/lib.rs"},"region":{"startLine":793}}}],"partialFingerprints":{"codehealthFindingId/v1":"83a13806479885a7cf5b7570b4f5a637f6812da7d571eaec64622c6f38fe5da6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src/bin/memory_recall_bench.rs:1829-1840 | src/bin/memory_recall_bench.rs:2024-2033 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/bin/memory_recall_bench.rs:1829\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":1829}}}],"partialFingerprints":{"codehealthFindingId/v1":"30a23ef04b46eb9ebf1d22913b891fe6a9dd2cc9242403058086192b3b7b5310"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-app-core/src/perf.rs:159-170 | crates/jcode-app-core/src/perf.rs:178-189 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/perf.rs:159\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/perf.rs"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"94786fb03254d35a848b7c11690a27f520a5b5cb0d82f99062510ec6b4596f5b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): crates/jcode-tui/src/tui/app/auth.rs:1930-1941 | crates/jcode-tui/src/tui/app/auth.rs:1974-1984 | crates/jcode-tui/src/tui/app/auth.rs:2054-2065 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/auth.rs:1930\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth.rs"},"region":{"startLine":1930}}}],"partialFingerprints":{"codehealthFindingId/v1":"962b973ecf870168c92925b6bd9aed6fbc30e118c053003823c8409d40e6d492"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-app-core/src/message_notifications.rs:139-150 | crates/jcode-base/src/message/notifications.rs:494-505 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/message_notifications.rs\u0060 and \u0060crates/jcode-base/src/message/notifications.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 91 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/message_notifications.rs:139\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/message_notifications.rs"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e6c10a2f95041411b912f405eea0643e8fb8b59e080675f506e3fb53c86eb5e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-app-core/src/agent/turn_execution.rs:883-894 | crates/jcode-app-core/src/agent/turn_execution.rs:933-944 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060self\u0060 to \u0060crate) async fn announce_late_mcp_tools(\u0026mut\u0060 in one and \u0060crate) fn announce_late_skills(\u0026mut\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/turn_execution.rs"},"region":{"startLine":883}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb04fe2c66783a610d673344f11177bbb91da492b9f5e9940c97a01818a3cba7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-app-core/src/server.rs:2135-2143 | crates/jcode-app-core/src/server.rs:2188-2198 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server.rs:2135\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server.rs"},"region":{"startLine":2135}}}],"partialFingerprints":{"codehealthFindingId/v1":"6645473df60893856e91de2e0dfbb3380a427d24bf6e577a07f1c1a05f139172"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-app-core/src/server/jade_relay.rs:253-261 | crates/jcode-app-core/src/server/jade_relay.rs:621-631 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/jade_relay.rs:253\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/jade_relay.rs"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddf9e3292cebbc0d89bbb9e858851428dfd432dae4695bacf1d9b109a6c4957b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-tui/src/tui/session_picker/render.rs:553-561 | crates/jcode-tui/src/tui/session_picker/render.rs:568-578 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/session_picker/render.rs:553\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/render.rs"},"region":{"startLine":553}}}],"partialFingerprints":{"codehealthFindingId/v1":"958e92dfc2dab196f955ddb16f4316e137f2e95d9fb44b726315b94ea2f9ef8f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote/key_handling.rs:1813-1823 | crates/jcode-tui/src/tui/app/remote/key_handling.rs:1969-1979 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/key_handling.rs"},"region":{"startLine":1813}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bb91177266ed081e8f4f46de82da3cddc3bf6b797c47606a94e38a765a4c3df"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 5): crates/jcode-tui/src/tui/app/auth_account_picker.rs:554-562 | crates/jcode-tui/src/tui/app/auth_account_picker.rs:900-908 | crates/jcode-tui/src/tui/app/auth_account_picker_saved_accounts.rs:226-234 | crates/jcode-tui/src/tui/app/auth_account_picker_saved_accounts.rs:397-405 | crates/jcode-tui/src/tui/login_picker.rs:785-795 \u2014 before extracting anything, compare \u0060crates/jcode-tui/src/tui/app/auth_account_picker.rs\u0060 and \u0060crates/jcode-tui/src/tui/app/auth_account_picker_saved_accounts.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 33 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/auth_account_picker.rs:554\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker.rs"},"region":{"startLine":554}}}],"partialFingerprints":{"codehealthFindingId/v1":"5aefe372b1fabe166c6ba62232d0b4c214f8d1f3b16a022f003d0a18213ef1ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201319 lines \u00D7 3): crates/jcode-app-core/src/tool/discover.rs:1035-1050 | crates/jcode-app-core/src/tool/discover.rs:1226-1244 | crates/jcode-app-core/src/tool/discover.rs:1308-1326 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/discover.rs:1035\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/discover.rs"},"region":{"startLine":1035}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7d257c7f9eb9f946ae7be293175fda0ceca746a46af0c69f74e156dc3367010"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-app-core/src/tool/memory.rs:246-256 | crates/jcode-app-core/src/tool/memory.rs:300-306 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/memory.rs:246\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/memory.rs"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"03abfe0c7abdb51850d763dd3a19a64da1be24a544ced8f61abe9527242b7015"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-base/src/memory.rs:1268-1278 | crates/jcode-base/src/memory.rs:1326-1336 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/memory.rs:1268\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory.rs"},"region":{"startLine":1268}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2879f4ac5cca69611c1c9927686cad7a9d52f29be9d201125047e752987bf7c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-harness-api-server/src/translate.rs:1177-1186 | crates/jcode-harness-api-server/src/translate.rs:1196-1206 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/translate.rs"},"region":{"startLine":1177}}}],"partialFingerprints":{"codehealthFindingId/v1":"c40629c73ce4a78aa9a60f1d6d01ea00538612c99dc012dc931ed24cd484e948"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): crates/jcode-tui/src/tui/ui_onboarding.rs:460-470 | crates/jcode-tui/src/tui/ui_onboarding.rs:497-507 | crates/jcode-tui/src/tui/ui_onboarding.rs:527-537 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_onboarding.rs:460\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_onboarding.rs"},"region":{"startLine":460}}}],"partialFingerprints":{"codehealthFindingId/v1":"523fab4ae4bf226573480ebafdfc4a3eafa654baaa6e4ccd62c1d96fe04e8e13"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src/cli/provider_init.rs:1071-1081 | src/cli/provider_init.rs:1280-1290 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/cli/provider_init.rs:1071\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/provider_init.rs"},"region":{"startLine":1071}}}],"partialFingerprints":{"codehealthFindingId/v1":"543a25475a61291df0145a3a495016f590c5094c400bd722c3834284db4baf46"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-app-core/src/tool/write.rs:182-192 | crates/jcode-app-core/src/tool/write.rs:195-205 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/write.rs:182\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/write.rs"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa30a4eee97a98ea73b181f25de2e14d1adbce82c037d7c69661f8a3d865773b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-base/src/auth/oauth.rs:173-183 | crates/jcode-base/src/auth/oauth.rs:239-249 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/oauth.rs"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"3df2050bd8406674a8d319cb4b9492f6485f25cc5b7cfec27da73f986dda4300"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-app-core/src/tool/memory.rs:306-316 | crates/jcode-app-core/src/tool/memory.rs:331-341 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/memory.rs:306\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/memory.rs"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"565d6db5a898ddff25a37ddb67cba93e54fc80779f9eb34eb5cf36f9c69bbdfc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): src/bin/memory_recall_bench.rs:1884-1893 | src/bin/memory_recall_bench.rs:1900-1910 | src/bin/memory_recall_bench.rs:1952-1957 | src/bin/memory_recall_bench.rs:1982-1989 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/bin/memory_recall_bench.rs:1884\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":1884}}}],"partialFingerprints":{"codehealthFindingId/v1":"99aa92a7835607317c222389e68ad5380cf98f4917f7648c44909f6c4774e0db"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-app-core/src/channel.rs:270-280 | crates/jcode-app-core/src/channel.rs:479-489 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/channel.rs:270\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/channel.rs"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5490d6a414f9268f8cabb95cb2822ff959fa38d72164b8f00d0507df2d99250"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-provider-gemini-runtime/src/lib.rs:787-797 | crates/jcode-provider-gemini-runtime/src/lib.rs:824-834 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-gemini-runtime/src/lib.rs:787\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-gemini-runtime/src/lib.rs"},"region":{"startLine":787}}}],"partialFingerprints":{"codehealthFindingId/v1":"119ddfafb72b50e1e05e5a9a9cf32e8b85e9c82a437e086b82b88bbfe01d6f82"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-app-core/src/server/comm_plan.rs:164-174 | crates/jcode-app-core/src/server/comm_plan.rs:303-313 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/comm_plan.rs:164\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_plan.rs"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b4ac9dc7b91d0c3c20c62bd83a321f078d37da61d0b48b322771e229499e915"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote/reconnect.rs:311-320 | crates/jcode-tui/src/tui/app/remote/reconnect.rs:607-616 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/remote/reconnect.rs:311\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/reconnect.rs"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"29edffaae655a93a70ad022cb192ce38f9ae101cfc09921a71da2f1fa2b9c2e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-tui/src/tui/ui_onboarding.rs:580-589 | crates/jcode-tui/src/tui/ui_onboarding.rs:605-614 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_onboarding.rs"},"region":{"startLine":580}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9f84b2630f297b9467ab0bde0847f9cfc3a33694adecf64b01dce007d8b26ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-tui/src/tui/ui_input.rs:659-667 | crates/jcode-tui/src/tui/ui_input.rs:1032-1041 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_input.rs:659\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_input.rs"},"region":{"startLine":659}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdc4f193e6af93a66f7724e57574698166afd851076c9e799776da6a3dd4003f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src/bin/memory_recall_bench.rs:440-449 | src/bin/memory_recall_bench.rs:1015-1024 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":440}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbae296f5207606baa1caa73aba55f500781520ca8797f3dc71433dc1a5b1631"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-tui/src/tui/info_widget_memory_utils.rs:17-26 | crates/jcode-tui/src/tui/info_widget_memory_utils.rs:62-71 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/info_widget_memory_utils.rs:17\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_memory_utils.rs"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"22b25a37edacd960c4eccaadfc5f5e9d99f0769176f5947d40f6de5838480ea7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-embedding/src/lib.rs:132-141 | crates/jcode-embedding/src/lib.rs:295-300 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-embedding/src/lib.rs:128\u0060 calls \u0060exists\u0060, \u0060download_model\u0060 and \u0060crates/jcode-embedding/src/lib.rs:294\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-embedding/src/lib.rs"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f64534cb50379997e7f0369fa634115a207baa830fc91499172d20123c3bf11"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-app-core/src/tool/session_http.rs:149-158 | crates/jcode-tui/src/tui/app/cloud_environment.rs:82-91 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/session_http.rs:149\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/session_http.rs"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"64ec5cfe1879193097ab35d83906afc45ec56b75802a2ae3b01a2ecc50727907"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/jcode-base/src/auth/cursor.rs:557-565 | crates/jcode-base/src/auth/cursor.rs:603-611 | crates/jcode-base/src/provider/antigravity.rs:105-113 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/cursor.rs"},"region":{"startLine":557}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a20a13f0358385095cbfb637b24afc898ef67eafed5bbc3754778f9e46606f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote/reconnect.rs:404-412 | crates/jcode-tui/src/tui/app/remote/reconnect.rs:458-466 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/remote/reconnect.rs:404\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/reconnect.rs"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"57113a5cf56da095f608329288cf8c17619b743ef50ac8e36068750d7320c515"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-app-core/src/perf.rs:525-531 | crates/jcode-tui/src/tui/ui_frame_metrics.rs:937-945 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/perf.rs:525\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/perf.rs"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"24275d5a0668c52d72094891ab88f10d44edcec496e383bc34a72a1f9995a79d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-provider-doctor/src/live_provider_probes.rs:185-193 | crates/jcode-provider-doctor/src/live_provider_probes.rs:369-377 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/live_provider_probes.rs"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"24e94c99d6e3920b31722c2d23cf73c440b4a29f9b7946b22f1de78471723f80"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-app-core/src/server/debug_swarm_write.rs:345-353 | crates/jcode-app-core/src/server/debug_swarm_write.rs:448-456 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_swarm_write.rs"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6b1f110f8d45eab2427561f46736b3fffae47189d638dcd9dcc974b85b71a51"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-app-core/src/tool/communicate.rs:1735-1743 | crates/jcode-app-core/src/tool/communicate.rs:1755-1763 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/communicate.rs:1735\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/communicate.rs"},"region":{"startLine":1735}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9c0f3773293fe98b25260ad2349747bbaa9aeb56e9283124bed774f59f05697"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-tui/src/tui/app/auth.rs:1915-1923 | crates/jcode-tui/src/tui/app/auth.rs:1957-1965 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/auth.rs:1915\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth.rs"},"region":{"startLine":1915}}}],"partialFingerprints":{"codehealthFindingId/v1":"79b7aeb039920b005f4ce522bce4ecc7455752fdd166027798a95abcca617b3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src/bin/memory_recall_bench.rs:1208-1216 | src/bin/memory_recall_bench.rs:1577-1583 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":1208}}}],"partialFingerprints":{"codehealthFindingId/v1":"327de65f3f93615bd95d2b9fe3c1a01d5f73da988a2b419f8b0605e001039c5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-base/src/browser_chromium_diag.rs:79-87 | crates/jcode-base/src/model_usage.rs:38-46 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/browser_chromium_diag.rs"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"8df041e7f7f8c4a3915813b0d8b0a1d8c03e1bb1393d53290576ec92d105f896"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-tui/src/tui/app/runtime_memory.rs:196-204 | crates/jcode-tui/src/tui/app/runtime_memory.rs:237-245 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/runtime_memory.rs"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3c26e08f4d07c03e41a849a75640d9e463f3594374c3f6ed6c7b891ec4923a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-tui/src/tui/ui_overlays.rs:71-79 | crates/jcode-tui/src/tui/ui_overlays.rs:734-742 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_overlays.rs:71\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_overlays.rs"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"f617fc7b306ae4c189ce293ca6fc8a86e3e5284fd43df9fba312127e14d3ae4e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-tui/src/tui/app/auth.rs:1121-1129 | crates/jcode-tui/src/tui/app/auth.rs:1694-1702 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-tui/src/tui/app/auth.rs:1131\u0060 calls \u0060to_string\u0060 and \u0060crates/jcode-tui/src/tui/app/auth.rs:1705\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth.rs"},"region":{"startLine":1121}}}],"partialFingerprints":{"codehealthFindingId/v1":"68d2f228ec0b4e02d5dd15e7c4b1fc8918e632d930ae924f3c13013a81b8fbbc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-app-core/src/agent.rs:989-997 | crates/jcode-app-core/src/agent.rs:1010-1018 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/agent.rs:989\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent.rs"},"region":{"startLine":989}}}],"partialFingerprints":{"codehealthFindingId/v1":"94fb53113f38950ff82be7eb3a046cf5a65906b92f4b8dfcf961ae77a0214cd0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-base/src/provider/models.rs:1249-1257 | crates/jcode-provider-core/src/models.rs:211-219 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/provider/models.rs:1249\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/models.rs"},"region":{"startLine":1249}}}],"partialFingerprints":{"codehealthFindingId/v1":"78751468c9e9cb489c409a2f334f87ac88eccbab5947f6998a149b9f34cbaec4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): crates/jcode-app-core/src/server/debug_server_state.rs:732-740 | crates/jcode-app-core/src/server/debug_server_state.rs:742-750 | crates/jcode-app-core/src/server/debug_server_state.rs:752-760 | crates/jcode-app-core/src/server/debug_server_state.rs:762-770 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/debug_server_state.rs:732\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-app-core/src/server/debug_server_state.rs:741\u0060 calls \u0060and_then\u0060, \u0060get\u0060 and \u0060crates/jcode-app-core/src/server/debug_server_state.rs:731\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_server_state.rs"},"region":{"startLine":732}}}],"partialFingerprints":{"codehealthFindingId/v1":"9becbd27ddfc424ec839993002e6fbfeb58748e3272daf6ca7b9edae34199f8f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-app-core/src/tool/session_search.rs:1468-1475 | crates/jcode-app-core/src/tool/session_search.rs:1626-1634 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/tool/session_search.rs:1468\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060session\u0060 to \u0060\u0026ExternalSessionRecord\u0060 in one and \u0060\u0026Session\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/session_search.rs"},"region":{"startLine":1468}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee0f8ee96dac47997da82a8d70ee0c011595a386020f4d386f53716f634a7eda"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-base/src/session_telemetry.rs:109-115 | crates/jcode-tui/src/tui/app/state_ui_messages.rs:313-321 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session_telemetry.rs"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"96192af43e2334f0a8febdd9a73758799a31e88b1844ca31196c2f9f10b4d211"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-app-core/src/server.rs:1691-1699 | crates/jcode-app-core/src/server.rs:1751-1759 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server.rs"},"region":{"startLine":1691}}}],"partialFingerprints":{"codehealthFindingId/v1":"35545e13ec2cec9f2bb6d4402e8c94156de8576be0fb837c2554faf69fb5cf76"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/jcode-app-core/src/server/comm_control.rs:1467-1475 | crates/jcode-app-core/src/server/comm_plan.rs:529-537 | crates/jcode-app-core/src/server/comm_plan.rs:675-683 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/server/comm_control.rs\u0060 and \u0060crates/jcode-app-core/src/server/comm_plan.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/comm_control.rs:1467\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-app-core/src/server/comm_plan.rs:538\u0060 calls \u0060push\u0060 and \u0060crates/jcode-app-core/src/server/comm_control.rs:1476\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_control.rs"},"region":{"startLine":1467}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f380c5ca13eba3eda92e2966e9114ad3b019412ca35371354bff52af85641b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-harness-api/src/requests.rs:368-375 | crates/jcode-protocol/src/wire.rs:934-941 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-harness-api/src/requests.rs:368\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api/src/requests.rs"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"26763debb382dd5d535fd8bfc2344f71271830c503891a4e78152084ccf3da52"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/jcode-tui/src/tui/app/todos_view.rs:745-752 | crates/jcode-tui/src/tui/app/turn_notify.rs:267-271 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/todos_view.rs"},"region":{"startLine":745}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9acf6f012fd7b2cea0eaf3e076c50bff0b462838ca02f7d04063cfba3493d3d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/jcode-app-core/src/server/debug_swarm_write.rs:256-263 | crates/jcode-app-core/src/server/debug_swarm_write.rs:345-352 | crates/jcode-app-core/src/server/debug_swarm_write.rs:448-455 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_swarm_write.rs"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ed668b1923076f8ac45068a1a5130d46a2d232556c1da81a19822206c8f2b5b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-base/src/usage/api_keys.rs:225-232 | crates/jcode-base/src/usage/api_keys.rs:236-243 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/usage/api_keys.rs:225\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/api_keys.rs"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"31e2ee91af14e830c796d6b7925b50c03cf1789fdc8932ccd3ba4d7b26b02a09"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-app-core/src/server/debug_jobs.rs:152-159 | crates/jcode-app-core/src/server/debug_jobs.rs:222-229 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/debug_jobs.rs:152\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-app-core/src/server/debug_jobs.rs:221\u0060 calls \u0060filter\u0060, \u0060as_deref\u0060, \u0060Some\u0060 and \u0060crates/jcode-app-core/src/server/debug_jobs.rs:151\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_jobs.rs"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"deb93416bc7c4f2b6da29f7e2e7aee8821f894cb6f287d90c8509824aeee6829"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-tui/src/tui/app/inline_interactive.rs:2606-2613 | crates/jcode-tui/src/tui/app/inline_interactive.rs:2627-2632 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060self\u0060 to \u0060super) fn open_session_picker(\u0026mut\u0060 in one and \u0060super) fn open_active_sessions_picker(\u0026mut\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":2606}}}],"partialFingerprints":{"codehealthFindingId/v1":"0db58cfc6daa04a7109c45c1b074b08228c8591b5b76e97112cadf308b737c61"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-base/src/subscription_api.rs:738-745 | crates/jcode-base/src/subscription_api.rs:776-783 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/subscription_api.rs:738\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/subscription_api.rs"},"region":{"startLine":738}}}],"partialFingerprints":{"codehealthFindingId/v1":"68bd4304fdc3e1ff780a46c69ca8216991120a14553ff1597fa75f68c9733515"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-tui/src/tui/app/auth_account_picker.rs:775-782 | crates/jcode-tui/src/tui/app/auth_account_picker.rs:910-917 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/auth_account_picker.rs:775\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker.rs"},"region":{"startLine":775}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5c2c6f8040928df753c20b729ff798b2f6fa9fd653c4392317a3e9d6ac3788b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-app-core/src/channel.rs:384-391 | crates/jcode-app-core/src/notifications.rs:301-308 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/channel.rs:384\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/channel.rs"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"7744df2acf9a3ed0cba697c8b16fc200bfb3bc1303915d51cab5252401a62b0f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src/bin/memory_recall_bench.rs:1969-1976 | src/bin/memory_recall_bench.rs:2004-2010 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/bin/memory_recall_bench.rs:1969\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":1969}}}],"partialFingerprints":{"codehealthFindingId/v1":"a346b0fbb9b71f00819d0244e038c016908d16ea401f71b928c2166293fa24f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-base/src/memory.rs:260-267 | crates/jcode-base/src/memory.rs:275-282 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/memory.rs:260\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory.rs"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dd35312f6eb592a7beb4920b18cec330020d99d945973b3d7856eabaf5640f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/jcode-app-core/src/server/comm_control.rs:1411-1418 | crates/jcode-app-core/src/server/comm_control.rs:1466-1473 | crates/jcode-app-core/src/server/comm_plan.rs:528-535 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/server/comm_control.rs\u0060 and \u0060crates/jcode-app-core/src/server/comm_plan.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/comm_control.rs:1411\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-app-core/src/server/comm_plan.rs:538\u0060 calls \u0060push\u0060 and \u0060crates/jcode-app-core/src/server/comm_control.rs:1476\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_control.rs"},"region":{"startLine":1411}}}],"partialFingerprints":{"codehealthFindingId/v1":"339cb71468e7d72269b01c3a93c73ce1c9ccd6f66cc21a97bfaa566b03d39874"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-app-core/src/server/debug_swarm_read.rs:147-154 | crates/jcode-app-core/src/server/debug_swarm_read.rs:542-549 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/debug_swarm_read.rs:147\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_swarm_read.rs"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"f65e5287e4a026a6871141953bf7f73befdc615c741059a0e25e7a81cdbc505b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-base/src/safety.rs:307-314 | crates/jcode-base/src/safety.rs:315-322 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/safety.rs:307\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/safety.rs"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"236ba0775833b1add46bcda84017d9944fa4dff259c2e117582cfc808405b523"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): crates/jcode-core/src/panic_util.rs:2-9 | crates/jcode-pdf/src/lib.rs:23-30 | crates/jcode-tui-mermaid/src/lib.rs:195-202 | src/cli/terminal.rs:225-232 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060payload\u0060 to \u0060\u0026(dyn std::any::Any \u002B Send)\u0060 in one and \u0060\u0026Box\u003Cdyn std::any::Any \u002B Send\u003E\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-core/src/panic_util.rs"},"region":{"startLine":2}}}],"partialFingerprints":{"codehealthFindingId/v1":"63314ccfc133ee2f0f5c3f5ffa89b140c8fe3e08274e8f64aa0ad54c83a26646"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-app-core/src/server/debug_events.rs:133-140 | crates/jcode-app-core/src/server/debug_events.rs:144-151 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/debug_events.rs:133\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_events.rs"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"982bebda50a0f5e7ea55db6924998399213ebca7981e0638a1945e661a4346ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-app-core/src/server/debug_swarm_read.rs:72-79 | crates/jcode-app-core/src/server/debug_swarm_read.rs:147-154 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/debug_swarm_read.rs:72\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-app-core/src/server/debug_swarm_read.rs:80\u0060 calls \u0060read\u0060 and \u0060crates/jcode-app-core/src/server/debug_swarm_read.rs:155\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_swarm_read.rs"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"d25ff98b633b2f8561d27f8596f47ad8443ed8e834cbb5838ab446cb664e3ee0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-app-core/src/server/comm_sync.rs:458-465 | crates/jcode-app-core/src/server/swarm.rs:1288-1295 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/comm_sync.rs:458\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_sync.rs"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"05334490a6a7e9eaeec4aa52611c718f193bc402f28bb38f4b29695cecada1b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-app-core/src/server/jade_relay.rs:341-348 | crates/jcode-app-core/src/server/jade_relay.rs:695-702 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/jade_relay.rs:341\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/jade_relay.rs"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb4d3be93cadc92a11180c7c6085bd6871b78fc271fe46ad2089b3c17ee16aa9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-tui/src/tui/app/run_shell.rs:1185-1192 | crates/jcode-tui/src/tui/app/run_shell.rs:1194-1201 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/run_shell.rs:1185\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/run_shell.rs"},"region":{"startLine":1185}}}],"partialFingerprints":{"codehealthFindingId/v1":"e732892dfae8722b5578ed542afc6fb8848bc168a4df90d6a4cecb74003ea247"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-app-core/src/server/debug_swarm_read.rs:187-194 | crates/jcode-app-core/src/server/debug_swarm_read.rs:762-769 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/debug_swarm_read.rs:187\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_swarm_read.rs"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c6c2edf069001031e443df3aeafa529ef4bb5aa77a5ff963f4cc2c683e747d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-app-core/src/server/debug_swarm_read.rs:406-413 | crates/jcode-app-core/src/server/debug_swarm_read.rs:503-510 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/debug_swarm_read.rs:406\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_swarm_read.rs"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"1467bfab4b524b821b2057e58e6c1ee208588ef9d43c35fff6cf02bdad2211fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-telemetry-core/src/lib.rs:542-548 | crates/jcode-telemetry-core/src/lib.rs:648-655 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-telemetry-core/src/lib.rs:542\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lib.rs"},"region":{"startLine":542}}}],"partialFingerprints":{"codehealthFindingId/v1":"aed3b11ac4f1c7812459c1ebdb16c2e011995ab19184a08c18fd6f46aaafe739"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-base/src/subscription_api.rs:711-718 | crates/jcode-base/src/subscription_api.rs:741-748 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/subscription_api.rs:711\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-base/src/subscription_api.rs:740\u0060 calls \u0060json\u0060 and \u0060crates/jcode-base/src/subscription_api.rs:710\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/subscription_api.rs"},"region":{"startLine":711}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bae868536bfd30290fb8c798a0c1e105b73bc867b93918dd30e86fe711248ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-tui/src/tui/info_widget_cache.rs:115-121 | crates/jcode-tui/src/tui/info_widget_cache.rs:125-131 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/info_widget_cache.rs:115\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_cache.rs"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"894bc4db0a0c4e7fb73c338bab5079154d927cfc1c99e92313c6cab352b734de"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-base/src/usage/provider_fetch.rs:400-406 | crates/jcode-base/src/usage/provider_fetch.rs:430-436 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/usage/provider_fetch.rs:400\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/provider_fetch.rs"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"f482f65c70b2137bfc2e6e36343753a1ab2169cb85c0675efee7c8d3ce6bb93e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-tui/src/tui/ui_tools.rs:343-349 | crates/jcode-tui/src/tui/ui_tools.rs:354-360 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_tools.rs:343\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tools.rs"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"aebbd87c640744872b9cb4f6c33d68c4680dab3e1775e4389b72b71296147a47"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-app-core/src/server/debug_command_exec.rs:510-516 | crates/jcode-app-core/src/server/debug_command_exec.rs:535-541 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/debug_command_exec.rs:510\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_command_exec.rs"},"region":{"startLine":510}}}],"partialFingerprints":{"codehealthFindingId/v1":"089d7156e97721bfe7c6fb5e4acc014fdf11d72637eba4525492a56bd32163fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/jcode-app-core/src/server/debug_command_exec.rs:456-462 | crates/jcode-app-core/src/server/debug_command_exec.rs:498-504 | crates/jcode-app-core/src/server/debug_command_exec.rs:524-530 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/debug_command_exec.rs:456\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_command_exec.rs"},"region":{"startLine":456}}}],"partialFingerprints":{"codehealthFindingId/v1":"a827c3f6032d5cb97021566c7d3acfba40de7b515b6bd5712c7e75adecf2a2ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-app-core/src/server/runtime_ssh_host.rs:231-237 | crates/jcode-app-core/src/server/runtime_ssh_host.rs:282-288 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/runtime_ssh_host.rs:231\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/runtime_ssh_host.rs"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"e49e4548afc3a0031745c839b11e1d3f5a7810e271631df41c441a8c163d3a39"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-app-core/src/update.rs:276-282 | crates/jcode-app-core/src/update_preview.rs:73-79 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/update.rs:276\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/update.rs"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e9dd24f57da6e6bf8dafe4f5d818f218e8baa8f1456a4003d54a5386de4b4e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-provider-antigravity-runtime/src/lib.rs:264-270 | crates/jcode-provider-gemini-runtime/src/lib.rs:479-485 \u2014 before extracting anything, compare \u0060crates/jcode-provider-antigravity-runtime/src/lib.rs\u0060 and \u0060crates/jcode-provider-gemini-runtime/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 137 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-antigravity-runtime/src/lib.rs:264\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-antigravity-runtime/src/lib.rs"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"89101967063054c15b17658fadf0cdfe03de35fd808e1db26193e70551eca090"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): crates/jcode-app-core/src/perf.rs:366-372 | crates/jcode-setup-hints/src/lib.rs:2391-2397 | crates/jcode-tui-style/src/color.rs:60-66 | crates/jcode-tui-workspace/src/color_support.rs:31-37 | crates/jcode-tui/src/tui/ui_onboarding.rs:52-58 \u2014 before extracting anything, compare \u0060crates/jcode-setup-hints/src/lib.rs\u0060 and \u0060crates/jcode-tui-style/src/color.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/perf.rs"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"e48e31fb1c458964d1d40f76e757b7983032f78da2c0be9e2411dabf12ba44c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-app-core/src/server/client_processing.rs:370-376 | crates/jcode-tui-mermaid/src/mermaid_cache_render.rs:1416-1422 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_processing.rs"},"region":{"startLine":370}}}],"partialFingerprints":{"codehealthFindingId/v1":"b91bfddcb395f376546bb3708d72a8e79fd341c7eb0f608f0aa43390de72138f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-import-core/src/lib.rs:534-540 | crates/jcode-import-core/src/lib.rs:541-547 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-import-core/src/lib.rs:534\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-import-core/src/lib.rs"},"region":{"startLine":534}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cb2969bcfc1a20d0b1f268846c7d4e86e99095a5dba61555a2d509700f96732"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src/bin/memory_recall_bench.rs:488-494 | src/bin/memory_recall_bench.rs:962-968 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":488}}}],"partialFingerprints":{"codehealthFindingId/v1":"32fef2fc0d4bde5b8bafb6cca453b03408dff23593821cc1240db682d05648e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): crates/jcode-tui/src/tui/ui_overlays.rs:347-353 | crates/jcode-tui/src/tui/ui_overlays.rs:437-443 | crates/jcode-tui/src/tui/ui_overlays.rs:478-484 | crates/jcode-tui/src/tui/ui_overlays.rs:619-625 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_overlays.rs:347\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_overlays.rs"},"region":{"startLine":347}}}],"partialFingerprints":{"codehealthFindingId/v1":"fff07164bf631fa1d57c9e5aeb59b59a063be38f5bbdd6f7b98ac3f0ade3dbe3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-setup-hints/src/windows_setup.rs:24-30 | crates/jcode-setup-hints/src/windows_setup.rs:34-40 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-setup-hints/src/windows_setup.rs:24\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/windows_setup.rs"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"946aa5fc41b3ef4e706f5f4d29bf75c3d113149bbdd8ec5a6fe368f20aee5418"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-base/src/mobile_runner.rs:343-349 | crates/jcode-base/src/mobile_runner_local.rs:95-101 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/mobile_runner.rs:343\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mobile_runner.rs"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"489d274a652ec24e155d4f72b3aa8fecc501cc1c9881cdf354f6eb47a402aa7e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/jcode-app-core/src/usage_display.rs:171-175 | crates/jcode-base/src/usage/display.rs:178-184 | crates/jcode-tui-usage-overlay/src/lib.rs:775-781 \u2014 before extracting anything, compare \u0060crates/jcode-app-core/src/usage_display.rs\u0060 and \u0060crates/jcode-base/src/usage/display.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 133 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/usage_display.rs:171\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_display.rs"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"8357d7126d0f61a5eb5a57feddf3826ab46de4eafb8edb91078a5e07aed95af3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-tui/src/tui/ui_header.rs:946-951 | crates/jcode-tui/src/tui/ui_header.rs:966-972 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_header.rs:946\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_header.rs"},"region":{"startLine":946}}}],"partialFingerprints":{"codehealthFindingId/v1":"335f2056cfcba96e86ecfbfd5c258fd3f0f7b9ae795cd4c5d7070b1b84634153"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-swarm-core/src/lib.rs:393-399 | crates/jcode-swarm-core/src/lib.rs:400-406 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-swarm-core/src/lib.rs"},"region":{"startLine":393}}}],"partialFingerprints":{"codehealthFindingId/v1":"c24191e65afb905be9c1519362d9b04e19a34d9da9a64fad4251e50bb85588ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 5): crates/jcode-tui/src/tui/ui_overlays.rs:347-353 | crates/jcode-tui/src/tui/ui_overlays.rs:437-443 | crates/jcode-tui/src/tui/ui_overlays.rs:456-460 | crates/jcode-tui/src/tui/ui_overlays.rs:478-484 | crates/jcode-tui/src/tui/ui_overlays.rs:619-625 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_overlays.rs:347\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-tui/src/tui/ui_overlays.rs:454\u0060 calls \u0060push\u0060, \u0060help_entry\u0060, \u0060from\u0060 and \u0060crates/jcode-tui/src/tui/ui_overlays.rs:347\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_overlays.rs"},"region":{"startLine":347}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b4f14f57ba03a306032a2a0d8a4a9fd42b19f75b8f48eb393ddbf76fe85a459"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-tui/src/tui/app/auth_account_picker.rs:693-698 | crates/jcode-tui/src/tui/app/auth_account_picker.rs:976-981 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/auth_account_picker.rs:693\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker.rs"},"region":{"startLine":693}}}],"partialFingerprints":{"codehealthFindingId/v1":"80ae65d3cdb6048532c100600a39dab25ebc2eb9e0819924a2f1a53d6f614460"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-app-core/src/tool/computer/input.rs:81-86 | crates/jcode-app-core/src/tool/computer/input.rs:89-94 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/computer/input.rs"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"e70b5dac739214396570c88b9eaa302f7b7bc6ee3aed05c51bb36838817cd4b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 6): crates/jcode-tui/src/tui/ui_overlays.rs:350-354 | crates/jcode-tui/src/tui/ui_overlays.rs:440-444 | crates/jcode-tui/src/tui/ui_overlays.rs:457-461 | crates/jcode-tui/src/tui/ui_overlays.rs:481-485 | crates/jcode-tui/src/tui/ui_overlays.rs:550-554 | crates/jcode-tui/src/tui/ui_overlays.rs:622-627 \u2014 all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_overlays.rs:622\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-tui/src/tui/ui_overlays.rs:454\u0060 calls \u0060push\u0060, \u0060help_entry\u0060 and \u0060crates/jcode-tui/src/tui/ui_overlays.rs:347\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_overlays.rs"},"region":{"startLine":350}}}],"partialFingerprints":{"codehealthFindingId/v1":"a08747d64fddee8407138be36509725829de72d4669788e2672423baf16d1b01"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-embedding/src/lib.rs:431-436 | crates/jcode-provider-openai-runtime/src/openai_provider_impl.rs:811-816 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-embedding/src/lib.rs:431\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-embedding/src/lib.rs"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"f86cf3a4112cb49082787695039cde5d0c94676e76aee8ff3000286888b354f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-tui/src/tui/info_widget_memory_utils.rs:10-15 | crates/jcode-tui/src/tui/info_widget_memory_utils.rs:55-60 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/info_widget_memory_utils.rs:10\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_memory_utils.rs"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"28c1d5a1d3a9e8da3063949a67024657c6506b3c907d5035a6b6d178e348256a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-harness-api-server/src/translate.rs:534-539 | crates/jcode-harness-api-server/src/translate.rs:551-556 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-harness-api-server/src/translate.rs:534\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/translate.rs"},"region":{"startLine":534}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f5f45f64406637eb142a921101efbe4054f3ff58c20533f39f3de045be4782e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-tui/src/tui/ui_frame_metrics.rs:802-807 | crates/jcode-tui/src/tui/ui_frame_metrics.rs:1311-1316 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_frame_metrics.rs:802\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_frame_metrics.rs"},"region":{"startLine":802}}}],"partialFingerprints":{"codehealthFindingId/v1":"1be8da6d3a074b480d56d8b8f5a3cc6c77b94c0395d8c53c849387324c51e88b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-tui/src/tui/login_picker.rs:694-699 | crates/jcode-tui/src/tui/login_picker.rs:769-774 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/login_picker.rs:694\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/login_picker.rs"},"region":{"startLine":694}}}],"partialFingerprints":{"codehealthFindingId/v1":"2699ca5d1a2205d658390d03333e21abcdbfa98ccd3bff16fa00e1486facd1cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/jcode-tui/src/tui/ui_overlays.rs:525-529 | crates/jcode-tui/src/tui/ui_overlays.rs:537-542 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_overlays.rs:525\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_overlays.rs"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cf1bc9dbc55523bef41c736713a809af673c666ac9190540b6426ee894c69d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-tui/src/tui/app/auth_account_picker.rs:658-663 | crates/jcode-tui/src/tui/app/auth_account_picker.rs:847-852 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/auth_account_picker.rs:658\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker.rs"},"region":{"startLine":658}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6d6ce7e32cf0ee9e2a03c11844ccf9b85707fd0f88c867c014921b24084e376"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-tui/src/tui/app/state_ui_storage.rs:28-33 | crates/jcode-tui/src/tui/app/state_ui_storage.rs:116-121 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/state_ui_storage.rs:28\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui_storage.rs"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a8f5e9e6b48e16358ba64d67656a274b200f81fe3a59f078d8134d2122eb030"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-tui-account-picker/src/overlay.rs:766-771 | crates/jcode-tui/src/tui/login_picker.rs:588-593 \u2014 before extracting anything, compare \u0060crates/jcode-tui-account-picker/src/overlay.rs\u0060 and \u0060crates/jcode-tui/src/tui/login_picker.rs\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 204 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-account-picker/src/overlay.rs:766\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay.rs"},"region":{"startLine":766}}}],"partialFingerprints":{"codehealthFindingId/v1":"48fcd5c59f14b7711177f84189346d7be5b95bbd2b8f63265450fbe94ed3d3a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-embedding/src/lib.rs:454-459 | crates/jcode-embedding/src/lib.rs:465-470 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-embedding/src/lib.rs:454\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-embedding/src/lib.rs"},"region":{"startLine":454}}}],"partialFingerprints":{"codehealthFindingId/v1":"59da41c027defd521b5e91fb46b49bceb74e3175c653e114a0025e46aad658e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/jcode-tui-account-picker/src/overlay.rs:719-724 | crates/jcode-tui-account-picker/src/overlay.rs:733-737 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui-account-picker/src/overlay.rs:719\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay.rs"},"region":{"startLine":719}}}],"partialFingerprints":{"codehealthFindingId/v1":"9639e8d1b0d7edc11398798e24346939d05f1a51e3b7898c3499bb555e958966"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/jcode-base/src/import.rs:1074-1078 | crates/jcode-base/src/import.rs:1197-1201 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/import.rs"},"region":{"startLine":1074}}}],"partialFingerprints":{"codehealthFindingId/v1":"42493c9ec3b791a70e0834a92f14652bb9f42e29ad5fea12c3fe66f70b6afd3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/jcode-import-core/src/lib.rs:485-489 | crates/jcode-import-core/src/lib.rs:1138-1142 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-import-core/src/lib.rs:485\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-import-core/src/lib.rs"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"63d2f0cd67cc14e848ca511e2420e62d4cdc6fe6c5187849a6ff3bddc528ceaf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/jcode-app-core/src/catchup.rs:72-76 | crates/jcode-app-core/src/catchup.rs:77-81 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/catchup.rs"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6b74432558c88aedfbc25d7068db85c2ab3cb767e97c8511005f2a84ff3d3f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/jcode-app-core/src/restart_snapshot.rs:119-123 | crates/jcode-app-core/src/restart_snapshot.rs:170-174 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/restart_snapshot.rs"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bc255c7b714e9261b8830513b7b8beb5a0a3e20d520233b83bb9889d7c72873"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-base/src/provider/openrouter.rs:140-146 | crates/jcode-provider-openrouter-runtime/src/lib.rs:145-151 \u2014 before extracting anything, compare \u0060crates/jcode-base/src/provider/openrouter.rs\u0060 and \u0060crates/jcode-provider-openrouter-runtime/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 132 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/provider/openrouter.rs:140\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/openrouter.rs"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f3541ab6271ab8082f2458da8cb57425d6f60420d4fb4bd39bd1691a4e01c4b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/jcode-productivity-core/src/scan.rs:262-266 | crates/jcode-productivity-core/src/scan.rs:321-325 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-productivity-core/src/scan.rs:262\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-productivity-core/src/scan.rs"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc36c75c67b91e00e8ac5fa9f9c5c41f5d39a37c6648a26722996805725c671b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/jcode-provider-openrouter-runtime/src/lib.rs:1483-1487 | crates/jcode-provider-openrouter-runtime/src/lib.rs:1782-1786 | crates/jcode-provider-openrouter-runtime/src/lib.rs:2038-2042 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/lib.rs"},"region":{"startLine":1483}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ca08520d5d307e06e4c60ecf73f7199cc136c12b38e88acd3fa927ea2f1a1b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-tui/src/tui/app/commands.rs:351-356 | crates/jcode-tui/src/tui/app/commands_improve.rs:431-436 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b5dc2336aa5f4a12f11a97a5ac1908f263baa008f3dc3d1702efd41e90888d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/jcode-tui/src/tui/app/commands.rs:475-479 | crates/jcode-tui/src/tui/app/remote/server_events.rs:3451-3455 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/app/commands.rs:475\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":475}}}],"partialFingerprints":{"codehealthFindingId/v1":"3212a81211cb1f4abfe40b4d03387b184cbd2c6de9e5339ac127f7ab9b421837"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/jcode-tui/src/tui/app/remote.rs:433-437 | crates/jcode-tui/src/tui/app/remote.rs:1768-1772 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote.rs"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc034c9f624d26930d4464882c76d344526e95ef49c42353090ead8d5bc63151"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-tui/src/tui/ui_inline_interactive.rs:1057-1062 | crates/jcode-tui/src/tui/ui_inline_interactive.rs:1070-1075 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_inline_interactive.rs:1057\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-tui/src/tui/ui_inline_interactive.rs:1077\u0060 calls \u0060default\u0060, \u0060fg\u0060, \u0060rgb\u0060 and \u0060crates/jcode-tui/src/tui/ui_inline_interactive.rs:1063\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_inline_interactive.rs"},"region":{"startLine":1057}}}],"partialFingerprints":{"codehealthFindingId/v1":"6205d686382b81ea37f3592611aec4bf41449034501100ade35846beeb8508a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/jcode-tui/src/tui/ui_messages.rs:4212-4216 | crates/jcode-tui/src/tui/ui_tools.rs:1631-1635 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_messages.rs:4212\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":4212}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5cd45f2070c8545ee589a085e1bfcc6daa4577fa73969c30e37ea6e4695c7b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-tui/src/tui/ui_messages.rs:4626-4631 | crates/jcode-tui/src/tui/ui_tools.rs:1592-1597 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":4626}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee71a332c0a0563fe3856ded93ac85b5aa1103bf06dfd78f5e75157b1d6af29d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/jcode-tui/src/tui/ui_prepare.rs:2651-2655 | crates/jcode-tui/src/tui/ui_prepare.rs:2772-2776 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_prepare.rs"},"region":{"startLine":2651}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e6eae406c9224b6ed3d858176da69711ea44962357f1ed3b88367ae7300c776"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/jcode-voice/src/dictation.rs:176-181 | crates/jcode-voice/src/dictation.rs:215-220 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-voice/src/dictation.rs"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"81b4925ca7f8bc82b5b6ba5f3eb12e55f9f04a2a833b5ba1a0b7459f9a7da6fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src/bin/memory_recall_bench.rs:1545-1551 | src/bin/memory_recall_bench.rs:1686-1692 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":1545}}}],"partialFingerprints":{"codehealthFindingId/v1":"561da838e6cd88d8a8bfd71d5ee66335a69653354540e51b4816e72710030326"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src/bin/memory_recall_bench.rs:1736-1740 | src/bin/memory_recall_bench.rs:1922-1926 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":1736}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a7a7504da1c4ecce3812aa42ff2a94c268bad53f450c4950f7a8384b2560727"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (8 members, 37 shared lines): scripts/check_donut_animates_live.py:69-176 | scripts/count_idle_draws.py:46-165 | scripts/dump_fresh_spawn_screen.py:31-127 | scripts/pin_no_area_state.py:39-128 | scripts/probe_idle_state.py:94-206 | scripts/verify_donut_still_animates.py:69-245 | scripts/which_overlay_blocks_donut.py:43-118 | scripts/why_no_animation_area.py:34-133 \u2014 These 8 members are variants of one another: a block of 37 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 8 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_donut_animates_live.py"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a63038bb0e63d052af90fa7a57655ad108ddc2bce9d56205273d6f8049e9f27"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (7 members, 14 shared lines): scripts/check_donut_animates_live.py:69-176 | scripts/count_idle_draws.py:46-165 | scripts/diagnose_idle_render_cost.py:314-443 | scripts/dump_fresh_spawn_screen.py:31-127 | scripts/probe_idle_state.py:94-206 | scripts/repro_slash_flicker.py:341-495 | scripts/verify_donut_still_animates.py:69-245 \u2014 These 7 members are variants of one another: a block of 14 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 7 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_donut_animates_live.py"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec6762cd2d485b821fe2ead0b4a75f8931c06a0261cc370227911d0d6262397a"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (6 members, 28 shared lines): scripts/count_idle_draws.py:46-165 | scripts/diagnose_idle_render_cost.py:314-443 | scripts/pin_no_area_state.py:39-128 | scripts/probe_idle_state.py:94-206 | scripts/which_overlay_blocks_donut.py:43-118 | scripts/why_no_animation_area.py:34-133 \u2014 These 6 members are variants of one another: a block of 28 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/count_idle_draws.py"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf0cc00252ec99dcbfbfa8c4c315ceb345f3dd55a04bd42800938130ec2d7264"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (5 members, 25 shared lines): scripts/count_idle_draws.py:46-165 | scripts/pin_no_area_state.py:39-128 | scripts/probe_idle_state.py:94-206 | scripts/profile_idle_donut.py:49-157 | scripts/which_overlay_blocks_donut.py:43-118 \u2014 These 5 members are variants of one another: a block of 25 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/count_idle_draws.py"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5d621d54b51f456c5c1d3f55ec7c4e80f541a07a1afee7788c2c8207c6507a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 46 shared lines): crates/jcode-provider-doctor/src/provider_e2e.rs:873-947 | crates/jcode-provider-doctor/src/provider_e2e.rs:1216-1291 | crates/jcode-provider-doctor/src/provider_e2e.rs:1868-1943 | crates/jcode-provider-doctor/src/provider_e2e.rs:2184-2251 \u2014 These 4 members are variants of one another: a block of 46 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/provider_e2e.rs"},"region":{"startLine":873}}}],"partialFingerprints":{"codehealthFindingId/v1":"d581edc068ce541751e6ca71be806a0ae3328dd918be5ab107c7d4cd572cf8a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (42 shared lines): scripts/measure_animation_cpu_cost.py:65-135 | scripts/sweep_animation_fps.py:51-124 \u2014 These two members are variants of one another: 42 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/measure_animation_cpu_cost.py"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0a0bcaf6c40aabfd556b63b505f89e1982d1dd22090010bc9da8b8886dc08e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (8 members, 50\u002B identical tokens): scripts/diagnose_idle_render_cost.py:78-90 | scripts/profile_remote_resume_burst.py:77-89 | scripts/profile_single_spawn.py:27-39 | scripts/repro_expand_edit_shortcut.py:144-156 | scripts/repro_input_flicker.py:89-101 | scripts/repro_input_lag.py:91-103 | scripts/repro_live_duplicate.py:114-126 | scripts/repro_slash_flicker.py:85-97 \u2014 These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/diagnose_idle_render_cost.py"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"8648e74d0d3a7c2ac99c09d93b0d80efb05ba3a21bab2ad21b3205afd6d62cf6"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): scripts/diagnose_idle_render_cost.py:94-110 | scripts/repro_expand_edit_shortcut.py:100-116 | scripts/repro_input_flicker.py:105-121 | scripts/repro_input_lag.py:107-123 | scripts/repro_live_duplicate.py:68-85 | scripts/repro_slash_flicker.py:101-117 \u2014 These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/diagnose_idle_render_cost.py"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"169afd318312687c28069a316fd1ffaf80e4017e4ac3ad1317e235f61ef923a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): scripts/diagnose_idle_render_cost.py:151-178 | scripts/repro_expand_edit_shortcut.py:194-222 | scripts/repro_input_flicker.py:212-245 | scripts/repro_input_lag.py:170-201 | scripts/repro_live_duplicate.py:164-192 | scripts/repro_slash_flicker.py:172-204 \u2014 These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/diagnose_idle_render_cost.py"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"62f5a207d1f0a35496f9cd3471428b46bb2ef50e34690191fe11275af6322321"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): crates/jcode-provider-openai-runtime/src/openai_tests/http_idle.rs:2-111 | crates/jcode-provider-openai-runtime/src/openai_tests/opaque_recovery.rs:10-233 | crates/jcode-provider-openai-runtime/src/openai_tests/overload_retry.rs:2-118 | crates/jcode-provider-openai-runtime/src/openai_tests/persistent_prefix.rs:66-171 | crates/jcode-provider-openai-runtime/src/openai_tests/persistent_terminal.rs:171-314 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_tests/http_idle.rs"},"region":{"startLine":2}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4d95bd6b5c8478f6cfdb5f8864ba351a9de74dbcf157c099ef68ef19ff33be3"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): scripts/diagnose_idle_render_cost.py:129-140 | scripts/repro_expand_edit_shortcut.py:287-300 | scripts/repro_input_flicker.py:140-151 | scripts/repro_input_lag.py:143-154 | scripts/repro_slash_flicker.py:136-147 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/diagnose_idle_render_cost.py"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca87374b1cb1e49b42a5da6c4de4a4967034b1a4d7257c2ab27629e44a79e6b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/jcode-provider-doctor/src/provider_e2e.rs:402-554 | crates/jcode-provider-doctor/src/provider_e2e.rs:618-848 | crates/jcode-provider-doctor/src/provider_e2e.rs:1018-1208 | crates/jcode-provider-doctor/src/provider_e2e.rs:1649-1858 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/provider_e2e.rs"},"region":{"startLine":402}}}],"partialFingerprints":{"codehealthFindingId/v1":"37db65a817bc96d3c816e2500972ab5a2b6095cc3063f689f6f42942dc7700f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): scripts/check_code_size_budget.py:41-58 | scripts/check_panic_budget.py:40-55 | scripts/check_swallowed_error_budget.py:47-62 | scripts/check_test_size_budget.py:32-47 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_code_size_budget.py"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfa8c05b28b034261134c8fede21e6111d042db3283cceb2bfa0720d59e18bec"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): scripts/diagnose_idle_render_cost.py:114-124 | scripts/repro_input_flicker.py:125-135 | scripts/repro_input_lag.py:127-137 | scripts/repro_slash_flicker.py:121-131 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/diagnose_idle_render_cost.py"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"27dc5ccbf0152a2baa7a94a1287c3cb67e5cf262a5744c27681cd90bc4eb0159"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): scripts/diagnose_idle_render_cost.py:200-215 | scripts/repro_input_flicker.py:275-290 | scripts/repro_input_lag.py:249-264 | scripts/repro_slash_flicker.py:218-233 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/diagnose_idle_render_cost.py"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c5e1af85edda119d06f8f4f02d1f0da6cb14e3d85aba9fa92f3d2138787d78d"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): scripts/diagnose_idle_render_cost.py:220-237 | scripts/repro_input_flicker.py:295-317 | scripts/repro_input_lag.py:270-290 | scripts/repro_slash_flicker.py:238-255 \u2014 These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/diagnose_idle_render_cost.py"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"493e6a86690e2f23ccaacf94fbb93ceeeab6c5fba0ff09d2d9e01387e2faacde"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (34 corresponding lines): scripts/bench_headless_memory.py:223-259 | scripts/bench_headless_memory.py:452-485 \u2014 These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/bench_headless_memory.py"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0afc2922ade1705db590cace9bc57431caa9f78ede21682b79db9c4dac7a5fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (41 corresponding lines): src/cli/auth_test/run.rs:8-52 | src/cli/auth_test/run.rs:61-101 \u2014 These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/auth_test/run.rs"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"45f5d1a6945b7982b9b33c27352ba0e974165f0a6da4de9bf298d621280f788e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): crates/jcode-tui/src/tui/ui_tests/pinned_todo_regressions.rs:5-32 | crates/jcode-tui/src/tui/ui_tests/prepare.rs:1200-1230 \u2014 These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tests/pinned_todo_regressions.rs"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"1449d4910755a8c490e3060936a3fdc798bcc0d92794b4f360c782d6cd8bb2c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): scripts/jcode_harbor_agent.py:203-231 | scripts/jcode_harbor_claude_agent.py:228-257 \u2014 These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/jcode_harbor_agent.py"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"93d727ff32a4fb496b1f916e1d3f50a8effa3661769be38418e41b36e05623d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): crates/jcode-tui/src/tui/ui_tests/inline_picker.rs:7-27 | crates/jcode-tui/src/tui/ui_tests/onboarding.rs:7-27 \u2014 These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tests/inline_picker.rs"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a4c170851b80405af234bbb764ac6f6ef9933b3824c78557d700503c4940292"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): crates/jcode-harness-api/src/harness_api_tests/capability_coverage.rs:415-441 | crates/jcode-harness-api/src/harness_api_tests/schema_snapshot.rs:527-558 \u2014 These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api/src/harness_api_tests/capability_coverage.rs"},"region":{"startLine":415}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e2d1595578df14d3b299a557d2f8ef4fa57b0d8665a0d0918611782884a2236"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): crates/jcode-base/src/auth/oauth_tests/openai_device_code.rs:7-29 | crates/jcode-base/src/auth/oauth_tests/openai_refresh_deadline.rs:10-29 \u2014 These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/oauth_tests/openai_device_code.rs"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"6735743190c717440154f14121e5ea5046e645101868d0b45643abadce99278b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): scripts/bench_startup.py:169-200 | scripts/profile_spawn.py:329-351 \u2014 These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/bench_startup.py"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e1f3abeb4e053f87cde53893996fcb96a08189f9677a5de6d56c4b47b525c52"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 14\u002B corresponding lines): scripts/check_code_size_budget.py:81-95 | scripts/check_panic_budget.py:80-93 | scripts/check_test_size_budget.py:70-83 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_code_size_budget.py"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"45a76031f2e76df988ddbdd88be908ac5001f134eadd0e41742ab9bde424cc97"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): scripts/jcode_harbor_claude_agent.py:59-78 | scripts/jcode_harbor_claude_agent.py:92-109 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/jcode_harbor_claude_agent.py"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f348fa6b527e6c500e29b68ff88211cd96edf5833f9703b40e48129140ad7c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/jcode-tui/src/tui/ui_tests/basic/body_cache.rs:870-883 | crates/jcode-tui/src/tui/ui_tests/basic/image_regions.rs:25-38 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tests/basic/body_cache.rs"},"region":{"startLine":870}}}],"partialFingerprints":{"codehealthFindingId/v1":"20eed610b4b211fb06ae1b630bba9e0d30de6271c1b90be78a0b5891c74d2407"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): scripts/profile_remote_resume_burst.py:162-190 | scripts/repro_expand_edit_shortcut.py:257-279 \u2014 These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/profile_remote_resume_burst.py"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"d460ad7d889869fdb7459639b4fabc01a809aab883a3caabd839abb84c9bba3d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): scripts/check_code_size_budget.py:67-77 | scripts/check_test_size_budget.py:56-66 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_code_size_budget.py"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"d74f5b2f7a5cf4b679e285966b73f3f69f0bac6e0600fa3922fcbd9c3886fe35"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/jcode-tui/src/tui/ui_tests/basic/redraw_cadence.rs:15-32 | crates/jcode-tui/src/tui/ui_tests/basic/redraw_cadence.rs:262-281 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tests/basic/redraw_cadence.rs"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"905de7ab7025a364fac688e158a29f47219b6339cc75b092dc7a5ad6670f25ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): scripts/bench_memory_cli.py:207-218 | scripts/bench_startup.py:118-129 \u2014 These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/bench_memory_cli.py"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ecbfb1f8969ae5720bc79f9686593a31f8c15000d0bc7be4fecdf2b32eea443"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): scripts/cloud_acceptance_tui.py:457-465 | scripts/cloud_acceptance_tui.py:469-477 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/cloud_acceptance_tui.py"},"region":{"startLine":457}}}],"partialFingerprints":{"codehealthFindingId/v1":"d21290b8e58b26e65573aa88fdb52678df76d5d075fa7fbf3e2089ffa24c14b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): scripts/mock_sponsor_service.py:63-66 | scripts/post_discord_release.py:103-117 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/post_discord_release.py"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"53ec268dd9efacdc0a40045d9f366085f371b26b61b26942c7970e1e16ae57ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): scripts/bench_memory_cli.py:196-203 | scripts/bench_startup_visible_ready.py:161-168 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/bench_memory_cli.py"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"28945f7411302dbc13f4075c7f71eab143cc65ebe4954d68d1afec4f2d3147e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): scripts/demo_shop.py:66-70 | scripts/benchmark_discovery.py:735-738 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/demo_shop.py"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"85272d4535cba7ac9c4b052be2222643b5f6e1517fc7523b63a3c77def4e5b87"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 6\u002B corresponding lines): scripts/fake_openai_server.py:35-40 | scripts/openrelay_discovery_test_server.py:143-148 | scripts/phone-server/jcode-pair-service.py:18-24 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/fake_openai_server.py"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fef2844fc227d43b600e914a029d7c9e2b00628d0112394c9e283ec9e560673"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/jcode-app-core/src/agent_tests/concurrency.rs:28-39 | crates/jcode-app-core/src/agent_tests/desktop_selfdev.rs:29-38 \u2014 These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent_tests/concurrency.rs"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"3df788be91219562126f5b26145f67cf3909b695aaeff958dd06c68b756a51b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): scripts/check_panic_budget.py:97-105 | scripts/check_test_size_budget.py:87-95 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_panic_budget.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"63903901299222d0bb47e847d2c7e0dc48c14e39f5f6e506e11490e532a27c3c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): scripts/bench_memory_cli.py:73-75 | scripts/bench_startup_visible_ready.py:89-94 \u2014 These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/bench_memory_cli.py"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"db9d4488f1dd4b4b207bb233f9301741eab39a25c02e713d661b4793a3cf5b39"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 5\u002B corresponding lines): crates/jcode-harness-api/src/harness_api_tests/capability_coverage.rs:323-327 | crates/jcode-harness-api/src/harness_api_tests/schema_snapshot.rs:391-395 | crates/jcode-sdk/src/sdk_tests/parity.rs:228-232 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api/src/harness_api_tests/capability_coverage.rs"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bddfe3ebf737b6bef7272a27f32905c33c030dc0fb799eb25f3e269296a15b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (1 corresponding lines): scripts/jcode_harbor_agent.py:53-53 | scripts/jcode_harbor_claude_agent.py:55-55 \u2014 These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/jcode_harbor_agent.py"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b9b685508f397e951c40b3ae382d884951f09c6bdb3fd0c1eb002aecc38576c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 3\u002B corresponding lines): scripts/check_code_size_budget.py:31-37 | scripts/check_panic_budget.py:34-36 | scripts/check_swallowed_error_budget.py:41-43 | scripts/check_test_size_budget.py:26-28 | scripts/check_wildcard_reexport_budget.py:41-43 \u2014 These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_code_size_budget.py"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"4055abf09006e4dec76df54cf2308a713ed43af4fd3faff369d1f728e235a7bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): crates/jcode-provider-doctor/src/provider_e2e.rs:1253-1277 | crates/jcode-provider-doctor/src/provider_e2e.rs:1905-1929 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-doctor/src/provider_e2e.rs:1253\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/provider_e2e.rs"},"region":{"startLine":1253}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e545daa78d8f59b074781f715d208d04941f03cb2e636259566d60f67ad1786"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): crates/jcode-provider-doctor/src/provider_e2e.rs:910-933 | crates/jcode-provider-doctor/src/provider_e2e.rs:2221-2244 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-doctor/src/provider_e2e.rs:910\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/provider_e2e.rs"},"region":{"startLine":910}}}],"partialFingerprints":{"codehealthFindingId/v1":"2618bc53ac2f8659163a98b3a8f9aeed52a16649b69e5781372232eef2dc9cfa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): crates/jcode-provider-doctor/src/provider_e2e.rs:530-551 | crates/jcode-provider-doctor/src/provider_e2e.rs:826-845 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-doctor/src/provider_e2e.rs:530\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/provider_e2e.rs"},"region":{"startLine":530}}}],"partialFingerprints":{"codehealthFindingId/v1":"387b7c9a9e7caefcac738ec10c1056c7c8c01abd4f052b12d2bb74459c85a4e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201320 lines \u00D7 2): src/cli/auth_test/run.rs:28-46 | src/cli/auth_test/run.rs:73-92 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/cli/auth_test/run.rs:28\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/auth_test/run.rs"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5d1bd1dd8202cd4fde3f3f82b43c18cb9836f411f49bf910eb403ff7ac64faa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 4): crates/jcode-provider-doctor/src/provider_e2e.rs:486-504 | crates/jcode-provider-doctor/src/provider_e2e.rs:778-796 | crates/jcode-provider-doctor/src/provider_e2e.rs:1138-1156 | crates/jcode-provider-doctor/src/provider_e2e.rs:1769-1787 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-doctor/src/provider_e2e.rs:486\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/provider_e2e.rs"},"region":{"startLine":486}}}],"partialFingerprints":{"codehealthFindingId/v1":"b97ac2403df0e1307a87a4ad6d619ea4e3bcb98efd316b533fc05b4807fac3cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 4): crates/jcode-provider-doctor/src/provider_e2e.rs:922-939 | crates/jcode-provider-doctor/src/provider_e2e.rs:1266-1283 | crates/jcode-provider-doctor/src/provider_e2e.rs:1918-1935 | crates/jcode-provider-doctor/src/provider_e2e.rs:2233-2250 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-doctor/src/provider_e2e.rs:922\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/provider_e2e.rs"},"region":{"startLine":922}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bc6f6963ce18664e2cb883c97ad03b93cffa866acc753ad03bd65331607aa39"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/jcode-base/src/auth/oauth_tests/openai_device_code.rs:11-26 | crates/jcode-base/src/auth/oauth_tests/openai_refresh_deadline.rs:12-27 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/oauth_tests/openai_device_code.rs"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bddf4f5b9acdc86db7b9dca9a36019b3eca9e1ddff091233bcd8466737d09e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): crates/jcode-provider-doctor/src/provider_e2e.rs:451-465 | crates/jcode-provider-doctor/src/provider_e2e.rs:744-758 | crates/jcode-provider-doctor/src/provider_e2e.rs:1735-1749 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-doctor/src/provider_e2e.rs:451\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/provider_e2e.rs"},"region":{"startLine":451}}}],"partialFingerprints":{"codehealthFindingId/v1":"4799f8596b722b4fd7271234bb5b6c9444696c5caeb636d6df00f3cefc73071d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): crates/jcode-tui/src/tui/ui_tests/pinned_todo_regressions.rs:11-24 | crates/jcode-tui/src/tui/ui_tests/prepare.rs:1204-1218 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_tests/pinned_todo_regressions.rs:11\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tests/pinned_todo_regressions.rs"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"dff44844a88209038855463206b89bc058453b3b41184c1c575fb2d812eaf362"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 4): crates/jcode-provider-doctor/src/provider_e2e.rs:876-889 | crates/jcode-provider-doctor/src/provider_e2e.rs:1219-1232 | crates/jcode-provider-doctor/src/provider_e2e.rs:1871-1884 | crates/jcode-provider-doctor/src/provider_e2e.rs:2187-2200 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-doctor/src/provider_e2e.rs:876\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/provider_e2e.rs"},"region":{"startLine":876}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6c02b7d64d76692a1bcab587e74d006721b9aa19b779012016126e8dc573022"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 4): crates/jcode-provider-doctor/src/provider_e2e.rs:893-906 | crates/jcode-provider-doctor/src/provider_e2e.rs:1236-1249 | crates/jcode-provider-doctor/src/provider_e2e.rs:1888-1901 | crates/jcode-provider-doctor/src/provider_e2e.rs:2204-2217 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-doctor/src/provider_e2e.rs:893\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/provider_e2e.rs"},"region":{"startLine":893}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f3ba2110da4bcf3228ed106e4b707968c461cc68a4482bc41b31f2ddeef9933"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 4): crates/jcode-provider-doctor/src/provider_e2e.rs:454-466 | crates/jcode-provider-doctor/src/provider_e2e.rs:747-759 | crates/jcode-provider-doctor/src/provider_e2e.rs:1104-1116 | crates/jcode-provider-doctor/src/provider_e2e.rs:1738-1750 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-doctor/src/provider_e2e.rs:454\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/provider_e2e.rs"},"region":{"startLine":454}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa3a33e3dbecc73471ffdf01cb2dbd7bf8d94d4fe88a597bd591dbd05c5b4817"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/jcode-provider-doctor/src/provider_e2e.rs:803-815 | crates/jcode-provider-doctor/src/provider_e2e.rs:1163-1175 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-doctor/src/provider_e2e.rs:803\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/provider_e2e.rs"},"region":{"startLine":803}}}],"partialFingerprints":{"codehealthFindingId/v1":"988f600ab14b0689a2a839b3556793836037288d85a7ea6bbe930a4a268203d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/jcode-app-core/src/agent_tests/concurrency_construction.rs:10-21 | crates/jcode-app-core/src/server/client_session_tests/concurrency.rs:10-21 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent_tests/concurrency_construction.rs"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1d2d29db78582c632850ff2bd3e30628fb278f9710b1cc1cec9919451e7601e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): crates/jcode-harness-api/src/harness_api_tests/schema_snapshot.rs:512-522 | crates/jcode-harness-api/src/harness_api_tests/schema_snapshot.rs:528-539 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api/src/harness_api_tests/schema_snapshot.rs"},"region":{"startLine":512}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a84ea2cb9064a826cf0dc62938aa8e6ea92a3fbc98f02f9c1fec720409d7182"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-harness-api/src/harness_api_tests/capability_coverage.rs:423-433 | crates/jcode-harness-api/src/harness_api_tests/schema_snapshot.rs:539-549 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-harness-api/src/harness_api_tests/capability_coverage.rs:423\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/jcode-harness-api/src/harness_api_tests/capability_coverage.rs:422\u0060 calls \u0060Some\u0060 and \u0060crates/jcode-harness-api/src/harness_api_tests/schema_snapshot.rs:538\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api/src/harness_api_tests/capability_coverage.rs"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7e5f2c134ec6c8056fbd73aac1fea3002a8e735aa10ba52df40caf3f30fa272"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-provider-doctor/src/provider_e2e.rs:722-732 | crates/jcode-provider-doctor/src/provider_e2e.rs:1078-1088 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-doctor/src/provider_e2e.rs:722\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/provider_e2e.rs"},"region":{"startLine":722}}}],"partialFingerprints":{"codehealthFindingId/v1":"06b8667480579205fd4978a6685459c42f2286682499cfde90e87baf04e6fd6f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): crates/jcode-tui/src/tui/ui_tests/inline_picker.rs:17-26 | crates/jcode-tui/src/tui/ui_tests/onboarding.rs:17-25 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tests/inline_picker.rs"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"05af5d1ac356d99b39132126c8d8a4294a1177f6c7cad77367792363f146e472"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-tui/src/tui/ui_tests/prepare.rs:1264-1273 | crates/jcode-tui/src/tui/ui_tests/prepare.rs:1310-1319 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-tui/src/tui/ui_tests/prepare.rs:1264\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tests/prepare.rs"},"region":{"startLine":1264}}}],"partialFingerprints":{"codehealthFindingId/v1":"80604d8c2b1abece1524ff6b83117b16030b1101e04d14fa315867e779a284b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-app-core/src/server/client_session_tests/clear.rs:79-87 | crates/jcode-app-core/src/server/client_session_tests/resume/live_events_before_history.rs:83-91 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_session_tests/clear.rs"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"adf8c4b31d504954dda54a8c2215a9284f82dbce49d132037e1424b8db2a74c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 3): crates/jcode-base/src/auth/oauth_tests/mod.rs:57-63 | crates/jcode-base/src/auth/oauth_tests/openai_device_code.rs:12-19 | crates/jcode-base/src/auth/oauth_tests/openai_refresh_deadline.rs:13-20 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-base/src/auth/oauth_tests/mod.rs:57\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/oauth_tests/mod.rs"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fafcba30690b1b8e0c4a9b56c481a354a9a01ea40c797357678d9b593d6407e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-app-core/src/agent_tests/mcp_remote_cache.rs:310-318 | crates/jcode-app-core/src/agent_tests/mcp_remote_cache.rs:363-371 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/agent_tests/mcp_remote_cache.rs:310\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent_tests/mcp_remote_cache.rs"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a57dfa50a062af8b89c1c148e8ec2cb18d8132b9f6502aa664ae331fb0a8bf7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-app-core/src/server/client_session_tests/clear.rs:22-29 | crates/jcode-app-core/src/server/client_session_tests/resume/live_events_before_history.rs:25-32 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_session_tests/clear.rs"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"f182338514546c9b2ed069739a4d8597c16fa973bbed0e3feb7a047c80859f00"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-provider-openai-runtime/src/openai_tests/opaque_recovery.rs:20-27 | crates/jcode-provider-openai-runtime/src/openai_tests/persistent_terminal.rs:215-222 \u2014 before extracting anything, compare \u0060crates/jcode-provider-openai-runtime/src/openai_tests/opaque_recovery.rs\u0060 and \u0060crates/jcode-provider-openai-runtime/src/openai_tests/persistent_terminal.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_tests/opaque_recovery.rs"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"39dd431ed715c564b2a2dbecae957d48390a34f2233ccd4d261ec1929756a0f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/jcode-provider-openai-runtime/src/openai_tests/opaque_recovery.rs:160-176 | crates/jcode-provider-openai-runtime/src/openai_tests/persistent_terminal.rs:242-258 \u2014 before extracting anything, compare \u0060crates/jcode-provider-openai-runtime/src/openai_tests/opaque_recovery.rs\u0060 and \u0060crates/jcode-provider-openai-runtime/src/openai_tests/persistent_terminal.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_tests/opaque_recovery.rs"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce4a86ff32c9d2571a03b6388e3a5daaa7c564c01086e4a5d88d7fa4ed6f06c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-app-core/src/agent_tests/mcp_remote_cache.rs:248-254 | crates/jcode-app-core/src/agent_tests/mcp_remote_cache.rs:328-334 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/agent_tests/mcp_remote_cache.rs:248\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent_tests/mcp_remote_cache.rs"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"4053666e52d8ea2204db33782a01ad303b227ba49ae43dab1d4a331abef3e651"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/jcode-provider-openai-runtime/src/openai_tests/http_idle.rs:13-21 | crates/jcode-provider-openai-runtime/src/openai_tests/overload_retry.rs:14-22 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-openai-runtime/src/openai_tests/http_idle.rs:13\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_tests/http_idle.rs"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c44dacfc0c8ca12300dc0d24563319a0d71120dfdaf2e01e8c3554ee8e52995"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/jcode-app-core/src/server/client_session_tests/resume/live_events_before_history.rs:107-112 | crates/jcode-app-core/src/server/client_session_tests/resume/live_events_before_history.rs:115-120 | crates/jcode-app-core/src/server/client_session_tests/resume/live_events_before_history.rs:122-127 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_session_tests/resume/live_events_before_history.rs"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d1cbc9d9b4772c4cc1902de18149df4e24a585d21830ebf1da782643ae88b4f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src/cli/auth_test/run.rs:255-260 | src/cli/auth_test/run.rs:498-503 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/cli/auth_test/run.rs:255\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/auth_test/run.rs"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"e54778070f78e5d64b458dab45b86e28ab0a25a6e28ca36b40588d016b02d5a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-provider-openai-runtime/src/openai_tests/opaque_recovery.rs:46-53 | crates/jcode-provider-openai-runtime/src/openai_tests/opaque_recovery.rs:117-124 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_tests/opaque_recovery.rs"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"532ed685de54c7b57894f6770a20ddaf2ccc8f42c4d758b6f4534aa1605862b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/jcode-app-core/src/agent_tests/concurrency_construction.rs:25-32 | crates/jcode-app-core/src/server/client_session_tests/concurrency.rs:25-32 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent_tests/concurrency_construction.rs"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7a4aabf36b78f346587509eb2784127dede003fa4f09c21005424e2024a38c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/jcode-base/src/auth/oauth_tests/mod.rs:10-14 | crates/jcode-base/src/session_tests/mod.rs:14-18 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060value\u0060 to \u0060\u0026std::path::Path\u0060 in one and \u0060impl AsRef\u003Cstd::ffi::OsStr\u003E\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/oauth_tests/mod.rs"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"f46ba14050da508dd6b2dc970886337ad1e1fed5207df5482e342345b154f003"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/jcode-provider-openai-runtime/src/openai_tests/responses_input.rs:13-23 | crates/jcode-provider-openai-runtime/src/openai_tests/websocket_prewarm.rs:24-34 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_tests/responses_input.rs"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba38d7340c95005df9bb509f01d7bea094a1407a936884e4b3ad8eb621543fd9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/jcode-base/src/auth/oauth_tests/mod.rs:18-24 | crates/jcode-base/src/session_tests/mod.rs:28-34 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/oauth_tests/mod.rs"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"f12ce2d5934f1a627c833f56114a7704a0c425f71d9bb985d5d95331215fb4f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 3): crates/jcode-provider-doctor/src/provider_e2e.rs:530-551 | crates/jcode-provider-doctor/src/provider_e2e.rs:826-845 | crates/jcode-provider-doctor/src/provider_e2e.rs:1186-1205 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-doctor/src/provider_e2e.rs:530\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/provider_e2e.rs"},"region":{"startLine":530}}}],"partialFingerprints":{"codehealthFindingId/v1":"076a396ad859ba3dc7752b6a5a98be78ac7907c851fbfb672a8e95a853c7ff07"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/jcode-provider-doctor/src/provider_e2e.rs:689-704 | crates/jcode-provider-doctor/src/provider_e2e.rs:1047-1062 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-doctor/src/provider_e2e.rs:689\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/provider_e2e.rs"},"region":{"startLine":689}}}],"partialFingerprints":{"codehealthFindingId/v1":"21e0a0e542753bf303b40999bafe0ececb7e14f682fe9eaf7fd578533e52e582"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/jcode-provider-doctor/src/provider_e2e.rs:642-656 | crates/jcode-provider-doctor/src/provider_e2e.rs:692-706 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-provider-doctor/src/provider_e2e.rs:642\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/provider_e2e.rs"},"region":{"startLine":642}}}],"partialFingerprints":{"codehealthFindingId/v1":"47ef21e614f0d3ec52dfcaa50e9a6c4f8914793c04125d969266128e1aea856d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): src/cli/auth_test/types.rs:72-81 | src/cli/auth_test/types.rs:87-96 | src/cli/auth_test/types.rs:133-142 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060src/cli/auth_test/types.rs:72\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/auth_test/types.rs"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"873642f5b04beeb82e058f75c2875d681e7ebc29b7fc170338be448011ec02bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/jcode-app-core/src/server/client_session_tests/clear.rs:61-70 | crates/jcode-app-core/src/server/client_session_tests/resume/live_events_before_history.rs:45-54 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/jcode-app-core/src/server/client_session_tests/clear.rs:61\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/jcode-app-core/src/server/client_session_tests/resume/live_events_before_history.rs:55\u0060 calls \u0060default\u0060 and \u0060crates/jcode-app-core/src/server/client_session_tests/clear.rs:71\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_session_tests/clear.rs"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"0214f281293ac545099b37c21b9b82808b25c6d8d0a45bcf9d4e3f6ab8ebace8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 5): crates/jcode-provider-openai-runtime/src/openai_tests/http_idle.rs:4-8 | crates/jcode-provider-openai-runtime/src/openai_tests/opaque_recovery.rs:12-16 | crates/jcode-provider-openai-runtime/src/openai_tests/overload_retry.rs:4-8 | crates/jcode-provider-openai-runtime/src/openai_tests/persistent_prefix.rs:67-71 | crates/jcode-provider-openai-runtime/src/openai_tests/persistent_terminal.rs:172-176 \u2014 before extracting anything, compare \u0060crates/jcode-provider-openai-runtime/src/openai_tests/opaque_recovery.rs\u0060 and \u0060crates/jcode-provider-openai-runtime/src/openai_tests/persistent_terminal.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_tests/http_idle.rs"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"465a354f4a4a2adaf22f5f858cac82016ff0cd45274f626c0a0f0dcc711eb8f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (45 lines \u00D7 2): scripts/jcode_harbor_agent.py:254-298 | scripts/jcode_harbor_claude_agent.py:283-327 \u2014 before extracting anything, compare \u0060scripts/jcode_harbor_agent.py\u0060 and \u0060scripts/jcode_harbor_claude_agent.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/jcode_harbor_agent.py"},"region":{"startLine":254}}}],"partialFingerprints":{"codehealthFindingId/v1":"9004c25ad67e5e4796317951957302011121a917df475ae2e2d6ce69db264a07"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33\u201340 lines \u00D7 2): scripts/repro_input_flicker.py:480-512 | scripts/repro_input_lag.py:458-497 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060scripts/repro_input_lag.py:458\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/repro_input_flicker.py"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a5dffd9388da5e3d692fb8b1239c5cae87d3d399727678db2d4156096028a97"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (38\u201339 lines \u00D7 2): scripts/benchmark_swarm.py:248-286 | scripts/benchmark_swarm.py:327-364 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/benchmark_swarm.py"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"cecc8436dbcc6ac8afc2456cec93614258adad7207b2421fa7f144cce4b07ecc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (36 lines \u00D7 2): scripts/benchmark_swarm.py:46-81 | scripts/benchmark_takehome.py:32-67 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060scripts/benchmark_takehome.py:27\u0060 calls \u0060get\u0060 and \u0060scripts/benchmark_swarm.py:37\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/benchmark_swarm.py"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ab9f119b02842f2a37d5bd0de17f6306f9c0b2e0b0cbb46cd02730324a883b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33\u201335 lines \u00D7 2): scripts/diagnose_idle_render_cost.py:329-361 | scripts/repro_slash_flicker.py:358-392 \u2014 before extracting anything, compare \u0060scripts/diagnose_idle_render_cost.py\u0060 and \u0060scripts/repro_slash_flicker.py\u0060 as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 267 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/diagnose_idle_render_cost.py"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"7039b684f4a402f440eb85bde678530684031a3d373c33dd4f15219e3db2f0b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 2): scripts/jcode_harbor_agent.py:150-183 | scripts/jcode_harbor_claude_agent.py:151-184 \u2014 before extracting anything, compare \u0060scripts/jcode_harbor_agent.py\u0060 and \u0060scripts/jcode_harbor_claude_agent.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/jcode_harbor_agent.py"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0da224fc80f7858048ad759b7f7e53411352d137f96bbf34e4a442e051316ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): scripts/benchmark_swarm.py:292-319 | scripts/benchmark_swarm.py:420-447 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/benchmark_swarm.py"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"288c29e7bc3eb8ba2310ea23d29722360dae42d7973a4ea4d659d4614c291752"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27\u201328 lines \u00D7 2): scripts/measure_animation_cpu_cost.py:101-128 | scripts/sweep_animation_fps.py:92-118 \u2014 before extracting anything, compare \u0060scripts/measure_animation_cpu_cost.py\u0060 and \u0060scripts/sweep_animation_fps.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/measure_animation_cpu_cost.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7d3cd698169ab087ea4373c766ed694257d86852093c1da0d931fda188387e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201325 lines \u00D7 6): scripts/check_donut_animates_live.py:80-99 | scripts/dump_fresh_spawn_screen.py:44-63 | scripts/pin_no_area_state.py:49-68 | scripts/verify_donut_still_animates.py:79-103 | scripts/which_overlay_blocks_donut.py:53-72 | scripts/why_no_animation_area.py:44-63 \u2014 before extracting anything, compare \u0060scripts/check_donut_animates_live.py\u0060 and \u0060scripts/dump_fresh_spawn_screen.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060scripts/check_donut_animates_live.py:80\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_donut_animates_live.py"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd389125e3a036df9bdaf9ddc737a90c8acd8375b0ddd772c56dd57ebfbf80aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201323 lines \u00D7 2): scripts/benchmark_takehome.py:139-157 | scripts/benchmark_takehome.py:232-254 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/benchmark_takehome.py"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8c926f444472068136678ac0277f8501cfc6d020e077584907dd7e53a91d3a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201323 lines \u00D7 2): scripts/check_donut_animates_live.py:110-119 | scripts/verify_donut_still_animates.py:114-136 \u2014 before extracting anything, compare \u0060scripts/check_donut_animates_live.py\u0060 and \u0060scripts/verify_donut_still_animates.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 144 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_donut_animates_live.py"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"b498cea8f0bc2dbc11ed9a5cd3969aaa16be0696fc8d2deac57314e2b35f19ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201323 lines \u00D7 2): scripts/phone-server/testflight-setup.py:83-104 | scripts/phone-server/testflight-setup.py:108-130 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060scripts/phone-server/testflight-setup.py:83\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/phone-server/testflight-setup.py"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"d641be8b15a6ca5b0ade121924a27eb50fa3d54550e6bf12559e3f1ae6f86946"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): scripts/profile_remote_resume_burst.py:93-116 | scripts/profile_single_spawn.py:43-66 \u2014 before extracting anything, compare \u0060scripts/profile_remote_resume_burst.py\u0060 and \u0060scripts/profile_single_spawn.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060cwd\u0060 to \u0060str = \u0022.\u0022\u0060 in one and \u0060str\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/profile_remote_resume_burst.py"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cae29ca48a180ce4c6b84123d03907f972206967083994545a294b319ec10ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): scripts/repro_expand_edit_shortcut.py:198-220 | scripts/repro_live_duplicate.py:168-190 \u2014 before extracting anything, compare \u0060scripts/repro_expand_edit_shortcut.py\u0060 and \u0060scripts/repro_live_duplicate.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 191 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/repro_expand_edit_shortcut.py"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"adb165f1c51e131a7666814377655c46e5921e153dfd9b302f5b502c76c74c0b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201321 lines \u00D7 2): scripts/bench_headless_memory.py:88-108 | scripts/repro_idle_session_rss.py:107-123 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060scripts/bench_headless_memory.py:88\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/bench_headless_memory.py"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a3e86db16f0f631800c8b65034b7818dd8e61b1a2145e809c9c9be9afcb3730"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): scripts/profile_remote_resume_burst.py:162-182 | scripts/profile_single_spawn.py:148-168 \u2014 before extracting anything, compare \u0060scripts/profile_remote_resume_burst.py\u0060 and \u0060scripts/profile_single_spawn.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 85 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/profile_remote_resume_burst.py"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d497932913e5550291e4cd0c3973d312e4f22a453b21b614f3e795c67a95418"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201321 lines \u00D7 8): scripts/check_donut_animates_live.py:77-92 | scripts/count_idle_draws.py:56-73 | scripts/dump_fresh_spawn_screen.py:41-56 | scripts/pin_no_area_state.py:46-61 | scripts/probe_idle_state.py:101-115 | scripts/verify_donut_still_animates.py:76-96 | scripts/which_overlay_blocks_donut.py:50-65 | scripts/why_no_animation_area.py:41-56 \u2014 before extracting anything, compare \u0060scripts/check_donut_animates_live.py\u0060 and \u0060scripts/count_idle_draws.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060scripts/check_donut_animates_live.py:73\u0060 calls \u0060add_argument\u0060 and \u0060scripts/verify_donut_still_animates.py:72\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_donut_animates_live.py"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"92bd4335046b61d58e52dee60fef04be9ea361f14166b1cb49c2cadc196b4c0d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): scripts/repro_expand_edit_shortcut.py:235-252 | scripts/repro_live_duplicate.py:205-222 \u2014 before extracting anything, compare \u0060scripts/repro_expand_edit_shortcut.py\u0060 and \u0060scripts/repro_live_duplicate.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 191 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/repro_expand_edit_shortcut.py"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cf36d280dfe51ec790c62514ee01be1f461a5ca1bdfa2cec4ae427b083893b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): scripts/benchmark_discovery.py:488-504 | scripts/benchmark_discovery_rate.py:448-464 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/benchmark_discovery.py"},"region":{"startLine":488}}}],"partialFingerprints":{"codehealthFindingId/v1":"80b0c61f63f5b7b7ce20d68d7237b9f71d763968101db784e60ffc17b28016c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 6): scripts/diagnose_idle_render_cost.py:151-166 | scripts/repro_expand_edit_shortcut.py:194-209 | scripts/repro_input_flicker.py:212-227 | scripts/repro_input_lag.py:170-185 | scripts/repro_live_duplicate.py:164-179 | scripts/repro_slash_flicker.py:172-187 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 6 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060scripts/repro_input_lag.py:186\u0060 calls \u0060monotonic\u0060 and \u0060scripts/repro_expand_edit_shortcut.py:210\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/diagnose_idle_render_cost.py"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"81ef6eb8a9cbbdf54c0571044005071adfdae9c34ce4b52b8aa6c3db680437fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 4): scripts/diagnose_idle_render_cost.py:200-215 | scripts/repro_input_flicker.py:275-290 | scripts/repro_input_lag.py:249-264 | scripts/repro_slash_flicker.py:218-233 \u2014 before extracting anything, compare \u0060scripts/diagnose_idle_render_cost.py\u0060 and \u0060scripts/repro_input_flicker.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 167 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/diagnose_idle_render_cost.py"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"f136b2bddfeacbbb045f74d072f31b51122703440c01b1c212be3e43ef8eaf1e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): scripts/repro_expand_edit_shortcut.py:264-279 | scripts/repro_live_duplicate.py:227-242 \u2014 before extracting anything, compare \u0060scripts/repro_expand_edit_shortcut.py\u0060 and \u0060scripts/repro_live_duplicate.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 191 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/repro_expand_edit_shortcut.py"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f055ce7313f0195bd416e1c842d10e8216de3da16c959b0e758c832d90219a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): scripts/repro_expand_edit_shortcut.py:435-449 | scripts/repro_live_duplicate.py:445-460 \u2014 before extracting anything, compare \u0060scripts/repro_expand_edit_shortcut.py\u0060 and \u0060scripts/repro_live_duplicate.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 191 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060scripts/repro_live_duplicate.py:445\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/repro_expand_edit_shortcut.py"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1af95ae9e8e947ce61f3cb9868f24e8be581f9fd1b49b304d1ebf3a2b5b1048"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): scripts/check_panic_budget.py:41-55 | scripts/check_swallowed_error_budget.py:48-62 | scripts/check_test_size_budget.py:33-47 \u2014 before extracting anything, compare \u0060scripts/check_panic_budget.py\u0060 and \u0060scripts/check_swallowed_error_budget.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_panic_budget.py"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"af917d6f3c9f3fcd09f5e43b49b82374b6c385fead1689f9bdca3ae718f1dc8d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 3): scripts/profile_remote_resume_burst.py:322-335 | scripts/repro_expand_edit_shortcut.py:443-457 | scripts/repro_live_duplicate.py:454-468 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/profile_remote_resume_burst.py"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d7fe7a58e4078a0f0a05350842f92f1b5799a3a8528d40d83c89e2f3dccf918"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): scripts/jcode_harbor_agent.py:217-231 | scripts/jcode_harbor_claude_agent.py:243-257 \u2014 before extracting anything, compare \u0060scripts/jcode_harbor_agent.py\u0060 and \u0060scripts/jcode_harbor_claude_agent.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/jcode_harbor_agent.py"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc027fd5e194a5f5bd65e23920d1225ab6285bf3e82e8a6a5ad076f6809cfc8c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 10): scripts/check_donut_animates_live.py:163-176 | scripts/count_idle_draws.py:152-165 | scripts/diagnose_idle_render_cost.py:430-443 | scripts/dump_fresh_spawn_screen.py:114-127 | scripts/pin_no_area_state.py:115-128 | scripts/probe_idle_state.py:193-206 | scripts/repro_slash_flicker.py:482-495 | scripts/verify_donut_still_animates.py:232-245 | scripts/which_overlay_blocks_donut.py:105-118 | scripts/why_no_animation_area.py:120-133 \u2014 before extracting anything, compare \u0060scripts/check_donut_animates_live.py\u0060 and \u0060scripts/count_idle_draws.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060scripts/check_donut_animates_live.py:163\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060scripts/pin_no_area_state.py:113\u0060 calls \u0060sleep\u0060 and \u0060scripts/diagnose_idle_render_cost.py:428\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_donut_animates_live.py"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"6837b5222d8eb228f37c00dda454a7ee425add0adc50e689e7a0d5ed56841192"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 5): scripts/diagnose_idle_render_cost.py:97-110 | scripts/repro_expand_edit_shortcut.py:103-116 | scripts/repro_input_flicker.py:108-121 | scripts/repro_input_lag.py:110-123 | scripts/repro_slash_flicker.py:104-117 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 5 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/diagnose_idle_render_cost.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"61e7b6ddf3bca3e731667a6754571f903fc06ee1b05815256349900943c0ade5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201314 lines \u00D7 2): scripts/diagnose_idle_render_cost.py:365-378 | scripts/probe_idle_state.py:127-138 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060scripts/diagnose_idle_render_cost.py:365\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/diagnose_idle_render_cost.py"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"05986beb9a2093e29a720fddccd801251aac1636ad90015ccd2552c3af069e03"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 8): scripts/diagnose_idle_render_cost.py:78-90 | scripts/profile_remote_resume_burst.py:77-89 | scripts/profile_single_spawn.py:27-39 | scripts/repro_expand_edit_shortcut.py:144-156 | scripts/repro_input_flicker.py:89-101 | scripts/repro_input_lag.py:91-103 | scripts/repro_live_duplicate.py:114-126 | scripts/repro_slash_flicker.py:85-97 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 8 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060timeout_s\u0060 to \u0060float = 30.0\u0060 in one and \u0060float = 10.0\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/diagnose_idle_render_cost.py"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d247bb01e60915d36160c970964741f6ee0205cfd3574bcfba4b73772be6c83"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 6): scripts/diagnose_idle_render_cost.py:94-106 | scripts/repro_expand_edit_shortcut.py:100-112 | scripts/repro_input_flicker.py:105-117 | scripts/repro_input_lag.py:107-119 | scripts/repro_live_duplicate.py:68-80 | scripts/repro_slash_flicker.py:101-113 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 6 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/diagnose_idle_render_cost.py"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e8e2262813c34198f8411287116f0f54f5507ebe9ea8151fb996e49997ddabf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 5): scripts/diagnose_idle_render_cost.py:129-140 | scripts/repro_expand_edit_shortcut.py:288-300 | scripts/repro_input_flicker.py:140-151 | scripts/repro_input_lag.py:143-154 | scripts/repro_slash_flicker.py:136-147 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 5 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060timeout_s\u0060 to \u0060float = 10.0\u0060 in one and \u0060float = 6.0\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/diagnose_idle_render_cost.py"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbb04a947d14dca908a8af3663da175a1982bafebbb5780261fcaded4a1e1066"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 4): scripts/diagnose_idle_render_cost.py:324-336 | scripts/repro_input_flicker.py:484-496 | scripts/repro_input_lag.py:463-475 | scripts/repro_slash_flicker.py:353-365 \u2014 before extracting anything, compare \u0060scripts/diagnose_idle_render_cost.py\u0060 and \u0060scripts/repro_input_flicker.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 167 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/diagnose_idle_render_cost.py"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb42be0ca817fe705511a94884c29a74d92bb42e6444732f532d829ef69fb5ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): scripts/profile_idle_donut.py:144-156 | scripts/which_overlay_blocks_donut.py:104-116 | scripts/why_no_animation_area.py:119-131 \u2014 before extracting anything, compare \u0060scripts/profile_idle_donut.py\u0060 and \u0060scripts/which_overlay_blocks_donut.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/profile_idle_donut.py"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc57c75586300b0e8d71f42194b7da67475a49d75c5d4e1f686db4d8b3309c6d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): scripts/diagnose_idle_render_cost.py:377-389 | scripts/repro_slash_flicker.py:414-425 \u2014 before extracting anything, compare \u0060scripts/diagnose_idle_render_cost.py\u0060 and \u0060scripts/repro_slash_flicker.py\u0060 as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 267 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/diagnose_idle_render_cost.py"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f43b147479f26e4e874f305e5e13938a827cc7701ae29c2b38012c63f26d261"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): scripts/repro_input_flicker.py:676-688 | scripts/repro_input_lag.py:655-667 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/repro_input_flicker.py"},"region":{"startLine":676}}}],"partialFingerprints":{"codehealthFindingId/v1":"d60b02148b6d37048b60db50939de68380c6bc0d7dedbe1ebfe15607f8ef9bc8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 6): scripts/diagnose_idle_render_cost.py:167-178 | scripts/repro_expand_edit_shortcut.py:211-222 | scripts/repro_input_flicker.py:234-245 | scripts/repro_input_lag.py:190-201 | scripts/repro_live_duplicate.py:181-192 | scripts/repro_slash_flicker.py:193-204 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 6 call sites, so a change lands once. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060scripts/repro_slash_flicker.py:192\u0060 calls \u0060feed\u0060, \u0060decode\u0060 and \u0060scripts/repro_input_lag.py:189\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/diagnose_idle_render_cost.py"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"80bd41e5475893570d7586d3a6ff1d8095a8b9f84716549f7e3b70d637cd2dc6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): scripts/pin_no_area_state.py:66-77 | scripts/profile_idle_donut.py:84-95 | scripts/which_overlay_blocks_donut.py:70-81 | scripts/why_no_animation_area.py:61-72 \u2014 before extracting anything, compare \u0060scripts/pin_no_area_state.py\u0060 and \u0060scripts/profile_idle_donut.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/pin_no_area_state.py"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"9798967bc60949d9065000993f3d14d0ffc548a5dc33025d9a50b952c30c202e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): scripts/measure_animation_cpu_cost.py:102-113 | scripts/repro_real_spawn_lag.py:190-201 | scripts/sweep_animation_fps.py:93-104 \u2014 before extracting anything, compare \u0060scripts/measure_animation_cpu_cost.py\u0060 and \u0060scripts/sweep_animation_fps.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060scripts/measure_animation_cpu_cost.py:117\u0060 calls \u0060round\u0060, \u0060load_average\u0060 and \u0060scripts/sweep_animation_fps.py:108\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/measure_animation_cpu_cost.py"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"63ca7f1beea5c6d73b9badd4dc83f30258b2d501587641182eb6572153c27b77"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): scripts/benchmark_swarm.py:409-420 | scripts/benchmark_takehome.py:197-208 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060scripts/benchmark_swarm.py:409\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060scripts/benchmark_swarm.py:425\u0060 calls \u0060get_test_summary\u0060 and \u0060scripts/benchmark_takehome.py:209\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/benchmark_swarm.py"},"region":{"startLine":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf4b614f4873f0dbc84bac9c1a828a031a3be2f036af91b9092e417c8dc9bfde"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): scripts/diagnose_idle_render_cost.py:114-124 | scripts/repro_input_flicker.py:125-135 | scripts/repro_input_lag.py:127-137 | scripts/repro_slash_flicker.py:121-131 \u2014 before extracting anything, compare \u0060scripts/diagnose_idle_render_cost.py\u0060 and \u0060scripts/repro_input_flicker.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 167 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/diagnose_idle_render_cost.py"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca2001e2a46d966e9f50a5fe3290c4f722628ffce0ee6f860b53a19f47bac12d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): scripts/diagnose_idle_render_cost.py:223-233 | scripts/repro_input_lag.py:276-286 | scripts/repro_slash_flicker.py:241-251 \u2014 before extracting anything, compare \u0060scripts/diagnose_idle_render_cost.py\u0060 and \u0060scripts/repro_input_lag.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/diagnose_idle_render_cost.py"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c7cc0841fd91e971ec7d574a4bb48ae2bc2b131c810b359108f601bea9adb81"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): scripts/diagnose_idle_render_cost.py:332-342 | scripts/profile_idle_donut.py:65-75 | scripts/repro_slash_flicker.py:361-371 \u2014 before extracting anything, compare \u0060scripts/diagnose_idle_render_cost.py\u0060 and \u0060scripts/profile_idle_donut.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/diagnose_idle_render_cost.py"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e7d8fa3f57e6e28b6da9cc271e852aa85f9a364cb360829a89ef3cf8a9f0b94"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): scripts/check_donut_animates_live.py:55-65 | scripts/verify_donut_still_animates.py:55-65 \u2014 before extracting anything, compare \u0060scripts/check_donut_animates_live.py\u0060 and \u0060scripts/verify_donut_still_animates.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 144 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_donut_animates_live.py"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7da75dfba3e49783c8e12c72583a18f474d0687c019adad69499da062f91bc7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): scripts/jcode_harbor_agent.py:29-39 | scripts/jcode_harbor_claude_agent.py:31-41 \u2014 before extracting anything, compare \u0060scripts/jcode_harbor_agent.py\u0060 and \u0060scripts/jcode_harbor_claude_agent.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/jcode_harbor_agent.py"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b451f3a720a32de78982c350e359b8174368b546a84570f379060b2a6559f49"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): scripts/jcode_harbor_agent.py:289-298 | scripts/jcode_harbor_agent.py:306-315 | scripts/jcode_harbor_claude_agent.py:318-327 \u2014 before extracting anything, compare \u0060scripts/jcode_harbor_agent.py\u0060 and \u0060scripts/jcode_harbor_claude_agent.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/jcode_harbor_agent.py"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a3dd7540a97ffc8fa548b9fa59d668358cd4120f3a18b20d0c53a204525d2bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): scripts/bench_headless_memory.py:238-247 | scripts/bench_headless_memory.py:470-479 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/bench_headless_memory.py"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"b79fc6740c9e6e556747f81cffb75704a28a598f13bec248d6cdd40bc007a5cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): scripts/bench_memory_cli.py:240-249 | scripts/bench_startup_visible_ready.py:208-217 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/bench_memory_cli.py"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"12bf2f3ffc9770638cae48bde5f70671966c960edfa254eed96019c10e8d549b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): scripts/bench_startup.py:170-179 | scripts/profile_spawn.py:332-340 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/bench_startup.py"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"42650976e9beb29f33b46c6f151398138469c8b568f3dbd5467c589019411a3f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): scripts/profile_real_spawn.py:33-41 | scripts/repro_real_spawn_lag.py:149-158 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060scripts/repro_real_spawn_lag.py:149\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/profile_real_spawn.py"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa785480b012b5c7b633cc64a558fbbf2cfaf0a842c6aed3f1e507937cbc37e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): scripts/repro_expand_edit_shortcut.py:121-130 | scripts/repro_live_duplicate.py:91-100 \u2014 before extracting anything, compare \u0060scripts/repro_expand_edit_shortcut.py\u0060 and \u0060scripts/repro_live_duplicate.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 191 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/repro_expand_edit_shortcut.py"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a216916688ca75b5c4ca95aca880166e6820474a808460a7038822de0fbc74e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 5): scripts/count_idle_draws.py:89-97 | scripts/pin_no_area_state.py:74-82 | scripts/probe_idle_state.py:135-143 | scripts/profile_idle_donut.py:92-100 | scripts/which_overlay_blocks_donut.py:78-86 \u2014 before extracting anything, compare \u0060scripts/count_idle_draws.py\u0060 and \u0060scripts/pin_no_area_state.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/count_idle_draws.py"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e2fbb62914492bf7b48df57c308823aeb112175f3b123a1b9a00f07dd08c920"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20139 lines \u00D7 4): scripts/check_code_size_budget.py:135-143 | scripts/check_panic_budget.py:136-141 | scripts/check_swallowed_error_budget.py:191-196 | scripts/check_test_size_budget.py:121-127 \u2014 before extracting anything, compare \u0060scripts/check_code_size_budget.py\u0060 and \u0060scripts/check_test_size_budget.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060scripts/check_code_size_budget.py:135\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_code_size_budget.py"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"223e308cb78bd7f5c16b6e7eb29fa870f005573122daa9e534fc565193821d71"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): scripts/benchmark_swarm.py:204-212 | scripts/benchmark_swarm.py:369-377 | scripts/benchmark_takehome.py:177-185 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/benchmark_swarm.py"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"b92dd0e5627c4bf8679d2d940feb4e17d649e3f3f68ac89cbad542ff760fed62"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): scripts/repro_expand_edit_shortcut.py:436-444 | scripts/repro_live_duplicate.py:447-455 | scripts/repro_startup_lag.py:83-91 \u2014 before extracting anything, compare \u0060scripts/repro_expand_edit_shortcut.py\u0060 and \u0060scripts/repro_live_duplicate.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 191 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/repro_expand_edit_shortcut.py"},"region":{"startLine":436}}}],"partialFingerprints":{"codehealthFindingId/v1":"c217ca1a26ddd0fc58b57aea5578d2f078cb6b93a107e8f68040b2736e742372"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): scripts/check_panic_budget.py:59-67 | scripts/check_swallowed_error_budget.py:66-74 \u2014 before extracting anything, compare \u0060scripts/check_panic_budget.py\u0060 and \u0060scripts/check_swallowed_error_budget.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_panic_budget.py"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a76ee895336036d90c6d62e6a0643aa9468a6f2a7e255aeec6e9ef3b3f40f61"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5\u20139 lines \u00D7 2): scripts/dump_fresh_spawn_screen.py:37-41 | scripts/repro_real_spawn_lag.py:140-148 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060scripts/repro_real_spawn_lag.py:140\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/dump_fresh_spawn_screen.py"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"228dced6af8133d60fddc51f57c99bd7543f50f3ee42e9f089d1ed6826355dbf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20139 lines \u00D7 2): scripts/profile_idle_donut.py:116-124 | scripts/profile_real_spawn.py:61-67 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/profile_idle_donut.py"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"d19a767436465c46a87e63d2ae931802656cd303631d37ebd81889ecbf5b40ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 8): scripts/check_donut_animates_live.py:93-100 | scripts/count_idle_draws.py:76-83 | scripts/dump_fresh_spawn_screen.py:57-64 | scripts/pin_no_area_state.py:62-69 | scripts/probe_idle_state.py:122-129 | scripts/verify_donut_still_animates.py:97-104 | scripts/which_overlay_blocks_donut.py:66-73 | scripts/why_no_animation_area.py:57-64 \u2014 before extracting anything, compare \u0060scripts/check_donut_animates_live.py\u0060 and \u0060scripts/count_idle_draws.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_donut_animates_live.py"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4b4615af6cb4816dd30a9160d3384d3775abf9e5267dad94c95586c60cefcd3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 7): scripts/diagnose_idle_render_cost.py:324-331 | scripts/repro_expand_edit_shortcut.py:436-443 | scripts/repro_input_flicker.py:483-491 | scripts/repro_input_lag.py:462-470 | scripts/repro_live_duplicate.py:447-454 | scripts/repro_slash_flicker.py:353-360 | scripts/repro_startup_lag.py:83-90 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 7 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060scripts/repro_input_flicker.py:483\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060scripts/repro_live_duplicate.py:446\u0060 calls \u0060add_argument\u0060, \u0060parse_args\u0060 and \u0060scripts/repro_input_flicker.py:483\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/diagnose_idle_render_cost.py"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"97ceee697c46b82ac95034dfc26e44cca61a29a85921a4d0921b89fd9b7322fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 6): scripts/diagnose_idle_render_cost.py:336-343 | scripts/profile_idle_donut.py:69-76 | scripts/profile_remote_resume_burst.py:327-334 | scripts/repro_expand_edit_shortcut.py:449-456 | scripts/repro_live_duplicate.py:460-467 | scripts/repro_slash_flicker.py:365-372 \u2014 before extracting anything, compare \u0060scripts/diagnose_idle_render_cost.py\u0060 and \u0060scripts/profile_idle_donut.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/diagnose_idle_render_cost.py"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"47e2e42f6efe6e8aa11e1c6c7244628d878b5f21490090aff2985008f2cd69e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): scripts/check_code_size_budget.py:41-48 | scripts/check_panic_budget.py:40-47 | scripts/check_swallowed_error_budget.py:47-54 | scripts/check_test_size_budget.py:32-39 \u2014 before extracting anything, compare \u0060scripts/check_code_size_budget.py\u0060 and \u0060scripts/check_test_size_budget.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_code_size_budget.py"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e4db88bebb9251c213b5c3a50ee1c954fa523a30db7e82878775b7e2ba378b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): scripts/diagnose_idle_render_cost.py:227-234 | scripts/repro_input_flicker.py:305-312 | scripts/repro_input_lag.py:280-287 | scripts/repro_slash_flicker.py:245-252 \u2014 before extracting anything, compare \u0060scripts/diagnose_idle_render_cost.py\u0060 and \u0060scripts/repro_input_flicker.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 167 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060scripts/repro_input_flicker.py:304\u0060 calls \u0060setdefault\u0060 and \u0060scripts/diagnose_idle_render_cost.py:226\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/diagnose_idle_render_cost.py"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f7808a45b212cab1dc30b32c9c77cb92b3b22a6e43fb5c1ff9b62493b8846c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 3): scripts/diagnose_idle_render_cost.py:376-382 | scripts/repro_input_lag.py:539-546 | scripts/repro_slash_flicker.py:413-419 \u2014 before extracting anything, compare \u0060scripts/diagnose_idle_render_cost.py\u0060 and \u0060scripts/repro_input_lag.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/diagnose_idle_render_cost.py"},"region":{"startLine":376}}}],"partialFingerprints":{"codehealthFindingId/v1":"402602d10d7cafd6d19caeba0ce80286fb6954e0b89fe3f18e3ee8352a9722b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): scripts/measure_animation_cpu_cost.py:75-82 | scripts/sweep_animation_fps.py:63-70 \u2014 before extracting anything, compare \u0060scripts/measure_animation_cpu_cost.py\u0060 and \u0060scripts/sweep_animation_fps.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/measure_animation_cpu_cost.py"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"1daef5c7f98ccca5889e228b836a6ebcd0eb6d083587554a9f100918e30f7ded"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): scripts/profile_idle_donut.py:54-61 | scripts/repro_slash_flicker.py:351-358 \u2014 before extracting anything, compare \u0060scripts/profile_idle_donut.py\u0060 and \u0060scripts/repro_slash_flicker.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/profile_idle_donut.py"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb354852b41e36656aab2268410d88c137cc52c4f17c6b51026a7c7f717b0c53"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): scripts/repro_expand_edit_shortcut.py:402-409 | scripts/repro_expand_edit_shortcut.py:418-425 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/repro_expand_edit_shortcut.py"},"region":{"startLine":402}}}],"partialFingerprints":{"codehealthFindingId/v1":"04bf0abead37e57fe2b734a2defc50c4be435d739748e8a40d9d60e8d92ddf5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 8): scripts/diagnose_idle_render_cost.py:337-343 | scripts/profile_idle_donut.py:70-76 | scripts/profile_remote_resume_burst.py:328-334 | scripts/repro_expand_edit_shortcut.py:450-456 | scripts/repro_input_flicker.py:503-509 | scripts/repro_input_lag.py:486-492 | scripts/repro_live_duplicate.py:461-467 | scripts/repro_slash_flicker.py:366-372 \u2014 before extracting anything, compare \u0060scripts/diagnose_idle_render_cost.py\u0060 and \u0060scripts/profile_idle_donut.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/diagnose_idle_render_cost.py"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bcebfd9852c2837b7c29509c031213290990d01d4f4fb69e384ee9ed4b15d5b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 7): scripts/count_idle_draws.py:79-85 | scripts/diagnose_idle_render_cost.py:363-369 | scripts/pin_no_area_state.py:65-71 | scripts/probe_idle_state.py:125-131 | scripts/profile_idle_donut.py:83-89 | scripts/which_overlay_blocks_donut.py:69-75 | scripts/why_no_animation_area.py:60-66 \u2014 before extracting anything, compare \u0060scripts/count_idle_draws.py\u0060 and \u0060scripts/pin_no_area_state.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/count_idle_draws.py"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f0b7baf5a20a7d6050acdb00eaad7c50ef4a3966f63283b24a02e52d1864d3a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 7): scripts/count_idle_draws.py:87-93 | scripts/diagnose_idle_render_cost.py:373-379 | scripts/pin_no_area_state.py:72-78 | scripts/probe_idle_state.py:133-139 | scripts/profile_idle_donut.py:90-96 | scripts/which_overlay_blocks_donut.py:76-82 | scripts/why_no_animation_area.py:67-73 \u2014 before extracting anything, compare \u0060scripts/count_idle_draws.py\u0060 and \u0060scripts/pin_no_area_state.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/count_idle_draws.py"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"970518a1dfe190934e9c3c027fdc171abeea9e99256d00bf2c570bc34ed77ded"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 4): scripts/diagnose_idle_render_cost.py:314-320 | scripts/repro_input_flicker.py:465-470 | scripts/repro_input_lag.py:437-442 | scripts/repro_slash_flicker.py:341-347 \u2014 before extracting anything, compare \u0060scripts/diagnose_idle_render_cost.py\u0060 and \u0060scripts/repro_input_flicker.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 167 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/diagnose_idle_render_cost.py"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"8559787990735ee99313896d0e95ef528517111fb6017fd54142b10efb303a33"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): scripts/check_donut_animates_live.py:58-64 | scripts/repro_slash_flicker.py:326-332 | scripts/verify_donut_still_animates.py:58-64 \u2014 before extracting anything, compare \u0060scripts/check_donut_animates_live.py\u0060 and \u0060scripts/verify_donut_still_animates.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 144 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_donut_animates_live.py"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c3faf66caf0d13e107647e7e693166cd74848c176fce1e9f2eacd9fc3a95c4e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 3): scripts/diagnose_idle_render_cost.py:220-226 | scripts/repro_input_flicker.py:295-300 | scripts/repro_slash_flicker.py:238-244 \u2014 before extracting anything, compare \u0060scripts/diagnose_idle_render_cost.py\u0060 and \u0060scripts/repro_input_flicker.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 167 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060scripts/repro_input_flicker.py:304\u0060 calls \u0060setdefault\u0060 and \u0060scripts/diagnose_idle_render_cost.py:227\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/diagnose_idle_render_cost.py"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"40ac2c18aee5dae16e27db21fcbec9e62eec3d4a80f215abfb67577a4f026a3f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): scripts/check_code_size_budget.py:84-90 | scripts/check_test_size_budget.py:73-79 \u2014 before extracting anything, compare \u0060scripts/check_code_size_budget.py\u0060 and \u0060scripts/check_test_size_budget.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060scripts/check_code_size_budget.py:84\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_code_size_budget.py"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3800dc3ef61c1d0532925e9f371218b846e09a9fb32f96fd1aedb600d8a40f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): scripts/measure_animation_cpu_cost.py:145-151 | scripts/sweep_animation_fps.py:134-140 \u2014 before extracting anything, compare \u0060scripts/measure_animation_cpu_cost.py\u0060 and \u0060scripts/sweep_animation_fps.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/measure_animation_cpu_cost.py"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"5eff312ca9cb69b08d345a562d5a0dfcc2fe6cefedef221a799eb969265e7d0d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): scripts/measure_animation_cpu_cost.py:153-159 | scripts/repro_real_spawn_lag.py:164-170 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/measure_animation_cpu_cost.py"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"393633a2129176789719cd9f469977b927b97f00d1494b950d692bd83ace8271"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): scripts/profile_idle_donut.py:129-135 | scripts/profile_idle_donut.py:137-143 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/profile_idle_donut.py"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6a62158a227e9951967da86ca2f32b4d8d8d0e48c390adc032d25e635a1eb7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 9): scripts/check_donut_animates_live.py:78-84 | scripts/count_idle_draws.py:57-63 | scripts/dump_fresh_spawn_screen.py:42-48 | scripts/pin_no_area_state.py:47-53 | scripts/probe_idle_state.py:102-108 | scripts/profile_idle_donut.py:63-69 | scripts/verify_donut_still_animates.py:77-83 | scripts/which_overlay_blocks_donut.py:51-57 | scripts/why_no_animation_area.py:42-48 \u2014 before extracting anything, compare \u0060scripts/check_donut_animates_live.py\u0060 and \u0060scripts/count_idle_draws.py\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060scripts/profile_idle_donut.py:59\u0060 calls \u0060Path\u0060, \u0060exists\u0060 and \u0060scripts/count_idle_draws.py:56\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_donut_animates_live.py"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"43e22adb9bd873d48d35cc61010a1a2c91d965d6b4cfe71d525e957c4958c760"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): scripts/bench_headless_memory.py:150-155 | scripts/bench_headless_memory.py:241-246 | scripts/bench_headless_memory.py:473-478 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/bench_headless_memory.py"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b68f33602acc54cf9dc0dff1ad4ac58790d22b5a14d0113fef9a27e443da83b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): scripts/check_donut_animates_live.py:104-115 | scripts/dump_fresh_spawn_screen.py:67-78 | scripts/verify_donut_still_animates.py:108-119 \u2014 before extracting anything, compare \u0060scripts/check_donut_animates_live.py\u0060 and \u0060scripts/dump_fresh_spawn_screen.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 87 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_donut_animates_live.py"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"16cf293910268c050ee4ae8cc9c31c061c33cf77a5e6e71d0b012ad9f2d6d897"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): scripts/check_donut_animates_live.py:69-74 | scripts/probe_idle_state.py:94-99 \u2014 before extracting anything, compare \u0060scripts/check_donut_animates_live.py\u0060 and \u0060scripts/probe_idle_state.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_donut_animates_live.py"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8c18d38de906ec23a834a1f3ea6014e2bdc0397b2f7069d39351204c1316e32"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): scripts/check_panic_budget.py:123-128 | scripts/check_swallowed_error_budget.py:167-172 \u2014 before extracting anything, compare \u0060scripts/check_panic_budget.py\u0060 and \u0060scripts/check_swallowed_error_budget.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_panic_budget.py"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"617a939c984769a03151f7b89b481ebdd12065f4e66f6fb1b9ed1f4ee20640b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): scripts/jcode_harbor_agent.py:188-193 | scripts/jcode_harbor_claude_agent.py:197-202 \u2014 before extracting anything, compare \u0060scripts/jcode_harbor_agent.py\u0060 and \u0060scripts/jcode_harbor_claude_agent.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/jcode_harbor_agent.py"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"087008801fe77e4914548d38dd3b98bddaa32d2567c55081edce0526f33f5c64"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): scripts/measure_animation_cpu_cost.py:65-71 | scripts/sweep_animation_fps.py:51-57 \u2014 before extracting anything, compare \u0060scripts/measure_animation_cpu_cost.py\u0060 and \u0060scripts/sweep_animation_fps.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/measure_animation_cpu_cost.py"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d7609d900393ee95c60d8e0153543a13f70bc19819f553b5914e5d9db457954"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): scripts/check_code_size_budget.py:83-87 | scripts/check_panic_budget.py:82-86 | scripts/check_test_size_budget.py:72-76 \u2014 before extracting anything, compare \u0060scripts/check_code_size_budget.py\u0060 and \u0060scripts/check_test_size_budget.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_code_size_budget.py"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"f795ddbaeefcd978b6da8a43aec7e6533216b6ed2c2d045ce29292d7a3060da6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): scripts/check_code_size_budget.py:90-95 | scripts/check_panic_budget.py:89-93 | scripts/check_test_size_budget.py:79-83 \u2014 before extracting anything, compare \u0060scripts/check_code_size_budget.py\u0060 and \u0060scripts/check_test_size_budget.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_code_size_budget.py"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"e12dabc034bc40e8b3aa583b11d3268926722485248ba683abd0806692099b1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): scripts/measure_animation_cpu_cost.py:145-149 | scripts/sweep_animation_fps.py:134-138 | scripts/why_no_animation_area.py:37-41 \u2014 before extracting anything, compare \u0060scripts/measure_animation_cpu_cost.py\u0060 and \u0060scripts/sweep_animation_fps.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060scripts/measure_animation_cpu_cost.py:142\u0060 calls \u0060add_argument\u0060 and \u0060scripts/why_no_animation_area.py:36\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/measure_animation_cpu_cost.py"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"9abb54c9ed4c58ba4a29c01722aa1c8a809df66cfcbda21b6297129f0e50dd12"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): scripts/bench_headless_memory.py:195-199 | scripts/bench_headless_memory.py:327-331 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060scripts/bench_headless_memory.py:195\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/bench_headless_memory.py"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e359149f982221a20c7b34fb36620ff50f37e13ffc09ea987865d4045bdbda0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): scripts/bench_startup.py:107-114 | scripts/profile_spawn.py:275-282 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/bench_startup.py"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"a43570eca37ccdd92ca12e25327fe5520420ddb03bd56dd89204392c39b29af3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): scripts/benchmark_swarm.py:85-90 | scripts/benchmark_takehome.py:71-76 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/benchmark_swarm.py"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"315acf05af14a7d6446c0d7e6843a5161508cfb96cd3956f47c0b472c0f4f4ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): scripts/check_donut_animates_live.py:74-78 | scripts/verify_donut_still_animates.py:73-77 \u2014 before extracting anything, compare \u0060scripts/check_donut_animates_live.py\u0060 and \u0060scripts/verify_donut_still_animates.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 144 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060scripts/check_donut_animates_live.py:73\u0060 calls \u0060add_argument\u0060 and \u0060scripts/verify_donut_still_animates.py:72\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_donut_animates_live.py"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c186e41b8a26b03a1ec28b4c793e2b3237da7916b77f19a0a8511d35aa6fe28"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u20135 lines \u00D7 4): scripts/count_idle_draws.py:53-57 | scripts/pin_no_area_state.py:44-47 | scripts/probe_idle_state.py:98-102 | scripts/which_overlay_blocks_donut.py:48-51 \u2014 before extracting anything, compare \u0060scripts/count_idle_draws.py\u0060 and \u0060scripts/pin_no_area_state.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 78 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060scripts/count_idle_draws.py:50\u0060 calls \u0060add_argument\u0060 and \u0060scripts/probe_idle_state.py:97\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/count_idle_draws.py"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"78a0784cf19e1b7b57aace72c783ac19c63f0d007b301d576833dd50aeda6a46"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): scripts/heap_diff_idle_sessions.py:40-44 | scripts/repro_idle_session_rss.py:107-111 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060scripts/heap_diff_idle_sessions.py:45\u0060 calls \u0060str\u0060 and \u0060scripts/repro_idle_session_rss.py:112\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/heap_diff_idle_sessions.py"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"84f23f59ef8dad9c0ef6fcf9d885aa76dbeb3be332ce7b7ee2bec3542794fe4b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): scripts/bench_memory_cli.py:79-86 | scripts/bench_startup_visible_ready.py:78-85 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/bench_memory_cli.py"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dadc48c0b0a6eb669999ae233fd5c0c9c26691ccdb39dafece78f84a4b8a2a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 4): scripts/bench_memory_cli.py:162-188 | scripts/bench_startup_visible_ready.py:131-157 | scripts/profile_remote_resume_burst.py:120-145 | scripts/profile_single_spawn.py:70-95 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 4 call sites, so a change lands once. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/bench_memory_cli.py"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d98d2bafde518b51c1acc3229745ff46151c8eb7003a84de391cabf90fabb32"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): scripts/benchmark_discovery.py:315-319 | scripts/benchmark_discovery_rate.py:386-390 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/benchmark_discovery.py"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"54f545e1ff6acfb5f4ae64c642df7963100b0027ea4e3a6b2f73c01a4b8ab5a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): scripts/check_dependency_boundaries.py:54-61 | scripts/compile_isolation_report.py:44-51 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_dependency_boundaries.py"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a089d14582b3f039cf8f9bf370d23e97a7d315635c60af7449cc4be6f18a41e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): scripts/check_donut_animates_live.py:41-51 | scripts/verify_donut_still_animates.py:42-51 \u2014 before extracting anything, compare \u0060scripts/check_donut_animates_live.py\u0060 and \u0060scripts/verify_donut_still_animates.py\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 144 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_donut_animates_live.py"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1c3f0e77fb034cebb2a0c4e5152fa33c291d4b2e566e23dd7a44992da98354d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): scripts/diagnose_idle_render_cost.py:241-248 | scripts/repro_input_flicker.py:321-328 | scripts/repro_input_lag.py:294-301 | scripts/repro_slash_flicker.py:259-266 \u2014 before extracting anything, compare \u0060scripts/diagnose_idle_render_cost.py\u0060 and \u0060scripts/repro_input_flicker.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 167 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060timeout_s\u0060 to \u0060float = 60.0\u0060 in one and \u0060float = 40.0\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/diagnose_idle_render_cost.py"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"8990f4592d9cffbb478f3effdf2ca6d6c5e1ec18cfe3d94756ed635dbdeb8490"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): scripts/diagnose_idle_render_cost.py:252-265 | scripts/probe_idle_state.py:38-57 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/diagnose_idle_render_cost.py"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9c66fd74a6b6072e3b5fe92327e9c53797829c237189b1924512b4072d62e70"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): scripts/jcode_harbor_agent.py:43-49 | scripts/jcode_harbor_claude_agent.py:45-51 | scripts/run_terminal_bench_campaign.py:37-43 \u2014 before extracting anything, compare \u0060scripts/jcode_harbor_agent.py\u0060 and \u0060scripts/jcode_harbor_claude_agent.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 128 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060candidates\u0060 to \u0060tuple[str | None, ...]\u0060 in one and \u0060list[str | None]\u0060 in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH \u2014 their common supertype where they have one, or a new abstraction over them where they do not \u2014 and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/jcode_harbor_agent.py"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"a74ca588b18ec4c5f302f8cc44a8be139f24529703d0d5a9478cdfbd7d17d0bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): scripts/measure_animation_cpu_cost.py:56-60 | scripts/sweep_animation_fps.py:42-46 \u2014 before extracting anything, compare \u0060scripts/measure_animation_cpu_cost.py\u0060 and \u0060scripts/sweep_animation_fps.py\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/measure_animation_cpu_cost.py"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"0efb5e6926e573169e48c338b124f1b9411dc220ccf0d802828a8ff724e48faa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): scripts/repro_expand_edit_shortcut.py:135-140 | scripts/repro_live_duplicate.py:105-110 \u2014 before extracting anything, compare \u0060scripts/repro_expand_edit_shortcut.py\u0060 and \u0060scripts/repro_live_duplicate.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 191 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/repro_expand_edit_shortcut.py"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f8d3be36a7a1702e21522ecb9773f7f294b7d76e477c8229b10273ebe02145c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): scripts/repro_real_spawn_lag.py:83-88 | scripts/repro_real_spawn_lag.py:94-99 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/repro_real_spawn_lag.py"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cb8c9e59e1320d896d7849e0007b34a70720aca5fd5ed6523782c45b14feaf8"}},{"ruleId":"D5","level":"warning","message":{"text":"Unstable project jcode-app-core: jcode-app-core has instability 0.97 with 1 dependents."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"0cc0b0fe5494278cf180838514e747fa4e1a00c54ae7e3060c2ba93192f23cfe"}},{"ruleId":"D5","level":"warning","message":{"text":"Unstable project jcode-protocol: jcode-protocol has instability 0.90 with 1 dependents."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6d682ff19ea7d474341b6aa8827f278f8f6a7e42772b6888063211083feb2a59"}},{"ruleId":"D5","level":"warning","message":{"text":"Unstable project jcode-provider-bedrock: jcode-provider-bedrock has instability 0.86 with 1 dependents."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"ce8c6e61266135785e401bfdab42b91b207141e14fa9da37d775d810c273436a"}},{"ruleId":"D5","level":"warning","message":{"text":"Unstable project jcode-provider-doctor: jcode-provider-doctor has instability 0.89 with 1 dependents."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"f67aa6b46ea47d7df07498c79c1dd8e086fc16fbec4ae0aac24e9974423777de"}},{"ruleId":"D5","level":"warning","message":{"text":"Unstable project jcode-setup-hints: jcode-setup-hints has instability 0.86 with 1 dependents."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"43b30024d3edb2e8de84f5338184672ebfab360be00fef0e517993e3ae27ee34"}},{"ruleId":"D5","level":"warning","message":{"text":"Unstable project jcode-telemetry-core: jcode-telemetry-core has instability 0.88 with 1 dependents."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"b2ec5bf7726672096f2d8e000c838cf73dcf5d2b652d870726d38aa6fdcec12f"}},{"ruleId":"D5","level":"warning","message":{"text":"Unstable project jcode-tui: jcode-tui has instability 0.96 with 1 dependents."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6b99e9ccfa907585e6c0a20c7a842ad294b281e64280459eae5ca2744f9f519c"}},{"ruleId":"D5","level":"warning","message":{"text":"Unstable project jcode-tui-messages: jcode-tui-messages has instability 0.83 with 1 dependents."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"ad9107a158a4c1a3b82cabb983879026b09341e0c1046ac1480a0cf4bbba92a9"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-agent-runtime: jcode-agent-runtime: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 3 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"2c33644de6ddfede395a1c616d460d9987dc28e806f7d1c939e1c801a1f4257d"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-ambient-types: jcode-ambient-types: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 1 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"b93d1dd6e38a2dce7d5de53e81cb626cfe6bd2a57dbb7fac2564dd5f2c5e97ef"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-applet-types: jcode-applet-types: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 5 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"7e12d3387af32861a3427500345e79882bbae4c8a1c568f5f82b75ae8cf42a95"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-auth-types: jcode-auth-types: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 1 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"fec72949da704889d8bfd1e26a103909bf7dac8f68278d71aca38ce6e668dcdd"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-background-types: jcode-background-types: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 1 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"2f370e7ad7d075a845e3fab65b00d6336e77de2eee48f2952f2e3fd769c36349"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-command-risk: jcode-command-risk: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 1 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"78e9e8437a42f17666d75acfe6dc24f28d78f25452999ab78169055db8089282"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-config-types: jcode-config-types: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 5 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"1c3801d0f21aaf26bed9ec02b462365d7e37b62442b9541b76a0948a89094af5"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-core: jcode-core: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 13 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"f284af1797bd05a3cbb8e5766087b1d6452b3eea80c3d162a3179ed2a39055f6"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-desktop-open: jcode-desktop-open: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 2 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"78db360ffe73e9c4e64563e34d7e391d43904ab3e6c4ff014f92f2123009e826"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-embedding: jcode-embedding: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 1 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"e74ca4cbc30ff6964ca397f7e6b6b8f9096497bb09b873e3fcee275a54c5ffb4"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-gateway-types: jcode-gateway-types: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 1 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d8d5b9a755a690fb3a311b559ce62ed67f7b386326c2d7b9048192968262765a"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-import-core: jcode-import-core: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 2 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"97a46926d688edecabd8093377e1eb8bfaf0157aa014386c08d0e76e81cc1ac7"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-memory-types: jcode-memory-types: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 2 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"692066eb9a2fb11623fa171938c01fa5a37e3149d4ecd22002ac45edd2113b70"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-message-types: jcode-message-types: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 24 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"0ce8cae75b271e8cfbc46452bf0b82855dd0e9ca93be7e035faca5874558fb55"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-notify-email: jcode-notify-email: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 1 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"9124a6b3e92de73baae0ba3371d35f3a2fb7cf09d5ba2f085ca477bb22d165dd"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-overnight-core: jcode-overnight-core: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 1 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"75cf42279a2a7a8cc70596811785da61c3e7efe3dc4f597f1daaba5b7a206012"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-plan: jcode-plan: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 4 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"718759f66ed6ebfb240af399d204f4ff5140466e79edf3065a2f4af10fa78131"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-provider-metadata: jcode-provider-metadata: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 3 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"5bd3553465bd9b5e036e8fe6e142d3b1ad968f95aa0bb0071b7750defeb0dae8"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-schema-dialect: jcode-schema-dialect: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 10 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"ee9b960d775944a6825e4416be7375ea7c7535de7d17fce30c345419e3dd8b36"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-selfdev-types: jcode-selfdev-types: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 7 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"2371999b660a9ca44d9176aa8286cfc0952ede936d51418a786d0a26e3b9bbc7"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-side-panel-types: jcode-side-panel-types: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 3 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"0270c0cdcb8953ea4d7a4cbb0cab069b9760c2bd20cf252aff1adc7c977da325"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-task-types: jcode-task-types: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 3 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"0db5236c6338adcbdea38328c25a5b3f1b4dde5b16beeb0f46c579c9110bc0a5"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-terminal-image: jcode-terminal-image: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 2 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d96446781d9b44e99588563952afedf6a78104326a7421cedd3c660e4791e2e7"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-terminal-launch: jcode-terminal-launch: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 2 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"8b486d082b9d1b827f599ce05a2bd48a5bb4acea4181375c6141c41915f21fc4"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-tool-types: jcode-tool-types: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 3 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"07bbf5f0d9e1ee49b1bedc0e9af0cf7f3b3240f6df680e924dc185bfc8bc6e48"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-transport: jcode-transport: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 4 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6941771d5be8ee34b309fee045889c15ac2126f7f17294dd7ed5a0d2c6082acf"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-tui-account-picker: jcode-tui-account-picker: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 1 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"7245ccc565e82186039517b729a1df29090974e4079199a03f2c090404eee63e"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-tui-workspace: jcode-tui-workspace: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 3 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6d54d6977ddc5397cdcb4c85ea65ae2a27cff4ded9767e853484f474f78e4b82"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-update-core: jcode-update-core: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 1 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"e3c8cd29207c1b6b013ca2bf5d2727c5d7a21ea0ee60bbf6408c0116fcd440dd"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-usage-types: jcode-usage-types: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 5 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"7617af44c534a4bd9696f4276c88337836d35e12d728755a52606f6ab8f3bf85"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-render-core: jcode-render-core: abstractness 0.08, instability 0.00, distance 0.92 \u2014 zone of pain \u2014 concrete and depended on by 2 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"beb41d0013d64f4d66c7101388640b6f52e393e1955289c0560a1c2b9d2b1e66"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-storage: jcode-storage: abstractness 0.00, instability 0.10, distance 0.90 \u2014 zone of pain \u2014 concrete and depended on by 9 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"c9a996ce72084c3024ada8bfa1e575657dfe1d750b62c6d387528f11bc1cace1"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-fuzzy: jcode-fuzzy: abstractness 0.11, instability 0.00, distance 0.89 \u2014 zone of pain \u2014 concrete and depended on by 1 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"aba2444c4f5a72c8df51c9d044a46865df29a5b3b70ef1e9749df0664c733eb2"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-logging: jcode-logging: abstractness 0.00, instability 0.11, distance 0.89 \u2014 zone of pain \u2014 concrete and depended on by 16 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"00165bbe11c24920aea126fa660fd15cdca4b87e72ebc012ec6bcee8f8e2b609"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-session-types: jcode-session-types: abstractness 0.00, instability 0.11, distance 0.89 \u2014 zone of pain \u2014 concrete and depended on by 8 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"de6728200ff3f70f0c660345352eb0f4894ab107da6e67316fa046f1426f18b6"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-codemode: jcode-codemode: abstractness 0.17, instability 0.00, distance 0.83 \u2014 zone of pain \u2014 concrete and depended on by 1 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"3a1052019eb344e1b80a81e1c4e634a98801bd84014b8eb2a8f0a241db9b3974"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-tui-style: jcode-tui-style: abstractness 0.00, instability 0.20, distance 0.80 \u2014 zone of pain \u2014 concrete and depended on by 4 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"718763fb010c82fb5a5e1926f31eaf2bf13697d145a54c15b01b5ade278f5671"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: jcode-provider-core: jcode-provider-core: abstractness 0.04, instability 0.20, distance 0.76 \u2014 zone of pain \u2014 concrete and depended on by 16 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"94d4677fe4220c142ef7e2b9f8577803c8275bb16a894e06bf7272c1028a2be5"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: MemoryManager (LCOM4 6): MemoryManager\u0027s methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/memory.rs"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"4987489c382128dfe90334b23bb1fa04c29953637edfe453437ce2b9fbc9bca1"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: MemoryEntry (LCOM4 6): MemoryEntry\u0027s methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-memory-types/src/lib.rs"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc3e2149ffa7364a8e287f904fcf9e023cf8d12f309635dda420215b665ec22b"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: CloudClient (LCOM4 5): CloudClient\u0027s methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-sdk/src/cloud.rs"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f2b5ce59151267155f493a26a4c0b37dcaf8b15d10250801bb13d990dcd7a85"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: App (LCOM4 5): App\u0027s methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \u2014 your repository\u0027s bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected \u2014 and which would otherwise dominate this list \u2014 are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app.rs"},"region":{"startLine":935}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdbe75ef92a46686abc3fc649001bf8a7f6141533f399a50c167ea6b94d7022e"}},{"ruleId":"D10","level":"warning","message":{"text":"Fixed-sleep synchronisation: concurrent configuration is rejected without changing the callback table: This test starts work it did not wait for (\u0060first\u0060, still running when the sleep starts) and then orders itself against it with \u0060delay(5)\u0060 \u2014 a fixed wait, not a signal that the work is done. Whether it passes depends on how loaded the machine is, which is why a test written this way is green on a developer\u0027s box and random in CI. Wait for the event itself instead: the process\u0027s own exit or output, a completion handle, or a condition polled to a timeout."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/typescript/test/tools.test.ts"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f49fbe2f946b14e99eba6caab1f01811afb8be9461ca683ac2b9adb101bf2de"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/app/remote/server_events.rs: crates/jcode-tui/src/tui/app/remote/server_events.rs changed 101 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 414 in jcode_tui::tui::app::remote::server_events::handle_server_event_inner at line 339. 45 of those changes were fix/bug commits, and the other 56 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/app/remote/server_events.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/server_events.rs"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"c124a52ecd0d4c7c0e446a1a79ee0a9b16dac4e4cb0559c663abd9b3d1d731fa"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/server/client_lifecycle.rs: crates/jcode-app-core/src/server/client_lifecycle.rs changed 91 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 291 in jcode_app_core::server::client_lifecycle::handle_client at line 245. 28 of those changes were fix/bug commits, and the other 63 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/server/client_lifecycle.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_lifecycle.rs"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"422777acb16f63d4345b9d583f111583f40068c44f39bf2b631629a84c596545"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/app/remote/key_handling.rs: crates/jcode-tui/src/tui/app/remote/key_handling.rs changed 52 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 242 in jcode_tui::tui::app::remote::key_handling::submit_prepared_remote_enter_input at line 283. 14 of those changes were fix/bug commits, and the other 38 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/app/remote/key_handling.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/key_handling.rs"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"57f154f15f6e706060860f4f80b0be7bcf57bd92d41593baee9bf02f74b59930"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-harness-api-server/src/translate.rs: crates/jcode-harness-api-server/src/translate.rs changed 78 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 141 in BridgeState::legacy_event_to_api_inner at line 1692. 26 of those changes were fix/bug commits, and the other 52 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-harness-api-server/src/translate.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/translate.rs"},"region":{"startLine":1692}}}],"partialFingerprints":{"codehealthFindingId/v1":"49cd86291409176e94f53bdf33b5d883bc33c93acb21c4d40e8423c6137c1be7"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/ui_messages.rs: crates/jcode-tui/src/tui/ui_messages.rs changed 93 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 102 in jcode_tui::tui::ui_messages::render_tool_message at line 3961. 20 of those changes were fix/bug commits, and the other 73 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/ui_messages.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":3961}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dfecf1b6b1ddf24afaa8a2ace70f90308ef361d5837aa4b2dfed6814eb8108b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/agent/turn_streaming_mpsc.rs: crates/jcode-app-core/src/agent/turn_streaming_mpsc.rs changed 53 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 178 in Agent::run_turn_streaming_mpsc at line 14. 19 of those changes were fix/bug commits, and the other 34 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/agent/turn_streaming_mpsc.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/turn_streaming_mpsc.rs"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd8bfc605507a7099c58d2274592d3564dcaa1fb0103cc2d13ee3c6e01ff9ae7"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-base/src/config/env_overrides.rs: crates/jcode-base/src/config/env_overrides.rs changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 312 in Config::apply_env_overrides at line 9. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/config/env_overrides.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/config/env_overrides.rs"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"85209568711e2144db94545dc31fdf613243a48b135a1f08c6d154bc88520ac9"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/ui.rs: crates/jcode-tui/src/tui/ui.rs changed 66 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 106 in jcode_tui::tui::ui::draw_inner at line 2981. 20 of those changes were fix/bug commits, and the other 46 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/ui.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui.rs"},"region":{"startLine":2981}}}],"partialFingerprints":{"codehealthFindingId/v1":"90ce172294b853752540fb9d3d21473e6b337ee95accaa599f69b82f0ec8b9ce"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/app/remote.rs: crates/jcode-tui/src/tui/app/remote.rs changed 77 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 75 in jcode_tui::tui::app::remote::handle_tick at line 94. 21 of those changes were fix/bug commits, and the other 56 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/app/remote.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8badba309f6779967963b3630fbea8e7b842e9f615c7f603f52ab7b4798b79c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/ui_viewport.rs: crates/jcode-tui/src/tui/ui_viewport.rs changed 43 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 132 in jcode_tui::tui::ui_viewport::draw_messages at line 322. 12 of those changes were fix/bug commits, and the other 31 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/ui_viewport.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_viewport.rs"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"372b882c4e79544b92e55aec00e296f081b23ad63145bc33c01d70a2abb356e4"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/agent/turn_loops.rs: crates/jcode-app-core/src/agent/turn_loops.rs changed 33 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 161 in Agent::run_turn at line 45. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/agent/turn_loops.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/turn_loops.rs"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"49a9ccea4122821b5bdc9263eb35b17200a2cbaa07f1564a14578580a8515f5f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/app/navigation.rs: crates/jcode-tui/src/tui/app/navigation.rs changed 36 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 135 in App::handle_mouse_event at line 1329. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/app/navigation.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/navigation.rs"},"region":{"startLine":1329}}}],"partialFingerprints":{"codehealthFindingId/v1":"73a2dcc66685c17e1f7e30f275578e1b07a7c9d4bc391c74d23a3298a3c59476"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/app/inline_interactive.rs: crates/jcode-tui/src/tui/app/inline_interactive.rs changed 37 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 113 in App::handle_inline_interactive_key at line 3532. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/app/inline_interactive.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":3532}}}],"partialFingerprints":{"codehealthFindingId/v1":"162174b2a28012338430efa540e66715c986db644322c78e5c13a08d9f5bad6d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/tool/communicate.rs: crates/jcode-app-core/src/tool/communicate.rs changed 34 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 112 in CommunicateTool::execute at line 810. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/tool/communicate.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/communicate.rs"},"region":{"startLine":810}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b335cee28376b6740ce85591332999cf4de56c3b8eb09ab0bc42cabcb6fc270"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/app/turn.rs: crates/jcode-tui/src/tui/app/turn.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 219 in App::run_turn_interactive at line 64. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/app/turn.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/turn.rs"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c08486ec91cbf243a1933ba9a4dcd66bc87491b7b9890789a252a7848d5fd3d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/app/input.rs: crates/jcode-tui/src/tui/app/input.rs changed 77 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in jcode_tui::tui::app::input::handle_pre_control_shortcuts at line 2359. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/app/input.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":2359}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cc83876b2c41a66e17479ede2875e1c8fc00ec8f23cf2aad52c61a4a1a3d290"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/app/state_ui_input_helpers.rs: crates/jcode-tui/src/tui/app/state_ui_input_helpers.rs changed 38 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 79 in App::get_suggestions_for at line 478. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/app/state_ui_input_helpers.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui_input_helpers.rs"},"region":{"startLine":478}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8de2547b303defb77835b23902d3e7acc2f164384dee9c9fc716102832d1d6e"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/app/debug_cmds.rs: crates/jcode-tui/src/tui/app/debug_cmds.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 176 in App::handle_debug_command at line 6. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/app/debug_cmds.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_cmds.rs"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce0b48beccd521b23335ddb96d6999aec8411648bec26f1978a55e72b91a1704"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/app/tui_state.rs: crates/jcode-tui/src/tui/app/tui_state.rs changed 66 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in App::info_widget_data at line 1582. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/app/tui_state.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tui_state.rs"},"region":{"startLine":1582}}}],"partialFingerprints":{"codehealthFindingId/v1":"36a66c5ece09b5dfc7624e2f08342083b3e08ec8a46bbfdef70c2734fdc65ad3"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/server.rs: crates/jcode-app-core/src/server.rs changed 62 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in Server::spawn_background_tasks at line 1199. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/server.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server.rs"},"region":{"startLine":1199}}}],"partialFingerprints":{"codehealthFindingId/v1":"f839446d1f813d0f1a10b0de7c43ac462fb3d1b3ca8d2ce2ca8812b23ef83bbf"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/app/run_shell.rs: crates/jcode-tui/src/tui/app/run_shell.rs changed 42 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 59 in App::run_remote at line 901. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/app/run_shell.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/run_shell.rs"},"region":{"startLine":901}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e6444f61e0023a65df719b9e38179fc656c378d03a6e77c0a1f7fc5b413e5df"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/app/commands.rs: crates/jcode-tui/src/tui/app/commands.rs changed 32 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 75 in jcode_tui::tui::app::commands::handle_session_command at line 1698. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/app/commands.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands.rs"},"region":{"startLine":1698}}}],"partialFingerprints":{"codehealthFindingId/v1":"419f35b220d7cf1d4b8c76a9a78e8e1bca760f5647b7e591d26f9d67fbf1b525"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs: crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs changed 28 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 83 in jcode_provider_openai_runtime::openai_stream_runtime::continue_persistent_ws_locked at line 539. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs"},"region":{"startLine":539}}}],"partialFingerprints":{"codehealthFindingId/v1":"82ed6ca4e8b6c4b2c08fdc520b52468dfdb2ad2cecaff4dcf285ff2ef210ed25"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src/cli/dispatch.rs: src/cli/dispatch.rs changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 80 in jcode::cli::dispatch::run_main at line 74. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- src/cli/dispatch.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/dispatch.rs"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"45c2d58d511850b882d89996e0daf1ae132e0309b5d22f0c52e3d768b5418c04"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/session_picker.rs: crates/jcode-tui/src/tui/session_picker.rs changed 62 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in SessionPicker::handle_overlay_key_inner at line 1514. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/session_picker.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker.rs"},"region":{"startLine":1514}}}],"partialFingerprints":{"codehealthFindingId/v1":"567e3bc999160d389a5ef693a59d2218f8b4d104bd234457693ee91f8bfd1e38"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/ui_prepare.rs: crates/jcode-tui/src/tui/ui_prepare.rs changed 40 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 57 in jcode_tui::tui::ui_prepare::render_message_into at line 1428. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/ui_prepare.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_prepare.rs"},"region":{"startLine":1428}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2cd167a3fc990c41aedd175d75b5ad625fbcdece0e37a6d928cece1c89c12e4"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: telemetry-worker/src/worker.js: telemetry-worker/src/worker.js changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 119 in worker.insertEvent at line 1183. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- telemetry-worker/src/worker.js\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":1183}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bc8dea10beb36ef031e1ed4602647282f54d24582d2dd904095eeb00356c9e2"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/app.rs: crates/jcode-tui/src/tui/app.rs changed 102 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in App::classify_kv_cache_miss_reason at line 2723. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/app.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app.rs"},"region":{"startLine":2723}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0305ef7bf87eb5ade77cdf3228a8de9a38da0adecf721949bca2ac32b97d2f1"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src/cli/cloud_move.rs: src/cli/cloud_move.rs changed 35 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 52 in jcode::cli::cloud_move::run_cli at line 2111. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- src/cli/cloud_move.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_move.rs"},"region":{"startLine":2111}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc5aa24f9840ff6defd668e036326bd95c9758cf7ede36438b6d0b4f1f10f472"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/tool/todo.rs: crates/jcode-app-core/src/tool/todo.rs changed 41 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in jcode_app_core::tool::todo::apply_todo_patch at line 323. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/tool/todo.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/todo.rs"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"d33f66387216b9ba4d9c4b150a56985d498664bf48127405d72e71a93ef029f8"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/ui_input.rs: crates/jcode-tui/src/tui/ui_input.rs changed 51 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in jcode_tui::tui::ui_input::draw_input at line 2159. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/ui_input.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_input.rs"},"region":{"startLine":2159}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5ed74a26d9a5c5c41013c1b88ff01e26a6a5c8bf687750b3b8ddcd759a899ed"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/tool/mod.rs: crates/jcode-app-core/src/tool/mod.rs changed 50 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in Registry::execute at line 1053. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/tool/mod.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/mod.rs"},"region":{"startLine":1053}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfda0628d6fd4301652c8e92defcc2ef43fe466e1820834aadd99546eca1d9f3"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/server/client_session.rs: crates/jcode-app-core/src/server/client_session.rs changed 33 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in jcode_app_core::server::client_session::handle_resume_session at line 1285. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/server/client_session.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_session.rs"},"region":{"startLine":1285}}}],"partialFingerprints":{"codehealthFindingId/v1":"fae34e7c33ff1d1016052345489cf5a8eddc452ca17925c01165b33bb7e14d1b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/app/tui_lifecycle.rs: crates/jcode-tui/src/tui/app/tui_lifecycle.rs changed 86 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in App::new_for_remote_with_options at line 1493. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/app/tui_lifecycle.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tui_lifecycle.rs"},"region":{"startLine":1493}}}],"partialFingerprints":{"codehealthFindingId/v1":"e93580a1e8f2aa5c4d0e03d13f6e52c4ebf48a13139f5c7328ca8966c53000f0"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-base/src/provider/mod.rs: crates/jcode-base/src/provider/mod.rs changed 43 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in MultiProvider::complete_with_failover at line 600. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/provider/mod.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/mod.rs"},"region":{"startLine":600}}}],"partialFingerprints":{"codehealthFindingId/v1":"514a9cc2f0e6ec8621dd8f154b2b0b7c02ab76cf5d27fbee65daf1d87cecbb70"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/app/auth.rs: crates/jcode-tui/src/tui/app/auth.rs changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 77 in App::handle_login_input at line 1841. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/app/auth.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth.rs"},"region":{"startLine":1841}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d4005499974a9439876d189ebe341f5e0fc7c788de051b0d4764c0a24f4df3d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/info_widget.rs: crates/jcode-tui/src/tui/info_widget.rs changed 39 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in jcode_tui::tui::info_widget::render_ambient_widget at line 1857. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/info_widget.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget.rs"},"region":{"startLine":1857}}}],"partialFingerprints":{"codehealthFindingId/v1":"f86518fdbf13d847d8f57465c67fab94848ec548fbe3a8704e3382e6c025525f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/app/local.rs: crates/jcode-tui/src/tui/app/local.rs changed 35 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in jcode_tui::tui::app::local::handle_bus_event at line 207. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/app/local.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/local.rs"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b89657c81851d037ed8462c4a75040fb8f1610f41c4e227cb5db635936a6845"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/agent/turn_execution.rs: crates/jcode-app-core/src/agent/turn_execution.rs changed 60 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in Agent::extract_session_memories at line 1564. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/agent/turn_execution.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/turn_execution.rs"},"region":{"startLine":1564}}}],"partialFingerprints":{"codehealthFindingId/v1":"7041d320d7c43befd631defe382ef05c255ac76444c5da0f71b97da227a21a89"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/session_picker/transcript_search.rs: crates/jcode-tui/src/tui/session_picker/transcript_search.rs changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in jcode_tui::tui::session_picker::transcript_search::search_shard at line 752. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/session_picker/transcript_search.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/transcript_search.rs"},"region":{"startLine":752}}}],"partialFingerprints":{"codehealthFindingId/v1":"030709c0c954309f85c2075582e48051424edf3c6bc97b2ab7d273a0c36f0942"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-provider-anthropic-runtime/src/lib.rs: crates/jcode-provider-anthropic-runtime/src/lib.rs changed 33 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in jcode_provider_anthropic_runtime::process_sse_event at line 2553. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-provider-anthropic-runtime/src/lib.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic-runtime/src/lib.rs"},"region":{"startLine":2553}}}],"partialFingerprints":{"codehealthFindingId/v1":"1724c26c2ae96eb3716c2714c1137c93694d7597bb87208ac8359b76a20255e5"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/ui_tools.rs: crates/jcode-tui/src/tui/ui_tools.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 89 in jcode_tui::tui::ui_tools::get_tool_summary_with_budget at line 847. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/ui_tools.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tools.rs"},"region":{"startLine":847}}}],"partialFingerprints":{"codehealthFindingId/v1":"9687b123e42ec762bad2122a744b69e548026236616263d41bf73061b193422b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/ui_todo_stages.rs: crates/jcode-tui/src/tui/ui_todo_stages.rs changed 44 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in jcode_tui::tui::ui_todo_stages::push_stage_lines at line 868. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/ui_todo_stages.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_todo_stages.rs"},"region":{"startLine":868}}}],"partialFingerprints":{"codehealthFindingId/v1":"36bbe2527205844d0e6518a7a09f73ef776f450c93e247f3a64205570e948975"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/app/commands_cloud.rs: crates/jcode-tui/src/tui/app/commands_cloud.rs changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in jcode_tui::tui::app::commands_cloud::finish_cloud_command at line 1177. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/app/commands_cloud.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/commands_cloud.rs"},"region":{"startLine":1177}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cb339409475ee633f3bb9cc51593c5f8f2ae9f93acb0890ff5f3e151482cab3"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-provider-openai-runtime/src/openai_provider_impl.rs: crates/jcode-provider-openai-runtime/src/openai_provider_impl.rs changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 51 in OpenAIProvider::complete at line 129. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-provider-openai-runtime/src/openai_provider_impl.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_provider_impl.rs"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5b567b0f8a0e799cc2ea4c22fb48cc4eb0184cf1c2565a4f7815a878f0affdc"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src/cli/commands.rs: src/cli/commands.rs changed 42 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in jcode::cli::commands::run_single_message_command_ndjson at line 3106. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- src/cli/commands.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands.rs"},"region":{"startLine":3106}}}],"partialFingerprints":{"codehealthFindingId/v1":"88880e545009060276d170a80f13608971cd0665a14a2f2c28780beff504a13f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/session_picker/render.rs: crates/jcode-tui/src/tui/session_picker/render.rs changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in SessionPicker::render_session_list_impl at line 418. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/session_picker/render.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/render.rs"},"region":{"startLine":418}}}],"partialFingerprints":{"codehealthFindingId/v1":"88bdffa1d0c8607564021dcb226210e3976ead16ebace2b245fff242a38a67fa"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/server/client_lightweight_control.rs: crates/jcode-app-core/src/server/client_lightweight_control.rs changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in jcode_app_core::server::client_lightweight_control::handle_lightweight_control_request at line 246. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/server/client_lightweight_control.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_lightweight_control.rs"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d7d7100d851d6b6300cf148dd457a33691988ae970749f2804b210d26f6a1d5"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/ui_inline_interactive.rs: crates/jcode-tui/src/tui/ui_inline_interactive.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 94 in jcode_tui::tui::ui_inline_interactive::draw_inline_interactive at line 595. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/ui_inline_interactive.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_inline_interactive.rs"},"region":{"startLine":595}}}],"partialFingerprints":{"codehealthFindingId/v1":"3752d6f63893cf961287041a7896a6ba599a640e8b6241d226ad2121567f728f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/server/comm_control.rs: crates/jcode-app-core/src/server/comm_control.rs changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in jcode_app_core::server::comm_control::handle_comm_task_control at line 1690. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/server/comm_control.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_control.rs"},"region":{"startLine":1690}}}],"partialFingerprints":{"codehealthFindingId/v1":"a20576aa0fdf5cde6a248a5e8a385850ff8999d30b8f9de924e84cfcb0182217"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-provider-openrouter-runtime/src/openrouter_provider_impl.rs: crates/jcode-provider-openrouter-runtime/src/openrouter_provider_impl.rs changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in OpenRouterProvider::complete at line 38. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-provider-openrouter-runtime/src/openrouter_provider_impl.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/openrouter_provider_impl.rs"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"19364c6d3bf31dc773705ec5fdd3158f1ca08cd5732776629cde68478860c1aa"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/app/model_context.rs: crates/jcode-tui/src/tui/app/model_context.rs changed 37 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in App::handle_provider_failover_prompt_with_payload at line 418. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/app/model_context.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/model_context.rs"},"region":{"startLine":418}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e8bc8618cc0a8084563a2aa075ef8e19b6fd8a8555bbe317c77327b19886703"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src/cli/provider_init.rs: src/cli/provider_init.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 56 in jcode::cli::provider_init::init_provider_with_model_policy at line 1525. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- src/cli/provider_init.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/provider_init.rs"},"region":{"startLine":1525}}}],"partialFingerprints":{"codehealthFindingId/v1":"d759ee5cf340233ce7b369e033a754af6f06c378b5a385923d12d62cb0f34f09"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/app/state_ui.rs: crates/jcode-tui/src/tui/app/state_ui.rs changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in jcode_tui::tui::app::state_ui::handle_info_command at line 1895. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/app/state_ui.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui.rs"},"region":{"startLine":1895}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ef425336883b586d1304a43b512b047d66ce94b554559b6aba0e4e9e5745fb7"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-provider-openai/src/stream.rs: crates/jcode-provider-openai/src/stream.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in jcode_provider_openai::stream::parse_openai_response_event at line 326. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-provider-openai/src/stream.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai/src/stream.rs"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bb4b9259f86900d52785d89699cae39ec8e7abe423442d21636d1de641d57d6"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-provider-anthropic/src/lib.rs: crates/jcode-provider-anthropic/src/lib.rs changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in jcode_provider_anthropic::format_messages_with_native at line 71. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-provider-anthropic/src/lib.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic/src/lib.rs"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"221e8a37436a691b8085a5f036dcdbf7f4fead6f5c731ebf412a8d05ecdafe94"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/tool/browser_fast.rs: crates/jcode-app-core/src/tool/browser_fast.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in jcode_app_core::tool::browser_fast::run at line 584. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/tool/browser_fast.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/browser_fast.rs"},"region":{"startLine":584}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7286ba57d0f43c23e500ef4c4bf9dafb5ee31cad2d4974b85182cd9240bb4a6"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/session_picker/filter.rs: crates/jcode-tui/src/tui/session_picker/filter.rs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in SessionPicker::rebuild_items_inner at line 449. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/session_picker/filter.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/filter.rs"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"98e9a7b8871e82913fe4fabd638aab5f46aa2d98bc24fe5a53e049d6aaa2acc7"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/server/debug.rs: crates/jcode-app-core/src/server/debug.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in jcode_app_core::server::debug::handle_debug_client at line 316. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/server/debug.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug.rs"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"63c501b3fe14f45d10eab859cf8e844a85be2697b6ef4540634d51061e0ce1da"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-harness-api-server/src/lib.rs: crates/jcode-harness-api-server/src/lib.rs changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in jcode_harness_api_server::run_bridge_stream at line 316. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-harness-api-server/src/lib.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/lib.rs"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd80983d5cb4261f050c79bdaf24c72ffb91787ce19458b71647a4daafa2444c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/server/swarm.rs: crates/jcode-app-core/src/server/swarm.rs changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in jcode_app_core::server::swarm::update_member_status_with_report_tldr at line 1709. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/server/swarm.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/swarm.rs"},"region":{"startLine":1709}}}],"partialFingerprints":{"codehealthFindingId/v1":"140aae51d944b615a7bb3af1e196f60732eeac76bba0f3a2da659b2219645e51"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src/cli/tui_launch.rs: src/cli/tui_launch.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 59 in jcode::cli::tui_launch::list_sessions at line 606. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- src/cli/tui_launch.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/tui_launch.rs"},"region":{"startLine":606}}}],"partialFingerprints":{"codehealthFindingId/v1":"d620e5975fd9fce58801bfff4fceafb9e22ee6484c13ceff9b1bc7a7a68fa598"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src/cli/acp.rs: src/cli/acp.rs changed 25 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in AcpRuntime::run_prompt at line 1107. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- src/cli/acp.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/acp.rs"},"region":{"startLine":1107}}}],"partialFingerprints":{"codehealthFindingId/v1":"98dbeaaa75bb64ebb59554df23439ef17b5eacb450e64dad393b6230bdb68c7f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-provider-core/src/lib.rs: crates/jcode-provider-core/src/lib.rs changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in RouteSelection::routed_model_spec at line 1083. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-provider-core/src/lib.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/lib.rs"},"region":{"startLine":1083}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8dd4093f40c085cde29ed6ced33fdbe44fb04d631b902df60e47a722710b1ec"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui-markdown/src/markdown_render_full.rs: crates/jcode-tui-markdown/src/markdown_render_full.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 149 in jcode_tui_markdown::markdown_render_full::render_markdown_with_link_urls at line 24. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui-markdown/src/markdown_render_full.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_full.rs"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"58e2b5709f0d7abd4e253cd352c42821ed4cc7746fd869ec3cf5367bdf230489"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/ui_header/account_router.rs: crates/jcode-tui/src/tui/ui_header/account_router.rs changed 28 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in jcode_tui::tui::ui_header::account_router::inventory_lines at line 234. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/ui_header/account_router.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_header/account_router.rs"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"95a9d30908e22761996372eb731a6816b1fa92da003b919e9fdbe0c024141463"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/app/tui_lifecycle_runtime.rs: crates/jcode-tui/src/tui/app/tui_lifecycle_runtime.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in jcode_tui::tui::app::tui_lifecycle_runtime::handle_dev_command at line 574. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/app/tui_lifecycle_runtime.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tui_lifecycle_runtime.rs"},"region":{"startLine":574}}}],"partialFingerprints":{"codehealthFindingId/v1":"01a8de3098bd7b9c98fbe0427f922f192890159342ab0efc43f55d9fce57ea66"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/app/auth_account_commands.rs: crates/jcode-tui/src/tui/app/auth_account_commands.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in jcode_tui::tui::app::auth_account_commands::parse_account_command at line 141. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/app/auth_account_commands.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_commands.rs"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"92d19ccc10286e23d81b46d05cbe11bc5f78f2d522dcb91d24ca76b6443018b2"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/server/provider_control.rs: crates/jcode-app-core/src/server/provider_control.rs changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in jcode_app_core::server::provider_control::handle_notify_auth_changed at line 881. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/server/provider_control.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/provider_control.rs"},"region":{"startLine":881}}}],"partialFingerprints":{"codehealthFindingId/v1":"48620fa83d11ead75834e9f3a8b8560ce207178230d2ccad6fd552576e8291cb"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui-markdown/src/markdown_render_lazy.rs: crates/jcode-tui-markdown/src/markdown_render_lazy.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 141 in jcode_tui_markdown::markdown_render_lazy::render_markdown_lazy_with_link_urls at line 16. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui-markdown/src/markdown_render_lazy.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_lazy.rs"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1e8b7bfdb166537c3cccf74e20b4ca79b395724fc7449f4896ad62f97e88c72"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-base/src/provider/startup.rs: crates/jcode-base/src/provider/startup.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in MultiProvider::new_with_auth_status at line 71. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/provider/startup.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/startup.rs"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea7248aa5f61bb7f31c73daf2c171eddeb55ef556fa574c1d7c31908389aaec3"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/server/debug_command_exec.rs: crates/jcode-app-core/src/server/debug_command_exec.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 78 in jcode_app_core::server::debug_command_exec::execute_debug_command at line 162. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/server/debug_command_exec.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/debug_command_exec.rs"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"81d98b8afebada3c453d89996a845496846829915e2bef19820392522e236e24"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-telemetry-core/src/lib.rs: crates/jcode-telemetry-core/src/lib.rs changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in jcode_telemetry_core::mark_tool_feature_usage at line 1075. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-telemetry-core/src/lib.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lib.rs"},"region":{"startLine":1075}}}],"partialFingerprints":{"codehealthFindingId/v1":"8eec05fe7d0b067818cee9f69345a2060535b32b9c240986dea508f423bf6c69"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/session_picker/loading.rs: crates/jcode-tui/src/tui/session_picker/loading.rs changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in jcode_tui::tui::session_picker::loading::load_sessions_inner at line 1921. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/session_picker/loading.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading.rs"},"region":{"startLine":1921}}}],"partialFingerprints":{"codehealthFindingId/v1":"091ca5d0edbd1c76a7958c6afd161be458674e269b2cb8e225800097503326cf"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src/cli/login.rs: src/cli/login.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in jcode::cli::login::run_login_provider at line 268. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- src/cli/login.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/login.rs"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"d59510281e2a465fec3c7a1b049d3e2759346ff0a609da282c71a952b39a4c7b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/server/comm_session.rs: crates/jcode-app-core/src/server/comm_session.rs changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in jcode_app_core::server::comm_session::spawn_swarm_agent at line 373. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/server/comm_session.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_session.rs"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8e36b14995d118daac570ab806291d040c8c350db831a6cc23518c90e54b99b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/server/client_disconnect_cleanup.rs: crates/jcode-app-core/src/server/client_disconnect_cleanup.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in jcode_app_core::server::client_disconnect_cleanup::cleanup_client_connection at line 114. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/server/client_disconnect_cleanup.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_disconnect_cleanup.rs"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"6779b1dd6de4958a98014906a6774a2d8914cd21bb039c4cbb94c7fe6809b178"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-base/src/provider/multi_provider.rs: crates/jcode-base/src/provider/multi_provider.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in MultiProvider::cross_provider_pool_prompt at line 105. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/provider/multi_provider.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/multi_provider.rs"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"828d37f6aa334f31e385804e23b39c2b925cedd7fa6452c2bbb00c99600d16ac"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/app/remote/reconnect.rs: crates/jcode-tui/src/tui/app/remote/reconnect.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in jcode_tui::tui::app::remote::reconnect::connect_with_retry at line 476. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/app/remote/reconnect.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/reconnect.rs"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cb343571776ce96f26be9052981aa53e4e02e36c1632cb3d70c67a91b501a5c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-todo-policy/src/followup.rs: crates/jcode-todo-policy/src/followup.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in FollowUpPolicy::decide_after_turn at line 267. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-todo-policy/src/followup.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-todo-policy/src/followup.rs"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"f48f58414b695861e94808295d8880b3e96f0c6ff7a8aefed48766b3d3f9d9e7"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/app/auth_account_picker.rs: crates/jcode-tui/src/tui/app/auth_account_picker.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in App::open_account_picker at line 215. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/app/auth_account_picker.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker.rs"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"59c0bfbf5e64d0c5a374f69f2f413a1a9929d8b497fd99cdec66bfaf85c89273"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui-render/src/swarm_gallery.rs: crates/jcode-tui-render/src/swarm_gallery.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 56 in jcode_tui_render::swarm_gallery::render_swarm_strip_vertical at line 957. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui-render/src/swarm_gallery.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/swarm_gallery.rs"},"region":{"startLine":957}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dc942724b637cfcfcf9cf3812d533169e197bac2b65853243beac67f5539eb6"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/ui_header.rs: crates/jcode-tui/src/tui/ui_header.rs changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in jcode_tui::tui::ui_header::build_persistent_header_with_auth at line 705. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/ui_header.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_header.rs"},"region":{"startLine":705}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc2a3e3129f74af4fa1fa77e9be9e150693241b5222c7b60fd4cc0d5b567fa5e"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-sdk/src/launch.rs: crates/jcode-sdk/src/launch.rs changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in jcode_sdk::launch::launch_instance at line 175. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-sdk/src/launch.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-sdk/src/launch.rs"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bde274a4a19e594008b9c8d592875db4293162125bfa9af4b4fd9c83a13e4d5"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/tool/bash.rs: crates/jcode-app-core/src/tool/bash.rs changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in BashTool::execute_background at line 1234. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/tool/bash.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/bash.rs"},"region":{"startLine":1234}}}],"partialFingerprints":{"codehealthFindingId/v1":"4767467e0169ec3a19a58ba2153138d417b4b2cdb58f0645f556851fe2efe0c3"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/redraw_schedule.rs: crates/jcode-tui/src/tui/redraw_schedule.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in jcode_tui::tui::redraw_schedule::redraw_interval_focused_policy at line 465. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/redraw_schedule.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/redraw_schedule.rs"},"region":{"startLine":465}}}],"partialFingerprints":{"codehealthFindingId/v1":"4efafb7be9a4ca5cf230ce944db04fde4bc20be732eec81dd24b3f5395d68414"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-provider-core/src/models.rs: crates/jcode-provider-core/src/models.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in jcode_provider_core::models::open_weight_family_context_limit at line 365. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-provider-core/src/models.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/models.rs"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"5410523a40fe08dd98585112a6d92cd5cd3b30a27cf65f695022ca1b46e153e1"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: sdk/typescript/src/client.ts: sdk/typescript/src/client.ts changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in JcodeClient.run at line 1357. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- sdk/typescript/src/client.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/typescript/src/client.ts"},"region":{"startLine":1357}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3f01f7af53629f9a9c181d0a8c18506a371861beafbf0afe5060a109b90089d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-base/src/usage/provider_fetch.rs: crates/jcode-base/src/usage/provider_fetch.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in jcode_base::usage::provider_fetch::fetch_openai_usage_for_account at line 150. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/usage/provider_fetch.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/provider_fetch.rs"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc71b9499674898f1c455e7ebbe202415d3523ad6ac852ae3ccdc1f058f04ca1"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/app/onboarding_flow_control.rs: crates/jcode-tui/src/tui/app/onboarding_flow_control.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in App::handle_onboarding_import_review_key at line 555. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/app/onboarding_flow_control.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/onboarding_flow_control.rs"},"region":{"startLine":555}}}],"partialFingerprints":{"codehealthFindingId/v1":"27d8b1320e7c4fc64d490dd0d6b56a6d7c8a45720310cf179b345a8c6b32e55f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-base/src/browser.rs: crates/jcode-base/src/browser.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in jcode_base::browser::ensure_browser_setup_for at line 270. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/browser.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/browser.rs"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"84c1bdbda2a88accfc6a31a0418977b63b27ad16519aadc512a6a8da3e62fe50"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-base/src/session/persistence.rs: crates/jcode-base/src/session/persistence.rs changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in Session::save_inner at line 612. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/session/persistence.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/persistence.rs"},"region":{"startLine":612}}}],"partialFingerprints":{"codehealthFindingId/v1":"674343f02172e056880f690fe2f7e9f62d93cbe8bcf3d927f6d785a0124708b5"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-base/src/session/render.rs: crates/jcode-base/src/session/render.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in jcode_base::session::render::render_messages_and_images_with_compacted_history at line 365. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/session/render.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/render.rs"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"095fc889fd6ef574da15d68ca1b384243b7aa6f0234ed0369b234699ae7a370a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-provider-cursor-runtime/src/agent_transport.rs: crates/jcode-provider-cursor-runtime/src/agent_transport.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 90 in jcode_provider_cursor_runtime::agent_transport::run_agent_turn at line 758. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-provider-cursor-runtime/src/agent_transport.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/agent_transport.rs"},"region":{"startLine":758}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4bcd18e8d13d5b949d88c0c93c9cb9fe645827bc07dcb9e27022148dd11124a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-provider-openai/src/request.rs: crates/jcode-provider-openai/src/request.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 69 in jcode_provider_openai::request::build_responses_input_with_logger at line 195. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-provider-openai/src/request.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai/src/request.rs"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c7b6a501d99da7f17e7632460866cf3b70dfb169c026313878924c0e9c2cc55"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-provider-openrouter/src/stream.rs: crates/jcode-provider-openrouter/src/stream.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in OpenRouterStream::parse_next_event at line 273. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-provider-openrouter/src/stream.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter/src/stream.rs"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d3c6272a4bf3d05a43ddd74ca43c5491b0404b5a333d78c0124df048ce78539"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-base/src/mobile_sync.rs: crates/jcode-base/src/mobile_sync.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in jcode_base::mobile_sync::sync_pass at line 708. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/mobile_sync.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mobile_sync.rs"},"region":{"startLine":708}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e7e2988f3e301116a4b18d5055cfd28841180ddda823aa98d7f56f8d4d0c00d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/tool/todo_names.rs: crates/jcode-app-core/src/tool/todo_names.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in jcode_app_core::tool::todo_names::normalize_public_input at line 139. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/tool/todo_names.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/todo_names.rs"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"210bdcf1807718ec83528e182e936c1ff35070b7db9d8d4cd4a1cecf8c30a334"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/ui_pinned.rs: crates/jcode-tui/src/tui/ui_pinned.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in jcode_tui::tui::ui_pinned::draw_side_panel_markdown at line 561. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/ui_pinned.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_pinned.rs"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"6903d379b4ed6aedefc5ebdb9294ff69535c7cb853588f37d599e8adb565f1f4"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/server/group_transfer.rs: crates/jcode-app-core/src/server/group_transfer.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in jcode_app_core::server::group_transfer::handle_with_gate at line 248. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/server/group_transfer.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/group_transfer.rs"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"25149c6b0937201321e9eb99184ca6df59ba0e02a6da256a11f32c83195c2e44"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-provider-bedrock/src/lib.rs: crates/jcode-provider-bedrock/src/lib.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in BedrockProvider::complete at line 1179. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-provider-bedrock/src/lib.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-bedrock/src/lib.rs"},"region":{"startLine":1179}}}],"partialFingerprints":{"codehealthFindingId/v1":"afd9629208ed3862af9ead8aabd4a7a5e25c9bccec740ff7a9573fc2ae64ca29"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/tool/gmail.rs: crates/jcode-app-core/src/tool/gmail.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 54 in GmailTool::execute at line 155. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/tool/gmail.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/gmail.rs"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"878974b6dabdfad22821f65575162f598b8f6f2481de914fb9c4ffef0dc4cd41"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/info_widget_swarm_background.rs: crates/jcode-tui/src/tui/info_widget_swarm_background.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in jcode_tui::tui::info_widget_swarm_background::render_swarm_dock at line 434. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/info_widget_swarm_background.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_swarm_background.rs"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"c13cc2540b45e6a20f1646f32c0a307b72dfc6350b6d4b13e3d1721d9d41004b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/server/client_comm_message.rs: crates/jcode-app-core/src/server/client_comm_message.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in jcode_app_core::server::client_comm_message::handle_comm_message at line 102. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/server/client_comm_message.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_comm_message.rs"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"c40108c5dd131dc8c565b1ba96b66c32a515b770ed93191446a1cccbbeed4290"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-provider-gemini-runtime/src/lib.rs: crates/jcode-provider-gemini-runtime/src/lib.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in GeminiProvider::complete at line 605. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-provider-gemini-runtime/src/lib.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-gemini-runtime/src/lib.rs"},"region":{"startLine":605}}}],"partialFingerprints":{"codehealthFindingId/v1":"af617d781306707dbee69fd9c68e0e65b34f224eb3922a5e0df97e9ba571bd57"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-base/src/auth/mod.rs: crates/jcode-base/src/auth/mod.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in AuthStatus::assessment_for_provider at line 590. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/auth/mod.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/mod.rs"},"region":{"startLine":590}}}],"partialFingerprints":{"codehealthFindingId/v1":"2720a326e4e55370df4e501846aeb81121d4d5dd3329d30529db3c09e6722252"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-voice/src/streaming_capture.rs: crates/jcode-voice/src/streaming_capture.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in jcode_voice::streaming_capture::capture at line 280. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-voice/src/streaming_capture.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-voice/src/streaming_capture.rs"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d875495671f88b0c20a9b7e73ab049869606741c30582bb0098007050a384e9"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/ui_todo_changes.rs: crates/jcode-tui/src/tui/ui_todo_changes.rs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in jcode_tui::tui::ui_todo_changes::compute_diff at line 141. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/ui_todo_changes.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_todo_changes.rs"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"0068e85d76e11f690b86c3040f140d2526261c1e211526de1274d7134b53ca90"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/update.rs: crates/jcode-app-core/src/update.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in jcode_app_core::update::download_and_install_blocking_with_progress at line 960. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/update.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/update.rs"},"region":{"startLine":960}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca5a3f1532e9ddfe1d0538668a0e785a43d9f380db57187601ee3a03dfb1c348"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src/cli/ssh_transport.rs: src/cli/ssh_transport.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in jcode::cli::ssh_transport::accept_connections at line 522. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- src/cli/ssh_transport.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/ssh_transport.rs"},"region":{"startLine":522}}}],"partialFingerprints":{"codehealthFindingId/v1":"818da0bcd060343047989fedff7d169ce28ce3a1b00c35a3829bcbd130fa4311"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/tool/bg.rs: crates/jcode-app-core/src/tool/bg.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in BgTool::execute at line 559. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/tool/bg.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/bg.rs"},"region":{"startLine":559}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7c796c0aa242aa295523900761bd0c0377cf465e2ecf96b0a421020c6b0b276"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/ui_messages/usage.rs: crates/jcode-tui/src/tui/ui_messages/usage.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in ProviderCard::body_lines at line 304. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/ui_messages/usage.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages/usage.rs"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3f45c9b7ad215abe572c07f3d71050e02084467fbf4f01665b2f3f04a36af54"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/app/usage_reset.rs: crates/jcode-tui/src/tui/app/usage_reset.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in App::handle_usage_reset_command at line 297. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/app/usage_reset.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/usage_reset.rs"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e4aa71869d1982ef374d20fcc76fff1c941c57a5b2f4bb84d4b619af0b136aa"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-todo-policy/src/stages.rs: crates/jcode-todo-policy/src/stages.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in jcode_todo_policy::stages::validate_lane_dependencies at line 124. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-todo-policy/src/stages.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-todo-policy/src/stages.rs"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6970350b5a094f8f54a7826c4f3c146c154b166f1605f41a3563a181e3dacbd"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-provider-core/src/pricing.rs: crates/jcode-provider-core/src/pricing.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in jcode_provider_core::pricing::openai_api_pricing_with_tier at line 161. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-provider-core/src/pricing.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/pricing.rs"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"73ebd4b4b5cade941f381d54cc7a80375757ed7bb1dafa9c2b4c58748f7be240"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-base/src/provider/catalog_routes.rs: crates/jcode-base/src/provider/catalog_routes.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in jcode_base::provider::catalog_routes::append_openai_routes at line 527. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/provider/catalog_routes.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/catalog_routes.rs"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"986a1260eca26c43b7ef40217b416070eb566175e5b3645f08f2400be85e4aef"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/server/swarm_persistence.rs: crates/jcode-app-core/src/server/swarm_persistence.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in jcode_app_core::server::swarm_persistence::load_runtime_state at line 500. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/server/swarm_persistence.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/swarm_persistence.rs"},"region":{"startLine":500}}}],"partialFingerprints":{"codehealthFindingId/v1":"7da28b604aae5354304db0c418130e5d1a19d6dcfb6e5e4670fc96d2314fb740"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/server/headless.rs: crates/jcode-app-core/src/server/headless.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in jcode_app_core::server::headless::create_headless_session at line 37. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/server/headless.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/headless.rs"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4de0a2cab9d58f9341dfc76ff1924d958c76b8d600ee6b9db645195895b6926"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-provider-cursor-runtime/src/wire.rs: crates/jcode-provider-cursor-runtime/src/wire.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 97 in jcode_provider_cursor_runtime::wire::decode_exec_server_message at line 691. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-provider-cursor-runtime/src/wire.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-cursor-runtime/src/wire.rs"},"region":{"startLine":691}}}],"partialFingerprints":{"codehealthFindingId/v1":"5687bde1b9dfad87a6b13ed1c1edab2a9d0f87a3c2978d7b670a841d111bb429"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src/cli/proctitle.rs: src/cli/proctitle.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in jcode::cli::proctitle::initial_title at line 11. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- src/cli/proctitle.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/proctitle.rs"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"22a2f8153e9e1f2cdf22cf3ae1e5447c3cdb53bc4e8b5aca97475f30b9858c2c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-command-risk/src/tokenize.rs: crates/jcode-command-risk/src/tokenize.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in jcode_command_risk::tokenize::heredoc_delimiters at line 397. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-command-risk/src/tokenize.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-command-risk/src/tokenize.rs"},"region":{"startLine":397}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bee75f9fa745f960d2724d73708d604d6e4519ef6307378a2e84007075f2062"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/tool/apply_patch.rs: crates/jcode-app-core/src/tool/apply_patch.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in ApplyPatchTool::execute at line 94. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/tool/apply_patch.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/apply_patch.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5d471bb51f80706aff056b55d184f453ef31104bf14bef2b7851b820dc37495"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/server/client_processing.rs: crates/jcode-app-core/src/server/client_processing.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in jcode_app_core::server::client_processing::start_processing_message at line 187. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/server/client_processing.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_processing.rs"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0de2b82d2bf1b06287cdc8f507e0729764dac96c024293809be02779c1f28f8"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-provider-antigravity-runtime/src/lib.rs: crates/jcode-provider-antigravity-runtime/src/lib.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in AntigravityProvider::complete at line 450. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-provider-antigravity-runtime/src/lib.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-antigravity-runtime/src/lib.rs"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e42fa8648c55fc4501ddc82a5f22f94e329cc8b04b11bb4c50e86fd97205df8"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-provider-openai-runtime/src/openai_tests/persistent_terminal.rs: crates/jcode-provider-openai-runtime/src/openai_tests/persistent_terminal.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in jcode_provider_openai_runtime::openai_tests::persistent_terminal::persistent_terminal_public_case at line 166. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-provider-openai-runtime/src/openai_tests/persistent_terminal.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_tests/persistent_terminal.rs"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"3432bb9352dc57364ca575bacab9ff7c6b255cacb04d1a822214b8eb67bda69c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-provider-doctor/src/live_provider_probes.rs: crates/jcode-provider-doctor/src/live_provider_probes.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in jcode_provider_doctor::live_provider_probes::consume_native_stream at line 595. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-provider-doctor/src/live_provider_probes.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/live_provider_probes.rs"},"region":{"startLine":595}}}],"partialFingerprints":{"codehealthFindingId/v1":"a518f55f78402ccb051630a965329634c48dab7beff05bc4b35f0c02c0ed559d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/app/turn_memory.rs: crates/jcode-tui/src/tui/app/turn_memory.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in App::extract_session_memories at line 134. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/app/turn_memory.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/turn_memory.rs"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac9c6c2c8eda788d2479317a4e8a230b1f3ec32a82beaf5d9e4ec353b6d32725"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src/cli/ssh.rs: src/cli/ssh.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in jcode::cli::ssh::run_unix at line 104. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- src/cli/ssh.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/ssh.rs"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"b60e46973a2ddcf5d7cae62ca8f19352c5d7ffba7bbb935b2af53e9684252e15"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-compaction-core/src/lib.rs: crates/jcode-compaction-core/src/lib.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in jcode_compaction_core::build_compaction_conversation_text at line 162. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-compaction-core/src/lib.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-compaction-core/src/lib.rs"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"37e4debb1f8a3d11675d4911162915ab2025b1cd1486ccfa793ccf4775509244"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui-tool-display/src/lib.rs: crates/jcode-tui-tool-display/src/lib.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in jcode_tui_tool_display::parse_tool_failure at line 214. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui-tool-display/src/lib.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-tool-display/src/lib.rs"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"718703eff9d4ae5b1dc9265c1c4f9f0802d5c3e32245d5f7b34a4d8f7df3ff83"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-provider-openrouter-runtime/src/opencode_go_responses.rs: crates/jcode-provider-openrouter-runtime/src/opencode_go_responses.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in ResponsesStream::parse_event at line 208. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-provider-openrouter-runtime/src/opencode_go_responses.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/opencode_go_responses.rs"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"45b292a299d1d29fd2384cf8ed1c6fb16d91ca92d93725db601e7ac50b77c312"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: sdk/typescript/src/launch.ts: sdk/typescript/src/launch.ts changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in launch.launchInstance at line 522. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- sdk/typescript/src/launch.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/typescript/src/launch.ts"},"region":{"startLine":522}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d28bddacf31699d1c856900aae8632222f05f039dd2af6ea7b46044e2de092a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-protocol/src/comm_format.rs: crates/jcode-protocol/src/comm_format.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in jcode_protocol::comm_format::format_comm_members at line 134. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-protocol/src/comm_format.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-protocol/src/comm_format.rs"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"258afed3bbce3dd7ac45a3ebd2ba99996020c28d259e245453f7e6c228306db8"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-base/src/auth/transfer.rs: crates/jcode-base/src/auth/transfer.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in jcode_base::auth::transfer::import_cloud_inner at line 1016. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/auth/transfer.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/transfer.rs"},"region":{"startLine":1016}}}],"partialFingerprints":{"codehealthFindingId/v1":"02ab972ac7d504bba9fd4dc1a97ae5ca4cea44c487806aea756de4bf8de8f442"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/server/runtime_commands.rs: crates/jcode-app-core/src/server/runtime_commands.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 70 in jcode_app_core::server::runtime_commands::execute at line 34. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/server/runtime_commands.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/runtime_commands.rs"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"df5f0efaa99dc565428e69142f74cfddd87b3e50a9680992d0a5c66353420beb"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src/cli/cloud_env.rs: src/cli/cloud_env.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in jcode::cli::cloud_env::exchange_bounded at line 144. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- src/cli/cloud_env.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_env.rs"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1dc1032dbd78a9cffd13e7219035c8978873b9cacfdf04e9755ef69c7dd62c1"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-provider-openrouter-runtime/src/openrouter_sse_stream.rs: crates/jcode-provider-openrouter-runtime/src/openrouter_sse_stream.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in jcode_provider_openrouter_runtime::openrouter_sse_stream::stream_response at line 192. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-provider-openrouter-runtime/src/openrouter_sse_stream.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/openrouter_sse_stream.rs"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"9096a780896de78edb717ca47bfe38b3c51a0d21c93cd9f9e018cf2c79e51187"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-base/src/kv_cache_monitor.rs: crates/jcode-base/src/kv_cache_monitor.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in jcode_base::kv_cache_monitor::reason at line 559. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/kv_cache_monitor.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/kv_cache_monitor.rs"},"region":{"startLine":559}}}],"partialFingerprints":{"codehealthFindingId/v1":"eedac6dc50facb4137b6c00cecaad1f96ad109d1f21b12b80a60b818f8b9318c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-base/src/mcp/client.rs: crates/jcode-base/src/mcp/client.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in McpClient::connect_in_dir at line 195. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/mcp/client.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mcp/client.rs"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"75c1423a76540c1f2b079022ea835aa98107d97ff2d45f19eda64a96f685ef63"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: scripts/accept_live_local_message.mjs: scripts/accept_live_local_message.mjs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in accept_live_local_message.main at line 89. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- scripts/accept_live_local_message.mjs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/accept_live_local_message.mjs"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9ba65b5194029688a7cefb0a094daecd9ba5679473da6b5f6c05564e57764d6"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-base/src/usage/api_keys.rs: crates/jcode-base/src/usage/api_keys.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in jcode_base::usage::api_keys::fetch_compatible_profile_report at line 213. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/usage/api_keys.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/api_keys.rs"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"e360e05c67c48e8103cb9f329b9184fbc567d60f3c2f6cfb1b532d0d1612eea0"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/info_widget_layout.rs: crates/jcode-tui/src/tui/info_widget_layout.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 54 in jcode_tui::tui::info_widget_layout::calculate_placements_anchored at line 125. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/info_widget_layout.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_layout.rs"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"0effbfccecf1b0bf96536e716d155043a212a518d7d50a5e928e57fc3462faa2"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-voice/src/global/hotkey.rs: crates/jcode-voice/src/global/hotkey.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in Listener::poll at line 694. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-voice/src/global/hotkey.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-voice/src/global/hotkey.rs"},"region":{"startLine":694}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb484de924f4aaf2669a9cf838bf4e264432de9776924e1df2c798bcdb2d9e45"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src/cli/commands/todo_followup.rs: src/cli/commands/todo_followup.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in jcode::cli::commands::todo_followup::prepare_run_todo_follow_up at line 156. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- src/cli/commands/todo_followup.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands/todo_followup.rs"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff6cd9121604910822ccaf8e0d1e0c2baafddfcba571a8eb0fe7edf94dacdc71"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src/cli/cloud_group_run.rs: src/cli/cloud_group_run.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in jcode::cli::cloud_group_run::run_migrate at line 3. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- src/cli/cloud_group_run.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_group_run.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d2fcb1e0ff6d580093a0986eda1de86e11f2933f95863ab74300c1ec4fa1775"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/app/state_ui_storage.rs: crates/jcode-tui/src/tui/app/state_ui_storage.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in jcode_tui::tui::app::state_ui_storage::compact_tool_input_for_display at line 3. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/app/state_ui_storage.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui_storage.rs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb9d2094b5f438f7381b2386a298bf572bda602ffd6a2aa374b7010cfc8c7d93"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/justrust_status.rs: crates/jcode-tui/src/tui/justrust_status.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in Snapshot::row at line 158. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/justrust_status.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/justrust_status.rs"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"57a6fb635f94d5993c655eef3e23129ff8cc28dc238eb3e8ecb4dab35eec346b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/server/live_status.rs: crates/jcode-app-core/src/server/live_status.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in Projection::observe at line 57. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/server/live_status.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/live_status.rs"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6e178df56c2a7f7ba561586a637dcd5c35d3a8ac70b997a651b17e43934781f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/app/helpers_rate_limit_parse.rs: crates/jcode-tui/src/tui/app/helpers_rate_limit_parse.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in jcode_tui::tui::app::helpers_rate_limit_parse::parse_rate_limit_error at line 22. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/app/helpers_rate_limit_parse.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/helpers_rate_limit_parse.rs"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"19c58e88ea7910ad040d741791d3f585e3f09b49fed72ba8e839216c1477cb08"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/tool/conversation_search.rs: crates/jcode-app-core/src/tool/conversation_search.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in ConversationSearchTool::execute at line 83. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/tool/conversation_search.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/conversation_search.rs"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4f2bd66633e4814a5027b2f6cd5f28ff7ad0de1687d1fc5da347c6894307c26"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src/bin/tui_bench.rs: src/bin/tui_bench.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in jcode::bin::tui_bench::reconstruct_side_panel_snapshot_from_session at line 659. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- src/bin/tui_bench.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/tui_bench.rs"},"region":{"startLine":659}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9ba4164ae585ea6ecc71d06c4ea070d07965dd7ca40887dce95495ac99530de"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/ui/copy_selection.rs: crates/jcode-tui/src/tui/ui/copy_selection.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in jcode_tui::tui::ui::copy_selection::copy_selection_text_from_raw_lines_base at line 222. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/ui/copy_selection.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui/copy_selection.rs"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"730ab9ec1e2ace1d92796b10867918e8b84b83ede4c65f1df635b25a8c858f6a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-companion/src/voice.rs: crates/jcode-companion/src/voice.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in jcode_companion::voice::run at line 94. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-companion/src/voice.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-companion/src/voice.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fa189496a224766f6d01e7b88d78894a518987b0ad79e7e7a7e45dbc736c2ec"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-companion/src/server.rs: crates/jcode-companion/src/server.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in Companion::handle at line 133. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-companion/src/server.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-companion/src/server.rs"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2ebf4433274749869ca9ab02a1899a5c172c324c0d7f89c09fa1968be8c2f66"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/tool/patch.rs: crates/jcode-app-core/src/tool/patch.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in jcode_app_core::tool::patch::render_patch at line 280. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/tool/patch.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/patch.rs"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"d129bce93a1cfc66a0d1410d994024d9a06cbebacba9d004512926a21beda829"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/app/inline_interactive/openers.rs: crates/jcode-tui/src/tui/app/inline_interactive/openers.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in App::open_agent_model_picker at line 216. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/app/inline_interactive/openers.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive/openers.rs"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d9bc9b414ac6ade6eb9583ce5286077ba7861de3c2bc5594bbecb2896e2f371"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/app/todo_completion.rs: crates/jcode-tui/src/tui/app/todo_completion.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in App::refresh_completed_todo_report at line 25. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/app/todo_completion.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/todo_completion.rs"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccc6ecf0f958094140e86569532ea7be102321e037aff223c0820ee4fb43d662"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/server/runtime_ssh_accounts.rs: crates/jcode-app-core/src/server/runtime_ssh_accounts.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in jcode_app_core::server::runtime_ssh_accounts::execute at line 380. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/server/runtime_ssh_accounts.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/runtime_ssh_accounts.rs"},"region":{"startLine":380}}}],"partialFingerprints":{"codehealthFindingId/v1":"d75355922d65b869eb4765adeeacc748a598ea4bbc420d3ff3b3ddb00c4a075b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-base/src/transcript_sample.rs: crates/jcode-base/src/transcript_sample.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in jcode_base::transcript_sample::recent_external_transcripts_in at line 99. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/transcript_sample.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/transcript_sample.rs"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"62edb535c1deff955f3cc15d75b08a019220c406590d3acb61c27abec4e5831b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: scripts/benchmark_browser_handoff.py: scripts/benchmark_browser_handoff.py changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in benchmark_browser_handoff.extract_trace at line 180. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- scripts/benchmark_browser_handoff.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/benchmark_browser_handoff.py"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7526a537404d784ccfd6149a69f88f8532af26b1d240f35549be14ca9d808db"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/app/copy_selection.rs: crates/jcode-tui/src/tui/app/copy_selection.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in App::handle_copy_selection_mouse_with at line 558. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/app/copy_selection.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/copy_selection.rs"},"region":{"startLine":558}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9aef92a90ee0e70167b90a27c8cef6413bf7276f9e483383fed4b6af1a85b51"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src/cli/account.rs: src/cli/account.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in jcode::cli::account::run_mobile at line 117. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- src/cli/account.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/account.rs"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0440c0904aed54a3af8c2ee2214f002a0676f9bcf9c7ef7373aeb66ad45c759"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/server/comm_plan.rs: crates/jcode-app-core/src/server/comm_plan.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in jcode_app_core::server::comm_plan::handle_comm_propose_plan at line 41. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/server/comm_plan.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_plan.rs"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"c25a004dfedb508cb102ef52a17ce92f960f5bffa8a137e4b827693520ce50d8"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-terminal-launch/src/lib.rs: crates/jcode-terminal-launch/src/lib.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in jcode_terminal_launch::build_spawn_command at line 724. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-terminal-launch/src/lib.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-terminal-launch/src/lib.rs"},"region":{"startLine":724}}}],"partialFingerprints":{"codehealthFindingId/v1":"f608be32a533940d29c5270c9e04b02dc11e1bb0d80070f0f5e8510d2217e09a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-tui/src/tui/session_picker/cloud_preview/remote.py: crates/jcode-tui/src/tui/session_picker/cloud_preview/remote.py changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in remote.project at line 170. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/session_picker/cloud_preview/remote.py\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/cloud_preview/remote.py"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f25a019a76317c1adfd8d3154f7b9ac53b69df2749596661679b92d42f1b4d4"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-base/src/provider/selection.rs: crates/jcode-base/src/provider/selection.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in MultiProvider::model_switch_request_for_session_route at line 472. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/provider/selection.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/selection.rs"},"region":{"startLine":472}}}],"partialFingerprints":{"codehealthFindingId/v1":"54aac6fb416467d98e52f950d9d24607ce156533c7dec2a123c76fe135c0a1b6"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/replay.rs: crates/jcode-app-core/src/replay.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in jcode_app_core::replay::timeline_to_replay_events at line 401. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/replay.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/replay.rs"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"7afc435368de1f79a4f7a653e3e4de42f18effda03539af78eb1d89a3fb8fb1b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-todo-policy/src/completion_report.rs: crates/jcode-todo-policy/src/completion_report.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in jcode_todo_policy::completion_report::render_completion_report at line 141. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-todo-policy/src/completion_report.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-todo-policy/src/completion_report.rs"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"49d3cd88b6473d3874acfa8193223c07690bd6b414c602b892896b91263a5375"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-provider-openai/src/citations.rs: crates/jcode-provider-openai/src/citations.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in jcode_provider_openai::citations::render_annotated_text at line 8. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-provider-openai/src/citations.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai/src/citations.rs"},"region":{"startLine":8}}}],"partialFingerprints":{"codehealthFindingId/v1":"53fd13459770aef9d66509b4eee6bb7df1b8a26c516ae46c608d3fd719f1b840"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-base/src/provider/catalog_memo.rs: crates/jcode-base/src/provider/catalog_memo.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in MultiProvider::fresh_routes_memo_entry at line 186. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/provider/catalog_memo.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/catalog_memo.rs"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"04daf733ba97fdc44c6fb0391f5ca29a8bf91b3576e7e55a3903a8137e26d26d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-base/src/usage/anthropic_fable_reset.rs: crates/jcode-base/src/usage/anthropic_fable_reset.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in jcode_base::usage::anthropic_fable_reset::redeem at line 136. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/usage/anthropic_fable_reset.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/anthropic_fable_reset.rs"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2df6525f6d6e7fc06db350e726ec0b953138259f73d7b946343e52d32354015"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-provider-core/src/model_names.rs: crates/jcode-provider-core/src/model_names.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in jcode_provider_core::model_names::pretty_picker_model_name at line 401. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-provider-core/src/model_names.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/model_names.rs"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"24a4dac456fa5e0b773c12dfd04e7d3046109ad1083b8c6f45956ce4b5ff0262"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-app-core/src/server/runtime_ssh_sessions.rs: crates/jcode-app-core/src/server/runtime_ssh_sessions.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in jcode_app_core::server::runtime_ssh_sessions::list_sessions at line 20. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/server/runtime_ssh_sessions.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/runtime_ssh_sessions.rs"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"1eff37fdaece34d5a014cc00540d84843c4dfdc3860912747e394a04154d26fb"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/jcode-base/src/provider/dispatch.rs: crates/jcode-base/src/provider/dispatch.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in MultiProvider::complete_on_provider at line 57. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/provider/dispatch.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/dispatch.rs"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddfc5cd131732ac703e5eca6982cda3a422a10796f0bab0819bb4888b41afae3"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/jcode-provider-openrouter-runtime/src/lib.rs: crates/jcode-provider-openrouter-runtime/src/lib.rs changed 36 times in last 90 days and 19 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 13 (its worst body is OpenRouterProvider::apply_resolved_reasoning_effort at line 867), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix: serialize explicit none for opted-in compatible profiles (fixes #2020)\u201D; \u201Cfix(grok): discover subscription models from the live CLI catalog\u201D; \u201Cfix(providers): close non-Grok live catalog discovery gaps\u201D; \u201Cfix(ci): restore green master for v0.99.1\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-provider-openrouter-runtime/src/lib.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/lib.rs"},"region":{"startLine":867}}}],"partialFingerprints":{"codehealthFindingId/v1":"241e77e412eb672055bd7ebe58f13430c2b8c9688270d151eeded91150c9a13a"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/jcode-tui-mermaid/src/lib.rs: crates/jcode-tui-mermaid/src/lib.rs changed 11 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 10 (its worst body is jcode_tui_mermaid::evict_old_cache at line 1533), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(tui): rasterize SVG graphs in markdown side panels\u201D; \u201CFix Kitty images in Zellij with classic placements\u201D; \u201Cfix: persist prepared sessions and repair test/clippy drift\u201D; \u201Cfix(tui): skip duplicate inline image sizes\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui-mermaid/src/lib.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/lib.rs"},"region":{"startLine":1533}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c71ae23835fbd066844c5b6594d657c817c36d9b152f87b7d310c4094166417"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/jcode-message-types/src/lib.rs: crates/jcode-message-types/src/lib.rs changed 10 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 11 (its worst body is jcode_message_types::ends_with_fresh_user_turn at line 484), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201CAnchor dynamic context at stable turn boundaries (fixes #1989)\u201D; \u201Cfix: apply speed tier changes promptly with truthful provider feedback\u201D; \u201Cfix(openai): render native web citations from URL annotations\u201D; \u201Cfix(agent): keep non-object streamed tool arguments so malformed calls get corrected\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-message-types/src/lib.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-message-types/src/lib.rs"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"98e7eb45b7a4d5b586c32b988121ee12b2d9def32214134ba1f6ee574c2c73e1"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/jcode-tui-mermaid/src/mermaid_runtime.rs: crates/jcode-tui-mermaid/src/mermaid_runtime.rs changed 9 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 12 (its worst body is jcode_tui_mermaid::mermaid_runtime::infer_protocol_from_env at line 248), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix: restore production safety ratchets without raising budgets\u201D; \u201Cfix(tui): rasterize SVG graphs in markdown side panels\u201D; \u201Cfix: probe Orca image capabilities automatically (fixes #1985)\u201D; \u201CFix Kitty images in Zellij with classic placements\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui-mermaid/src/mermaid_runtime.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_runtime.rs"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4cecbbce02d448d0bc57ae2611d05f300464cfb087e26a6d962eef8bfee8dc4"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/jcode-setup-hints/src/lib.rs: crates/jcode-setup-hints/src/lib.rs changed 8 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 12 (its worst body is jcode_setup_hints::install_xfce_launch_hotkeys at line 2000), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(ci): clear clippy 1.99 and macOS warning-budget failures\u201D; \u201Cfix(macos): gate test-only and unused setup-hints imports\u201D; \u201Cfix: persist prepared sessions and repair test/clippy drift\u201D; \u201Cmacos: hide notification helper, drop CLI Spotlight launcher; rustfmt fixes\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-setup-hints/src/lib.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/lib.rs"},"region":{"startLine":2000}}}],"partialFingerprints":{"codehealthFindingId/v1":"59f70b2abfb29cd639941d4a40f3adb73b2b4dcc8162500ad8ee7ad449cf53ac"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/jcode-tui/src/tui/mermaid.rs: crates/jcode-tui/src/tui/mermaid.rs changed 7 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 1 (its worst body is jcode_tui::tui::mermaid::install_jcode_mermaid_hooks at line 44), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(tui): rasterize SVG graphs in markdown side panels\u201D; \u201CFix Kitty images in Zellij with classic placements\u201D; \u201Cfix(tui): skip duplicate inline image sizes\u201D; \u201Cfix(tui): invalidate mermaid message cache on resize\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/mermaid.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/mermaid.rs"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f56f4173a7bbd75b335b15399574381deeb5c0e4daa659338a522520692bace"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: src/cli/commands/menubar.rs: src/cli/commands/menubar.rs changed 6 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 14 (its worst body is jcode::cli::commands::menubar::macos::run_status_item_app at line 545), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(menubar): stable macOS signing identity and a [menubar] enabled opt-out (#1793)\u201D; \u201Cfix(menubar): draw the streaming icon green instead of tinting the template (#1785)\u201D; \u201Cfix(menubar): gate passwd home helpers to macOS and unix tests\u201D; \u201Cfix(ci): clear clippy 1.99 and macOS warning-budget failures\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- src/cli/commands/menubar.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/commands/menubar.rs"},"region":{"startLine":545}}}],"partialFingerprints":{"codehealthFindingId/v1":"856752e0fba354959fd457a7c5f703aefc800c1e7e78481b3c0df69961afdaa2"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/jcode-tui/src/tui/info_widget_model.rs: crates/jcode-tui/src/tui/info_widget_model.rs changed 9 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 15 (its worst body is jcode_tui::tui::info_widget_model::runtime_rows at line 106), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(tui): preserve reported tier without inferring processing speed\u201D; \u201Cfix(tui): shorten speed tier mismatch and pending labels\u201D; \u201Cfix(tui): show reported speed tier first in compact status\u201D; \u201Cfix(tui): stabilize startup layout and hydrate daemon quota hints\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui/src/tui/info_widget_model.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_model.rs"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5e98352c2d6bcdcd726e15ccdc2afe1679f3cde5a65ac134e657b187f21f16f"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/jcode-base/src/usage/disk_cache.rs: crates/jcode-base/src/usage/disk_cache.rs changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 7 (its worst body is jcode_base::usage::disk_cache::import_last_good at line 437), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(ci): handle terminal cache failures and limit usage test helper\u201D; \u201Cfix(usage): recover Claude quota telemetry and stop rejected-token polling\u201D; \u201Cfix(usage): retain adaptive polling and mark last-known quotas stale\u201D; \u201Cfix(usage): coalesce Anthropic probes across processes and preserve backoff\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/usage/disk_cache.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/disk_cache.rs"},"region":{"startLine":437}}}],"partialFingerprints":{"codehealthFindingId/v1":"00efc05387626555ba967f21767635356c119c785bfb97bb58dfa9b1aa6b42a9"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/jcode-base/src/sidecar.rs: crates/jcode-base/src/sidecar.rs changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 10 (its worst body is jcode_base::sidecar::collect_openai_sse_text at line 999), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(providers): stop impersonating Claude Code and Codex CLI on OAuth\u201D; \u201Cfix(provider): retain observed usage on simple completion failures\u201D; \u201Cfix(usage): retain sparse cache reports and served sidecar models\u201D; \u201Cfix: update Claude OAuth client version (#1135)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/sidecar.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/sidecar.rs"},"region":{"startLine":999}}}],"partialFingerprints":{"codehealthFindingId/v1":"808865fa89f259e202f12ee1a36b718cd401c4b32d3895d5071bbb0a261fe5b7"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/jcode-base/src/usage/account_fetch.rs: crates/jcode-base/src/usage/account_fetch.rs changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 8 (its worst body is jcode_base::usage::account_fetch::fetch_oauth_account_usage at line 48), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(usage): recover Claude quota telemetry and stop rejected-token polling\u201D; \u201Cfix(usage): coalesce Anthropic probes across processes and preserve backoff\u201D; \u201Cfix(router): start fresh sessions on first ready pool account\u201D; \u201Cfix(usage): fetch account router quotas on daemon in background\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/usage/account_fetch.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/account_fetch.rs"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c0d339d11bd62cbdf249913811f8a27e9d5ca9cabc99d58e86b2d3e014ef109"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/jcode-base/src/auth/antigravity.rs: crates/jcode-base/src/auth/antigravity.rs changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 7 (its worst body is jcode_base::auth::antigravity::login at line 229), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(antigravity): don\u0027t abort project lookup on a non-JSON loadCodeAssist response\u201D; \u201Cfix(antigravity): address greptile review \u2014 override-aware project lookup, endpoint validation, catalog invalidation\u201D; \u201Cfix(antigravity): use daily-cloudcode-pa endpoint to fix consumer-account 429s\u201D; \u201Cfix(auth): automatically show login QR when browser is suppressed\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/auth/antigravity.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/antigravity.rs"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"af0fe9ffd3cbd66b694558856593895d31c6b6d236bf83955e19002fe0d00a1b"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/jcode-base/src/provider/pricing.rs: crates/jcode-base/src/provider/pricing.rs changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 13 (its worst body is jcode_base::provider::pricing::cheapness_for_route at line 304), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(pricing): keep local profiles out of the cross-provider fallback (follow-up to #1658)\u201D; \u201Cfix: make env files the source of truth for API keys\u201D; \u201Cfix(session): persist sessions created with a title before the first visible message (fixes #1144)\u201D; \u201Cfix(openrouter): price @endpoint-pinned models from the pinned endpoint (fixes #1095)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/provider/pricing.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/pricing.rs"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"458cf4e1c2a7131964f8ba4306c2fb0845e62df4dc3b8bd540111e9243051ffb"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/jcode-tui-mermaid/src/mermaid_content.rs: crates/jcode-tui-mermaid/src/mermaid_content.rs changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 7 (its worst body is jcode_tui_mermaid::mermaid_content::write_video_export_marker at line 409), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix: persist prepared sessions and repair test/clippy drift\u201D; \u201Cfix(tui): skip duplicate inline image sizes\u201D; \u201Cfix(tui): apply resize clicks to mermaid placeholders\u201D; \u201Cfix(tui): resize and copy clicked mermaid diagrams\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui-mermaid/src/mermaid_content.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_content.rs"},"region":{"startLine":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfd92b1d14a635a97b0b7ffe32ce5b20881798fe628bc08d4bfa5c8cd24fb353"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/jcode-provider-openai-runtime/src/openai_websocket_prewarm.rs: crates/jcode-provider-openai-runtime/src/openai_websocket_prewarm.rs changed 5 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 8 (its worst body is jcode_provider_openai_runtime::openai_websocket_prewarm::warm_socket at line 274), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(openai): avoid replaying response output in websocket deltas\u201D; \u201Cfix(openai): send route-specific speed tier headers and rebind sockets\u201D; \u201Cfix(openai): preserve session cache affinity across transports\u201D; \u201Cfix(openai): replay changed persistent input prefixes\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-provider-openai-runtime/src/openai_websocket_prewarm.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_websocket_prewarm.rs"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3abaa81e382fd79e016836240096602e9f83640ab1187ab8fab8301e0588f6a"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: telemetry-worker/scripts/sync-model-prices.mjs: telemetry-worker/scripts/sync-model-prices.mjs changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 11 (its worst body is sync-model-prices.main at line 83), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(telemetry): discover canonical usage prices and document replay limits\u201D; \u201Cfix(telemetry): estimate prices for new model releases before models.dev lists them\u201D; \u201Cfix(telemetry): price new models nightly so spend stops reading $0 for Opus 5.5\u201D; \u201Cfix(telemetry): report unmatched model pricing coverage across providers\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- telemetry-worker/scripts/sync-model-prices.mjs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/scripts/sync-model-prices.mjs"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"0502d5b4fcfb3d47123f5ee4feb34415cfc0c61a115fdacd61b03023f8ea9262"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/jcode-base/src/subscription_catalog.rs: crates/jcode-base/src/subscription_catalog.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 6 (its worst body is JcodeTier::parse at line 110), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(subscription): accept deployed Sonnet 4.6 model ID\u201D; \u201Cfix(subscription): restrict catalog to Claude 5.5 and GPT 6.1\u201D; \u201Cfix: make env files the source of truth for API keys\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/subscription_catalog.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/subscription_catalog.rs"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"c54f07600a6dc33660569fc1b9f5e1d9ab4882a4b69d8d7ec6e283a28f51b5b6"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/jcode-app-core/src/server/util.rs: crates/jcode-app-core/src/server/util.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 8 (its worst body is jcode_app_core::server::util::git_common_dir_for at line 441), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(app-core): handle safety failures and production lint blockers\u201D; \u201Cfix(swarm): correct member attribution, debug default session, and restart notices\u201D; \u201Cfix(server): reload when an install repoints the link the server started from\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/server/util.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/util.rs"},"region":{"startLine":441}}}],"partialFingerprints":{"codehealthFindingId/v1":"df9b4ba8ac6f0d12d6c37e1f942bf8eb9107b3bb7e498df7ad83fc9e10df71d8"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/jcode-build-meta/src/lib.rs: crates/jcode-build-meta/src/lib.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 2 (its worst body is jcode_build_meta::is_release_build at line 117), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix: preserve dev version offset in hosted builds\u201D; \u201Cfix: tolerate prerelease build identities (fixes #2042)\u201D; \u201Cfix(build): invalidate CLI metadata when hosted snapshots change\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-build-meta/src/lib.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-build-meta/src/lib.rs"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"f13517f8298f9a4f21d63fc0c8bc5f886abc358db897e4cd9df5ae60cd70129b"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/jcode-base/src/skill.rs: crates/jcode-base/src/skill.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 10 (its worst body is SkillRegistry::import_from_external at line 113), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix: prefer jcode skills over compatibility sources (fixes #2030)\u201D; \u201Cfix: skip skills already imported by an earlier source on first run (fixes #1404) (#1416)\u201D; \u201Cfix: accept list-style skill allowed-tools (fixes #1041)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/skill.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/skill.rs"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd93cfbc68d54929c4e39387e416b8db6d04fcd621dbb4c6caad3db90e76c6b8"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/jcode-provider-gemini/src/lib.rs: crates/jcode-provider-gemini/src/lib.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 14 (its worst body is jcode_provider_gemini::build_contents_with_signature_policy at line 287), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(gemini): account for explicit tool-use prompt tokens\u201D; \u201Cfix(gemini): include thinking tokens in output usage\u201D; \u201Cfix(gemini): default to non-dated gemini-pro-latest alias\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-provider-gemini/src/lib.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-gemini/src/lib.rs"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec4442f777dd4b0293f599fdd48aa515cf4e16f0704831ef9f3879aff9fa5624"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/jcode-provider-core/src/fallback_pick.rs: crates/jcode-provider-core/src/fallback_pick.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 12 (its worst body is jcode_provider_core::fallback_pick::rank_fallback_routes at line 447), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(failover): prefer latest-generation model and auto-switch from unlabeled OAuth\u201D; \u201Cfix(tui): stop retrying permanently rejected OAuth sessions\u201D; \u201Cfix(provider): serialize Grok Build SetRoute switches\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-provider-core/src/fallback_pick.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/fallback_pick.rs"},"region":{"startLine":447}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a5b9503ced4541578afed2398fcfd3b843cca594520a3b4c8e4e2f6f1cbf28b"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/jcode-base/src/auth/cursor.rs: crates/jcode-base/src/auth/cursor.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 10 (its worst body is jcode_base::auth::cursor::resolve_direct_tokens at line 424), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(auth): keep every saved API key out of the process env (fixes #1386)\u201D; \u201Cfix(ci): clear clippy 1.99 and macOS warning-budget failures\u201D; \u201Cfix: persist prepared sessions and repair test/clippy drift\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/auth/cursor.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/cursor.rs"},"region":{"startLine":424}}}],"partialFingerprints":{"codehealthFindingId/v1":"37a7d3b53eff999e737f96b7e70dc3604b1119add14965d01de4f2e99e175af3"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/jcode-base/src/model_pricing.rs: crates/jcode-base/src/model_pricing.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 8 (its worst body is jcode_base::model_pricing::lookup_with_provenance at line 175), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(pricing): keep local profiles out of the cross-provider fallback (follow-up to #1658)\u201D; \u201Cfix(session): persist sessions created with a title before the first visible message (fixes #1144)\u201D; \u201Cfix(openrouter): price @endpoint-pinned models from the pinned endpoint (fixes #1095)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/model_pricing.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/model_pricing.rs"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8173f4f90ae89c9fb84d92f731d206e97d1e690dea819ec49cda4ca4942fae1"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/jcode-core/src/stdin_detect.rs: crates/jcode-core/src/stdin_detect.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 11 (its worst body is jcode_core::stdin_detect::linux::check_inner at line 30), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix: handle base and provider safety fallbacks explicitly\u201D; \u201Cstdin_detect: only trust wchan fallback when fd 0 is the sole readable pipe/socket/tty (fixes false needs_input pushes)\u201D; \u201Cfix(ci): clear clippy 1.99 and macOS warning-budget failures\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-core/src/stdin_detect.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-core/src/stdin_detect.rs"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb37325e1da4ade3ab5d43ce75aa9783578136361545ab539497907cdd70e86a"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/jcode-base/src/auth/muse.rs: crates/jcode-base/src/auth/muse.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 12 (its worst body is jcode_base::auth::muse::poll_login_by_code at line 529), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(ci): restore green master for v0.99.1\u201D; \u201Cfix(muse): send a User-Agent so device authorization is reachable\u201D; \u201Cfix(muse): make cancellation and attempt ownership authoritative\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/auth/muse.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/muse.rs"},"region":{"startLine":529}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe902281635b79ba54519cc277bad9b588cb4eaae2cb5ff17198c8ae4539b5e8"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/jcode-base/src/provider/failover.rs: crates/jcode-base/src/provider/failover.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 3 (its worst body is MultiProvider::provider_precheck_unavailable_reason at line 21), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(provider): restrict agent failover and honor model preferences\u201D; \u201Cfix(provider): refresh account guidance after OAuth rotation\u201D; \u201Cfix(provider): rotate OAuth accounts before quota retry backoff\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/provider/failover.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/failover.rs"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bbdb00b8d5f6f6d85206c72a3f3a527c9461ba5bb4118403b2a5add4b57289c"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/jcode-tui-messages/src/anchor.rs: crates/jcode-tui-messages/src/anchor.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 5 (its worst body is jcode_tui_messages::anchor::resolve at line 80), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(tui-messages): drop useless usize conversion now that wrapped_len is usize\u201D; \u201Cfix(tui): anchor rows that belong to no message (live streaming output)\u201D; \u201Cfix(tui): never hold a resize anchor across a compacted-history prepend\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-tui-messages/src/anchor.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-messages/src/anchor.rs"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"76dfec799d5a77de91338be82eb918df9a9352feb25aa674fe753fff1d7dba68"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/jcode-base/src/provider/routing.rs: crates/jcode-base/src/provider/routing.rs changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 7 (its worst body is jcode_base::provider::routing::anthropic_oauth_route_availability at line 1), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(auth): scope Claude readiness to usable OAuth credentials\u201D; \u201Cfix(anthropic): honor scoped OAuth catalog over legacy plan gate\u201D; \u201Cfix(anthropic): isolate API and OAuth model catalogs and route availability\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-base/src/provider/routing.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/routing.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d569b84b28ad959bb89fdda506186c28a8fee335fbabe524cbbc866b168a884d"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: telemetry-worker/src/model-pricing.js: telemetry-worker/src/model-pricing.js changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 12 (its worst body is model-pricing.resolvePriceRows at line 160), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(telemetry): discover canonical usage prices and document replay limits\u201D; \u201Cfix(telemetry): expose unknown inference prices instead of marking them free\u201D; \u201Cfix(telemetry): estimate prices for new model releases before models.dev lists them\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- telemetry-worker/src/model-pricing.js\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/model-pricing.js"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd691805fb6e533e883690d6334c9df8c9a8d862a6b68758fdbb54c23382e842"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/jcode-app-core/src/server/lifecycle.rs: crates/jcode-app-core/src/server/lifecycle.rs changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 9 (its worst body is jcode_app_core::server::lifecycle::spawn_temporary_lifecycle_monitor at line 153), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix: give headless \u0060run --socket X\u0060 a server so swarm works (#1748)\u201D; \u201Cfix: self-heal image 400s and drain session saves on SIGTERM (#1712, #1632)\u201D; \u201Cfix: preserve live headless workers during idle checks (fixes #1090)\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 19:57:39 -08:00\u0027 --until=\u00272026-11-13 19:57:39 -08:00\u0027 --full-history --no-merges -- crates/jcode-app-core/src/server/lifecycle.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/lifecycle.rs"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a1c54854706d7cb55f65ead00b8a6a9ce8a0b9198fb4e744b1c8f447fedfd70"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // ---- Todo card ---- \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/swarm_gallery.rs"},"region":{"startLine":1724}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d17b226e93f2d518a9a5146a8132e6890212c7bf5161d7a884c0988dc5e9f3f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // Todo counter on the row. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/swarm_gallery_dock_tests.rs"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3868e43f47c9b05374b2de541bc144706523c1b6248e1f79b4b697e44b74c66"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // Todo names replace the less actionable transcript tail when present. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/swarm_gallery_tests.rs"},"region":{"startLine":723}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d59c46a74d492c5d36241fa9a24641fee0a6a84e67f9b6140ca9a3b2d486648"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: /// todo list at all) must leave auto-poke armed for the next batch of work; \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app.rs"},"region":{"startLine":1069}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad7e800826572844a3c505bb48672dca42b5e66d9d1e0e0160ddb5c88d2af960"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: /// Todo state at the final-response handoff. Unchanged finished work must \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app.rs"},"region":{"startLine":1091}}}],"partialFingerprints":{"codehealthFindingId/v1":"a51e8d976c2570c861885656bad969adde46b4924e5677e201410588dbbf76da"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // Todo cards sit directly on the terminal background, so the global \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":782}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bcda8fe89f31fad9e9268d50bd8eeb7e1f95ec22752b615eb5fe285ccc9856c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: /// Todo card for the pinned band at the top of the viewport. The band owns \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":1107}}}],"partialFingerprints":{"codehealthFindingId/v1":"d142ae947a56254243d85f582864a6dcb6f37ebeb4f9d7b7e247226ceb37bd48"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // todo result while losing its paired ToolCall metadata. Recognize the \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":3976}}}],"partialFingerprints":{"codehealthFindingId/v1":"33c1d531b45fbed8a204f7b80a89a503bb0633a461060de2d266232a2ffc97eb"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // todo tool messages in display_messages for history/session fidelity, but \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_prepare.rs"},"region":{"startLine":1439}}}],"partialFingerprints":{"codehealthFindingId/v1":"617d03d3c7ec0a91b360f982ff881c53926f9484d9b4d37131dfc8fa33944ecb"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: /// Todo tools historically returned a JSON array followed by labeled JSON \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/replay_export.rs"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"f69c0e6474cea8d6a7543db161f0e48cd146efdc2438bf751ad8b7945b3f8abc"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: /// (todo tool completed locally or remotely). Arms a timer when incomplete \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/subscribe_nudge.rs"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1277991a64cc01c9e49f160ec421cd501c72d151246d08a93a3937a4dfc2b7b"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // todo list at all, and again whenever a cycle completed. In practice that \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tests/remote_events_reload_05.rs"},"region":{"startLine":1040}}}],"partialFingerprints":{"codehealthFindingId/v1":"18c65e0b6e42a8cb2422ae43b487fe158ffb73f40aac911410c143b677ff8bfe"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // todo tool, the next completion check requests one clean final answer. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tests/state_model_poke_03.rs"},"region":{"startLine":2763}}}],"partialFingerprints":{"codehealthFindingId/v1":"b49e0c26a89e10b1618e8239e2d36c2b91216a05f34c5fd7fbebb43e1f0b818e"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: /// Todo group for goal-scoped observations; \u0060None\u0060 for plan-level ones. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-todo-policy/src/lib.rs"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"38c26f8ea11580c6311d2b973ce2b2f4a112115fa4134ac3020ab9de7452a97c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: /// Todo groups are intended to name coherent goals, so the group containing the \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-todo-policy/src/lib.rs"},"region":{"startLine":887}}}],"partialFingerprints":{"codehealthFindingId/v1":"38f4282f8a3279bc07312b8e0d6da10c4991d61756894fcd07150aa1355056df"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: /// todo, goal, plan, or feedback-loop text those scores describe. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lib.rs"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f482a6d9a2b66f627af646d802ebb8ce65d60cac5ce7c442139c9a085333f70"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: /// todo list\u0027s agent. Absence means ownership is unknown, not local. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-task-types/src/lib.rs"},"region":{"startLine":516}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e220f214bb6bd276dd3f6ec8124a203a0202b69331f101455c3b22b3d641e7d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: /// todo write, so a sloppy stage can never cost the model its plan. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-task-types/src/lib.rs"},"region":{"startLine":554}}}],"partialFingerprints":{"codehealthFindingId/v1":"5133eb8019470e7575779294a95f6bb7e0ebc7f895d898604e5de003e5ddf176"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: /// todo state changes, so the client need not poll. Absent on older \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-protocol/src/wire/events.rs"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"29d529021865a894edc37fc585d7fdde1e6292ef957bdd1b3a151b6a00bdf939"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: implement with windows-sys crate \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-core/src/stdin_detect.rs"},"region":{"startLine":414}}}],"partialFingerprints":{"codehealthFindingId/v1":"41841c700079251181960ef7fbbb82e2d63d52ee09d4004100af29f8d974e2f2"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: //! Todo persistence plus a re-export of the shared pure policy in \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/todo.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c811cc08eeccc247ddbc8af192a7ab05d2ee7930a54b4c563d2c7e2d2faac268"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: /// todo list format (a bare \u0060Vec\u003CTodoItem\u003E\u0060 array) stays readable by every \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/todo.rs"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddac899833fd6ae0e6c0b89862b90185606d7f58ce8c42c217c21e44e8a800ff"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: /// todo lanes, which the server dispatches itself, and lane-owning \u0060spawn\u0060. Unlisted actions still \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/communicate.rs"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"0624cae0170272fe180f5cddbed26c8e669c52d08320e35ea7dd29c32c09b7e2"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // todo carries a deliberate \u0022use it very often\u0022 directive requested by the \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/tests.rs"},"region":{"startLine":715}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bd93c1da793224715270648773d534fc171714d24efb8fceb2c6c2b519362ae"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // todo\u0027s update items are open on purpose: repeating every item field a \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/tests.rs"},"region":{"startLine":1902}}}],"partialFingerprints":{"codehealthFindingId/v1":"c21c7efa4a7f2742f68a1906d18873329d45537a48b46bdda6bdaecf3421ac20"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // todo\u0027s reference must not prevent unrelated or assessment writes. \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/todo.rs"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f01da8ce5c9af4515d703b5f17289d8101cd1b58e3a01c87ecfaeaf78e7d6b1"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: /// Todo snapshots live only in memory on the swarm member, so a reload would \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/swarm_persistence.rs"},"region":{"startLine":482}}}],"partialFingerprints":{"codehealthFindingId/v1":"43de756714533c414a32dbd4e36fc1e109219c1a94dd77dc88c1eb75d18fd257"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: /// todo save, so lanes added or reshaped mid-run are picked up without a \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060// REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/swarm_todo_link.rs"},"region":{"startLine":437}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fa89b062fb239f84093e391f32a603c0c1d779eeead575506e1027162e5f083"}},{"ruleId":"D19","level":"note","message":{"text":"Documentation: no build, run or usage example: \u0060darwin-arm64\u0060 is a published package (\u0060package.json\u0060 without \u0060\u0022private\u0022: true\u0060) and neither \u0060sdk/npm/darwin-arm64/README.md\u0060 nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/npm/darwin-arm64/README.md"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"11c7d0e14f8d9f9b7e2a5dff778e95e6ec79fb669cf4d1aaec9d0d9d94e467e1"}},{"ruleId":"D19","level":"note","message":{"text":"Documentation: no build, run or usage example: \u0060darwin-x64\u0060 is a published package (\u0060package.json\u0060 without \u0060\u0022private\u0022: true\u0060) and neither \u0060sdk/npm/darwin-x64/README.md\u0060 nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/npm/darwin-x64/README.md"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"06008b4103d42aefa1d177d610a7097e98b8182ee0bce6f6c9561072cfb2c340"}},{"ruleId":"D19","level":"note","message":{"text":"Documentation: no build, run or usage example: \u0060linux-arm64\u0060 is a published package (\u0060package.json\u0060 without \u0060\u0022private\u0022: true\u0060) and neither \u0060sdk/npm/linux-arm64/README.md\u0060 nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/npm/linux-arm64/README.md"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bca6b403fed153fcd437d37d1455d844e2735a5bd22b07112bb517adebf91dcb"}},{"ruleId":"D19","level":"note","message":{"text":"Documentation: no build, run or usage example: \u0060linux-x64\u0060 is a published package (\u0060package.json\u0060 without \u0060\u0022private\u0022: true\u0060) and neither \u0060sdk/npm/linux-x64/README.md\u0060 nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/npm/linux-x64/README.md"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"98a2ad7de6761e8bbb8285ab229881b38700e7287c3e063d0dd28bc0cc1c638d"}},{"ruleId":"D19","level":"note","message":{"text":"Documentation: no build, run or usage example: \u0060win32-arm64\u0060 is a published package (\u0060package.json\u0060 without \u0060\u0022private\u0022: true\u0060) and neither \u0060sdk/npm/win32-arm64/README.md\u0060 nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/npm/win32-arm64/README.md"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e024a7d22d07ab4587582a90f109d61c30bbd465cd60650190061301cea29bc1"}},{"ruleId":"D19","level":"note","message":{"text":"Documentation: no build, run or usage example: \u0060win32-x64\u0060 is a published package (\u0060package.json\u0060 without \u0060\u0022private\u0022: true\u0060) and neither \u0060sdk/npm/win32-x64/README.md\u0060 nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/npm/win32-x64/README.md"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b64bc970e7ebebe1b122fd11ba1d7a269aa83179d2eff6013a3ebbed9e92784"}},{"ruleId":"D19","level":"note","message":{"text":"Documentation: no map of the repository\u0027s parts: The repository has 7 units (\u0060darwin-arm64\u0060, \u0060darwin-x64\u0060, \u0060linux-arm64\u0060, \u0060linux-x64\u0060, \u0060win32-arm64\u0060, ...); \u0060README.md\u0060 and the documents it links name none of them. Add a short list of the parts and what each does."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"README.md"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f047b1120601c2537f0645d9b67f052758989ccf5801de4d919633bcff2a3cc2"}},{"ruleId":"D20","level":"note","message":{"text":"No ADRs found: No ADRs found. The recognised ADR directories in this tree were read \u2014 \u0060docs/proposals\u0060 \u2014 and none of their files is a decision record (a README, index or template page does not count). What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (\u0060docs/adr/use-postgres.md\u0060, \u0060docs/adr/2024/0001-x.md\u0060); or a file anywhere whose name is ADR-shaped (\u00600001-use-postgres.md\u0060, \u0060adr-012-caching.md\u0060); or, when neither turned anything up, a document carrying the decision-record signature (an \u0022Architecture Decision Record\u0022 heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these \u2014 unnumbered files outside any recognised directory, without those headings \u2014 is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in \u0060docs/adr/\u0060. ADRs are expected here because \u0060Cargo.toml\u0060 makes this repository a deployable product (line 108)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Cargo.toml"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3a1f320edebd162aecb630322055fab9fa4bd5274ac8a03cd339206970700a5"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: 4 of 93 project(s) overshoot their size bounds, lowering Project Cohesion to 9.1/10. The most over is \u0060crates/jcode-tui\u0060 (190499 LoC, 391 module-visible types across 31 directories). Review these for cohesion \u2014 draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d5a94650dc74886a0f1f08eb9fb6775f1fc395279ef7e901c970c9d26f767a72"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"9dbf2ce20ecc6b0c6904d348838ef3d153365cce09e95a6942982fc3cae47c2f"},"properties":{"commitSha":"2235769f4b250353122af4d7f0168798bcf83488"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c49f3ba792c3b76b5177a4a152a6424312b96b3cf9d90b3a02f04e21dd64390a"},"properties":{"commitSha":"d340018f6308d2e2ab02d5a292aa2812f8f9b952"}},{"ruleId":"D28","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3cdfd7beb31b791ae18dcb425e21eb157c842e7bbcd522cc330573c1a6538db1"}},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a1f31e3fc38e806c632551480508ae27b2701acddad0a9d80c648ba1fc9463b3"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"866f5db9e17cba13054be81498300d5689d6380b38ab693dd948f99e20adbff5"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"54015389eb5f9a0beb6433e209224f32665bbffd45f48b4ac71eacdc7584cddd"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"eb416b9c0989fe4b5d2c777b87e08b2a280c2c0d2c81b25e0393000702e5ebf5"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c1bb7814097052b3b9e49cf20adb5ffa3c94da3abc00863955683dc4725b2e91"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ae4b19a624088a80ae967fa19fc6e2d3b4d86bf95f6afb9918729adad8224e32"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"05dd1cc6a6536213feac72458953b3ecc92da85b7219289a9d2c68054660f8e9"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"58416306c1a27a37c4768b939e55dd2865e8672774adab59964be2ffeffdd74f"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"fe7f65b7cb9c5ab1c98d6e658787bc0cd9639dcb90b9cae340baf25810bdc6fd"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"82a1893f62fe8dee3fcdaad2e3da3e94b86729172346ee8d336b86cb9d8780c6"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0669e1f3431c98667930f684472859fc811c8f0f3d8fcf7490fce1dd8cf7fd04"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a1873f73df2980e05749fb989e4983bd7e44b6790994284629fa7f4a2ef29ad4"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7566fc2cb9dc0ec2b1e678bad4b9892f3b37a8e46ee6408fe416bd8ad45869ff"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"99c8716916ca0dd9ddee8302208a5745bab6513f34ca12c2672d93f07c07be5f"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"bc17439367157c6f6ff8590f4dfe29bc3a0ce4e328d99df310f8a49a2877af10"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6b562a86ba4fad32d6ccdcd6ca2d4c34c2236a59e5d8276adbfb83a1790cdee0"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"45e43b2cf0f13df69fd5c5d1f3263d8d91ae8a1d217ff414c529a77aebd1ca8d"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ab979ab2dc46515c14a5a4f004fc991e04e40404eedb88f91aeaa5242f0df4a2"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b15e7c4516957eb0ce628a71875180462280b3da835590c3e3ea26dfe36c7cc0"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c4014e7719155abad9ee780737c6a29d8c31bcf1e70b94286734d74edc799576"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"2ba1bd8cd7cc00ffea37dae7b5e07643f624b23874e3cb0759fc3e4878f73406"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1fe915542e9ef9e0e2030d13e5e967c9edc93ad44e0043112709e63c307bce8b"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"25418735264325a9c5b82eddf16fbcb4ed0e20a791820dc258482fac526f3370"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"57d823555c0f50a3493fd14230fc2974c80d783a2164e0399518f807a574cc38"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0b81debfdf26ad72c8d0b6ae327091ed6b094389fdb86a94cad6363ea8f38e48"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7e9323362030c11a89ee75d7211b2720333c55d8869ae68ed4aebea060c08384"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"74e9a15e0aaad67b56b01fc904a989f50780d47c2a8d26f4479f4d170548bf18"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"233c283afabc3cbe9e1fb2c663cda67ee401e34fde1c1baa92c564e85ddd0b79"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"36fbc14be81a946a51ac3ef00a15c153b89b5190c82816063cb2a1a654571647"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3c13115023bc85d294240f93f1194e5061daef94566d21438f631eec186a2d41"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d4e67df4cd5ebd92d6f368f5074d9b922e9d8e6be0b4a1b48b5f6ae31a57ecad"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"39f993eafbfc08b95992a7fb8c17eb8099f077c063f1359118ee6d6ec0f432d2"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"963f865cf0c50c66204f97667ad3b478f78190d50972fe20aa759db224970b86"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"2b191caef21022004adc16d6ea02d21034f0a634e64595d40fe36b553b58b505"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ab142b9f8436593dfb17e6328129d50519a3f7ec7bfe35704b9bd1ee2c8c4c70"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0e01a030f442d1f4d728fbf7212e1b32adf5b9b76f6efc2a07c9763bfc15d912"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"53bd8773ed488f71637736764585968a8426f0e5c458c6a194f616b2498ed3d1"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7655405ead5afdbc502edda812c5a86fcf4504b2e223e238b6ae8219928732db"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"921716162261e1554769165e515f1785ea93c165cff8437e99b2c44b62cc0c30"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"bfaf8a5eaeb4b33a946acfa2f44cfda03668b9a72d064179be61cc0f8d443334"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"dd4134f648559c0c61b252f981db49877fb1ffa3d2b595ff1c544794cfa054fe"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"34b43a4423f7415406edc572fca5fdae6c369ff5da675782847e8f234e006e56"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4cc96d643b84bc5815bfd8d2ebdac1fa0525e6d92bf844ce4c87ac3ab8a72508"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d2b8b6fdb3672ceee6eaf92df41289eba3c85fddd725016bb523c9dad6fcdc5c"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"232c86a26af04c1139086976348f7e3b4a97f5c856481873529a7c4a5a1aea34"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b166d66660f45af8d533ae5809fc8ba29383044090774430b733b9abb8233223"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f3fec82b2bc184439f309ee048b65487335130261cb06dcecb361819e2792322"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d6e3991c6bb871e5b1a4e230bf9afb4b37f66ea0309ee547d9de3cbd5b2d3eeb"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b55ce8274943d1c5df8d1c6a99b4d85b6f0103ef58bac60eda18d58a666f036c"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f97ababc7cd33b3e72e61a1f764df25fcf2d45db33eda1f0cdd9b29de87d4f68"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3ce298eee9b8a326398f26ca6a19449dc5766d8b2906033386a589f015d95ff9"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ed04a01b6c512bb2389f5397343dab18447ffc41abb632b255524443f62d0bb5"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0be76139aaf30b6d53d48f685aa52d37ea3bbfd18427cd49210f21e4d381deb0"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a945cb94b5b7feccda4a1c1d2d0be061a716cc7575d52d4ebe2d487b6ac4c2df"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"13736eaa25b62737b22fae9c4aad9212502bc54e0def92c4cf523a1c87704a46"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ca6aab4e9e1869072a97350aa258c5cb76aa2917971d0dfc983835f70517ee18"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a04d0e01f1982d150d3f822395d66c6536932409d7d3a3e52d8de335ebc624a5"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4cc18675a4cdc47610856ad8dd9d196fcd8243760968ddba71970b1155b84a75"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4b11179d364d55a3a77801ff5b8dcd48e2156ecb507905fd68269d8b35a79f1e"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"08b7a1fac21415381a8340b724f0ec95842edba9e9dbdbf4124b51295f089b40"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"79c028470bd58ad8ce03c6ceb1631f9862c99a11c21f2f2ee76db27d066d3b6e"},"taxa":[{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"009c709d990a78847909b1fe64f74eb246883475f78ce846f2af1ac3ae379ed2"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b21ef51d97f04d1a8b921e635aca9ef4e877341aa2c3b0f6eaeabc61234774b6"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4f51d598102786d6fe7ccdb4c5ce07901ce46b3341024418f2338de4b1f69943"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6504d8d1633fd2629c17cb911821ef9d4b240f323d5e1ebac2df01ac4726a04a"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"517b3a2651d0e48e4b35b8c37179425a58a71fd457d164acf85774e2d854ad0c"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"8d29b94038490c84613e9786e27a95b1e6778b882160e1bb8b3d7dcc9422beff"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c72f8dd0a4660c0410011ad22b062a88bfb12e99dfa88785bd553544f3303bc1"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e7aea5ad354bb944fe749ff0e5f574830ccdd11e2edd1cb16678dd3d93b52205"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"9e8660f5fb6b1ee56c8fc5d802b4262ea07b88afff011d95993ad38b820c8111"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7e21242bcbf5945ab43341f6aa1175983a61614ca9b1ac3a66eb70f6d6c3ff93"},"taxa":[{"id":"CWE-522","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A06:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f942f498d240b67fee82289eb3ff4f9679a803d0e57a79d106f90c084ee30aec"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"75e0967497e1d3fb89b27906c6925bfccb4038149657308d857bce35f330933b"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a0ad5da48e64f416c9785470139b24304d40462052e38b2a8c573ec8da8eb0ca"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"46f4b234569d9def00d491e2620fc51069056222000fc1f164e722fbe0a7130d"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6819b36024d45f5f0e1d43e74427f1e72c7d8dae5d09101e0f966a51bf6829ab"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"fb4a23173542d7a1718b502d857067e50a3ab2bcd9e6cbc8252c0d9b2bd57371"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b1fcec82878dabdc8a0348b15ea412f6d653d81b036d9cd7874029a60233666a"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4e723f08f45f0a1f62d26ce0e60fea7e78f378ad6503433dd0d53a1e5a62a418"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"5af221a0a713df6aa43875e37653ab43744fc29dba3d5ea44eaf351c954cd1d8"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3c5d16acaab7eb63c3e4b312f7e82bf8d7642999cdc22d1f2ea26432002f0a69"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0710b0f999fee14bd2a7416f6ae96889b6d6c48b026e94a96420e87ec1eb8ee4"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ae59d5e9dd2c30e110a21be3f2f3e4339df91ffb4154cfcf5f17bedb858ec684"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d2542699b904854fe2d3bb29c559aae2c03652694d5ce26390e798fe91bdf8a8"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"64aee044c1f4dd4bb7a77441c8cfb2ad1960dbe2c5bbb6dcc4a3af1fa08e7b62"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"90114bdfb46a14da7fdb84f499a586ebbb6ec4f6d60b31ffbb53eaa867f0e164"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"779ada017121311af1dcbd594d845a667d64ff17257130a9c2304ac151f9b69e"},"taxa":[{"id":"CWE-522","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A06:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ff630563cf18d2bfdf0e4add1fe73117b84061a7bdc9937b413454264457179c"},"taxa":[{"id":"CWE-522","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A06:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a171985860d653efe45358b81742b5062f66d3b4a0e922a639715aeb6cf1340e"},"taxa":[{"id":"CWE-522","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A06:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7e5fa0d7f372dfbdcbfaf8e7df5924814a8d634aaa68ed9bda90f2cc7682932e"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"64478662fa5e1544368a8d37a73d78bfc90ea789fe52460bc2794d70b8e273b3"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"04b15c1d822501a1f3b0513e178960337673a790f4f183f2453907ced2d2833f"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d541a0eb3b2dbe5998fdd42a98fc8d42f993bd63318277a56aeb54e15c268e50"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f0b22a242a8fd723970690e110d72da2ef35ac0c152d9a334fc64e6169e52cc5"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"5820d2832b24c301dfa745945b6d73762e17d6f8190921e1bba42ea7ccd769f9"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f82a94b547e583107475ce443fc06e8d421287b4914413339b69fa88eebfa9dd"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"49c16b6fbc91670e61b639ab9c9270b4df42b6b11889eae216a02e4dd9c52b80"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"9d91001383771ca996c517bb36f23662aba4e449394385caa3c248633ba31d79"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"2432bda162e0ecc6f6bbe7901109c67da52ccfd469be056b20bc75c9891afc05"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"8b218ca302fe3307bb76f59a38dd33c0aa237063b091d34656ae2a7b04f9a488"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"fd11e0c8ba76850abd2b3f9a585b077426f5ad61698bc7c7c891fa25ba0cf972"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6434b59fd8f713dec758cbb04aef9830ce8a3ea2ec2c531dcae340b1fd506621"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"24f78557a459e39ebf1aaa34ad662177282ec0dabef194b20f05688e73c7c72d"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f2a5d0bbd2638fc0c3200c4cabd46114e73dace88d665dbc1aba86cb68dafb95"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"9fd5c2899c8a0bcb300338867d93b26f17a38530218d5a99a1753834b4980b41"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"881b6a4808c5c5edaeaea7ffa859a620e5f0e8c509864981c1a587a9138a9dea"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c1a59893c9ea8d158beb0da920d6d4216ca012eb1790f02cc7e64d4765c821c4"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"00b15d5db71503e46861e872733eb18d4d7efefd622c9ab348fc265106805b5b"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"5f2c86ce1ccd552188d1490b0732632ec17e5c95ded33fb029457e9c73ba3dc9"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b926ea3663bf0c2f2d5b3d8ff9a7d6b9c35fc8f87c0be420ce9f476a36470467"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f836c27743f18ca7c0ad9e5d5a66f28916d74303b17c4b782dd1892be2ba1eed"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"5a70c38bb5c661b6ec9010ce2cf692f53a9e06bb61935dc99e0f2a624d350efd"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a0545c07b5d2a4df33248f284c1275fcc85cf9b9944557cc4643bddfdde94ebd"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ccc973a45e08ebc8f2b03cf6cf7bbb47cb27f90e46a9d7e5e945c9906cb88692"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"18224e1ab949bc37af8e6fd82205281c7866ba060d488730bf478ce77e9b68d2"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b126a7c4c5a5e89d7a18da301e68515b3fa6ae35fca645313996cd0ed9ada803"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e1af06a76eb75447954e0ebb748b03b45ebdf6ac8a4ff90ac92cb2d0bdbcdcb5"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"9a75639d7d536035eda71f2c17f3bc689a18812e437f9c7c60deba4b48216d68"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"857ff30d16ac393be784dbbb072731cae8b3dc501ea2d9d4f2796c506e3875f8"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a9fd4f8abdd1aa92ee988960feb83ddcee4b343940fde555b4c5355f79217abe"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ec79156b072b9ab1b3440a28ecda26393dff7879d0439515bde8ec95121a502f"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"be060a518d46738276facb39466a6855312f6de5eeb96f6d2b337ea93119c01d"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"2bb2bddd40d20ef1917fb3a393ef9a6011424b9c9f107fedab1d54fbfee7d44f"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"eae4affaa4f5b452d49ee8fe94625c7ea107c7021d3e9754e476915e50c2aa80"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c6f7ee69fcca86449b4a7e8d4837c8184539e6a8c7f22aeec0e1b6152c012203"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e2a23739c370e3471e99edc8ee607eaeaecb6eb7c68251b7a6c3c583e7816acc"},"taxa":[{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-88","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"68a2e9216e62d617303780adc65bd228c370ff3407b2481a698fcd148398f626"},"taxa":[{"id":"CWE-116","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"759d36a63e8483c4a467399ff199fa57fa2e02d89ef311720974588edb9516d4"},"properties":{"dependency":{"package":"anyhow","version":"1.0.100","advisory":"RUSTSEC-2026-0190","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"4975822701b3b96654c82dada9bad969e348a6adefa52cd3bba1b6cfd71c3bb7"},"properties":{"dependency":{"package":"bincode","version":"1.3.3","advisory":"RUSTSEC-2025-0141","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ca383df8f93c1fcb449201c7c47b9fc487e55acf31a9bb60212d29fe36dde189"},"properties":{"dependency":{"package":"block-buffer","version":"0.12.0","advisory":"[GHSA redacted]","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1092cdc16bab90e26caa98781415518f2a1a0fec9b43d183894264e01dcc42b6"},"properties":{"dependency":{"package":"event-listener","version":"5.4.1","advisory":"RUSTSEC-2026-0221","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"422864efbc32ee020d94634a443edac9d818b90faf02ac96d91c4d66ffa4da37"},"properties":{"dependency":{"package":"lru","version":"0.16.3","advisory":"RUSTSEC-2026-0253","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"5922a5beeab5ac077ffb485a783ad545036e79b56239f83da38f3fb84336b113"},"properties":{"dependency":{"package":"paste","version":"1.0.15","advisory":"RUSTSEC-2024-0436","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"46f49615124997a47ae03424c2b2e05e8f53b2ec644cd091de0dc203d46f11ac"},"properties":{"dependency":{"package":"pin-utils","version":"0.1.0","advisory":"RUSTSEC-2026-0441","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"45f6c0dd73434ccd86356af3cc9622ade7a0e177107528134623e6a917ba7888"},"properties":{"dependency":{"package":"quinn-proto","version":"0.11.18","advisory":"RUSTSEC-2026-0523","aliases":["[GHSA redacted]","[GHSA redacted]","RUSTSEC-2026-0524"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"28f0bc6d34596072b24d37b19b745b7394ed4ce99a53e032439b262379e02dc1"},"properties":{"dependency":{"package":"quinn-udp","version":"0.5.14","advisory":"RUSTSEC-2026-0538","aliases":["[GHSA redacted]"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e9cf74773a6e34d2f2cd5f4cc024a1a57cb07e5917cf84c703df779cadb57013"},"properties":{"dependency":{"package":"rustix","version":"1.1.3","advisory":"RUSTSEC-2026-0486","aliases":["[GHSA redacted]"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"be12c71023c43937a607a177a93163e0581c742a3255ef7103051bf074226b53"},"properties":{"dependency":{"package":"rustybuzz","version":"0.20.1","advisory":"RUSTSEC-2026-0206","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c64e30c28e3c0e2ac4c865fc1656b78d3404e0bf0484e55f9176b7c5f283f360"},"properties":{"dependency":{"package":"tokio","version":"1.49.0","advisory":"RUSTSEC-2026-0386","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c356dafc2d2f879539349393edf47ceccc3e0771bf15e4dae816abd8594fd25c"},"properties":{"dependency":{"package":"ttf-parser","version":"0.25.1","advisory":"RUSTSEC-2026-0192","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"2b5cc6a78fe02a95b2f6755616011982ae866dcba8c2aeaae7b037f36ce19be5"},"properties":{"dependency":{"package":"unsafe-libyaml","version":"0.2.11","advisory":"RUSTSEC-2024-0449","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7f6329e2b29fe1ee1dd724766af980b151618490b720201bbdc1839704210c3e"},"properties":{"dependency":{"package":"zbus_names","version":"4.3.4","advisory":"RUSTSEC-2026-0371","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"77d4d5d4357ce0a5ade8f6f76c84914f1a2c80f9fe7358d9854254b760de650a"},"properties":{"dependency":{"package":"zvariant","version":"5.15.0","advisory":"RUSTSEC-2026-0370","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"f67f0700e108bacf2f3dfd2008273e31f01b0ea1f2d5f9ef71c4f46ace73bbe9"},"properties":{"dependency":{"package":"zvariant_derive","version":"5.15.0","advisory":"RUSTSEC-2026-0372","reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6eac9071c066f2a1c3b4fa1affbe6cf7b0245832ff100b4172a93da803e7e17e"},"properties":{"dependency":{"package":"fast-uri","version":"3.1.8","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]"],"reachability":{"kind":"not-imported"}}}},{"ruleId":"D30","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c4252d9ecfca3cf44dffbbe4342dfc88e3b3a1b5e8024502ad7c8e1b6f99463a"},"properties":{"dependency":{"package":"russh","version":"0.65.0","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[GHSA redacted]"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D35","level":"error","message":{"text":"Boundary-crossing change coupling: discover.rs \u2194 benchmark_discovery.py: \u0060crates/jcode-app-core/src/tool/discover.rs\u0060 (context crates) and \u0060scripts/benchmark_discovery.py\u0060 (context scripts) sit in DIFFERENT parts of the tree yet change together 80% of the time (8 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) \u2014 the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can\u0027t see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are \u0060bd64f8f8\u0060 fix(discovery): enforce provenance report contract; \u00600c641dfc\u0060 fix(discovery): enforce provenance report contract; \u0060977d49c4\u0060 Rename discover_tools to integration_tools with search/setup actions \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/discover.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdb4bf83a58e677231f34c73af4820f6205ab011703f1bd06c0b405ef13987ca"}},{"ruleId":"D35","level":"error","message":{"text":"Boundary-crossing change coupling: accessors.rs \u2194 startup.rs: \u0060crates/jcode-base/src/provider/accessors.rs\u0060 (context crates) and \u0060src/cli/startup.rs\u0060 (context cli) sit in DIFFERENT parts of the tree yet change together 50% of the time (8 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) \u2014 the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can\u0027t see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are \u00603e4f0933\u0060 refactor(providers): remove the Claude Code CLI subprocess transport; \u00603d187f4a\u0060 refactor(provider): move OpenRouter runtime out of jcode-base into do\u2026; \u0060a8faf98f\u0060 refactor(provider): move Anthropic runtime out of jcode-base (base wi\u2026 \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/accessors.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"920051ac4777cf464cb39dd3e6973dd9b4351c6e540cd2617f6f3c1e3a177592"}},{"ruleId":"D35","level":"error","message":{"text":"Boundary-crossing change coupling: misc_events.rs \u2194 acp.rs: \u0060crates/jcode-app-core/src/protocol_tests/misc_events.rs\u0060 (context crates) and \u0060src/cli/acp.rs\u0060 (context cli) sit in DIFFERENT parts of the tree yet change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) \u2014 the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can\u0027t see. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are \u0060753f0d10\u0060 feat(router): server-side account failover for Desktop/SDK clients; \u00601e2c6de9\u0060 feat(server): opt in to disconnected remote turn continuation; \u00605b63e5f6\u0060 feat(server): opt in to disconnected remote turn continuation \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/protocol_tests/misc_events.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2616233ae9ffef5eae7d11b3c0ecf714755ebffcaf133b75c6d5e7c5acca601"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: comm_session.rs \u2194 debug_session_admin.rs: \u0060crates/jcode-app-core/src/server/comm_session.rs\u0060 and \u0060crates/jcode-app-core/src/server/debug_session_admin.rs\u0060 change together 100% of the time (13 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module \u2014 a sibling reference still needs an import \u2014 so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are \u0060d3303bad\u0060 refactor(swarm): make the headless memory scope a named choice (refs \u2026; \u00603f384a6e\u0060 refactor(swarm): make the headless memory scope a named choice (refs \u2026; \u00603e855091\u0060 fix(swarm): spawned workers keep real memory instead of test storage \u2026 \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/comm_session.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"05219c7afbe8647da7fe039f57d201a5fdb168943dc7b3df229d758eefd482e3"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: markdown_render_full.rs \u2194 markdown_render_lazy.rs: \u0060crates/jcode-tui-markdown/src/markdown_render_full.rs\u0060 and \u0060crates/jcode-tui-markdown/src/markdown_render_lazy.rs\u0060 change together 95% of the time (19 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module \u2014 a sibling reference still needs an import \u2014 so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 19 shared commits counted here, the most recent 3 are \u006058c6662d\u0060 Make Markdown link URL suffixes opt-in via display config; \u0060a6eab991\u0060 fix(tui): keep blockquote gutters continuous across paragraph breaks; \u00606e0234af\u0060 fix(tui): keep blockquote gutters continuous across paragraph breaks \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_full.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdfc111f3fe85c22d0f3931d840b9f63bcf4b65c0bfbe5e1775009ba4f7f5a89"}},{"ruleId":"D35","level":"warning","message":{"text":"Change-coupling hub: randomized.rs \u2192 client_api.rs, client_lifecycle.rs, translate.rs, backend.rs: \u0060crates/jcode-protocol/src/protocol_tests/randomized.rs\u0060 changes together with 4 other files \u2014 \u0060crates/jcode-app-core/src/server/client_api.rs\u0060, \u0060crates/jcode-app-core/src/server/client_lifecycle.rs\u0060, \u0060crates/jcode-harness-api-server/src/translate.rs\u0060, \u0060crates/jcode-tui/src/tui/backend.rs\u0060 \u2014 none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-protocol/src/protocol_tests/randomized.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f1639955df62a977d91884b9e733332990d0bd1a0075d141fe2b5648fd3b6a1"}},{"ruleId":"D35","level":"warning","message":{"text":"Change-coupling hub: comm_requests.rs \u2192 client_lightweight_control.rs, comm_control.rs, comm_session.rs, communicate.rs: \u0060crates/jcode-app-core/src/protocol_tests/comm_requests.rs\u0060 changes together with 4 other files \u2014 \u0060crates/jcode-app-core/src/server/client_lightweight_control.rs\u0060, \u0060crates/jcode-app-core/src/server/comm_control.rs\u0060, \u0060crates/jcode-app-core/src/server/comm_session.rs\u0060, \u0060crates/jcode-app-core/src/tool/communicate.rs\u0060 \u2014 none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/protocol_tests/comm_requests.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e759b8ccc715f558a41df28f4976aa9d0d6ebbe13561fa68d7592126cc9a37ff"}},{"ruleId":"D35","level":"warning","message":{"text":"Change-coupling hub: misc_events.rs \u2192 client_api.rs, client_lifecycle.rs, translate.rs, backend.rs: \u0060crates/jcode-app-core/src/protocol_tests/misc_events.rs\u0060 changes together with 4 other files \u2014 \u0060crates/jcode-app-core/src/server/client_api.rs\u0060, \u0060crates/jcode-app-core/src/server/client_lifecycle.rs\u0060, \u0060crates/jcode-harness-api-server/src/translate.rs\u0060, \u0060crates/jcode-tui/src/tui/backend.rs\u0060 \u2014 none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/protocol_tests/misc_events.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"08dea61a7755a8fdbb9dc52e8703e035e0e3eb523c7fab1e5fe8f0af41b3e8ee"}},{"ruleId":"D35","level":"warning","message":{"text":"Change-coupling hub: comm_requests.rs \u2192 client_lightweight_control.rs, comm_control.rs, comm_session.rs, communicate.rs: \u0060crates/jcode-protocol/src/protocol_tests/comm_requests.rs\u0060 changes together with 4 other files \u2014 \u0060crates/jcode-app-core/src/server/client_lightweight_control.rs\u0060, \u0060crates/jcode-app-core/src/server/comm_control.rs\u0060, \u0060crates/jcode-app-core/src/server/comm_session.rs\u0060, \u0060crates/jcode-app-core/src/tool/communicate.rs\u0060 \u2014 none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-protocol/src/protocol_tests/comm_requests.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"924c33d47c26b86dcb7af63d0f29eccfceb5963450b138026fa809ba18c06bea"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: client_api.rs \u2194 backend.rs: \u0060crates/jcode-app-core/src/server/client_api.rs\u0060 and \u0060crates/jcode-tui/src/tui/backend.rs\u0060 change together 76% of the time (19 of the 25 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 19 shared commits counted here, the most recent 3 are \u0060765f9e4c\u0060 Forward API Hello client name so jcode-ios sessions get every-turn push; \u0060753f0d10\u0060 feat(router): server-side account failover for Desktop/SDK clients; \u0060cfbf3d9e\u0060 fix(protocol): wire disconnect crash flag \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_api.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c28b0abcdffdb42e22566588cb353aa644eceb09b434b257292d2dd0c711d39"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: tests.rs \u2194 dispatch.rs: \u0060src/cli/args/tests.rs\u0060 and \u0060src/cli/dispatch.rs\u0060 change together 75% of the time (33 of the 44 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 33 shared commits counted here, the most recent 3 are \u006061d871c1\u0060 Add opt-in v1 preview update channel; \u00607f52d118\u0060 google: guided OAuth app setup like gog, plus auto-import and publish\u2026; \u0060a8869dc0\u0060 google: selectable services in Google login and a built-in calendar tool \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/args/tests.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"310eaa9736a0bb5787b0bb040a431d88ff5e5d432891cf7053e1186c31700877"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: accessors.rs \u2194 external.rs: \u0060crates/jcode-base/src/provider/accessors.rs\u0060 and \u0060crates/jcode-base/src/provider/external.rs\u0060 change together 73% of the time (8 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module \u2014 a sibling reference still needs an import \u2014 so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are \u00603e4f0933\u0060 refactor(providers): remove the Claude Code CLI subprocess transport; \u00603d187f4a\u0060 refactor(provider): move OpenRouter runtime out of jcode-base into do\u2026; \u0060a8faf98f\u0060 refactor(provider): move Anthropic runtime out of jcode-base (base wi\u2026 \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/accessors.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"35f763d28d7120370f62ceba1a4b600fceca5fc8d214fbe8007e3328619e5d19"}},{"ruleId":"D35","level":"warning","message":{"text":"Change-coupling hub: lib.rs \u2192 display_summary.rs, hooks.rs, keybind.rs: \u0060crates/jcode-config-types/src/lib.rs\u0060 changes together with 3 other files \u2014 \u0060crates/jcode-base/src/config/display_summary.rs\u0060, \u0060crates/jcode-base/src/hooks.rs\u0060, \u0060crates/jcode-tui/src/tui/keybind.rs\u0060 \u2014 none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-config-types/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"53b7aab54daf4c675ac5ec05e8be1a5ff423ec3f0cfbb7dc978b4370d759552c"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: lib.rs \u2194 lib.rs: \u0060crates/jcode-harness-api/src/lib.rs\u0060 and \u0060crates/jcode-sdk/src/lib.rs\u0060 change together 68% of the time (15 of the 22 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are \u00602f703919\u0060 Expose native runtime commands through harness and SDK; \u0060adbf48bd\u0060 feat(sdk): expose structured abnormal turn stop reasons; \u00609a7be7be\u0060 fix(protocol): frame assistant text messages and preserve retry corre\u2026 \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"56f37b66b4715eedbc9ca94c4d3bd5b3115b7f4ba6a7a2dd4e97b727061334f7"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: core_events.rs \u2194 server_events.rs: \u0060crates/jcode-app-core/src/protocol_tests/core_events.rs\u0060 and \u0060crates/jcode-tui/src/tui/app/remote/server_events.rs\u0060 change together 64% of the time (9 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are \u00605d20e9cc\u0060 fix(usage): report authoritative OAuth account to remote clients; \u00608ef93821\u0060 Track per-request cache prompt totals across providers and history; \u0060827eee1c\u0060 feat(sdk): expose durable per-turn history response stats \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/protocol_tests/core_events.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e230507702715c0330aa2711c08780a58e2e4d03894c00d2d5de6ff4a660eba6"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: client_comm_context.rs \u2194 input_format.rs: \u0060crates/jcode-app-core/src/server/client_comm_context.rs\u0060 and \u0060crates/jcode-app-core/src/tool/communicate_tests/input_format.rs\u0060 change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are \u0060e2ad1db3\u0060 swarm: add stalled-worker watchdog (#1703); \u0060b9cb0aaf\u0060 feat(swarm): add agents.swarm_effort pin and show worker effort in sw\u2026; \u0060d7d5d8ad\u0060 feat(swarm): add agents.swarm_effort pin and show worker effort in sw\u2026 \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_comm_context.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c069279e41ae77b667e9eecea2f465f8154d4e15cc99f3bbf03295e8ef5b17a7"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: keybindings.rs \u2194 input.rs: \u0060crates/jcode-config-types/src/keybindings.rs\u0060 and \u0060crates/jcode-tui/src/tui/app/input.rs\u0060 change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are \u0060fc34ea46\u0060 tui: Alt\u002BUp/Down cycle speed tier (Standard, Fast, Ultrafast); \u00603309ad37\u0060 fix: configure auto-poke toggle key (fixes #945); \u0060a5064b85\u0060 fix: configure auto-poke toggle key (fixes #945) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-config-types/src/keybindings.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bda06a6dbc886e219bd267dcbe9a69b09a8c71273297f17295f14392a44ee92b"}},{"ruleId":"D35","level":"warning","message":{"text":"Change-coupling hub: ui_overlays.rs \u2192 hotkey_feedback.rs, input.rs, key_handling.rs, info_widget_tips.rs: \u0060crates/jcode-tui/src/tui/ui_overlays.rs\u0060 changes together with 4 other files \u2014 \u0060crates/jcode-tui/src/tui/app/hotkey_feedback.rs\u0060, \u0060crates/jcode-tui/src/tui/app/input.rs\u0060, \u0060crates/jcode-tui/src/tui/app/remote/key_handling.rs\u0060, \u0060crates/jcode-tui/src/tui/info_widget_tips.rs\u0060 \u2014 none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_overlays.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcdf63e4122a08368ce235f084a0fd612ab079de142d7c296b5e4bb2599e6546"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: env_overrides.rs \u2194 hooks.rs: \u0060crates/jcode-base/src/config/env_overrides.rs\u0060 and \u0060crates/jcode-base/src/hooks.rs\u0060 change together 59% of the time (10 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are \u0060dd86f266\u0060 hooks: expose tool input, call id, touched paths to post_tool; add po\u2026; \u006075dd137b\u0060 feat: add pre-tool input transformers (#1279); \u0060774c2254\u0060 Revert \u0022Merge PR #758\u0022 \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/config/env_overrides.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3e57766b06ab3b2f366ab91757c31f6bf86066aea8aee596b585c1dda4ee30a"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: onboarding_flow.rs \u2194 ui_onboarding.rs: \u0060crates/jcode-tui/src/tui/app/onboarding_flow.rs\u0060 and \u0060crates/jcode-tui/src/tui/ui_onboarding.rs\u0060 change together 58% of the time (21 of the 36 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 21 shared commits counted here, the most recent 3 are \u006092f2f034\u0060 Telemetry settings: per-category checkboxes with Continue on top; \u006017e5598b\u0060 onboarding: fix Import less committing on Enter, cleaner first page, \u2026; \u006025ed7fe7\u0060 tui: remove Jcode subscription option from onboarding import summary \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/onboarding_flow.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f992d5971a30736843f6f4becd4a494123d5b44b84817a31423ec9ef6a99e3c"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: requests.rs \u2194 parity.rs: \u0060crates/jcode-harness-api/src/requests.rs\u0060 and \u0060crates/jcode-sdk/src/sdk_tests/parity.rs\u0060 change together 58% of the time (14 of the 24 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are \u00602f703919\u0060 Expose native runtime commands through harness and SDK; \u006019110e6d\u0060 Move auto-poke and todo quality gates into a shared SDK policy; \u006014df6c06\u0060 harness api: expose background_tool (move running tool to background) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api/src/requests.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"67e0b44752d217fd47e117739a46eca52c61391499d46d1bfbf750c283390ee7"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: todo.rs \u2194 lifecycle.rs: \u0060crates/jcode-app-core/src/tool/todo.rs\u0060 and \u0060crates/jcode-telemetry-core/src/lifecycle.rs\u0060 change together 58% of the time (11 of the 19 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are \u00604973f3e1\u0060 feat(todo): gate feedback loop relevance and coverage; \u0060abb0baab\u0060 feat(todo): gate feedback loop relevance and coverage; \u00600d48b768\u0060 telemetry: count todo progress without quoting any of it \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/todo.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcc716c651846c2aae5461ccfa730a5d42743b45373da0d255cd3bcc7396d2ec"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: core_events.rs \u2194 server_events.rs: \u0060crates/jcode-protocol/src/protocol_tests/core_events.rs\u0060 and \u0060crates/jcode-tui/src/tui/app/remote/server_events.rs\u0060 change together 58% of the time (15 of the 26 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are \u00604be17b27\u0060 Delta History: also skip rendered images the client already holds; \u00605d20e9cc\u0060 fix(usage): report authoritative OAuth account to remote clients; \u00608ef93821\u0060 Track per-request cache prompt totals across providers and history \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-protocol/src/protocol_tests/core_events.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ecff6a1bdd77c9723a05ec8e1bd9ab970ea130b45b3828c07d204da887b89e9"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: bash.rs \u2194 bg.rs: \u0060crates/jcode-app-core/src/tool/bash.rs\u0060 and \u0060crates/jcode-app-core/src/tool/bg.rs\u0060 change together 55% of the time (11 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module \u2014 a sibling reference still needs an import \u2014 so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are \u0060bc0e25de\u0060 feat(bg): stall watchdog wakes the agent when a background task goes \u2026; \u0060b861f370\u0060 feat(bg): stall watchdog wakes the agent when a background task goes \u2026; \u0060039dc86a\u0060 Cap tool parameter descriptions at ~25 tokens \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/bash.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bfc7796cfcae079b2debfd49e482ad836d019895bcf5ea87acc5d9c50de15dd"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: events.rs \u2194 tui_lifecycle.rs: \u0060crates/jcode-protocol/src/wire/events.rs\u0060 and \u0060crates/jcode-tui/src/tui/app/tui_lifecycle.rs\u0060 change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are \u0060a36f6f19\u0060 server: push todo changes to attached clients, clients stop polling f\u2026; \u00606c47789c\u0060 companion: [companion] config toggles, autostart from the TUI, live w\u2026; \u006017a12d1a\u0060 Fence resumed observer events by runtime generation and turn identity \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-protocol/src/wire/events.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a1aa7f58a7602b43828257063c37fc71d601fad5520655af1b6bc3bbdc57d11"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: external.rs \u2194 catalog.rs: \u0060crates/jcode-base/src/auth/external.rs\u0060 and \u0060crates/jcode-provider-metadata/src/catalog.rs\u0060 change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are \u00601f9a56a4\u0060 feat(auth): add built-in Novita API-key login; \u00602ff0b799\u0060 feat(auth): add built-in Novita API-key login; \u006045c5469f\u0060 feat: add Conifer provider integration (fixes #1089) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/external.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"472e8cfbed51b64335d59dd28db3f3bfb400add66ba44b06c5c498aa7d9db402"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: tests.rs \u2194 proctitle.rs: \u0060src/cli/args/tests.rs\u0060 and \u0060src/cli/proctitle.rs\u0060 change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are \u006061d871c1\u0060 Add opt-in v1 preview update channel; \u00606fa94a88\u0060 fix: honor telemetry opt-out before install event (fixes #893); \u00600f675d89\u0060 fix: honor telemetry opt-out before install event (fixes #893) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/args/tests.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7a299b61d3a9db2da7dbcef8be49ac0ba8614cc55489d1d280aceac6cc79252"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: client_comm_context.rs \u2194 comm_format.rs: \u0060crates/jcode-app-core/src/server/client_comm_context.rs\u0060 and \u0060crates/jcode-protocol/src/comm_format.rs\u0060 change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are \u0060e2ad1db3\u0060 swarm: add stalled-worker watchdog (#1703); \u0060b9cb0aaf\u0060 feat(swarm): add agents.swarm_effort pin and show worker effort in sw\u2026; \u0060d7d5d8ad\u0060 feat(swarm): add agents.swarm_effort pin and show worker effort in sw\u2026 \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_comm_context.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd59141d52f0b2eadbbfab92307a84e5bfeaceaf4b9e7c8e601627f7e05e91b6"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: keybindings.rs \u2194 key_handling.rs: \u0060crates/jcode-config-types/src/keybindings.rs\u0060 and \u0060crates/jcode-tui/src/tui/app/remote/key_handling.rs\u0060 change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are \u0060fc34ea46\u0060 tui: Alt\u002BUp/Down cycle speed tier (Standard, Fast, Ultrafast); \u00603309ad37\u0060 fix: configure auto-poke toggle key (fixes #945); \u0060a5064b85\u0060 fix: configure auto-poke toggle key (fixes #945) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-config-types/src/keybindings.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b70a161a2769d04778810e00e5ef392946c109c0a1c42f238f0b0f0177c784a"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: onboarding_flow.rs \u2194 mod.rs: \u0060crates/jcode-tui/src/tui/app/onboarding_flow.rs\u0060 and \u0060crates/jcode-tui/src/tui/mod.rs\u0060 change together 53% of the time (19 of the 36 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 19 shared commits counted here, the most recent 3 are \u006092f2f034\u0060 Telemetry settings: per-category checkboxes with Continue on top; \u006025ed7fe7\u0060 tui: remove Jcode subscription option from onboarding import summary; \u0060145b8ba9\u0060 Offer Jcode subscription during onboarding \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/onboarding_flow.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"61c238969aba079ce5a98efe8b4e80111faf260b71d7cd5adb61ceb90dae77c4"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: client_api.rs \u2194 misc_events.rs: \u0060crates/jcode-app-core/src/server/client_api.rs\u0060 and \u0060crates/jcode-protocol/src/protocol_tests/misc_events.rs\u0060 change together 52% of the time (13 of the 25 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are \u0060765f9e4c\u0060 Forward API Hello client name so jcode-ios sessions get every-turn push; \u0060753f0d10\u0060 feat(router): server-side account failover for Desktop/SDK clients; \u00601e2c6de9\u0060 feat(server): opt in to disconnected remote turn continuation \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_api.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"786e0cfb6eefa0d60159092d157da629adef2d9d6ab95185b919d8719fc712d4"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: translate.rs \u2194 parity.rs: \u0060crates/jcode-harness-api-server/src/translate.rs\u0060 and \u0060crates/jcode-sdk/src/sdk_tests/parity.rs\u0060 change together 52% of the time (14 of the 27 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are \u00602f703919\u0060 Expose native runtime commands through harness and SDK; \u006019110e6d\u0060 Move auto-poke and todo quality gates into a shared SDK policy; \u006014df6c06\u0060 harness api: expose background_tool (move running tool to background) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/translate.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c571388a994bb3f2e061416918a4a4874a01a9df3f3c78a294aa93bff7c7522a"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: translate.rs \u2194 lib.rs: \u0060crates/jcode-harness-api-server/src/translate.rs\u0060 and \u0060crates/jcode-sdk/src/lib.rs\u0060 change together 51% of the time (21 of the 41 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 21 shared commits counted here, the most recent 3 are \u00600871234b\u0060 harness-api: carry tool call identity on history tool rows; \u00602f703919\u0060 Expose native runtime commands through harness and SDK; \u006019110e6d\u0060 Move auto-poke and todo quality gates into a shared SDK policy \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/translate.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"89c4852bf5d1539c5df46b546db7506fa4458acc12281cf690283928288f958a"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: activation.rs \u2194 selection.rs: \u0060crates/jcode-base/src/provider/activation.rs\u0060 and \u0060crates/jcode-base/src/provider/selection.rs\u0060 change together 50% of the time (9 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module \u2014 a sibling reference still needs an import \u2014 so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are \u0060659b8cc1\u0060 feat: add Grok Build ACP provider; \u006055ed0d77\u0060 feat: add Grok Build ACP provider; \u0060d85dd178\u0060 fix: allow interactive cross-provider model switching (fixes #549) (#\u2026 \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/activation.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a3ff1dd454f8c54ca2a0ed06360748045ab18c0fe7a76e052770d02628d6f0c"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: anthropic.rs \u2194 copilot.rs: \u0060crates/jcode-base/src/provider/anthropic.rs\u0060 and \u0060crates/jcode-base/src/provider/copilot.rs\u0060 change together 50% of the time (8 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module \u2014 a sibling reference still needs an import \u2014 so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are \u0060918562ce\u0060 fix: make stream_idle_timeout_secs provider-agnostic and extend TUI s\u2026; \u00600b35c952\u0060 fix(providers): retry transport faults on a fresh unpooled HTTP client; \u0060ec2f3f84\u0060 fix(providers): roll back partial output on mid-stream retry instead \u2026 \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/anthropic.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"72d6dccce3786c89c1d697188d2f0606a40717b6ac4a3d449cb82f9596edae3d"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: paths.rs \u2194 tokenize.rs: \u0060crates/jcode-command-risk/src/paths.rs\u0060 and \u0060crates/jcode-command-risk/src/tokenize.rs\u0060 change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module \u2014 a sibling reference still needs an import \u2014 so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are \u00605dae4628\u0060 fix(command-risk): parse nested shell constructs safely; \u0060496dedeb\u0060 fix(command-risk): parse nested shell constructs safely; \u0060c32869d5\u0060 fix(command-risk): close three bypasses found in review (#604) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-command-risk/src/paths.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cba4c808f182a4cba32dead7bac6c330139e6d7a3672e9afabcdea4c8a8c8ceb"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: input.rs \u2194 info_widget_tips.rs: \u0060crates/jcode-tui/src/tui/app/input.rs\u0060 and \u0060crates/jcode-tui/src/tui/info_widget_tips.rs\u0060 change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are \u006035b06b58\u0060 tui: Alt\u002BG opens the project\u0027s git commit log; diff cycling moves to \u2026; \u006073913b0a\u0060 tui: show \u2325 instead of Alt in keybinding hints on macOS; \u0060ad05593e\u0060 tui: show \u2325 instead of Alt in keybinding hints on macOS \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0a295c1174a8eed36ae079156aba1d565dc961296cf0d148434df28d297965e"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: key_handling.rs \u2194 info_widget_tips.rs: \u0060crates/jcode-tui/src/tui/app/remote/key_handling.rs\u0060 and \u0060crates/jcode-tui/src/tui/info_widget_tips.rs\u0060 change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository\u0027s 10,000 most recent commits rather than its whole history \u2014 a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are \u006035b06b58\u0060 tui: Alt\u002BG opens the project\u0027s git commit log; diff cycling moves to \u2026; \u006073913b0a\u0060 tui: show \u2325 instead of Alt in keybinding hints on macOS; \u0060ad05593e\u0060 tui: show \u2325 instead of Alt in keybinding hints on macOS \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote/key_handling.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9871eb153b3128c176be188d16b65767bf3f61add242183f8711c5f218b955a6"}},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"eb00976a698a5d68999b7ee6d27206fd374e916853e7ff1ead5eed42386f043f"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"90f83b4fa27db32740afe9540c905f3c0499caed87f61049a8a903ecc95b41c3"},"taxa":[{"id":"CICD-SEC-8","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"19d4cbb252a3e4997007fe629a8fde65a6a24e745494155b47ed43cbf523f1eb"},"taxa":[{"id":"CICD-SEC-4","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"168ad65a3b806fbaeb5536cff28f94d079d7cdf3c9bb1c27884fa830d0bf1a03"},"taxa":[{"id":"CICD-SEC-5","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ace515990e7ee0f17b5c17e44dd168a5bdecf90804a3a3dd845cf05540978013"},"taxa":[{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"AX4","level":"error","message":{"text":"Dependency-rule violation: jcode-app-core (Domain) \u2192 jcode-harness-api (Web): \u0060jcode-app-core\u0060 is a Domain project but references \u0060jcode-harness-api\u0060, a Web project. The clean-architecture rule is that dependencies point INWARD \u2014 the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"8b37a9cf54fdc3f30d58acb1631e09c4dc23132074521704c4dcb440aff49945"}},{"ruleId":"AX9","level":"error","message":{"text":"Query writes persistent state on the read path: communicate$module.fetch_awaited_member_reports: \u0060communicate$module.fetch_awaited_member_reports\u0060 is a read-named query yet it performs a durable write on the read path (a persist to a store/repository). A query must stay side-effect-free so reads are safe to retry, cache, and route to a read replica; move the write into a command."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/communicate.rs"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"14a4ff20d8896ffb3ef7e1534e90430912b9d1206686c5110e070e2e50df2088"}},{"ruleId":"C1","level":"warning","message":{"text":"No data-protection/encryption: No encryption usage (RustCrypto\u0027s aes-gcm/chacha20poly1305 encrypting, ring or aws-lc-rs aead sealing, orion, libsodium\u0027s secretbox, openssl symm, age, SQLCipher keyed by PRAGMA key, pgcrypto, MongoDB client-side field-level encryption, the OS keyring) was found, and this repository persists personal data in the model cited here \u2014 sensitive data at rest may be unprotected. If TDE/KMS/vault is delegated to infrastructure, ignore."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/schema.sql"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7c6faab308afa18b7845f70d925eca4815cc541ef32520f0d6c804d2c6298c6"}},{"ruleId":"C4","level":"note","message":{"text":"Partial data-retention evidence: A retention mechanism is present, but the data-lifecycle is not yet complete \u2014 missing: an expiry limit \u2014 a declared maximum age / TTL after which the data is no longer kept."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"e6c843eccaff7ffcfe5241125b74768c2364055ab6678b12b10d47f44086afa4"}},{"ruleId":"ED3","level":"note","message":{"text":"Event not named in past tense: UpdateStatus: \u0060UpdateStatus\u0060 is an imperative name inside a domain-event set whose siblings are past-tense facts \u2014 it reads as an intent, not something that happened. Name new events for the fact that occurred (e.g. \u0060ItemAdded\u0060). Do not rename this one if it is already stored or published: its type name is written with every event recorded under it, so a rename can break replay of the stored stream and every subscriber that reads it, and a clearer name does not pay for that. If it has never been written or sent, renaming it now is safe."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/bus.rs"},"region":{"startLine":422}}}],"partialFingerprints":{"codehealthFindingId/v1":"e57f5523974f623b4b3bce96f8e71559f444ee85e474eb708b103f437a266a68"}},{"ruleId":"M2","level":"note","message":{"text":"No ADRs: No Architecture Decision Records found \u2014 no conventional ADR directory, no numbered \u0060NNNN-title\u0060 documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"670b3d6e36a756d63097d0dfbf90afd5fc761308800b9354894a07c3f4e4aa14"}},{"ruleId":"P2","level":"note","message":{"text":"Logging is not universal: Only 14/22 runnable modules use logging (modules with no entry point or server are excluded \u2014 they are libraries a runnable module hosts). Silent: \u0060.\u0060, \u0060.\u0060, \u0060crates/jcode-harness-api-server\u0060, \u0060crates/jcode-provider-bedrock\u0060, \u0060crates/jcode-provider-core\u0060 and 3 more."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"91a94e21d6d4d0e6a2003f94505b0b02b157176f0b24c4820f3f82b4447a97fe"}},{"ruleId":"P3","level":"note","message":{"text":"No dependency-update automation: \u0060sdk/typescript/examples/demo-app/package.json\u0060 declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices \u2014 including after an advisory is published against it. Add a \u0060.github/dependabot.yml\u0060 with one \u0060package-ecosystem\u0060 entry per ecosystem the tree uses (or an enabled \u0060renovate.json\u0060), and gate pull requests with \u0060actions/dependency-review-action\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/typescript/examples/demo-app/package.json"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e24f3340e6708d7d6b2f3af3273ad7e46c992be84b7ff05a923ccef458837a9"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060run\u0060 is async and calls thread::sleep \u2014 a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server.rs"},"region":{"startLine":2379}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c8577e098233ab1f4814c5eac2d9839da6fdfa1b8f524c45765da6c03617d02"}},{"ruleId":"PF3","level":"warning","message":{"text":"Sync-over-async blocking: \u0060run\u0060 is async and calls block_on \u2014 a blocking call inside async code stalls the executor thread, and every task scheduled on it for as long as it runs."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-codemode/src/engine.rs"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b8b5364ff31d28d1d3d6857678fe14a0a006664562177985d11f79b039a72c1"}},{"ruleId":"R1","level":"warning","message":{"text":"Type Safety: 0 typed \u00B7 21 plain JS \u2014 the untyped files are scripts/accept_live_local_message.mjs, scripts/accept_live_local_message.test.mjs, scripts/test_version_sdk_release.mjs, scripts/version_sdk_release.mjs, telemetry-worker/scripts/model-price-report.mjs, telemetry-worker/scripts/move-bulk-events.mjs (\u002B15 more)."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d00ee7953f55325a823d27e5db9657c80ca9b9861c0c0abf8fe487cd3fa586d3"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (38 matched lines \u00D7 2 locations): telemetry-worker/src/worker.js:1579 \u00B7 telemetry-worker/src/worker.js:1793 \u2014 the two spans are one implementation copied and then locally edited \u2014 372 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":1579}}}],"partialFingerprints":{"codehealthFindingId/v1":"26e7ba383e921e366dad8ae373a74a33b1d6e9c4a15ac13dd9800e50e076c106"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2 locations): telemetry-worker/src/worker.js:291 \u00B7 telemetry-worker/src/worker.js:435 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":291}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b93fa134cf28cacd5d3fd52161a1ac9d3bde1ea8959d799d489d1e9b8a9a911"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2 locations): telemetry-worker/src/worker.js:426 \u00B7 telemetry-worker/src/worker.js:474 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":426}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fd2cda02f3502600a5da65dd8aefdd48a36fb88bd0a9e3a38cd97214849c374"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2 locations): telemetry-worker/src/worker.js:586 \u00B7 telemetry-worker/src/worker.js:621 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":586}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2d7e7e8b7ae1fbcb29513c9b7c52fc3a44b525401fe3bfec0194353ca1100f8"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2 locations): telemetry-worker/src/worker.js:1350 \u00B7 telemetry-worker/src/worker.js:1366 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":1350}}}],"partialFingerprints":{"codehealthFindingId/v1":"da990105353bcc958ae989085d5c21b56e998094ecee23b7d650cde52766dda6"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2 locations): telemetry-worker/src/worker.js:1500 \u00B7 telemetry-worker/src/worker.js:1611 \u2014 all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct \u2014 the members of a type, or the entries of an object or array literal \u2014 with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal\u0027s entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or \u2014 where the copies are a literal\u0027s entries rather than a type\u0027s members \u2014 one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared \u2014 a decorator and its options, an annotation, a registration table\u0027s keys \u2014 the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":1500}}}],"partialFingerprints":{"codehealthFindingId/v1":"c84ce0a6a5dae619b62805eee65c7eb2c3c793bd5b80fb6a1c4777bc985358ff"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2 locations): telemetry-worker/src/worker.js:1537 \u00B7 telemetry-worker/src/worker.js:1798 \u2014 all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct \u2014 the members of a type, or the entries of an object or array literal \u2014 with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal\u0027s entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or \u2014 where the copies are a literal\u0027s entries rather than a type\u0027s members \u2014 one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared \u2014 a decorator and its options, an annotation, a registration table\u0027s keys \u2014 the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":1537}}}],"partialFingerprints":{"codehealthFindingId/v1":"e43442b77940e86f282ff0390c10bedbb437b79b2270958997e0bd391a622029"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2 locations): scripts/accept_live_local_message.mjs:40 \u00B7 scripts/accept_live_local_message.mjs:67 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/accept_live_local_message.mjs"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"1653bc87909399954506992b898e4827912b4b33cf36f534372033c4714cff47"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4 locations): telemetry-worker/src/worker.js:1206 \u00B7 telemetry-worker/src/worker.js:1222 \u00B7 telemetry-worker/src/worker.js:1238 \u00B7 telemetry-worker/src/worker.js:1270 \u2014 all 4 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":1206}}}],"partialFingerprints":{"codehealthFindingId/v1":"90a64aa8ac87aba33d0137f54f9c4f0b697b3a05645fc1e5c2c08076a4d4d419"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3 locations): telemetry-worker/src/worker.js:2008 \u00B7 telemetry-worker/src/worker.js:2044 \u00B7 telemetry-worker/src/worker.js:2071 \u2014 all 3 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":2008}}}],"partialFingerprints":{"codehealthFindingId/v1":"d554a313ce36ff8a3d899ea5f93045de6741134de5a250c0e6a96b7240ee9373"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3 locations): telemetry-worker/src/worker.js:1989 \u00B7 telemetry-worker/src/worker.js:2015 \u00B7 telemetry-worker/src/worker.js:2078 \u2014 all 3 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":1989}}}],"partialFingerprints":{"codehealthFindingId/v1":"251a3594c4fe3f607b2d923dddc7cd2c91811bb8e62c3e10847d01f95336d96e"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2 locations): telemetry-worker/src/worker.js:1230 \u00B7 telemetry-worker/src/worker.js:1246 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":1230}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce3b8d8c4cab547c76f57e1fc783c8dd98ef71c15eb64c8ab1d3d844df203546"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3 locations): telemetry-worker/src/worker.js:411 \u00B7 telemetry-worker/src/worker.js:467 \u00B7 telemetry-worker/src/worker.js:490 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":411}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fdbc6f1bf1017bdc5d5a263012e84327f153ba5842bf289b7d206abb3df5f0b"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2 locations): telemetry-worker/src/worker.js:2232 \u00B7 telemetry-worker/src/worker.js:2267 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":2232}}}],"partialFingerprints":{"codehealthFindingId/v1":"87eb79d811cf990ea8b0125ec906933da1db006ca4e69de1031a2234fe05a9ae"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function insertEvent (cyclomatic 135, cognitive 145): insertEvent has cyclomatic complexity 135 and cognitive complexity 145; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":1183}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb2c56ed121957905777feff2a645d10fac3486d6462e7168460b884df5674e7"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function fetch (cyclomatic 64, cognitive 73): fetch has cyclomatic complexity 64 and cognitive complexity 73; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":510}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8ba21fb6cbd4e3a702b4956029d0df9ce9402d1a515be0862d9a36e96e9d4b2"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function insertTurnDetails (cyclomatic 49, cognitive 46): insertTurnDetails has cyclomatic complexity 49 and cognitive complexity 46; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":1579}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5e3744a69c8f8e9a5f429a80d5a4be5846ec1681b6f8d71c16488fdaa6aaf76"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function classifyConcurrency (cyclomatic 40, cognitive 38): classifyConcurrency has cyclomatic complexity 40 and cognitive complexity 38; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/concurrency.js"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c154406dbb13354d6a76f9a0fd35b689aa7392b719b79706e19b33419480c37"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function normalizeUsageReportEvent (cyclomatic 38, cognitive 37): normalizeUsageReportEvent has cyclomatic complexity 38 and cognitive complexity 37; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":2359}}}],"partialFingerprints":{"codehealthFindingId/v1":"847ebfc5d1e5371fe2e3c2bec95be43411339629cbd3ae271645823e148bdda2"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function oauthAccount (cyclomatic 38, cognitive 33): oauthAccount has cyclomatic complexity 38 and cognitive complexity 33; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/oauth-account.js"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"419a051d92f5d3482175b90ecc08bd2fccb372e371b25c761954e084a6628a22"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function insertSessionDetails (cyclomatic 35, cognitive 32): insertSessionDetails has cyclomatic complexity 35 and cognitive complexity 32; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":1793}}}],"partialFingerprints":{"codehealthFindingId/v1":"4aa0e7bbbaf52adc1434f2dee80fb0b4faa66bd5d29717ad640301a1cc52e81e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function normalizeWebEvent (cyclomatic 33, cognitive 38): normalizeWebEvent has cyclomatic complexity 33 and cognitive complexity 38; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":2102}}}],"partialFingerprints":{"codehealthFindingId/v1":"51f38bf729bc81e957459adb28a7c8589f1813b7c93d20ba9c6c97a9153fd5c7"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function pruneOldEvents (cyclomatic 32, cognitive 60): pruneOldEvents has cyclomatic complexity 32 and cognitive complexity 60; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":1044}}}],"partialFingerprints":{"codehealthFindingId/v1":"e43acede6ee00ea4b9e18f8dd5a3b6d5f21dc800a9585748efdbdb1daaa3341b"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function insertTodoSessionDetails (cyclomatic 28, cognitive 25): insertTodoSessionDetails has cyclomatic complexity 28 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":2015}}}],"partialFingerprints":{"codehealthFindingId/v1":"bde1d78cdd6ab6c92656d56dcf9eac84f256d5fe44c8f53c09c487b3ac217526"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function main (cyclomatic 22, cognitive 28): main has cyclomatic complexity 22 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/accept_live_local_message.mjs"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"89aa6e1608669195da08b1b34ff805c18767ecadf40016d7b41a0126c192531d"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function insertWebDetails (cyclomatic 21, cognitive 18): insertWebDetails has cyclomatic complexity 21 and cognitive complexity 18; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":2051}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ab0583f7bd0bc81a34d42312f0801860bff3e3dd1fbb1981cda91a1358c614b"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function resolvePriceRows (cyclomatic 20, cognitive 30): resolvePriceRows has cyclomatic complexity 20 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/model-pricing.js"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"9834affb9bf4f57bfe26f8c3bd5664ad9b235359d07cffd14941cf52e12e0a21"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function normalizeDiscoveryEvent (cyclomatic 19, cognitive 21): normalizeDiscoveryEvent has cyclomatic complexity 19 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":2243}}}],"partialFingerprints":{"codehealthFindingId/v1":"37938396af12f295074db0476e11ef93d06d460a77fed73c88f575cb142ba0f7"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 18, cognitive 28): (anonymous) has cyclomatic complexity 18 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":700}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb8ee45563254bf1416d60b0d3b7da19aae34801077bf99c4ed8e0164b2fefa5"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function validateTranscript (cyclomatic 17, cognitive 14): validateTranscript has cyclomatic complexity 17 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":867}}}],"partialFingerprints":{"codehealthFindingId/v1":"7498907463dd565e1daffe55fc4dd16d0c032b0aa831c593a359a293fdc2fc5e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 16, cognitive 27): (anonymous) has cyclomatic complexity 16 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/scripts/move-bulk-events.mjs"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"194f41acf950846f97f6cb1653849189fa992099c40f561cad158764583785b8"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function normalizeInstallFunnelEvent (cyclomatic 16, cognitive 16): normalizeInstallFunnelEvent has cyclomatic complexity 16 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":2187}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ea21811396897692dc18badf2eb92e4aeec0aa67b069babba107d08f97319e6"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function q (cyclomatic 15, cognitive 24): q has cyclomatic complexity 15 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/scripts/move-bulk-events.mjs"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3d15761168894a2c804f01ccd7d93bbc3fb3b44aa6f3ef8291b2d1d9f71a861"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function execute (cyclomatic 15, cognitive 16): execute has cyclomatic complexity 15 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/scripts/run-retention.mjs"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f6c05c5524156c3007a51da9636491662515fddd6809ce025290836322a6f4a"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function writeFirehose (cyclomatic 15, cognitive 14): writeFirehose has cyclomatic complexity 15 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":374}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dc988013f2bb6af58ab2da5a39e6b39b26a1b83b40c9b53294438b796df8edd"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function recordDailyActivity (cyclomatic 14, cognitive 13): recordDailyActivity has cyclomatic complexity 14 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":1654}}}],"partialFingerprints":{"codehealthFindingId/v1":"47ee429a7cc991456d01e1fbca10f3e1ab62a6df4afe826ad7c5bd7830eb81dd"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function ingestTranscript (cyclomatic 13, cognitive 13): ingestTranscript has cyclomatic complexity 13 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":796}}}],"partialFingerprints":{"codehealthFindingId/v1":"332eaf4d7fe48c9882112522b4ba0f2055e5b696086e36858fb55c4329ef8686"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function insertDiscoveryDetails (cyclomatic 13, cognitive 10): insertDiscoveryDetails has cyclomatic complexity 13 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":1989}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3c99452c7aab5400a0feaaef715a31c45903a8aea3bd5a62e5ed344475ecebe"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function syncModelPrices (cyclomatic 12, cognitive 16): syncModelPrices has cyclomatic complexity 12 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/model-pricing.js"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"339c9413d7a006a090c24da174e123c9b7ddb8ae539a0be9f9e0f6ddcf6a6df1"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function buildModelPriceReport (cyclomatic 12, cognitive 13): buildModelPriceReport has cyclomatic complexity 12 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/scripts/model-price-report.mjs"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"a91ba61d1241e56a390b77d94a5e5e06056ed455eabfdb2451a7f18d0f985914"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function commonEventEntries (cyclomatic 12, cognitive 11): commonEventEntries has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":1863}}}],"partialFingerprints":{"codehealthFindingId/v1":"81736d2ec345ec3868827777d2fc24606651dd060ca100902c8db455ac70af75"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function main (cyclomatic 11, cognitive 16): main has cyclomatic complexity 11 and cognitive complexity 16; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/scripts/sync-model-prices.mjs"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c40f4f095f5693cd3acbbb143cf1a5c7e5945a1c0c832d473475d8696614d12"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function normalizeLabel (cyclomatic 11, cognitive 13): normalizeLabel has cyclomatic complexity 11 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/model-pricing.js"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2f389ea736c47ac31d1a25ee5f38e6a05219ab43a19c8f905aaf0526fed4aa5"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function writeConcurrencyFirehose (cyclomatic 11, cognitive 10): writeConcurrencyFirehose has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"91b73213fda45140b91695f3b91cc81997baa288aec77d4c0214e8b899243bde"}},{"ruleId":"R3","level":"warning","message":{"text":"telemetry-worker/src/worker.js: 2342 lines of code: telemetry-worker/src/worker.js has 2342 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/src/worker.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b48916277fa84efebac8eb3b643258a5f5a11a2e8c430df4449da2307d5d919"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/scripts/sync-model-prices.mjs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7e2471e940353ef691eae9fd05dd7a2e6a6c2ea4c72f4d6dc36385e50c64732"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/scripts/move-bulk-events.mjs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"99b9e11f5182ccbf3f3b816eec1d73f8b8244c1aa7d5955faa85b636910c15e2"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/scripts/run-dashboard.mjs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e474cd7baa27867d7367ddfc46ab9970cf24742be2f48863cd44ce0fa8e37fba"}},{"ruleId":"SC1","level":"warning","message":{"text":"JavaScript dependencies are not locked: sdk/typescript/examples/demo-app/package.json declares dependencies that no committed lockfile resolves \u2014 there is no package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it \u2014 so its installs aren\u0027t reproducible (SSDF PW.4.4). Commit its package manager\u0027s lockfile (or add it to the locked workspace) and install from it (\u0060npm ci\u0060, \u0060yarn --immutable\u0060, \u0060pnpm i --frozen-lockfile\u0060 or \u0060bun i --frozen-lockfile\u0060). Advisory \u2014 never scored."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/typescript/examples/demo-app/package.json"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"3296d8944f369bc6e6bfa0a914880ca26be6d7b281ca40d19f9c2c580a236eca"}},{"ruleId":"SC1","level":"warning","message":{"text":"JavaScript dependencies are not locked: telemetry-worker/package.json declares dependencies that no committed lockfile resolves \u2014 there is no package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it \u2014 so its installs aren\u0027t reproducible (SSDF PW.4.4). Commit its package manager\u0027s lockfile (or add it to the locked workspace) and install from it (\u0060npm ci\u0060, \u0060yarn --immutable\u0060, \u0060pnpm i --frozen-lockfile\u0060 or \u0060bun i --frozen-lockfile\u0060). Advisory \u2014 never scored."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"telemetry-worker/package.json"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6ee55cc4592f64e359d5ff4249fbd119d80b5201dc862832aa6551bc62c31d8"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060args.session or recent_session(debug_sock, str(REPO_ROOT))\u0060 appears character-identically in 3 files \u2014 scripts/measure_animation_cpu_cost.py, scripts/profile_real_spawn.py, scripts/repro_real_spawn_lag.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/measure_animation_cpu_cost.py"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecddd4ce606d8f893318c8f239d1f87e8b8c31ab75c88a85be8b74fc2d1e3213"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060candidate.exists() and candidate.is_file()\u0060 appears character-identically in 2 files \u2014 scripts/jcode_harbor_agent.py, scripts/jcode_harbor_claude_agent.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/jcode_harbor_agent.py"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"38716eaebd7983596a1d5a43cb8ac658822080303501ca02d714d7f7184cbeb5"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060env.get(\u0022JCODE_RUNTIME_DIR\u0022) or f\u0022/run/user/{os.getuid()}\u0022\u0060 appears character-identically in 3 files \u2014 scripts/repro_input_flicker.py, scripts/repro_input_lag.py, scripts/repro_startup_lag.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/repro_input_flicker.py"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"922a20135da490d4a3207a6f0505760dbb5197bca9456b7028198870b5499d8b"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060env.get(\u0022JCODE_SOCKET\u0022) or str(real_runtime / \u0022jcode.sock\u0022)\u0060 appears character-identically in 2 files \u2014 scripts/repro_input_flicker.py, scripts/repro_input_lag.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/repro_input_flicker.py"},"region":{"startLine":499}}}],"partialFingerprints":{"codehealthFindingId/v1":"81ad412cde572f1d369683824fa02599c3d12668d64e5b62ae708132741bae5d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060env.get(\u0022JCODE_SOCKET\u0022) or str(runtime / \u0022jcode.sock\u0022)\u0060 appears character-identically in 5 files \u2014 scripts/measure_animation_cpu_cost.py, scripts/profile_real_spawn.py, scripts/repro_real_spawn_lag.py, scripts/repro_startup_lag.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/measure_animation_cpu_cost.py"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"67b0942dbb13285deb222cbee362f044f6d1f6108721396dbd0bac8449a02f15"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060isinstance(cache_read, int) and isinstance(cache_create, int)\u0060 appears character-identically in 2 files \u2014 scripts/jcode_harbor_agent.py, scripts/jcode_harbor_claude_agent.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/jcode_harbor_agent.py"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7922791cdf9e351de52caa38332b6eab7723960ee92762da4978fb8ef5695bf"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060name == \u0022tests.rs\u0022 or name.endswith(\u0022_tests.rs\u0022) or name.endswith(\u0022_test.rs\u0022) or name.startswith(\u0022tests_\u0022)\u0060 appears character-identically in 4 files \u2014 scripts/check_code_size_budget.py, scripts/check_panic_budget.py, scripts/check_swallowed_error_budget.py, scripts/check_test_size_budget.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_code_size_budget.py"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b318525fa3b5e1a18845915c748a5c986530a80fefebe424e7c9e303f81e6bd"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060not entry.name.isdigit() or int(entry.name) == os.getpid()\u0060 appears character-identically in 2 files \u2014 scripts/cloud_acceptance_tui.py, scripts/update_rehearsal.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/cloud_acceptance_tui.py"},"region":{"startLine":376}}}],"partialFingerprints":{"codehealthFindingId/v1":"43b3d8dd8307bac253afdda63ff2887b500f254118d559c87686137046c1cecf"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060not isinstance(k, str) or not isinstance(v, int) or v \u003C= 0\u0060 appears character-identically in 3 files \u2014 scripts/check_code_size_budget.py, scripts/check_panic_budget.py, scripts/check_test_size_budget.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_code_size_budget.py"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"f508dd5b425396768a3391b3be52764ddffd35ff1f7c5142c82393149b385ca8"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060not isinstance(threshold, int) or threshold \u003C= 0\u0060 appears character-identically in 2 files \u2014 scripts/check_code_size_budget.py, scripts/check_test_size_budget.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_code_size_budget.py"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"187c063d0ba2b4ff0e41c60291049fad61eed244be9d44b0b0594673de6b0032"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060os.environ.get(\u0022JCODE_RUNTIME_DIR\u0022) or f\u0022/run/user/{os.getuid()}\u0022\u0060 appears character-identically in 4 files \u2014 scripts/measure_animation_cpu_cost.py, scripts/profile_real_spawn.py, scripts/repro_real_spawn_lag.py, scripts/sweep_animation_fps.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/measure_animation_cpu_cost.py"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf84837f18865cdf02786d8a5dd37450d31adc93114f536dc30564e42c8feab9"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060os.environ.get(\u0022JCODE_SCRATCH_DIR\u0022) or tempfile.gettempdir()\u0060 appears character-identically in 13 files \u2014 scripts/check_donut_animates_live.py, scripts/count_idle_draws.py, scripts/dump_fresh_spawn_screen.py, scripts/measure_animation_cpu_cost.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_donut_animates_live.py"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cdd0025b86813eb0ed5d28a3c1370fba138b49bdacc578c2237b3031420f856"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060os.environ.get(env_name) or default_path\u0060 appears character-identically in 2 files \u2014 scripts/jcode_harbor_agent.py, scripts/jcode_harbor_claude_agent.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/jcode_harbor_agent.py"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"e27e0eab6c1b23297deea387e0d5b990022865a802137aada34aa138d5cacf76"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060part == \u0022tests\u0022 or part.endswith(\u0022_tests\u0022) or part.endswith(\u0022_test\u0022) or part.startswith(\u0022tests_\u0022)\u0060 appears character-identically in 4 files \u2014 scripts/check_code_size_budget.py, scripts/check_panic_budget.py, scripts/check_swallowed_error_budget.py, scripts/check_test_size_budget.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_code_size_budget.py"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"db0ddc7db3a5cee897dae94ad6d64cd3d00246ad732ef7de65bcab6ad4af7f55"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060path.suffix == \u0022.rs\u0022 and not is_test_rust_file(path)\u0060 appears character-identically in 2 files \u2014 scripts/check_panic_budget.py, scripts/check_swallowed_error_budget.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_panic_budget.py"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9d21e3d73ba62cd87065e67b61048323ce62f36e830f78a8979f0115c5b74c8"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060process.stdout is not None and process.stderr is not None\u0060 appears character-identically in 2 files \u2014 scripts/benchmark_discovery.py, scripts/benchmark_discovery_rate.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/benchmark_discovery.py"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"7350d65d19d5b233387e56c7f2fd0cc22a338871a2ab16011ebe45f51d03bdee"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060rec.returncode != 0 or not data.exists()\u0060 appears character-identically in 2 files \u2014 scripts/profile_idle_donut.py, scripts/profile_real_spawn.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/profile_idle_donut.py"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef0cd4a78ebc4cc0d2f988ba2c27f0b552dbc5afcb7cf0e23b1caef901edc71e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060shutil.which(\u0022claude\u0022) or str(Path.home() / \u0022.local/bin/claude\u0022)\u0060 appears character-identically in 2 files \u2014 scripts/bench_headless_memory.py, scripts/bench_memory_cli.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/bench_headless_memory.py"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"77836ab0914afb8f9002bdc4645307e9fa2ba3693a7280ff0d206202df16f74a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!creds.refresh_token.is_empty() || creds.id_token.is_some()\u0060 appears character-identically in 5 files \u2014 crates/jcode-base/src/provider/pricing.rs, crates/jcode-base/src/sidecar.rs, crates/jcode-base/src/usage.rs, crates/jcode-base/src/usage/provider_fetch.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/pricing.rs"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"b814535260e74931f8be4d55002e23c6c02fcf01489c60e1e494677b2604cd41"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!is_chatgpt || creds.access_token.is_empty()\u0060 appears character-identically in 2 files \u2014 crates/jcode-base/src/usage.rs, crates/jcode-base/src/usage/provider_fetch.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage.rs"},"region":{"startLine":716}}}],"partialFingerprints":{"codehealthFindingId/v1":"676fe9c3100ad4b004875b5cb9567d3bea9942ecc60004f024130378fe0fc491"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!messages.is_empty() \u0026\u0026 !preserve_visible_turn\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui/src/tui/app/input.rs, crates/jcode-tui/src/tui/app/remote.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":4226}}}],"partialFingerprints":{"codehealthFindingId/v1":"328c1c4b44b0cba1e47d81c9ac82e31128d36468ae5e833f7acc5324be412397"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!metadata.is_dir() || metadata.file_type().is_symlink()\u0060 appears character-identically in 2 files \u2014 crates/jcode-base/src/mcp/oauth.rs, src/cli/cloud_replace.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mcp/oauth.rs"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"0514744dad6ada04a9494b59eb8e4baf2ef537463abb8a63a66a4dee1894d6c7"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!modifiers.contains(KeyModifiers::CONTROL) \u0026\u0026 !modifiers.contains(KeyModifiers::ALT)\u0060 appears character-identically in 3 files \u2014 crates/jcode-tui-account-picker/src/overlay.rs, crates/jcode-tui-usage-overlay/src/lib.rs, crates/jcode-tui/src/tui/login_picker.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay.rs"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"d42c5f103954a7514c9cf312737eaf105d86f3fc368cdc183f7f0290fcda31e4"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!new_text.is_empty() \u0026\u0026 !new_text.ends_with(\u0027\\n\u0027)\u0060 appears character-identically in 2 files \u2014 crates/jcode-setup-hints/src/linux_env.rs, crates/jcode-setup-hints/src/linux_niri.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/linux_env.rs"},"region":{"startLine":598}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a85d7bc8af9b678fe0e1063cc2da7c55d616d71855e29cc962b5f73e844aa60"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!output.is_empty() \u0026\u0026 !output.ends_with(\u0027\\n\u0027)\u0060 appears character-identically in 2 files \u2014 crates/jcode-app-core/src/server/input_shell_output.rs, crates/jcode-tui/src/tui/app/input/shell_commands.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/input_shell_output.rs"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"3969bcc95ce4f8492a5bcddc9f183861a171582d794488421bfd8971eac0b0f8"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!self.display_messages.is_empty() \u0026\u0026 !self.is_processing\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui/src/tui/app/state_ui_runtime.rs, crates/jcode-tui/src/tui/app/tui_state.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui_runtime.rs"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"23a26b78c85020d85d96f6770c6c222a9a4721e23a80d63a652e6b39350517d5"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!server_running \u0026\u0026 std::env::var(\u0022JCODE_RESUMING\u0022).is_ok()\u0060 appears character-identically in 2 files \u2014 src/cli/dispatch.rs, src/cli/selfdev.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/dispatch.rs"},"region":{"startLine":901}}}],"partialFingerprints":{"codehealthFindingId/v1":"22ca5b520e33bbad154812c8932454035ea02aab3d660bb571e7f0d280177a8b"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!state.hotkey_configured \u0026\u0026 !state.hotkey_dismissed\u0060 appears character-identically in 2 files \u2014 crates/jcode-setup-hints/src/lib.rs, crates/jcode-setup-hints/src/windows_setup.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/lib.rs"},"region":{"startLine":1228}}}],"partialFingerprints":{"codehealthFindingId/v1":"5954c785d6ed62186cddfe99bd8fe66abf00d75e3171093919947fbf14338c8b"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!std::io::stdin().is_terminal() || !std::io::stdout().is_terminal()\u0060 appears character-identically in 3 files \u2014 crates/jcode-tui-permissions/src/lib.rs, crates/jcode-tui/src/tui/session_picker.rs, crates/jcode-tui/src/tui/theme_detect.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-permissions/src/lib.rs"},"region":{"startLine":510}}}],"partialFingerprints":{"codehealthFindingId/v1":"557560cfdc8e70151b3a0fd164a32d392bbdadf9dd085579d9ba239996fd0966"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!trimmed.is_empty() \u0026\u0026 trimmed != \u00220\u0022 \u0026\u0026 !trimmed.eq_ignore_ascii_case(\u0022false\u0022)\u0060 appears character-identically in 7 files \u2014 crates/jcode-app-core/src/server/jade_relay.rs, crates/jcode-app-core/src/server/reload.rs, crates/jcode-app-core/src/tool/selfdev/mod.rs, crates/jcode-base/src/auth/mod.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/jade_relay.rs"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"790542ebf6516c96d91bcb4a4888f8d679820633b5f5d71fac4aa5af4801f78a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!value.is_empty() \u0026\u0026 value != \u00220\u0022 \u0026\u0026 !value.eq_ignore_ascii_case(\u0022false\u0022)\u0060 appears character-identically in 3 files \u2014 crates/jcode-app-core/src/agent.rs, crates/jcode-base/src/auth/copilot.rs, crates/jcode-provider-doctor/src/lifecycle_driver.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent.rs"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"6803956dc199ca2c8cef3e2f4bb4ba4da9c3d444a6bcd9c6aa504cfbf3edacc6"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060(!credentials.access_token.is_empty() \u0026\u0026 account.access_token == credentials.access_token) || (!credentials.refresh_token.is_empty() \u0026\u0026 acco\u2026\u0060 appears character-identically in 2 files \u2014 crates/jcode-base/src/auth/codex.rs, crates/jcode-provider-openai-runtime/src/openai_provider_impl.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/codex.rs"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd1143d93671fab2fd8e85f0fd003b3af530194736757dfce5311056862fca8c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060(needs_validation || needs_spike_challenge) \u0026\u0026 gate_budget_left\u0060 appears character-identically in 2 files \u2014 crates/jcode-todo-policy/src/followup.rs, crates/jcode-tui/src/tui/app/input.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-todo-policy/src/followup.rs"},"region":{"startLine":392}}}],"partialFingerprints":{"codehealthFindingId/v1":"a47b7bb375fd63fabfcdc6f18ecb98ada411af89a9dc5bde08c381ec1c70dc57"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060(ownership_needs_followup || needs_validation || needs_spike_challenge) \u0026\u0026 !gate_budget_left\u0060 appears character-identically in 2 files \u2014 crates/jcode-todo-policy/src/followup.rs, crates/jcode-tui/src/tui/app/input.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-todo-policy/src/followup.rs"},"region":{"startLine":410}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d32ff92e781c08c98baf5f60d60a6fdc404fcb0b62f745bf681ab918ecc6a3e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060Self::runtime_provider_is_direct_compatible(runtime_provider.as_deref()) || std::env::var_os(\u0022JCODE_NAMED_PROVIDER_PROFILE\u0022).is_some()\u0060 appears character-identically in 2 files \u2014 crates/jcode-base/src/provider/openrouter.rs, crates/jcode-provider-openrouter-runtime/src/lib.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/openrouter.rs"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"760ef26d299d94c6296407b8321ece7ff483bf456d572e0fc02375dadfc78d58"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060app.handle_swarm_agent_shortcut(code, modifiers) || (app.swarm_panel_focused() \u0026\u0026 app.handle_swarm_panel_key(code, modifiers))\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui/src/tui/app/input.rs, crates/jcode-tui/src/tui/app/remote/key_handling/key_events.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":2461}}}],"partialFingerprints":{"codehealthFindingId/v1":"53d11b4435fa7c2101ed1cc6050fb7956d3b21f6c5e58fe0edd2d3a9fe69a4dd"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060app.inline_interactive_state \u0026\u0026 !picker.preview\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui/src/tui/app/input.rs, crates/jcode-tui/src/tui/app/remote/key_handling/key_events.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":2720}}}],"partialFingerprints":{"codehealthFindingId/v1":"e56227f55274792f72e038e7520b31336c0dddbfd9fd99583edabeb1ba605cae"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060app.is_processing \u0026\u0026 app.has_pending_user_followup()\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui/src/tui/app/input.rs, crates/jcode-tui/src/tui/app/remote/key_handling/key_events.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":2920}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1f1df5bb349f4d3eeb94c0f2612cbad0206ef26d750498dab39741eeec57ca7"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060area.width == 0 || area.height == 0 || img_w_px == 0 || img_h_px == 0\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui/src/tui/ui_diagram_pane.rs, crates/jcode-tui/src/tui/ui_pinned_layout.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_diagram_pane.rs"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4333d87183e8c287210954a70cf3529f97b477baf3b769f2b2cd832e801a608"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060arg.starts_with(\u0022--provider=\u0022) || arg.starts_with(\u0022--model=\u0022)\u0060 appears character-identically in 2 files \u2014 crates/jcode-app-core/src/server/reload.rs, crates/jcode-base/src/mobile_runner.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/reload.rs"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"cac8c45b63e5867e774c960a9729aac49e745b16723cec831bb4e589b660d9b1"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060at_line_start \u0026\u0026 (c == \u0027 \u0027 || c == \u0027\\t\u0027)\u0060 appears character-identically in 2 files \u2014 crates/jcode-render-core/src/preprocess.rs, crates/jcode-tui-markdown/src/markdown_text_preprocess.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/preprocess.rs"},"region":{"startLine":824}}}],"partialFingerprints":{"codehealthFindingId/v1":"d693e716ece16e9b206f4f72e4238f056c829528b66a136b0b84532f77be9d66"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060available_cells == 0 || image_px == 0 || cell_px == 0\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui/src/tui/ui_diagram_pane.rs, crates/jcode-tui/src/tui/ui_pinned_layout.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_diagram_pane.rs"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4b86cd6cabfeb9fd1908560743fb7f827279f111a257265538cd3e7dfe14699"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060blockquote_depth == 0 \u0026\u0026 !in_definition_list \u0026\u0026 !in_footnote_definition\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui-markdown/src/markdown_render_full.rs, crates/jcode-tui-markdown/src/markdown_render_lazy.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_full.rs"},"region":{"startLine":605}}}],"partialFingerprints":{"codehealthFindingId/v1":"afb34e100eb616a75ecb4067e5f994193540b06c97e636295edbbf6032613fb9"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060blockquote_depth == 0 \u0026\u0026 list_stack.is_empty() \u0026\u0026 !in_definition_list \u0026\u0026 !in_footnote_definition\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui-markdown/src/markdown_render_full.rs, crates/jcode-tui-markdown/src/markdown_render_lazy.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_full.rs"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbc36dbca46fdcbeadef1c9fd092a2e953759f17c0979215fc4de7e0792aeb7a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060blockquote_depth == 0 \u0026\u0026 list_stack.is_empty() \u0026\u0026 !in_footnote_definition\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui-markdown/src/markdown_render_full.rs, crates/jcode-tui-markdown/src/markdown_render_lazy.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_full.rs"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"9900a0e94e09da7f4375c0b92c5acfa466e51cb4c1bff2f04e2c84bb0d8d2ff7"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060c == \u0027$\u0027 \u0026\u0026 i \u002B 1 \u003C len \u0026\u0026 chars[i \u002B 1] == \u0027$\u0027\u0060 appears character-identically in 2 files \u2014 crates/jcode-render-core/src/preprocess.rs, crates/jcode-tui-markdown/src/markdown_text_preprocess.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/preprocess.rs"},"region":{"startLine":909}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f6cabec408b3b204c85e94457732b98cc53c8880c1558d898447ce329e4ed04"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060c == \u0027$\u0027 \u0026\u0026 i \u002B 1 \u003C len \u0026\u0026 chars[i \u002B 1].is_ascii_digit()\u0060 appears character-identically in 2 files \u2014 crates/jcode-render-core/src/preprocess.rs, crates/jcode-tui-markdown/src/markdown_text_preprocess.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/preprocess.rs"},"region":{"startLine":915}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a1293180b280eb9679a610c10c1d520993cd903f98c253c7eae4b24b9191c41"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060c.is_alphanumeric() || c == \u0027-\u0027 || c == \u0027_\u0027\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui/src/tui/test_harness.rs, src/cli/tui_launch.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/test_harness.rs"},"region":{"startLine":487}}}],"partialFingerprints":{"codehealthFindingId/v1":"432455bc5119c5a70481721d84dfa081bab42dfb50aac639e078309ee623c4f3"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060c.is_ascii_alphanumeric() || c == \u0027_\u0027 || c == \u0027-\u0027\u0060 appears character-identically in 2 files \u2014 crates/jcode-app-core/src/tool/codemode.rs, crates/jcode-message-types/src/lib.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/codemode.rs"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"031d78d51af69c56fa029a8e2502fded16974ba07709b8fcd6591577bc5682ff"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060candidate.is_file() || (cfg!(windows) \u0026\u0026 candidate.with_extension(\u0022exe\u0022).is_file())\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui-markdown/src/markdown_latex_image.rs, crates/jcode-voice/src/command_capture.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_latex_image.rs"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"c52707a33c49a5c5558fe212806a4b6640339790724bbffd1ef2c35d70ad40bf"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060ch.is_ascii_alphanumeric() || ch == \u0027-\u0027 || ch == \u0027_\u0027\u0060 appears character-identically in 4 files \u2014 crates/jcode-app-core/src/server/durable_state.rs, crates/jcode-app-core/src/server/reload_recovery.rs, crates/jcode-app-core/src/server/reload_trace.rs, crates/jcode-app-core/src/tool/selfdev/reload.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/durable_state.rs"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"3331d04de5d767bc939ea06bc89e7fbfabfe436bf7070100506bc24e56fdbb60"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060clamped.width == 0 || clamped.height == 0\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui-mermaid/src/mermaid_viewport.rs, crates/jcode-tui-mermaid/src/mermaid_widget.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_viewport.rs"},"region":{"startLine":1616}}}],"partialFingerprints":{"codehealthFindingId/v1":"abaa1a8cc23a50745dfe2b7a524388bb769013bc9fe19922aacbff17ff8009bd"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060content == \u0022Reload initiated. Process restarting...\u0022 || (is_error.unwrap_or(false) \u0026\u0026 (content.contains(\u0022interrupted by server reload\u0022) || c\u2026\u0060 appears character-identically in 3 files \u2014 crates/jcode-app-core/src/server/client_session.rs, crates/jcode-app-core/src/server/client_state.rs, crates/jcode-tui/src/tui/app/tui_lifecycle_runtime.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_session.rs"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d2b9295bafb94722090b2cc62c974c90bb2c78cf1958b6cab83c6cbc8f38aee"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060crate::provider::ModelRouteApiMethod::parse(api_method).is_openrouter() \u0026\u0026 provider != \u0022auto\u0022 \u0026\u0026 !provider.contains(\u0022OpenRouter\u0022)\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui/src/tui/ui_inline_interactive.rs, src/cli/commands/model_routes.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_inline_interactive.rs"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1509c0bac6aba3cb28906a353bf344863c70039981bbad272ace98256b7c583"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060crate::provider::provider_from_model_key(prefix).is_some() || crate::provider_catalog::resolve_openai_compatible_profile_selection(prefix) .\u2026\u0060 appears character-identically in 2 files \u2014 crates/jcode-app-core/src/server/jade_relay.rs, crates/jcode-app-core/src/server/spawn_model_selection.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/jade_relay.rs"},"region":{"startLine":1103}}}],"partialFingerprints":{"codehealthFindingId/v1":"c547efdb3dec5ae26e200537e79ab51731c434b12876421e70f4f3b6c6905bee"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060crate::todo::is_incomplete_todo(todo) \u0026\u0026 !todo.blocked_by.is_empty()\u0060 appears character-identically in 3 files \u2014 crates/jcode-tui/src/tui/ui_messages.rs, crates/jcode-tui/src/tui/ui_todo_changes.rs, crates/jcode-tui/src/tui/ui_todo_stages.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":2281}}}],"partialFingerprints":{"codehealthFindingId/v1":"67a081398c3fe3970ee3d4bd53ad8c6f19d6126541b8ec0e7c28f5cf34a3b262"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060credentials.provider() != account.provider || credentials.label() != account.label\u0060 appears character-identically in 2 files \u2014 src/cli/cloud_group_receive.rs, src/cli/cloud_move.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_group_receive.rs"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"eaa4edff7a940aa00e92a35df5d789ef2c824255fa44741c7e478ed48511b84f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060data.len() \u003E 2 \u0026\u0026 data[0] == 0xFF \u0026\u0026 data[1] == 0xD8\u0060 appears character-identically in 4 files \u2014 crates/jcode-app-core/src/tool/read.rs, crates/jcode-base/src/provider/image_clamp.rs, crates/jcode-terminal-image/src/display.rs, crates/jcode-tui-mermaid/src/mermaid_inline.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/read.rs"},"region":{"startLine":410}}}],"partialFingerprints":{"codehealthFindingId/v1":"feace511f5d384f55d85eda675dc657cd156c2fdbb6d864d000ddd7624ff81cb"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060entry_type != \u0022user\u0022 \u0026\u0026 entry_type != \u0022assistant\u0022\u0060 appears character-identically in 2 files \u2014 crates/jcode-import-core/src/lib.rs, crates/jcode-tui/src/tui/session_picker/loading.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-import-core/src/lib.rs"},"region":{"startLine":614}}}],"partialFingerprints":{"codehealthFindingId/v1":"3eb8f420ead1786f670e62e246b788ae32aff71975d0d8d1e217a93eaf78cfe9"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060event.is_some() || discarded_oversized_native\u0060 appears character-identically in 2 files \u2014 crates/jcode-app-core/src/agent.rs, crates/jcode-tui/src/tui/app/conversation_state.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent.rs"},"region":{"startLine":980}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f30c681ba448f1ef505f429796584da150402d72e118a92d873e1a23cc575d0"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060in_definition_item \u0026\u0026 current_spans.is_empty()\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui-markdown/src/markdown_render_full.rs, crates/jcode-tui-markdown/src/markdown_render_lazy.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_full.rs"},"region":{"startLine":828}}}],"partialFingerprints":{"codehealthFindingId/v1":"54f63e1a8af08a6a5f9ab18ccc9b612298e3daee9b62cbfb700124cdaf4921e9"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060info.session_id != session_id || !info.is_processing\u0060 appears character-identically in 2 files \u2014 crates/jcode-app-core/src/server/client_state.rs, crates/jcode-app-core/src/server/comm_sync.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/client_state.rs"},"region":{"startLine":1310}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c1de4c33aa38b8a6666acfbabb50ce6279d78f78b723dda71152928359b3ff5"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060input.starts_with(\u0022http://\u0022) || input.starts_with(\u0022https://\u0022) || input.starts_with(\u0027?\u0027) || input.contains(\u0022code=\u0022) || input.contains(\u0022state=\u2026\u0060 appears character-identically in 2 files \u2014 crates/jcode-base/src/auth/gemini.rs, crates/jcode-tui/src/tui/app/auth.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/gemini.rs"},"region":{"startLine":491}}}],"partialFingerprints":{"codehealthFindingId/v1":"17deff5f761f92ea71bbb4af56ecb655496cd5f5688c3dd298c00a515738aeb1"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060input_tokens.is_some() || output_tokens.is_some() || cache_read_input_tokens.is_some() || cache_creation_input_tokens.is_some()\u0060 appears character-identically in 2 files \u2014 crates/jcode-provider-openai/src/stream.rs, crates/jcode-provider-openrouter/src/stream.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai/src/stream.rs"},"region":{"startLine":1007}}}],"partialFingerprints":{"codehealthFindingId/v1":"917c9cc2a76d7ed77a16a9ce1378a0a71167c133e96e10ebb8cd96e77f12e6f7"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060intent.contains(\u0022cancel\u0022) || intent.contains(\u0022stop\u0022)\u0060 appears character-identically in 2 files \u2014 crates/jcode-app-core/src/tool/bg.rs, crates/jcode-tui/src/tui/ui_tools.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/bg.rs"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4756b4fb94d77fc8e8a777d185ec387397bba16e960dc4cf2671e19430daac7"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060intent.contains(\u0022list\u0022) || intent.contains(\u0022show\u0022)\u0060 appears character-identically in 2 files \u2014 crates/jcode-app-core/src/tool/bg.rs, crates/jcode-tui/src/tui/ui_tools.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/bg.rs"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"7618bdf32ba3d0e47c981889d95d95b0a7a4bee907f6e1c702915daf7284a7ff"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060intent.contains(\u0022output\u0022) || intent.contains(\u0022log\u0022)\u0060 appears character-identically in 2 files \u2014 crates/jcode-app-core/src/tool/bg.rs, crates/jcode-tui/src/tui/ui_tools.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/bg.rs"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9c6a967f64ee1a0d3d32a96677a61994f903b9fd45e11d70c3bbe2a6d76f342"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060intent.contains(\u0022status\u0022) || intent.contains(\u0022progress\u0022) || intent.contains(\u0022check\u0022)\u0060 appears character-identically in 2 files \u2014 crates/jcode-app-core/src/tool/bg.rs, crates/jcode-tui/src/tui/ui_tools.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/bg.rs"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"4012d77734adae41b67358c2c690d2ec84c1c5b0c5c2e506e84ecb391ee025dd"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060intent.contains(\u0022wait\u0022) || intent.contains(\u0022await\u0022)\u0060 appears character-identically in 2 files \u2014 crates/jcode-app-core/src/tool/bg.rs, crates/jcode-tui/src/tui/ui_tools.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/bg.rs"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c224fc709677644195d191a4b261e2b9a851221969cb7ffeac0d4d68ea7bfd0"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060key == \u0022rate_limits\u0022 || key == \u0022rate_limit\u0022 || key == \u0022additional_rate_limits\u0022\u0060 appears character-identically in 2 files \u2014 crates/jcode-app-core/src/usage_openai.rs, crates/jcode-base/src/usage/openai_helpers.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_openai.rs"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c035bc66c833501994149c9bf6c1f9c1570da09a6a9128de6399ec85d96c968"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060key.contains(\u00225 hour\u0022) || key.contains(\u00225hr\u0022) || key.contains(\u00225 h\u0022) || key.contains(\u0022five hour\u0022)\u0060 appears character-identically in 2 files \u2014 crates/jcode-app-core/src/usage_openai.rs, crates/jcode-base/src/usage/openai_helpers.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_openai.rs"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"985ec6ba5f99d1188e50db2752cefeccd448eb841892a88435f90dae1be7e1d0"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060key.contains(\u0022weekly\u0022) || key.contains(\u00221 week\u0022) || key.contains(\u00221w\u0022) || key.contains(\u00227 day\u0022) || key.contains(\u0022seven day\u0022)\u0060 appears character-identically in 2 files \u2014 crates/jcode-app-core/src/usage_openai.rs, crates/jcode-base/src/usage/openai_helpers.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_openai.rs"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"84d8890d0f282dbd677772a4ee4cd49167c54ea02fcfff3a57766a3697be4b66"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060kind.starts_with(\u0022response.\u0022) || kind == \u0022error\u0022\u0060 appears character-identically in 2 files \u2014 crates/jcode-provider-openai/src/stream.rs, crates/jcode-provider-openai/src/websocket_health.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai/src/stream.rs"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3d25db4a1e46938c4a89fddd90f8ae3047800d10cf83d8cae38656fdb036b05"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060line.is_empty() || line.starts_with(\u0027#\u0027)\u0060 appears character-identically in 2 files \u2014 crates/jcode-setup-hints/src/keymap/terminal.rs, crates/jcode-update-core/src/lib.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/keymap/terminal.rs"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"98d7959a83fe6afc361ffb55a70621106aa561821e1fa5701f4d1da7866ecf75"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060link_targets.pop() \u0026\u0026 show_link_urls \u0026\u0026 !url.is_empty()\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui-markdown/src/markdown_render_full.rs, crates/jcode-tui-markdown/src/markdown_render_lazy.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_full.rs"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"214dc2cf102b129530b899fc7975f087e22e4242de2df1e827cfdea70dd68d0c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060list_stack.pop() \u0026\u0026 center_code_blocks() \u0026\u0026 state.ordered\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui-markdown/src/markdown_render_full.rs, crates/jcode-tui-markdown/src/markdown_render_lazy.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_full.rs"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e2b9ba1603aeae3ec6c1bacb67f973c042118f80bc7638911391cdbc904f801"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060login.id == key \u0026\u0026 login.auth_kind == crate::provider_catalog::LoginProviderAuthKind::ApiKey\u0060 appears character-identically in 2 files \u2014 crates/jcode-app-core/src/server/provider_control.rs, crates/jcode-base/src/auth/account_pool.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/provider_control.rs"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0f5760efb896a6b5b24f0d5f53c3d90b051366b8c6c88aa38f27aafdc17a0e2"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060lower.contains(\u0022context length\u0022) || lower.contains(\u0022context window\u0022) || lower.contains(\u0022maximum context\u0022) || lower.contains(\u0022max context\u0022) |\u2026\u0060 appears character-identically in 2 files \u2014 crates/jcode-app-core/src/agent/compaction.rs, crates/jcode-tui/src/tui/app/helpers.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/compaction.rs"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"486c710cdd9f22107dbc9c291a0f99d574ac022a3eb5be5c2407cd95a962309f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060lower.contains(\u0022model\u0022) || lower.contains(\u0022slug\u0022) || lower.contains(\u0022engine\u0022) || lower.contains(\u0022deployment\u0022)\u0060 appears character-identically in 2 files \u2014 crates/jcode-base/src/sidecar.rs, crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/sidecar.rs"},"region":{"startLine":922}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d0f80d5f9a516d0663690fcae0bce2a65056f9922e6c881a952552496b4ca9e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060lower.contains(\u0022not available\u0022) || lower.contains(\u0022unavailable\u0022) || lower.contains(\u0022does not have access\u0022) || lower.contains(\u0022not enabled\u0022) \u2026\u0060 appears character-identically in 2 files \u2014 crates/jcode-base/src/sidecar.rs, crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/sidecar.rs"},"region":{"startLine":926}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2c0e489cac37ac86f728e821bcd23389fd151793993863ed6af8605b36ca6f1"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060maybe_fence \u0026\u0026 at_line_start \u0026\u0026 leading_spaces \u003C= 3\u0060 appears character-identically in 2 files \u2014 crates/jcode-render-core/src/preprocess.rs, crates/jcode-tui-markdown/src/markdown_text_preprocess.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/preprocess.rs"},"region":{"startLine":837}}}],"partialFingerprints":{"codehealthFindingId/v1":"21b0596bd2c88bee47ce8a8548b4cdf45caae77242aa17a1627c5093d2a8be39"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060member.is_headless || !member.event_txs.is_empty() || !member.event_tx.is_closed()\u0060 appears character-identically in 2 files \u2014 crates/jcode-app-core/src/server/live_turn.rs, crates/jcode-app-core/src/server/mobile_local.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/live_turn.rs"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cdc173a080c6dbece580d6508491e956965c7ba5275c6dcb689b9a9182c3f18"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060members.is_empty() || width \u003C 8 || max_height == 0\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui-render/src/swarm_gallery.rs, crates/jcode-tui/src/tui/info_widget_swarm_gallery.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-render/src/swarm_gallery.rs"},"region":{"startLine":1391}}}],"partialFingerprints":{"codehealthFindingId/v1":"a434b0e503e2f047e23ef2323b376e5a950cad75ef882475397e930299bca19d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060metadata.file_type().is_symlink() || !metadata.is_dir()\u0060 appears character-identically in 3 files \u2014 crates/jcode-harness-api-server/src/translate/credentials.rs, crates/jcode-sdk/src/launch.rs, src/cli/cloud_replace.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/translate/credentials.rs"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"5076644d0b1aabcb94625e8635372674591c6dad0176ef326b4bbbe17b643c18"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060modifiers.contains(KeyModifiers::CONTROL) \u0026\u0026 !modifiers.contains(KeyModifiers::SHIFT) \u0026\u0026 matches!(code, KeyCode::Char(\u0027k\u0027)) \u0026\u0026 !app.input.is\u2026\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui/src/tui/app/input.rs, crates/jcode-tui/src/tui/app/remote.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/input.rs"},"region":{"startLine":2371}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ebd8a309f8f3aee7eaa15c256529edcf61bdfaf86a439790902ba1ca3386c02"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060mouse.column \u003E= list_inner.x \u0026\u0026 mouse.column \u003C list_inner.x.saturating_add(list_inner.width) \u0026\u0026 mouse.row \u003E= list_inner.y \u0026\u0026 mouse.row \u003C lis\u2026\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui-account-picker/src/overlay.rs, crates/jcode-tui/src/tui/login_picker.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-account-picker/src/overlay.rs"},"region":{"startLine":378}}}],"partialFingerprints":{"codehealthFindingId/v1":"47c63519d829d10bf232a203aab883623e539950b67938cd25a420fb575e7d1e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060next \u003C CUBE_VALUES.len() \u0026\u0026 (v as i16 - CUBE_VALUES[next] as i16).unsigned_abs() == best_dist\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui-style/src/color.rs, crates/jcode-tui-workspace/src/color_support.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-style/src/color.rs"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d4d9d4c6264e128b152349e571c4a5df3ded7ed7a0835874e9e98c7fb96da20"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060obj.get(\u0022limit_reached\u0022).and_then(parse_bool_value) == Some(true) || obj.get(\u0022limitReached\u0022).and_then(parse_bool_value) == Some(true)\u0060 appears character-identically in 2 files \u2014 crates/jcode-app-core/src/usage_openai.rs, crates/jcode-base/src/usage/openai_helpers.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_openai.rs"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fca176326d6a47ea26442c7e5b9680b2306c39b9622aeefbe36943bb3a3c5bd"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060other.eq_ignore_ascii_case(\u0022entra\u0022) || other.eq_ignore_ascii_case(\u0022oauth\u0022)\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui/src/tui/app/auth.rs, src/cli/login.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth.rs"},"region":{"startLine":2438}}}],"partialFingerprints":{"codehealthFindingId/v1":"baad8787b430665fdb9392efb6ba4cdf553b8dfc434de2efdc8d5237e26f2b1c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060other.eq_ignore_ascii_case(\u0022key\u0022) || other.eq_ignore_ascii_case(\u0022api-key\u0022)\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui/src/tui/app/auth.rs, src/cli/login.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth.rs"},"region":{"startLine":2444}}}],"partialFingerprints":{"codehealthFindingId/v1":"f72ed9983ecf0f133786468f9e7199796db0b0b59ebb76e2e4e1cd0eff1000ff"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060output.is_empty() || output == missing_output\u0060 appears character-identically in 2 files \u2014 crates/jcode-provider-openai/src/request.rs, crates/jcode-provider-openrouter/src/request.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai/src/request.rs"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc29620871417d027dd1246f9b46f26034a3cc2fd691d08f560ae153f24d8de3"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060ownership_needs_followup \u0026\u0026 gate_budget_left\u0060 appears character-identically in 2 files \u2014 crates/jcode-todo-policy/src/followup.rs, crates/jcode-tui/src/tui/app/input.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-todo-policy/src/followup.rs"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"49fa635e43e5ae42e165b66797884cb415548f22386a3bba46067d003b6f85b1"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060path.contains(\u0022/target/debug/\u0022) || path.contains(\u0022\\\\target\\\\debug\\\\\u0022)\u0060 appears character-identically in 3 files \u2014 crates/jcode-app-core/src/telemetry_state.rs, crates/jcode-telemetry-core/src/state_support.rs, crates/jcode-tui/src/tui/app/support.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/telemetry_state.rs"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"a865504c9af5be2f78ec61f96d659724bc20bb1f43ca36d46ab34cd297540ce7"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060path.contains(\u0022/target/release/\u0022) || path.contains(\u0022\\\\target\\\\release\\\\\u0022)\u0060 appears character-identically in 3 files \u2014 crates/jcode-app-core/src/telemetry_state.rs, crates/jcode-telemetry-core/src/state_support.rs, crates/jcode-tui/src/tui/app/support.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/telemetry_state.rs"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c0716dcde42b210ddd8f9dcc8ee3764e53ab6aba84952a16469ef5caa0825ce"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060previous_count == 0 || previous_count \u003E current_count\u0060 appears character-identically in 2 files \u2014 crates/jcode-app-core/src/agent.rs, crates/jcode-base/src/cache_tracker.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent.rs"},"region":{"startLine":1034}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac5c52bf0270d254bee729004aad8f214936486276cc4ae815a18c8027047261"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060process_sample.is_none() \u0026\u0026 controller.can_write_attribution(now)\u0060 appears character-identically in 2 files \u2014 crates/jcode-app-core/src/server.rs, crates/jcode-tui/src/tui/app/runtime_memory.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server.rs"},"region":{"startLine":1719}}}],"partialFingerprints":{"codehealthFindingId/v1":"99818eacf4191b23520738b0e1a411bddfdb637e35cd8ea7720ea5b385e61000"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060provider.contains(\u0022anthropic\u0022) || provider.contains(\u0022claude\u0022) || model.starts_with(\u0022claude-\u0022)\u0060 appears character-identically in 2 files \u2014 crates/jcode-provider-core/src/reasoning.rs, crates/jcode-tui/src/tui/app/tui_state.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/reasoning.rs"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"40d9679e06ee73c2e7dec05553a64fd45bea0adad66c1d623110ff8478167ee3"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060provider.eq_ignore_ascii_case(\u0022azure\u0022) || provider.eq_ignore_ascii_case(\u0022azure-openai\u0022) || provider.eq_ignore_ascii_case(\u0022azure openai\u0022)\u0060 appears character-identically in 3 files \u2014 crates/jcode-base/src/auth/lifecycle.rs, crates/jcode-tui/src/tui/app/auth.rs, crates/jcode-tui/src/tui/app/remote.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/lifecycle.rs"},"region":{"startLine":1001}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3c1c1cf1bb333afcab95f10ad851685f064821edbf077226c5a49da4158161b"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060range.start.pane == crate::tui::CopySelectionPane::Chat \u0026\u0026 range.end.pane == crate::tui::CopySelectionPane::Chat\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui/src/tui/ui_overlays.rs, crates/jcode-tui/src/tui/ui_viewport.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_overlays.rs"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8bfecd070e559a3688969d6005ff6e90cff77186afd63df29507df770ab2be3"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060range.start.pane == crate::tui::CopySelectionPane::SidePane \u0026\u0026 range.end.pane == crate::tui::CopySelectionPane::SidePane\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui/src/tui/ui_file_diff.rs, crates/jcode-tui/src/tui/ui_pinned_selection.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_file_diff.rs"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"0166f5062c3ebf2614daf20627c0371de080e09659c813438c4499c514b2e893"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060raw == ColorCapability::TrueColor \u0026\u0026 fragile_glyph_cache_terminal()\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui-style/src/color.rs, crates/jcode-tui-workspace/src/color_support.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-style/src/color.rs"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a7c45e8d11e4426120ac9b219af0546a7ae9d2212e49e9bb8660c0a2eba3da3"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060recovered_local || !app.pending_soft_interrupts.is_empty()\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui/src/tui/app/remote.rs, crates/jcode-tui/src/tui/app/remote/server_events.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/remote.rs"},"region":{"startLine":1236}}}],"partialFingerprints":{"codehealthFindingId/v1":"468b0b8607c94d9d5b109c979f858b74aaa813c5955ba97d7055a405861aafd4"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060rest.is_empty() || rest.starts_with(\u0027/\u0027)\u0060 appears character-identically in 2 files \u2014 crates/jcode-command-risk/src/paths.rs, crates/jcode-tui/src/tui/session_picker/render.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-command-risk/src/paths.rs"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa54714d1b6ccadf3a80f869ced4df62aaa5ff3cadc4d247b87b799e4c382eb8"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060routes.is_empty() \u0026\u0026 !current_model.is_empty() \u0026\u0026 current_model != \u0022unknown\u0022\u0060 appears character-identically in 2 files \u2014 crates/jcode-base/src/provider/catalog_remote_routes.rs, crates/jcode-base/src/provider/catalog_routes.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/catalog_remote_routes.rs"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"c627efc595436a8b48cd12dda2e920e73de129bc09e905796aed5258ef457f57"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060seconds \u003E= DAY \u0026\u0026 seconds.is_multiple_of(DAY)\u0060 appears character-identically in 2 files \u2014 crates/jcode-app-core/src/usage_openai.rs, crates/jcode-base/src/usage/openai_helpers.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_openai.rs"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"a87727c34941e8f6706d74eb51c7d9c7f9ee18f5c9f732daa62fe1406141d61e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060seconds \u003E= HOUR \u0026\u0026 seconds.is_multiple_of(HOUR)\u0060 appears character-identically in 2 files \u2014 crates/jcode-app-core/src/usage_openai.rs, crates/jcode-base/src/usage/openai_helpers.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_openai.rs"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dfec08e147dcbaafa5c21e7c3572a074bcb0fb6ae230fa98877a594d62cff45"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.builtin_azure || Self::profile_supports_openai_reasoning_effort(self.profile_id.as_deref())\u0060 appears character-identically in 2 files \u2014 crates/jcode-provider-openrouter-runtime/src/lib.rs, crates/jcode-provider-openrouter-runtime/src/openrouter_provider_impl.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/lib.rs"},"region":{"startLine":974}}}],"partialFingerprints":{"codehealthFindingId/v1":"a48f6476e7225de9a1de888d360c1f863f5a0581131fdc24fe431d710ebf477b"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.is_processing || self.pending_queued_dispatch || self.split_launch_in_flight()\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui/src/tui/app/state_ui_runtime.rs, crates/jcode-tui/src/tui/app/tui_state.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui_runtime.rs"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4fbfb7ceb80df84fa50b694c6931535b4834073c78e8e6edb2bce99ea8dbeb0"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.is_remote \u0026\u0026 !self.remote_skills.is_empty()\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui/src/tui/app/state_ui_input_helpers.rs, crates/jcode-tui/src/tui/app/tui_state.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/state_ui_input_helpers.rs"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5610395f18e2917b3d578746407c408ab540746a0e8586db7b1f61aa6d810c9"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.is_remote || !self.memory_enabled || provider_messages.len() \u003C 4\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui/src/tui/app/conversation_state.rs, crates/jcode-tui/src/tui/app/turn_memory.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/conversation_state.rs"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"101a38c5ccdd91c2e4364b317ba3141ec9944188c7540e1e2df111fa44685e44"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.is_remote || !self.messages.is_empty()\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui/src/tui/app/conversation_state.rs, crates/jcode-tui/src/tui/app/debug_profile.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/conversation_state.rs"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f3fe6743164a44f5fd1a224091b0e44e16d38ab28eeec913798d2af32b27554"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.is_remote || !self.provider.uses_jcode_compaction()\u0060 appears character-identically in 3 files \u2014 crates/jcode-tui/src/tui/app/conversation_state.rs, crates/jcode-tui/src/tui/app/model_context.rs, crates/jcode-tui/src/tui/app/tui_state.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/conversation_state.rs"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"e48a66c874531e6c219d356f3ddb3dbb39511925419e45bc553ae7065aa5143d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.is_remote || crate::tui::is_ssh_remote()\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui/src/tui/app/auth_account_picker.rs, crates/jcode-tui/src/tui/app/inline_interactive.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/auth_account_picker.rs"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ec432271b0229a44c8da007922161362a8bde126668d7d760b6c9f4fe96af69"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.models_cache.try_read() \u0026\u0026 cache.fetched \u0026\u0026 !cache.models.is_empty()\u0060 appears character-identically in 2 files \u2014 crates/jcode-provider-openrouter-runtime/src/lib.rs, crates/jcode-provider-openrouter-runtime/src/openrouter_provider_impl.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/lib.rs"},"region":{"startLine":2435}}}],"partialFingerprints":{"codehealthFindingId/v1":"c616bb0df5d53bf120dc4d4a9ac53ebb57582c3bd9cba6619661e7531e132e7e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.provider_session_id.is_some() || self.session.provider_session_id.is_some()\u0060 appears character-identically in 2 files \u2014 crates/jcode-app-core/src/agent/runtime_recovery.rs, crates/jcode-tui/src/tui/app/model_context.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/runtime_recovery.rs"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"038c5eff8ff4554cd025b61c276470096155eaf929fcb9be32202359d5b16db5"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.remote_binary.is_empty() || self.remote_binary.starts_with(\u0027-\u0027) || self.remote_binary.chars().any(char::is_control)\u0060 appears character-identically in 2 files \u2014 crates/jcode-sdk/src/native_ssh.rs, crates/jcode-sdk/src/ssh.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-sdk/src/native_ssh.rs"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"1aecdf38a18e3f50d9a13ba1f0c3a3d08d9078d3d02c350eb2a226ef9051e17d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.score.to_bits() == other.score.to_bits() \u0026\u0026 self.ordinal == other.ordinal\u0060 appears character-identically in 4 files \u2014 crates/jcode-base/src/embedding_stub.rs, crates/jcode-embedding/src/lib.rs, crates/jcode-memory-types/src/graph.rs, crates/jcode-memory-types/src/lib.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/embedding_stub.rs"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4a39b2ae041f09554f7baf7993ef975a33bf7823713a000b06e3e78b1db1106"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060show_detail \u0026\u0026 !summary.is_empty() \u0026\u0026 summary != intent\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui/src/tui/ui_messages.rs, crates/jcode-tui/src/tui/ui_tools.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_messages.rs"},"region":{"startLine":4221}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e01f19edfd0116127e242f9c24334837a978a2d07a4292ccfb2b2b2666032aa"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060snapshot.five_hour.as_mut() \u0026\u0026 reset_timestamp_passed(window.resets_at.as_deref())\u0060 appears character-identically in 2 files \u2014 crates/jcode-app-core/src/usage_display.rs, crates/jcode-base/src/usage/display.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_display.rs"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"27769fbdd1d4005eedb39bf5d66ff0844dd112c407b8338989fe8f7a8ac9e1c5"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060snapshot.seven_day.as_mut() \u0026\u0026 reset_timestamp_passed(window.resets_at.as_deref())\u0060 appears character-identically in 2 files \u2014 crates/jcode-app-core/src/usage_display.rs, crates/jcode-base/src/usage/display.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_display.rs"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3c4f8ce9597db17fe490429e3adc01fa19059c46e7dd41505b98a057509e9a7"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060snapshot.spark.as_mut() \u0026\u0026 reset_timestamp_passed(window.resets_at.as_deref())\u0060 appears character-identically in 2 files \u2014 crates/jcode-app-core/src/usage_display.rs, crates/jcode-base/src/usage/display.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/usage_display.rs"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c15134bf4e1a4846adb8d01e00b1df85110f89c55b362ebc43d8423f5744ca6"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060span.content == \u0022docs\u0022 \u0026\u0026 span.style.fg == Some(link_fg()) \u0026\u0026 span.style.add_modifier.contains(Modifier::UNDERLINED)\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui-markdown/src/markdown_render_full.rs, crates/jcode-tui-markdown/src/markdown_render_lazy.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_full.rs"},"region":{"startLine":1112}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa1b3b93e7e9a358248e07a37218ca9b3bf6e5f68532c39f05a7dbc8551ece96"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060start \u003C value.len() \u0026\u0026 !value.is_char_boundary(start)\u0060 appears character-identically in 2 files \u2014 crates/jcode-compaction-core/src/lib.rs, crates/jcode-tui/src/tui/session_picker/loading_search_text.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-compaction-core/src/lib.rs"},"region":{"startLine":913}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a8ca3a2850077510e2a8eb3893dd379325e064f068c7b3b6bf846dfff676af7"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060state.feature_subagent_used || state.tool_cat_subagent \u003E 0\u0060 appears character-identically in 2 files \u2014 crates/jcode-telemetry-core/src/lifecycle.rs, crates/jcode-telemetry-core/src/session_outcome.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lifecycle.rs"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb96b2356557f27c69c593709c4c513c7478d8f3b25b478da2196f1c2b0db125"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060state.feature_swarm_used || state.tool_cat_swarm \u003E 0\u0060 appears character-identically in 2 files \u2014 crates/jcode-telemetry-core/src/lifecycle.rs, crates/jcode-telemetry-core/src/session_outcome.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/lifecycle.rs"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5f210705dda5cc1e75a0abebe986187ff9c694d026c4eb178d656672e7bfbc1"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060status == reqwest::StatusCode::UNAUTHORIZED || status == reqwest::StatusCode::FORBIDDEN\u0060 appears character-identically in 2 files \u2014 crates/jcode-base/src/auth/muse.rs, crates/jcode-provider-copilot-runtime/src/lib.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/muse.rs"},"region":{"startLine":600}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bad10401608b9cc8c8a5eb1c41fb2680aaa08ccde966f094aa59b26bddef695"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060std::env::var(\u0022CARGO\u0022).is_ok() || std::env::var(\u0022CARGO_MANIFEST_DIR\u0022).is_ok()\u0060 appears character-identically in 2 files \u2014 crates/jcode-app-core/src/telemetry_state.rs, crates/jcode-telemetry-core/src/state_support.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/telemetry_state.rs"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0f78f2ac2bfd51ed210f281b5138d7d0cf5785109b9127fa2da7bcf51c6565c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060std::env::var(\u0022GHOSTTY_RESOURCES_DIR\u0022).is_ok() || std::env::var(\u0022GHOSTTY_BIN_DIR\u0022).is_ok()\u0060 appears character-identically in 2 files \u2014 crates/jcode-app-core/src/notifications.rs, crates/jcode-tui/src/tui/ui_onboarding.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/notifications.rs"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"2eb6e1c8c066c315d4e7ed1c198e986a6e91ae10593ab50dcca1602b5f875b4c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060std::env::var(\u0022GHOSTTY_RESOURCES_DIR\u0022).is_ok() || std::env::var(\u0022GHOSTTY_BIN_DIR\u0022).is_ok() || std::env::var(\u0022WEZTERM_EXECUTABLE\u0022).is_ok() ||\u2026\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui-style/src/color.rs, crates/jcode-tui-workspace/src/color_support.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-style/src/color.rs"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"451e7d4549deee5ac8afa83ff61dfacfe99224ca920e7b88e198ac21d8524297"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060std::env::var(\u0022JCODE_RESUMING\u0022).is_err() \u0026\u0026 server_running\u0060 appears character-identically in 2 files \u2014 src/cli/dispatch.rs, src/cli/selfdev.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/dispatch.rs"},"region":{"startLine":956}}}],"partialFingerprints":{"codehealthFindingId/v1":"e97691e499d7b04a5ca7a06574f7ad43ddeebd9a798f8d60c58e97567f251864"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060std::env::var(\u0022SSH_CONNECTION\u0022).is_ok() || std::env::var(\u0022SSH_TTY\u0022).is_ok()\u0060 appears character-identically in 3 files \u2014 crates/jcode-app-core/src/perf.rs, crates/jcode-base/src/auth/env_facts.rs, crates/jcode-tui/src/tui/app/helpers.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/perf.rs"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"2440facb0caec708e22fdebaac8e24a450aa9c575d52e92c6311366d514051b4"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060std::env::var(\u0022WEZTERM_EXECUTABLE\u0022).is_ok() || std::env::var(\u0022WEZTERM_PANE\u0022).is_ok()\u0060 appears character-identically in 3 files \u2014 crates/jcode-app-core/src/perf.rs, crates/jcode-setup-hints/src/windows_setup.rs, crates/jcode-terminal-launch/src/lib.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/perf.rs"},"region":{"startLine":454}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b74534c8d123435d566c03b37ad8b4150b46092539a5a3a0ef0d6121e508a51"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060std::fs::remove_file(path) \u0026\u0026 error.kind() != std::io::ErrorKind::NotFound\u0060 appears character-identically in 2 files \u2014 crates/jcode-base/src/mobile_runner_process.rs, crates/jcode-base/src/session/window_closures.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mobile_runner_process.rs"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"badf7fa322b7f7a39541f0a6c257513473d907675c9631a524283d265b1b9cf1"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060std::io::stdout().is_terminal() \u0026\u0026 std::env::var_os(\u0022NO_COLOR\u0022).is_none() \u0026\u0026 std::env::var_os(\u0022JCODE_NO_COLOR\u0022).is_none()\u0060 appears character-identically in 2 files \u2014 src/cli/dispatch.rs, src/cli/provider_doctor.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/dispatch.rs"},"region":{"startLine":591}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ee9f85416e99fc4cf4b637a0ae281e297c956dc13550312d18162259502cb9b"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060t.contains(\u0022kitty\u0022) || t.contains(\u0022ghostty\u0022) || t.contains(\u0022alacritty\u0022)\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui-style/src/color.rs, crates/jcode-tui-workspace/src/color_support.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-style/src/color.rs"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"5489515085bce0f329cd261c39c5179768ec6315685b493cb45d891cc1b28f8e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060text.starts_with(\u0022Thought for \u0022) \u0026\u0026 text.ends_with(\u0027s\u0027)\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui-markdown/src/markdown_render_full.rs, crates/jcode-tui-markdown/src/markdown_render_lazy.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_render_full.rs"},"region":{"startLine":657}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e859fba9fb17412cdfa40bc26798e9079908eef892b254cd92b931c48c8d66a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060tool_calls.is_empty() \u0026\u0026 !generated_image_contexts.is_empty()\u0060 appears character-identically in 2 files \u2014 crates/jcode-app-core/src/agent/turn_loops.rs, crates/jcode-app-core/src/agent/turn_streaming_mpsc.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/turn_loops.rs"},"region":{"startLine":1001}}}],"partialFingerprints":{"codehealthFindingId/v1":"18a025d6dae87c1ccddf9ab8d61d1a97a9a076d249e6404631d395a074147284"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060tool_calls.last_mut() \u0026\u0026 !signature.is_empty()\u0060 appears character-identically in 2 files \u2014 crates/jcode-app-core/src/agent/turn_loops.rs, crates/jcode-app-core/src/agent/turn_streaming_mpsc.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/turn_loops.rs"},"region":{"startLine":486}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb5593d642b8a8bf509f1f30a5b154654dc1832ca571050fcc85535bb8a54877"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060total_ms \u003E= 250 || std::env::var(\u0022JCODE_LOG_MODEL_PICKER_TIMING\u0022).is_ok()\u0060 appears character-identically in 2 files \u2014 crates/jcode-base/src/provider/catalog_routes.rs, crates/jcode-tui/src/tui/app/inline_interactive.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/catalog_routes.rs"},"region":{"startLine":420}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ce46c248572ab1cdfd51927f21a0cc62d643436cc6422330abd5292631a0f38"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060tp == \u0022ghostty\u0022 || tp == \u0022iterm.app\u0022 || tp == \u0022wezterm\u0022 || tp == \u0022warp\u0022 || tp == \u0022alacritty\u0022 || tp == \u0022hyper\u0022\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui-style/src/color.rs, crates/jcode-tui-workspace/src/color_support.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-style/src/color.rs"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed2cc3f02887d44e534e42141fbddb66b8224c1ad6da46df495c47299788d740"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060tp == \u0022vscode\u0022 || tp == \u0022apple_terminal\u0022\u0060 appears character-identically in 3 files \u2014 crates/jcode-setup-hints/src/lib.rs, crates/jcode-tui-style/src/color.rs, crates/jcode-tui-workspace/src/color_support.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/lib.rs"},"region":{"startLine":2404}}}],"partialFingerprints":{"codehealthFindingId/v1":"19ab1ebecdfbc6392e33c255308bca6e549d8ebdf3faf0be60cd31588907a879"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060trimmed == \u0022/model\u0022 || trimmed == \u0022/models\u0022\u0060 appears character-identically in 2 files \u2014 crates/jcode-tui/src/tui/app/model_context_commands.rs, crates/jcode-tui/src/tui/app/remote/key_handling.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/model_context_commands.rs"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"772ff3c16b7f1db4a08160f4f5126b18a9d1ec74009fd6cb074ee5fb75d61deb"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060trimmed.starts_with(\u0022\u0060\u0060\u0060\u0022) || trimmed.starts_with(\u0022~~~\u0022)\u0060 appears character-identically in 2 files \u2014 crates/jcode-render-core/src/preprocess.rs, crates/jcode-tui/src/tui/ui_messages.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-render-core/src/preprocess.rs"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7e6914a31077c8cf8fe72ef0d3aa2b3c8bc582368b8d27189d8b6db4242b83a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060url.scheme() != \u0022https\u0022 || url.host_str().is_none() || !url.username().is_empty() || url.password().is_some() || auth_url.chars().any(char::\u2026\u0060 appears character-identically in 2 files \u2014 crates/jcode-sdk/src/auth.rs, crates/jcode-tui/src/tui/app/auth_remote/command.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-sdk/src/auth.rs"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"10cff5ba56ef26aa59b07d217478a9fa17986a6dcdb89ff32978b20ad83a2b09"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060url.starts_with(\u0022https://jcode.sh/\u0022) || url.starts_with(\u0022https://www.jcode.sh/\u0022)\u0060 appears character-identically in 2 files \u2014 crates/jcode-base/src/jev.rs, crates/jcode-base/src/usage/provider_fetch.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/jev.rs"},"region":{"startLine":744}}}],"partialFingerprints":{"codehealthFindingId/v1":"2919d869b1d558f35cbf99da2bb253514b55de94c86cbe4c2b5480653fde935b"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060usage.five_hour \u003E= 0.99 \u0026\u0026 usage.seven_day \u003E= 0.99\u0060 appears character-identically in 2 files \u2014 crates/jcode-base/src/provider/startup.rs, crates/jcode-provider-anthropic-runtime/src/lib.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/provider/startup.rs"},"region":{"startLine":813}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d8b901724df8600f59282439a260713bf18daddafa2515602dbb0a25e96f0fe"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060usage_input.is_some() || usage_output.is_some() || usage_cache_read.is_some() || usage_cache_creation.is_some()\u0060 appears character-identically in 2 files \u2014 crates/jcode-app-core/src/agent/turn_loops.rs, crates/jcode-app-core/src/agent/turn_streaming_mpsc.rs. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/agent/turn_loops.rs"},"region":{"startLine":871}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fcebe8bee0415ec5208295f6b346a8fdc34cfa3d2ce47ebe78a3e4a85000292"}},{"ruleId":"X15","level":"warning","message":{"text":"Length read from the parsed input is spent without ever being bounded: \u0060entry_count\u0060 is read from the bytes being parsed at line 283 (\u0060read_u32\u0060), then used to size a \u0060Vec::with_capacity\u0060 at line 284 \u2014 and nowhere in its scope is \u0060entry_count\u0060 compared to anything, clamped, or bounded against the input that remains. Whoever wrote those bytes therefore chooses the allocation directly: it reserves the whole length before a single byte of the payload is known to exist, so a 32-bit length asks for up to 4 GiB, and an allocation the allocator refuses aborts the process with \u0060memory allocation of \u2026 bytes failed\u0060 \u2014 an abort, not a panic, so no \u0060catch_unwind\u0060 intercepts it and the whole process dies; a 64-bit length past \u0060isize::MAX\u0060 panics with \u0060capacity overflow\u0060 instead, out of a parser whose failure path was written for malformed input, not for hostile input. Bound \u0060entry_count\u0060 against the bytes actually remaining and a maximum the format allows before allocating."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/tool/session_search_index.rs"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"b55805bbe4f981d07b243e7eccf21817b5b68ffb6d08dd9e145966843e102e85"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on parse failure: \u0060count_wildcards\u0060 returns \u00600\u0060 when \u0060(OSError, UnicodeDecodeError)\u0060 is raised, with no log or raise \u2014 a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/check_wildcard_reexport_budget.py"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"558b638e64a732c0b60ca753f5fdfa861b99004f81fe1fc2010df25e65c27bbe"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on parse failure: \u0060lease\u0060 returns \u0060{}\u0060 when \u0060(FileNotFoundError, json.JSONDecodeError)\u0060 is raised, with no log or raise \u2014 a malformed value silently becomes that default. Log the input or fail validation. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/cloud_acceptance_tui.py"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"94ad8dd305bd46167103e9766c218548ef85b9e2580f2a155aecf2000a8790f8"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060git_short_hash\u0060 swallows every exception into \u0060return \u0027rehearsal\u0027\u0060 \u2014 a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/update_rehearsal.py"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1661c1b0ba7619a7ad5cc1cc8403571ac66b93211c236d37a3542c51cb79c06"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060queue_json\u0060 turns every \u0060Err\u0060 into \u0060\u0022[]\u0022.to_string()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/ambient/runner.rs"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ac7c39913260bd4206d811dfa616dc604e1465b5ca9c2b6b053c3a9432a4d73"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060log_json\u0060 turns every \u0060Err\u0060 into \u0060\u0022[]\u0022.to_string()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/ambient/runner.rs"},"region":{"startLine":364}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cb65a6dd6b6accaad2ea3771c3ba9e9a8f40bc46ab3791407fe706f6e9661f4"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060gather_recent_sessions\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/ambient/prompt.rs"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"8020a9e732bb4865e84faa297917ec23af0fbe8beecef6af153cbe37c6692c78"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060load_seen_state\u0060 turns every \u0060Err\u0060 into \u0060PersistedCatchupState::default()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/catchup.rs"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef3c84d9f30f5030cebc128b041691f58c1c999c72ec40b6846b7af207e451fb"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060scan_pending_await_members_including_expired\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/await_members_state.rs"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c85542fa1aec37ceb0b2367f11b332cc34cf11182e427ee931e97b48c9670b7"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060reclaim_idle_caches\u0060 turns every \u0060Err\u0060 into \u00600\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/idle_hibernation.rs"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc688b29943b0535582776873e4da73b0b00860e60b02a3cb2836b572a4cb954"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060update_stalls\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/server/swarm_watchdog.rs"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"61e8c508d243da6cee1bc48250c83f6b6930957983af85453969513851f256cc"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060active_session_ids\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/session_active_pids.rs"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"460ff414d915f04f75d01c09ee222c7fe2e7ff67f70098e9759c133f9aee627e"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060rebuild_version_label\u0060 turns every \u0060Err\u0060 into \u0060\u0022local source build\u0022.to_string()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/session_rebuild.rs"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"79a4f6482acb4b161d5518a85a0b9b8bee7fcd46d002b7bd79c38075559f71d2"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060prune_active_session_files\u0060 turns every \u0060Err\u0060 into \u00600\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/telemetry_state.rs"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4a3fc24f0f609c57a74cde231d60a61c40705b6def902eefdfc8775022c5ed7"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060load\u0060 turns every \u0060Err\u0060 into \u0060Self::default()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/gateway/registry.rs"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"7942a47784e2d694143956c528d2c20a5301366416919f55ca5a055c82f5b774"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060load_uncached\u0060 turns every \u0060Err\u0060 into \u0060Self::default()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mcp/schema_cache.rs"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"111c7f9142c6d8961b0e4f02555d5b1a504da2541fd502ecccded7e21b8442da"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060installed_plugin_paths\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/skill.rs"},"region":{"startLine":407}}}],"partialFingerprints":{"codehealthFindingId/v1":"e22db11724679657f3a0365f9a7e3864b90b7ddb11a80df620933fd9a72281cd"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060load_all\u0060 turns every \u0060Err\u0060 into \u0060BTreeMap::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/refresh_state.rs"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ed8ea710a505d5ab8c8d560eb2e7ce45ed641d8db232fcd118fd9fa5307ee14"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060load_all\u0060 turns every \u0060Err\u0060 into \u0060BTreeMap::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/auth/validation.rs"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"2353c3b6886fadb05a91863f44d03046feeacc258aa09f862c8f0a7650dee854"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060clients_showing_session\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/client_focus.rs"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"4958b4d607abab3ff54a2b45814bcace608b97871e1b2f22fffa3129a28434c9"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060clients_showing_session_in\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/client_focus.rs"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0181a7973be040fe5e0b0b59a1b0946e2335f403d27e51001467291a765f7d9"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060canonical_resource\u0060 turns every \u0060Err\u0060 into \u0060String::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mcp/oauth.rs"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"0edf459860479d83c329af9d2eaaee97f014fea9661b57de40732a77a4b9573a"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060drain_upload_response\u0060 turns every \u0060Err\u0060 into \u0060\u0022read_error\u0022\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/mobile_sync.rs"},"region":{"startLine":683}}}],"partialFingerprints":{"codehealthFindingId/v1":"45bdafc6e04a86062e188a800e111a9477770adf3498269d16b93391fbee1be5"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060legacy_selections\u0060 turns every \u0060Err\u0060 into \u0060HashMap::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/model_usage.rs"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"11ae80335f461e03e982694561889ed3eba3502aa565a62685697622b5193351"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060busy_process_dirs\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/scratch_maintenance.rs"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"37e8fc606816ba61fdbeb29c9e35a6ce9a47ba5e02d27dc10fb2026595aaf9f5"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060find_crashed_legacy_scan\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/crash.rs"},"region":{"startLine":417}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc64b812a2dd688e29a69fca09074373833673d7e7cef36c10e808a32937ff20"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060sessions_owned_by\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/session/prewarm.rs"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"0dc067850cd9c0cf05426aaf7b34ec140dd712e8e0f1a9b29617fb119b44f48b"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060enqueue_openai_usage_tasks\u0060 turns every \u0060Err\u0060 into \u00600\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage.rs"},"region":{"startLine":713}}}],"partialFingerprints":{"codehealthFindingId/v1":"27d4f3d219e343ac00e56e04e4be4f6ddd1f13a0c1178efdc1c7e031e62a1399"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060get_openai_usage_for_email_sync\u0060 turns every \u0060Err\u0060 into \u0060OpenAIUsageData::default()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/accessors.rs"},"region":{"startLine":319}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c8dd3b1b9bc3e42b1e26ed67aedc40cf54dc27e1501b2696919f22be003bf7d"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060fetch_all_openai_usage_reports\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/provider_fetch.rs"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"510878cea9494f71891f8e50ab9b133b07e06269a93b1fa77bebcee65941dcde"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060clear_remote_account_usage\u0060 turns every \u0060Err\u0060 into \u00600\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-base/src/usage/remote_accounts.rs"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"c70f31ed1dba817a2e96fcd284e08429652c5cab022966e4528563e1db19f86d"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060running_versions\u0060 turns every \u0060Err\u0060 into \u0060HashSet::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-build-support/src/version_gc.rs"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"ada13a9aef32c68871cfdffd580622d0a652f157d9375e4b33224b85576c3193"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060runtime_user_discriminator\u0060 turns every \u0060Err\u0060 into \u0060\u0022user\u0022.to_string()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api/src/sockets.rs"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e4c17f6da63c659fbe660453bfc73f054c7e3fcc6d5a8a7dc7274d68ee8b27e"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060recent_session_index_entries\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/translate.rs"},"region":{"startLine":3202}}}],"partialFingerprints":{"codehealthFindingId/v1":"bddabe0511d4e0a53568eb00bb8db72679ef36e60236d8ea752a4c5f4613c12c"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060saved_session_ids\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/translate.rs"},"region":{"startLine":3263}}}],"partialFingerprints":{"codehealthFindingId/v1":"600183d7326a7946210bd0e0efa7f4c5cffd2490adc870769ff8de1e9f450242"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060stored_session_ids\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/translate.rs"},"region":{"startLine":3323}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd037be266cf8f136d7e56c60d2ab778755e4a4e7788ca768134179d57f55d57"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060load_archive_state\u0060 turns every \u0060Err\u0060 into \u0060ArchiveState::default()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/translate.rs"},"region":{"startLine":3397}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c7a1f6c0c4f8d7f418508f21f4b3be1565119dcc8e587713719e4db63aac7f5"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060stored_tail\u0060 turns every \u0060Err\u0060 into \u0060vec![]\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-harness-api-server/src/translate.rs"},"region":{"startLine":3456}}}],"partialFingerprints":{"codehealthFindingId/v1":"84cbed1fcff7143844e98d6b0040b76c265bb28ea11ca6e2da9fe3d77cdbfc1a"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060load_claude_external_messages\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-import-core/src/lib.rs"},"region":{"startLine":602}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bc59e5c548ea4832e8d93fc276ffa4099c96bbbd77a9e17a0ea01a92dc96478"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060collect_jcode_session_locations\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-import-core/src/repo_ranking.rs"},"region":{"startLine":382}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4550b3adc69fa263c01725c2664a6610d642e8b0d289150b05c90735e890f57"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060format_log_field_value\u0060 turns every \u0060Err\u0060 into \u0060\u0022\\\u0022\u003Cunserializable\u003E\\\u0022\u0022.to_string()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-logging/src/lib.rs"},"region":{"startLine":518}}}],"partialFingerprints":{"codehealthFindingId/v1":"27f609d10a6247825804ab81c1c422e98f3583c8edbe5fc5b67b6c93e5cf5ab7"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060read_rss_mb\u0060 turns every \u0060Err\u0060 into \u00600\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-logging/src/watchdog.rs"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf7687bf38c21871ddd7336d2cf12c845a8618e09e8551c28a665acc7ec7cc58"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060thread_states\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-logging/src/watchdog.rs"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"653813e2c7b8e13e3acc240a9071604a7ba9175146ec53d71d997d3de40b824a"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060load_official_claude_client_metadata\u0060 turns every \u0060Err\u0060 into \u0060OAuthClientMetadata::default()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic-runtime/src/lib.rs"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"b07e1faf812cd18d9434d43a615182a68d4d7f461d294cecd7abb04f1c4d9ce7"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060diagnostic_persistent_ws_summary\u0060 turns every \u0060Err\u0060 into \u0060\u0022persistent_ws=busy\u0022.to_string()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/lib.rs"},"region":{"startLine":1537}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fb9cc6c38c3b530c852313fa254f4bace28d39d8938c1dd9a84497d6e8f1a48"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060read\u0060 turns every \u0060Err\u0060 into \u0060Ok(0)\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-sdk/src/native_ssh.rs"},"region":{"startLine":350}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa0012e2376b9c2df760b175183ed16fbc673772979caee8643667ad03d72219"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060load\u0060 turns every \u0060Err\u0060 into \u0060Self::default()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/lib.rs"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa90644c04b2dc942778ea51ff60fad07fa2e4c8f1a053a90c99f374f84ded10"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060load_launch_hotkeys_config\u0060 turns every \u0060Err\u0060 into \u0060Default::default()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/lib.rs"},"region":{"startLine":325}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0fe83b8decad7fdf4ed032743c5f391de9522ecd322f1f02a835c820803d12d"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060parse_omniwm\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/keymap/external.rs"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"311fbc545137ec8f34269c2042690e6f122105ba38a6e5646de5232ec75d2403"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060parse_aerospace\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/keymap/external.rs"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"421ceaee8dfcda2454bd2eebc330a8b8c555ab725a00ebdfaee9983bdd776903"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060parse_symbolic_hotkeys_json\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/keymap/macos_hotkeys.rs"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f08381ab9952f0563ae17d80040648eb75ebc514dbf261a6f6a34355ec9964f"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060read_ghostty_keybinds\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-setup-hints/src/keymap/terminal.rs"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"e166a1e41f9ff7324210ff8c1af78ad7cb60d5573bd4ce62f552e8e1e92d2173"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060streaming_session_ids\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-storage/src/active_pids.rs"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"68ab08dcdfe5454f6b74ed3c388afe72467dc0a1fc39c30958e342da3e2917e0"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060active_session_ids\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-storage/src/active_pids.rs"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f0d27c1af600b3477e12ed8482ff934957fc80988b2f7d35b797cfe07167d9a"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060session_presence\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-storage/src/active_pids.rs"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bd9e877ac0007340f683758dcd3726689197ad94735b00f2206cfead35d3724"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060preview_json\u0060 turns every \u0060Err\u0060 into \u0060\u0022{}\u0022.to_string()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-telemetry-core/src/onboarding_trace.rs"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3818ebbb060c85e1af9dbdb842363e69452326062f6b3e930bed94df393ea99"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060run_mermaid_ui_bench\u0060 turns every \u0060Err\u0060 into \u0060\u0022{}\u0022.to_string()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_bench.rs"},"region":{"startLine":546}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb2a7bafd41ccbf08d6b20e3c30079824865bdc36526521b7fbf3996d1670213"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060run_scroll_suite\u0060 turns every \u0060Err\u0060 into \u0060\u0022{}\u0022.to_string()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_bench.rs"},"region":{"startLine":1130}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd6d06066456aedffa00c2af6ee46b08d38365077bb3005580d2ee11f0bca15f"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060handle_debug_command\u0060 turns every \u0060Err\u0060 into \u0060\u0022{}\u0022.to_string()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_cmds.rs"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b9b2b671ccecc7b87e4cc845d6ac437ba64b98a0bd9b491828d077ed90e4f40"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060debug_picker_state_json\u0060 turns every \u0060Err\u0060 into \u0060\u0022{}\u0022.to_string()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_picker_state.rs"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"134e65f3aca52786842b37a69918d8794509b400d3a392d86ef92cbaa8ca2a66"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060handle_assertions\u0060 turns every \u0060Err\u0060 into \u0060\u0022[]\u0022.to_string()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_script.rs"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"4098c2c3fd0faee11659fef42b397fe8f3d79b8772e8b860cc797139aae86359"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060handle_script_run\u0060 turns every \u0060Err\u0060 into \u0060\u0022{}\u0022.to_string()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_script.rs"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"1067ead766cf7e91d186f4192d871a9fab2adc3ce6d93b2c0a6086fe1932e08b"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060execute_script_step\u0060 turns every \u0060Err\u0060 into \u0060\u0022{}\u0022.to_string()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/debug_script.rs"},"region":{"startLine":471}}}],"partialFingerprints":{"codehealthFindingId/v1":"63c3ce30d94d791f7d1ced0790e6f3ea54238bf660347f7011139f970e8fd2c7"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060debug_model_picker_live_json\u0060 turns every \u0060Err\u0060 into \u0060\u0022{}\u0022.to_string()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":2390}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0bb154944e376841066c8f9547e30225ae9cce9abab199fed00a6385169c727"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060to_json\u0060 turns every \u0060Err\u0060 into \u0060\u0022[]\u0022.to_string()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/test_harness.rs"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"fde4a4d1efcf063af4238e3e938b6bc14d8827b5729d0a5150f1e2fadaeafc36"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060to_json\u0060 turns every \u0060Err\u0060 into \u0060\u0022{}\u0022.to_string()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/test_harness.rs"},"region":{"startLine":445}}}],"partialFingerprints":{"codehealthFindingId/v1":"346461f24fc6f752c64f532c011d2b9be7d9cb66e9c5fee6b735f55c7209a2c2"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060to_json\u0060 turns every \u0060Err\u0060 into \u0060\u0022[]\u0022.to_string()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/test_harness.rs"},"region":{"startLine":736}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fca2ae9e26d427a18b4692cbe97abf36c647cb433342f092411ff47df29df52"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060to_json\u0060 turns every \u0060Err\u0060 into \u0060\u0022{}\u0022.to_string()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/test_harness.rs"},"region":{"startLine":807}}}],"partialFingerprints":{"codehealthFindingId/v1":"47357b5872d4b15b41ba7c9316cb82bcdc9dd4233729c08d3b97f70347e18510"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060load_model_picker_usage_store\u0060 turns every \u0060Err\u0060 into \u0060ModelPickerUsageStore::default()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"602a580ee686f7966bb8a59357855dba84500458d928ecb932194caf69a1e8a2"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060load_model_picker_favorites_store\u0060 turns every \u0060Err\u0060 into \u0060ModelPickerFavoritesStore::default()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/inline_interactive.rs"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"834a99e37958dc935739bc6f035ba8895b60606dbac4ca77d35aff6ac42e06c6"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060load_from_path\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/prompt_history.rs"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"d05b0424736fda8b4a8f1a986a628e423328be5f62024cd23787670239334516"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060todo_card_payload_json_with_agents\u0060 turns every \u0060Err\u0060 into \u0060r#\u0022{\u0022todos\u0022:[],\u0022goals\u0022:[]}\u0022#.to_string()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/todos_view.rs"},"region":{"startLine":679}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc1c63cc7616beefc9157d33d1c7e61710455cff1c0034f70ba85f3539bd81a1"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060open_swarm_agent_window_with_launcher\u0060 turns every \u0060Err\u0060 into \u0060\u0022.\u0022.into()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/app/tui_state.rs"},"region":{"startLine":2616}}}],"partialFingerprints":{"codehealthFindingId/v1":"169fdd861a23dc64bfa239436de4f58b8a99a7ecd9a9c4ca89bcaf3fd98b6823"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060elapsed\u0060 turns every \u0060Err\u0060 into \u0060\u0022unknown\u0022.into()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/info_widget_cloud.rs"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"4903402f6d24ca1519a2507d426776c208d5abbc02b0a9e2d83a037ec3e30b5e"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060load_recently_closed_sessions\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading.rs"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dcc5933ee90dae30033a5dde1604701bc14f43fea47a8624ac07eed6f9dc809"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060load_external_claude_code_sessions\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading.rs"},"region":{"startLine":2119}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b302a750fb6cb6a265426fccebae1307d68b4e7b83a1ab32c1951e4b9362b50"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060load_external_codex_sessions\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading.rs"},"region":{"startLine":2270}}}],"partialFingerprints":{"codehealthFindingId/v1":"38ed1c9ea3a6f6b9db6c2d494325a6167f86d678e7dce867e47c9925624f5052"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060load_external_opencode_sessions\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading.rs"},"region":{"startLine":2475}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f01a6ec3785b4f0795e71cac77f301ab4f1ce30bc5c7e28675edbe940879675"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060load_external_cursor_sessions\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading.rs"},"region":{"startLine":2757}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d2dd75d900d021465581ff3a0254b265d1732dd6170ec7f696c1f62c8c6987c"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060load_external_pi_sessions\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading/pi_sessions.rs"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae2609ce8e7513a5132cc3a064669b13aad6f68d95dadfeb44565c0ff7ebfd45"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060report_json\u0060 turns every \u0060Err\u0060 into \u0060\u0022{}\u0022.to_string()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_smoothness.rs"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe4d3a87c2a5ba6ee6fb86351c2a82df01884699ef38aeb40530731a82e99f91"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060command_diagnostics\u0060 turns every \u0060Err\u0060 into \u0060\u0022no diagnostic output\u0022.to_string()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-markdown/src/markdown_latex_image.rs"},"region":{"startLine":835}}}],"partialFingerprints":{"codehealthFindingId/v1":"5427a92a2843d7f21641984c2a859afa699931359f12766427e2e466f9fa0e80"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060debug_image_state\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/debug.rs"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"f614da49be4137d76a69e492ab5d58721aa34f9febf6ec0f5c189a53baa68b8b"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060parse_scored_response\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/memory_recall_bench.rs"},"region":{"startLine":843}}}],"partialFingerprints":{"codehealthFindingId/v1":"bce85dcb2ba75041f3e62bf17a6e8982264cb8b22d664b9f19096174047a6b5c"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060generic_credential_paths_for_provider\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/auth_test/probes.rs"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f3f42eb55932fc13697dfb8755a4ef9e0bdab9b6b5be0d9e585b65d178afee2"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060configured_mcp_servers\u0060 turns every \u0060Err\u0060 into \u0060Vec::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/cloud_move.rs"},"region":{"startLine":2618}}}],"partialFingerprints":{"codehealthFindingId/v1":"7657a8c3190f4f90a9d5e1a4b1b5eb769bf06864bd25d1bd1774167341408e71"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060report_to_json\u0060 turns every \u0060Err\u0060 into \u0060\u0022{}\u0022.to_string()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/cli/provider_doctor.rs"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"96bd99cd7f5cd61689804a526094c56c68167a4e1ba5c2c26e8491e504146cf6"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060lower.contains(\u0022operation timed out\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060lower.contains(\u0022operation timed out\u0022)\u0060 also satisfies \u0060lower.contains(\u0022timed out\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/repro/tls-bad-record-mac/src/main.rs"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"88dfcf9958fabb3d3c9cce3aa8b523ba29341c33cd60603fe25e5b22c8f8187b"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060lower.contains(\u0022fatal alert: badrecordmac\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060lower.contains(\u0022fatal alert: badrecordmac\u0022)\u0060 also satisfies \u0060lower.contains(\u0022badrecordmac\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/repro/tls-bad-record-mac/src/main.rs"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"b77301d4c7c65d62638fd40c628aabb7e76d8f962261cd749ba1a41d0a96ccc2"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060lower.contains(\u0022fatal alert: bad_record_mac\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060lower.contains(\u0022fatal alert: bad_record_mac\u0022)\u0060 also satisfies \u0060lower.contains(\u0022bad_record_mac\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/repro/tls-bad-record-mac/src/main.rs"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"47a371e0fd15a35e1ffbf84a75af7d08cdb8729bfbe19632ac8c3ff45e12ec1e"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060lower.contains(\u0022received fatal alert: badrecordmac\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060lower.contains(\u0022received fatal alert: badrecordmac\u0022)\u0060 also satisfies \u0060lower.contains(\u0022badrecordmac\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/repro/tls-bad-record-mac/src/main.rs"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0f04b090e64e5aca3fe82f8b82663804625fec3d287dfb62db6b13748bd74b5"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060lower.contains(\u0022received fatal alert: bad_record_mac\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060lower.contains(\u0022received fatal alert: bad_record_mac\u0022)\u0060 also satisfies \u0060lower.contains(\u0022bad_record_mac\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/repro/tls-bad-record-mac/src/main.rs"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"80ea800f415c3adbada495193b00073a4c2cf3de0ab58ad6b487bbb60078a3a6"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060error_str.contains(\u0022500 internal server error\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060error_str.contains(\u0022500 internal server error\u0022)\u0060 also satisfies \u0060error_str.contains(\u0022internal server error\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/repro/tls-bad-record-mac/src/main.rs"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7818a343a1c3e5bb3472d652e81b1b0910450a53f574238fcb58aee50ba44fe"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060error_str.contains(\u0022504 gateway timeout\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060error_str.contains(\u0022504 gateway timeout\u0022)\u0060 also satisfies \u0060error_str.contains(\u0022timeout\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"scripts/repro/tls-bad-record-mac/src/main.rs"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9a035384ae8a96a29fbc4bdcc67b87b17bb3c4a156aac783369a08254e812fc"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060trimmed.contains(\u0022-.-\u003E\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060trimmed.contains(\u0022-.-\u003E\u0022)\u0060 also satisfies \u0060trimmed.contains(\u0022-.-\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui-mermaid/src/mermaid_svg.rs"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"c86f20d15f4abab59b982d12ae0df692c12eb957e2344ec116fc3a0b1e602411"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060intent.contains(\u0022await\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060intent.contains(\u0022await\u0022)\u0060 also satisfies \u0060intent.contains(\u0022wait\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/ui_tools.rs"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce7c2e0486003fbe07e434058294e76f682d0fa27bf2479146e257a4c46645b2"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060model.contains(\u0022openai-codex\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060model.contains(\u0022openai-codex\u0022)\u0060 also satisfies \u0060model.contains(\u0022codex\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-tui/src/tui/session_picker/loading.rs"},"region":{"startLine":711}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c200cf0e030e2036abce721fb88132679a23d4593e4b49bf92a1073aaf3a6dd"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060path.ends_with(\u0022/v1/models\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060path.ends_with(\u0022/v1/models\u0022)\u0060 also satisfies \u0060path.ends_with(\u0022/models\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter-runtime/src/catalog_fetch.rs"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"f13f7b7e0dae04ca37cb580c79e153b7024aca51b7c9021f02f2d17ba299ea8e"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060lower.contains(\u0022kimi-k2.5\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060lower.contains(\u0022kimi-k2.5\u0022)\u0060 also satisfies \u0060lower.contains(\u0022kimi-k2\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openrouter/src/lib.rs"},"region":{"startLine":725}}}],"partialFingerprints":{"codehealthFindingId/v1":"eae6f66570b653619f9cb2349463a25d69bc882d035d22b439f34c27a82c4b1d"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060error_str.contains(\u0022500 internal server error\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060error_str.contains(\u0022500 internal server error\u0022)\u0060 also satisfies \u0060error_str.contains(\u0022internal server error\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-openai-runtime/src/openai_stream_runtime.rs"},"region":{"startLine":2000}}}],"partialFingerprints":{"codehealthFindingId/v1":"1af8b7f76b70e59c015145e34eaab631623de9d48b18e08d12486aa3aece54be"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060outcome.text.contains(\u0022REASON_TEST_ANSWER= 4\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060outcome.text.contains(\u0022REASON_TEST_ANSWER= 4\u0022)\u0060 also satisfies \u0060outcome.text.contains(\u0022REASON_TEST_ANSWER\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-doctor/src/live_provider_probes.rs"},"region":{"startLine":1490}}}],"partialFingerprints":{"codehealthFindingId/v1":"4df56126b0bbbcf5ebf5308b4aeb89ae3882a5cbff257121e950a907a5b4a344"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060lower.contains(\u0022operation timed out\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060lower.contains(\u0022operation timed out\u0022)\u0060 also satisfies \u0060lower.contains(\u0022timed out\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/transport.rs"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4d7793be624251373b708e7973e245d7f7af058a4d6a6a0409878555cba80f9"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060lower.contains(\u0022fatal alert: badrecordmac\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060lower.contains(\u0022fatal alert: badrecordmac\u0022)\u0060 also satisfies \u0060lower.contains(\u0022badrecordmac\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/transport.rs"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"d274240257f72921563d8959662766524ce0dd8447c99ebd4d04c0f55ac153d4"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060lower.contains(\u0022fatal alert: bad_record_mac\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060lower.contains(\u0022fatal alert: bad_record_mac\u0022)\u0060 also satisfies \u0060lower.contains(\u0022bad_record_mac\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/transport.rs"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"8aeb939fab1815318c3c2d3307a2959ea3d3fd37288d90169227c22e6e824073"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060lower.contains(\u0022received fatal alert: badrecordmac\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060lower.contains(\u0022received fatal alert: badrecordmac\u0022)\u0060 also satisfies \u0060lower.contains(\u0022badrecordmac\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/transport.rs"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c3ccfdeb1de7f8347e6bc7d3f7f418d302b59698cb485a4b6f0dc59a96e6211"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060lower.contains(\u0022received fatal alert: bad_record_mac\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060lower.contains(\u0022received fatal alert: bad_record_mac\u0022)\u0060 also satisfies \u0060lower.contains(\u0022bad_record_mac\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-core/src/transport.rs"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cc2bdf111b93ba26d5d4549c9495d690aeef42582f383df9a2b6aae8164143c"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060error_str.contains(\u0022500 internal server error\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060error_str.contains(\u0022500 internal server error\u0022)\u0060 also satisfies \u0060error_str.contains(\u0022internal server error\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-provider-anthropic-runtime/src/error_classification.rs"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed04d40c7b468ae2c0135439f46c6fa11845a0a7644c41c1417a9f19993caa57"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060name.starts_with(\u0022jcode-desktop-\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060name.starts_with(\u0022jcode-desktop-\u0022)\u0060 also satisfies \u0060name.starts_with(\u0022jcode-\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-logging/src/lib.rs"},"region":{"startLine":619}}}],"partialFingerprints":{"codehealthFindingId/v1":"d924737aa07fe408f87a1bcf3049b9aed7787df9ece8aa83b3aa2225e30fde05"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060key.contains(\u0022oauth_code\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060key.contains(\u0022oauth_code\u0022)\u0060 also satisfies \u0060key.contains(\u0022auth_code\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-logging/src/lib.rs"},"region":{"startLine":656}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0ba7f87e0030e84c5a078300809e4cc38611c0193ee88f28b09b8c7bf13a7d5"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060lower.contains(\u0022request exceeds the maximum size\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060lower.contains(\u0022request exceeds the maximum size\u0022)\u0060 also satisfies \u0060lower.contains(\u0022exceeds the maximum size\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-compaction-core/src/lib.rs"},"region":{"startLine":729}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e079f63754f75733a4529dd42eb1485e199e16c5200433115c0824b1ac2e8d7"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060lower.contains(\u0022pnpm test\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060lower.contains(\u0022pnpm test\u0022)\u0060 also satisfies \u0060lower.contains(\u0022npm test\u0022)\u0060, so the \u0060||\u0060 chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/jcode-app-core/src/catchup.rs"},"region":{"startLine":446}}}],"partialFingerprints":{"codehealthFindingId/v1":"699f756af19f7f096222c89a31bd9c716b03928c4bf8dc3056f4e3d371743837"}}],"taxonomies":[{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d","organization":"MITRE","informationUri":"https://cwe.mitre.org/","isComprehensive":false,"shortDescription":{"text":"The MITRE Common Weakness Enumeration (CWE)."},"taxa":[{"id":"CWE-1032","guid":"5f21e517-68aa-a650-9a25-5771ef024637","name":"OWASP Top Ten \u2014 Security Misconfiguration category","shortDescription":{"text":"OWASP Top Ten \u2014 Security Misconfiguration category"},"helpUri":"https://cwe.mitre.org/data/definitions/1032.html"},{"id":"CWE-116","guid":"c0134ca8-adc7-6959-bd17-5253a265d101","name":"Improper Encoding or Escaping of Output","shortDescription":{"text":"Improper Encoding or Escaping of Output"},"helpUri":"https://cwe.mitre.org/data/definitions/116.html"},{"id":"CWE-1357","guid":"e4d2e772-757e-0a5c-bd7d-77052949d866","name":"Reliance on Insufficiently Trustworthy Component","shortDescription":{"text":"Reliance on Insufficiently Trustworthy Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1357.html"},{"id":"CWE-1395","guid":"800e09e7-c11a-8654-9fa6-86f398995fed","name":"Dependency on Vulnerable Third-Party Component","shortDescription":{"text":"Dependency on Vulnerable Third-Party Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1395.html"},{"id":"CWE-16","guid":"659db3ea-affc-8453-8add-c1218fbfcb92","name":"Configuration","shortDescription":{"text":"Configuration"},"helpUri":"https://cwe.mitre.org/data/definitions/16.html"},{"id":"CWE-259","guid":"ae9ad959-fbb6-9d5e-892d-3dca66da0b69","name":"Use of Hard-coded Password","shortDescription":{"text":"Use of Hard-coded Password"},"helpUri":"https://cwe.mitre.org/data/definitions/259.html"},{"id":"CWE-353","guid":"09d7e902-d4ee-f05d-ae6c-0a1554d0c18f","name":"Missing Support for Integrity Check","shortDescription":{"text":"Missing Support for Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/353.html"},{"id":"CWE-494","guid":"b8a65e0d-e459-4a55-a931-fc1136482375","name":"Download of Code Without Integrity Check","shortDescription":{"text":"Download of Code Without Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/494.html"},{"id":"CWE-506","guid":"401d6455-56e3-0552-9a39-f77461673e3f","name":"Embedded Malicious Code","shortDescription":{"text":"Embedded Malicious Code"},"helpUri":"https://cwe.mitre.org/data/definitions/506.html"},{"id":"CWE-522","guid":"71fb233e-ce6a-ae57-9419-ef8373540b09","name":"Insufficiently Protected Credentials","shortDescription":{"text":"Insufficiently Protected Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/522.html"},{"id":"CWE-732","guid":"1da27e8f-b330-7650-ab63-bd61953eae5d","name":"Incorrect Permission Assignment for Critical Resource","shortDescription":{"text":"Incorrect Permission Assignment for Critical Resource"},"helpUri":"https://cwe.mitre.org/data/definitions/732.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)","shortDescription":{"text":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-829","guid":"13c33925-97fb-5a5e-b40c-56d328b8a4d7","name":"Inclusion of Functionality from Untrusted Control Sphere","shortDescription":{"text":"Inclusion of Functionality from Untrusted Control Sphere"},"helpUri":"https://cwe.mitre.org/data/definitions/829.html"},{"id":"CWE-88","guid":"32dec161-013d-ac58-8599-1309e12e67f5","name":"Improper Neutralization of Argument Delimiters in a Command (\u0027Argument Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Argument Delimiters in a Command (\u0027Argument Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/88.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-937","guid":"16f316ae-415c-b354-a59b-1f7905f756e9","name":"Using Components with Known Vulnerabilities","shortDescription":{"text":"Using Components with Known Vulnerabilities"},"helpUri":"https://cwe.mitre.org/data/definitions/937.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Improper Control of Generation of Code (\u0027Code Injection\u0027)","shortDescription":{"text":"Improper Control of Generation of Code (\u0027Code Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]},{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61","version":"2025","organization":"OWASP Foundation","informationUri":"https://top10.owasp.org/2025/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10:2025 web application security risks."},"taxa":[{"id":"A02:2025","guid":"668dee9e-41bc-6354-97d0-fdf8f40c50c1","name":"Security Misconfiguration","shortDescription":{"text":"Security Misconfiguration"},"helpUri":"https://top10.owasp.org/2025/A02_2025-Security_Misconfiguration/"},{"id":"A03:2025","guid":"168e227c-7735-2e57-bc6e-997affe644c5","name":"Software Supply Chain Failures","shortDescription":{"text":"Software Supply Chain Failures"},"helpUri":"https://top10.owasp.org/2025/A03_2025-Software_Supply_Chain_Failures/"},{"id":"A05:2025","guid":"87e86033-3231-8458-8e4a-5cb82743553a","name":"Injection","shortDescription":{"text":"Injection"},"helpUri":"https://top10.owasp.org/2025/A05_2025-Injection/"},{"id":"A06:2025","guid":"491554d7-b8e4-9652-91a9-53700dc92ece","name":"Insecure Design","shortDescription":{"text":"Insecure Design"},"helpUri":"https://top10.owasp.org/2025/A06_2025-Insecure_Design/"},{"id":"A07:2025","guid":"334ddd78-539d-d35c-83dd-253647eb7eaf","name":"Authentication Failures","shortDescription":{"text":"Authentication Failures"},"helpUri":"https://top10.owasp.org/2025/A07_2025-Authentication_Failures/"},{"id":"A08:2025","guid":"84b0c297-710e-9a5f-9335-936ecb260c36","name":"Software or Data Integrity Failures","shortDescription":{"text":"Software or Data Integrity Failures"},"helpUri":"https://top10.owasp.org/2025/A08_2025-Software_or_Data_Integrity_Failures/"}]},{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35","organization":"OWASP Foundation","informationUri":"https://owasp.org/www-project-top-10-ci-cd-security-risks/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10 CI/CD Security Risks."},"taxa":[{"id":"CICD-SEC-3","guid":"458c83a6-ebf7-cf55-8cc3-b4d949bbf271","name":"Dependency Chain Abuse","shortDescription":{"text":"Dependency Chain Abuse"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-03-Dependency-Chain-Abuse"},{"id":"CICD-SEC-4","guid":"c859d8ea-8b24-a157-9406-94929c10397a","name":"Poisoned Pipeline Execution (PPE)","shortDescription":{"text":"Poisoned Pipeline Execution (PPE)"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-04-Poisoned-Pipeline-Execution"},{"id":"CICD-SEC-5","guid":"cc7f4610-8859-e654-9029-d5f97d992220","name":"Insufficient PBAC (Pipeline-Based Access Controls)","shortDescription":{"text":"Insufficient PBAC (Pipeline-Based Access Controls)"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-05-Insufficient-PBAC"},{"id":"CICD-SEC-6","guid":"f2ee2486-b260-2952-a41f-6b67fa713940","name":"Insufficient Credential Hygiene","shortDescription":{"text":"Insufficient Credential Hygiene"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-06-Insufficient-Credential-Hygiene"},{"id":"CICD-SEC-8","guid":"b6b2dacf-a168-4957-876e-a8c73ee00eb0","name":"Ungoverned Usage of 3rd Party Services","shortDescription":{"text":"Ungoverned Usage of 3rd Party Services"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-08-Ungoverned-Usage-of-3rd-Party-Services"},{"id":"CICD-SEC-9","guid":"b3d36727-0395-5b51-94c4-5e173d62eab3","name":"Improper Artifact Integrity Validation","shortDescription":{"text":"Improper Artifact Integrity Validation"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-09-Improper-Artifact-Integrity-Validation"}]}],"properties":{"codehealthPublication":{"public":true,"notice":"This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings \u2014 which rule fired, in which file, on which line, and how to fix it \u2014 are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.","securityFindingsRedacted":154,"secretScannerRunsExcluded":0}},"redactionTokens":["A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."]}]}