{"$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":"D7","name":"Architectural Integrity","shortDescription":{"text":"Architectural Integrity"},"helpUri":"https://codehealth.canine.dev/dimensions/D7"},{"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":"D16","name":"Bus Factor","shortDescription":{"text":"Bus Factor"},"helpUri":"https://codehealth.canine.dev/dimensions/D16"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"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":"D37","name":"Vulnerability-disclosure Policy","shortDescription":{"text":"Vulnerability-disclosure Policy"},"helpUri":"https://codehealth.canine.dev/dimensions/D37","relationships":[{"target":{"id":"CWE-1059","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-1059"],"owasp":"A02:2025"}},{"id":"D40","name":"Network Egress Confinement","shortDescription":{"text":"Network Egress Confinement"},"helpUri":"https://codehealth.canine.dev/dimensions/D40"},{"id":"D41","name":"Kernel \u0026 Syscall Confinement","shortDescription":{"text":"Kernel \u0026 Syscall Confinement"},"helpUri":"https://codehealth.canine.dev/dimensions/D41"},{"id":"D42","name":"Runtime Threat Enforcement","shortDescription":{"text":"Runtime Threat Enforcement"},"helpUri":"https://codehealth.canine.dev/dimensions/D42"},{"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":"D44","name":"Platform End-of-Life","shortDescription":{"text":"Platform End-of-Life"},"helpUri":"https://codehealth.canine.dev/dimensions/D44"},{"id":"AC1","name":"Text alternatives","shortDescription":{"text":"Text alternatives"},"helpUri":"https://codehealth.canine.dev/dimensions/AC1"},{"id":"AC2","name":"Forms \u0026 labels","shortDescription":{"text":"Forms \u0026 labels"},"helpUri":"https://codehealth.canine.dev/dimensions/AC2"},{"id":"AC3","name":"Page structure","shortDescription":{"text":"Page structure"},"helpUri":"https://codehealth.canine.dev/dimensions/AC3"},{"id":"AC4","name":"Keyboard semantics","shortDescription":{"text":"Keyboard semantics"},"helpUri":"https://codehealth.canine.dev/dimensions/AC4"},{"id":"AC5","name":"ARIA correctness","shortDescription":{"text":"ARIA correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/AC5"},{"id":"AC6","name":"Visual \u0026 motion safety","shortDescription":{"text":"Visual \u0026 motion safety"},"helpUri":"https://codehealth.canine.dev/dimensions/AC6"},{"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":"AXB2","name":"Runtime readiness","shortDescription":{"text":"Runtime readiness"},"helpUri":"https://codehealth.canine.dev/dimensions/AXB2"},{"id":"C1","name":"Data Protection","shortDescription":{"text":"Data Protection"},"helpUri":"https://codehealth.canine.dev/dimensions/C1"},{"id":"C2","name":"Access Controls","shortDescription":{"text":"Access Controls"},"helpUri":"https://codehealth.canine.dev/dimensions/C2"},{"id":"C3","name":"Audit Trail","shortDescription":{"text":"Audit Trail"},"helpUri":"https://codehealth.canine.dev/dimensions/C3"},{"id":"C4","name":"Data Retention","shortDescription":{"text":"Data Retention"},"helpUri":"https://codehealth.canine.dev/dimensions/C4"},{"id":"DM1","name":"Aggregate boundaries","shortDescription":{"text":"Aggregate boundaries"},"helpUri":"https://codehealth.canine.dev/dimensions/DM1"},{"id":"DM2","name":"Strongly-typed ids","shortDescription":{"text":"Strongly-typed ids"},"helpUri":"https://codehealth.canine.dev/dimensions/DM2"},{"id":"DM4","name":"Rich vs anemic domain model","shortDescription":{"text":"Rich vs anemic domain model"},"helpUri":"https://codehealth.canine.dev/dimensions/DM4"},{"id":"DM5","name":"Encapsulated state","shortDescription":{"text":"Encapsulated state"},"helpUri":"https://codehealth.canine.dev/dimensions/DM5"},{"id":"ED5","name":"Idempotency","shortDescription":{"text":"Idempotency"},"helpUri":"https://codehealth.canine.dev/dimensions/ED5"},{"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":"P7","name":"Outbound HTTP resilience","shortDescription":{"text":"Outbound HTTP resilience"},"helpUri":"https://codehealth.canine.dev/dimensions/P7"},{"id":"PF1","name":"Benchmark discipline","shortDescription":{"text":"Benchmark discipline"},"helpUri":"https://codehealth.canine.dev/dimensions/PF1"},{"id":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"S1","name":"Web-Security Posture","shortDescription":{"text":"Web-Security Posture"},"helpUri":"https://codehealth.canine.dev/dimensions/S1"},{"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":"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":"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":"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":"zeroclaw::async_main_inner (cyclomatic 378): zeroclaw::async_main_inner has cyclomatic complexity 378 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own 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/main.rs"},"region":{"startLine":9633}}}],"partialFingerprints":{"codehealthFindingId/v1":"415dc5a573817daa9db4e26f69c51a68da38d29f4bf92b667a7baefdfae6bbc4"}},{"ruleId":"D1","level":"warning","message":{"text":"Config::validate (cyclomatic 277): Config::validate has cyclomatic complexity 277 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-config/src/schema.rs"},"region":{"startLine":24639}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe405b240787bcba5666e502c7318a920d5f1ecfd203918fbd509aaf389037f3"}},{"ruleId":"D1","level":"warning","message":{"text":"zerocode::app::run (cyclomatic 275): zerocode::app::run has cyclomatic complexity 275 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/app.rs"},"region":{"startLine":1673}}}],"partialFingerprints":{"codehealthFindingId/v1":"e59c389dee47700dd6e009376e85831ff10cece5eee569a61277a82d797d0558"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_channels::orchestrator::process_channel_message_body (cyclomatic 181): zeroclaw_channels::orchestrator::process_channel_message_body has cyclomatic complexity 181 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":9281}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d9d1474ddd1ecbdbc5ce204e83bc2b7b156ee51077e979d9893fdf0a0d11cce"}},{"ruleId":"D1","level":"warning","message":{"text":"DiscordChannel::listen (cyclomatic 174): DiscordChannel::listen has cyclomatic complexity 174 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":1999}}}],"partialFingerprints":{"codehealthFindingId/v1":"9665f616d7ffb8e95bba1e0674c9a7b73176b8421cf63f9f0cddf799b231ddd7"}},{"ruleId":"D1","level":"warning","message":{"text":"Chat::handle_key (cyclomatic 160): Chat::handle_key has cyclomatic complexity 160 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/chat.rs"},"region":{"startLine":4024}}}],"partialFingerprints":{"codehealthFindingId/v1":"175b20e7d6313b13935bd93a2562f39ee721148dbbd66c6b3a674812ca8cbc09"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::agent::turn::run_tool_call_loop_impl (cyclomatic 158): zeroclaw_runtime::agent::turn::run_tool_call_loop_impl has cyclomatic complexity 158 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/agent/turn/mod.rs"},"region":{"startLine":1657}}}],"partialFingerprints":{"codehealthFindingId/v1":"2543f2c13d6a6f9820281c35de0ee3c5158d63e8420e12da1aed4e0ed2b40c70"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_channels::orchestrator::collect_configured_channels_with_authority (cyclomatic 152): zeroclaw_channels::orchestrator::collect_configured_channels_with_authority has cyclomatic complexity 152 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":14744}}}],"partialFingerprints":{"codehealthFindingId/v1":"4eaf9b335bdc0e289f33acd983ae24e0542abd0ba8b94ef13f0d3a9250cb7049"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw::run_quickstart_cli (cyclomatic 129): zeroclaw::run_quickstart_cli has cyclomatic complexity 129 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own 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/main.rs"},"region":{"startLine":1847}}}],"partialFingerprints":{"codehealthFindingId/v1":"9991e64bf97a009c53a1069ee99310aa5ed27d2f2122a516698020ff83374b9c"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::agent::loop_::run_inner (cyclomatic 119): zeroclaw_runtime::agent::loop_::run_inner has cyclomatic complexity 119 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":1620}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d268728fc19ab7a2c1349b8de9bf8062c5a43085c7e3dac16eb6967e7fcfd6a"}},{"ruleId":"D1","level":"warning","message":{"text":"RpcDispatcher::dispatch_method (cyclomatic 115): RpcDispatcher::dispatch_method has cyclomatic complexity 115 (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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":3391}}}],"partialFingerprints":{"codehealthFindingId/v1":"8eacdc86b6c4b38e20458ef33859136c4b4268b4c9c22fe9bc100235f673b070"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::tools::all_tools_with_runtime_on_thread (cyclomatic 111): zeroclaw_runtime::tools::all_tools_with_runtime_on_thread has cyclomatic complexity 111 (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/zeroclaw-runtime/src/tools/mod.rs"},"region":{"startLine":2306}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae9270f3340df88722eaa638f11e7828c343ef7d77f06fa85f36155f4e4f63c0"}},{"ruleId":"D1","level":"warning","message":{"text":"QuickstartPane::handle_modal_key (cyclomatic 101): QuickstartPane::handle_modal_key has cyclomatic complexity 101 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/quickstart_pane.rs"},"region":{"startLine":1610}}}],"partialFingerprints":{"codehealthFindingId/v1":"8faf4f32e4a11f62c4a043e7ab45ee4e404cffd44ddd51b62553930dfbdaf934"}},{"ruleId":"D1","level":"warning","message":{"text":"Chat::handle_mouse (cyclomatic 100): Chat::handle_mouse has cyclomatic complexity 100 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/chat.rs"},"region":{"startLine":5387}}}],"partialFingerprints":{"codehealthFindingId/v1":"5534f7fa133ec4a9283143bfc0930d1bdea65a3ae611987160ad312a8baf3670"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_tool_call_parser::parse_tool_calls (cyclomatic 98): zeroclaw_tool_call_parser::parse_tool_calls has cyclomatic complexity 98 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tool-call-parser/src/lib.rs"},"region":{"startLine":2090}}}],"partialFingerprints":{"codehealthFindingId/v1":"869d6266ff9d54d24766e96d7c6858524e1138f62654158f5638fc793ba3138c"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_config::policy::scan_unquoted_segments (cyclomatic 96): zeroclaw_config::policy::scan_unquoted_segments has cyclomatic complexity 96 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-config/src/policy.rs"},"region":{"startLine":1614}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ca8460db1a25a7e9a88686abc49f918394a8d9fc2baa9c1a63047b66fd2d324"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::agent::turn::stream_consume::consume_provider_streaming_response_with_policy (cyclomatic 95): zeroclaw_runtime::agent::turn::stream_consume::consume_provider_streaming_response_with_policy 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/zeroclaw-runtime/src/agent/turn/stream_consume.rs"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc9f086c82d83f8572c01e1e30ff5120863c63c97f5c2149b35072d3577b0d37"}},{"ruleId":"D1","level":"warning","message":{"text":"RpcDispatcher::run_session_prompt (cyclomatic 90): RpcDispatcher::run_session_prompt 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":6590}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ad4ca6b5cc0307eb48f10e2cd9181de748e3689289edf88b34fcbc8a4c6aae5"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_gateway::run_gateway_with_plugin_webhooks (cyclomatic 88): zeroclaw_gateway::run_gateway_with_plugin_webhooks has cyclomatic complexity 88 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":1386}}}],"partialFingerprints":{"codehealthFindingId/v1":"3abe8df29ab2812a4aa15cc2a7d4278279c6ed32da54abefb36122ef6716ff30"}},{"ruleId":"D1","level":"warning","message":{"text":"RpcDispatcher::session_new_with_mode (cyclomatic 88): RpcDispatcher::session_new_with_mode has cyclomatic complexity 88 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":4484}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f16208b32bea9e59d97ec53d4f2bc4c21264d016ae9100df1059f9f78722adf"}},{"ruleId":"D1","level":"warning","message":{"text":"ModelRoutingConfigTool::handle_upsert_agent (cyclomatic 87): ModelRoutingConfigTool::handle_upsert_agent 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/zeroclaw-tools/src/model_routing_config.rs"},"region":{"startLine":1157}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f16e9c5f9000b41a4b519a5fa94de2865271a2dd8aab85abd1a04e1c86bd95c"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_gateway::ws::handle_socket (cyclomatic 84): zeroclaw_gateway::ws::handle_socket has cyclomatic complexity 84 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-gateway/src/ws.rs"},"region":{"startLine":592}}}],"partialFingerprints":{"codehealthFindingId/v1":"51251f5cf0794881e85df9867bc5d936fede97380b7e48e41c4adb3d92134264"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_gateway::ws::process_chat_message (cyclomatic 78): zeroclaw_gateway::ws::process_chat_message 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/zeroclaw-gateway/src/ws.rs"},"region":{"startLine":2038}}}],"partialFingerprints":{"codehealthFindingId/v1":"da64cdd229dd111b9a3f6ef8da8e63935e08fa59cde2d0f0c2aac79f8f603788"}},{"ruleId":"D1","level":"warning","message":{"text":"ScopedToolRegistry::assemble_prepared (cyclomatic 72): ScopedToolRegistry::assemble_prepared 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/zeroclaw-runtime/src/tools/scoped.rs"},"region":{"startLine":699}}}],"partialFingerprints":{"codehealthFindingId/v1":"f004e3f68eb34570077aa80a305d6a37df1a0b9d7937a73e7422560a2e6d9e2a"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::identity::aieos_to_system_prompt (cyclomatic 70): zeroclaw_runtime::identity::aieos_to_system_prompt 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/zeroclaw-runtime/src/identity.rs"},"region":{"startLine":719}}}],"partialFingerprints":{"codehealthFindingId/v1":"b20da24b3936d124748787e76ea2a658c0f2df742f6026bb82f220a1f0300e33"}},{"ruleId":"D1","level":"warning","message":{"text":"zerocode::chat::markdown_to_lines (cyclomatic 67): zerocode::chat::markdown_to_lines has cyclomatic complexity 67 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/chat.rs"},"region":{"startLine":9014}}}],"partialFingerprints":{"codehealthFindingId/v1":"48bc861e25917d8b419de3e69da5c1f9c80ee81adac4272d6433736ee22e5157"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_channels::orchestrator::start_channels_with_authority_and_plugin_webhooks (cyclomatic 64): zeroclaw_channels::orchestrator::start_channels_with_authority_and_plugin_webhooks 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":"crates/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":17020}}}],"partialFingerprints":{"codehealthFindingId/v1":"44774a3603fe7aaf671e279934faeaf8e46a51cb68325eb15cbfbabc71b717fd"}},{"ruleId":"D1","level":"warning","message":{"text":"zerocode::chat::render_tool_entry (cyclomatic 61): zerocode::chat::render_tool_entry has cyclomatic complexity 61 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/chat.rs"},"region":{"startLine":7173}}}],"partialFingerprints":{"codehealthFindingId/v1":"a49bf42f2aa6c234a942a4154dd11948fdaab7c2eabf6bd007e1494f72988db1"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_macros::derive_configurable (cyclomatic 58): zeroclaw_macros::derive_configurable has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-macros/src/lib.rs"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0ef28055ae4c62c38165a984bba8e6383c6a21973eb09e568ded187e9813a8b"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::sop::dispatch::dispatch_sop_event_filtered (cyclomatic 58): zeroclaw_runtime::sop::dispatch::dispatch_sop_event_filtered has cyclomatic complexity 58 (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/zeroclaw-runtime/src/sop/dispatch.rs"},"region":{"startLine":688}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6865f8b5f0fb987e51da934ae574ac34cda62bd12f824f066b1ffec498ab4f1"}},{"ruleId":"D1","level":"warning","message":{"text":"zerocode::quickstart_pane::draw_modal (cyclomatic 56): zerocode::quickstart_pane::draw_modal 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":"apps/zerocode/src/quickstart_pane.rs"},"region":{"startLine":2913}}}],"partialFingerprints":{"codehealthFindingId/v1":"486b700dbf6a8c239a8e56fdf4302328bcd52d912d4f11bef984cb2ea4c7d6bc"}},{"ruleId":"D1","level":"warning","message":{"text":"LarkChannel::listen_ws (cyclomatic 56): LarkChannel::listen_ws 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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":1420}}}],"partialFingerprints":{"codehealthFindingId/v1":"22352fa02812492d27e9b5afb556ee519383b09df606e88d4175cd574b052654"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_config::schema::v2::normalize_provider_type (cyclomatic 56): zeroclaw_config::schema::v2::normalize_provider_type has cyclomatic complexity 56 (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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":619}}}],"partialFingerprints":{"codehealthFindingId/v1":"04fa3ec1a008f30426e9873cf98d956199cd8961bd4e286d203ca7992d66c355"}},{"ruleId":"D1","level":"warning","message":{"text":"InputBarState::handle_key (cyclomatic 55): InputBarState::handle_key has cyclomatic complexity 55 (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":"apps/zerocode/src/input_bar.rs"},"region":{"startLine":1555}}}],"partialFingerprints":{"codehealthFindingId/v1":"a28109af8974018fa5705466f7421d7fb77471f81a9d8da08105c90ea13e94db"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_channels::orchestrator::build_channel_by_id (cyclomatic 54): zeroclaw_channels::orchestrator::build_channel_by_id has cyclomatic complexity 54 (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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":13185}}}],"partialFingerprints":{"codehealthFindingId/v1":"d37e7f86c00498240856d80546b8acae9758e1487ee2b2477592c8e7e10ef7c6"}},{"ruleId":"D1","level":"warning","message":{"text":"WeChatChannel::listen (cyclomatic 53): WeChatChannel::listen has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/wechat.rs"},"region":{"startLine":2808}}}],"partialFingerprints":{"codehealthFindingId/v1":"8942e4c9a096b49049168b5433f617f35e6aee818012dd4c2acaf640071ae801"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_mouse_inner (cyclomatic 52): App::handle_mouse_inner has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":1385}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab884289db49b63d05accc8cdcd8d8b936a63b58b994ec778c8764d6beabae7c"}},{"ruleId":"D1","level":"warning","message":{"text":"Agent::turn_streamed_with_steering_body (cyclomatic 52): Agent::turn_streamed_with_steering_body has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":4912}}}],"partialFingerprints":{"codehealthFindingId/v1":"d575dd434b4b4c6bc8e9001f06c0cd04bde5d30f510976d032107abcc4ef10c7"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw::skills::handle_command (cyclomatic 50): zeroclaw::skills::handle_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":"src/skills/mod.rs"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d65877d7382d79d45274b8910be020ce27e044f3ff477365432a9480f83c892"}},{"ruleId":"D1","level":"warning","message":{"text":"QQChannel::listen (cyclomatic 49): QQChannel::listen has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/qq.rs"},"region":{"startLine":1401}}}],"partialFingerprints":{"codehealthFindingId/v1":"726a814e29157543a792b912e3ac9eabf91f447660b4a8453945f803060d6652"}},{"ruleId":"D1","level":"warning","message":{"text":"AnthropicModelProvider::parse_anthropic_sse_from_reader (cyclomatic 49): AnthropicModelProvider::parse_anthropic_sse_from_reader has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":2485}}}],"partialFingerprints":{"codehealthFindingId/v1":"61dde3901abfca204564bdafca2b6ba011e3104f34d9818bd7248d74ccc13ddc"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_channels::line::handle_webhook (cyclomatic 48): zeroclaw_channels::line::handle_webhook 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/zeroclaw-channels/src/line.rs"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"6af153b4d3208cf9718ab4d7331256b2eca7d7db7a103cb4e02eab4f6f3522c1"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::daemon::run_with_authority (cyclomatic 47): zeroclaw_runtime::daemon::run_with_authority 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/zeroclaw-runtime/src/daemon/mod.rs"},"region":{"startLine":715}}}],"partialFingerprints":{"codehealthFindingId/v1":"a24b4f3cca8ff14ec59574505821abb59f1244e89817447b6bdb93d243dae291"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::agent::turn::drive_live_sop_actions (cyclomatic 46): zeroclaw_runtime::agent::turn::drive_live_sop_actions 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/zeroclaw-runtime/src/agent/turn/mod.rs"},"region":{"startLine":4330}}}],"partialFingerprints":{"codehealthFindingId/v1":"674beec8cbc40d91e706f8c0e1a6e23bea87f8d0cb58c02d9314b56232588f63"}},{"ruleId":"D1","level":"warning","message":{"text":"SlackChannel::listen_socket_mode (cyclomatic 45): SlackChannel::listen_socket_mode 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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":4229}}}],"partialFingerprints":{"codehealthFindingId/v1":"4323e0596d3f526e9405cc60dbb06fd39ffe0059ddd1689cc4fd89b83c25ebb0"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::doctor::check_config_semantics (cyclomatic 45): zeroclaw_runtime::doctor::check_config_semantics 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/zeroclaw-runtime/src/doctor/mod.rs"},"region":{"startLine":1163}}}],"partialFingerprints":{"codehealthFindingId/v1":"fece837de05c80f524f9596cc9b216d9b767ce43f65e4ec9d83776c55efb7c7e"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::sop::parse_steps (cyclomatic 45): zeroclaw_runtime::sop::parse_steps 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/zeroclaw-runtime/src/sop/mod.rs"},"region":{"startLine":1309}}}],"partialFingerprints":{"codehealthFindingId/v1":"6df1bf40936025ed8ca950a4320e00bbe75b502d086157233a530c508aaca2bc"}},{"ruleId":"D1","level":"warning","message":{"text":"SqliteSessionBackend::migrate_from_jsonl_with_handlers (cyclomatic 44): SqliteSessionBackend::migrate_from_jsonl_with_handlers 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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"908d893895174f5ec21242b2c41c7ea6957f3be055a54e3beb680295d6d0e7f7"}},{"ruleId":"D1","level":"warning","message":{"text":"SqliteMemory::recall_scoped (cyclomatic 43): SqliteMemory::recall_scoped 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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":1050}}}],"partialFingerprints":{"codehealthFindingId/v1":"84a335f0cb76032a0627e5ec425d29c064e603e1a1426d6a813c2cd3dbf05722"}},{"ruleId":"D1","level":"warning","message":{"text":"IrcChannel::listen (cyclomatic 42): IrcChannel::listen 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/zeroclaw-channels/src/irc.rs"},"region":{"startLine":419}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad840c9212c763d469022f2c3b6945bbf8f5f751e56c81d60a66e437da9fd9ba"}},{"ruleId":"D1","level":"warning","message":{"text":"SecurityPolicy::forbidden_path_argument_impl (cyclomatic 42): SecurityPolicy::forbidden_path_argument_impl 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/zeroclaw-config/src/policy.rs"},"region":{"startLine":4719}}}],"partialFingerprints":{"codehealthFindingId/v1":"c77b7d73ba0826bd54e7df8c83276ab68b31f5c204cf09664d3401cd9cc3a620"}},{"ruleId":"D1","level":"warning","message":{"text":"OtelObserver::record_event (cyclomatic 42): OtelObserver::record_event 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/zeroclaw-runtime/src/observability/otel.rs"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"51959218b13aa6a83ebff5df687cb06bc756fae15543e0b3a03c9c081b3527a7"}},{"ruleId":"D1","level":"warning","message":{"text":"SlackChannel::listen (cyclomatic 41): SlackChannel::listen 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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":5808}}}],"partialFingerprints":{"codehealthFindingId/v1":"804f7a1e4469f938cea4edfa2015ddafa1f68931f4814308465b54bf38b9bb77"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_channels::orchestrator::run_message_dispatch_loop_until_cancelled (cyclomatic 41): zeroclaw_channels::orchestrator::run_message_dispatch_loop_until_cancelled 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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":12325}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad038512b306488b7e4ccd6e1006c94bdf4ff19ce1c171cf407c13e16fb9b46f"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::agent::turn::max_iter::finish_after_max_iterations (cyclomatic 41): zeroclaw_runtime::agent::turn::max_iter::finish_after_max_iterations 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/zeroclaw-runtime/src/agent/turn/max_iter.rs"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0903789f700a547baa69f2e44e649131d830a7d1f7e5946788cbca0dc5993c7"}},{"ruleId":"D1","level":"warning","message":{"text":"ChatState::apply_update (cyclomatic 40): ChatState::apply_update 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":"apps/zerocode/src/chat.rs"},"region":{"startLine":11831}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ef7296acef2b89800e822d9c99e0962a2de2d9f241c6b3f2c3051f09d34941d"}},{"ruleId":"D1","level":"warning","message":{"text":"Chat::relay_turn (cyclomatic 40): Chat::relay_turn 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/zeroclaw-gateway/src/chat_core.rs"},"region":{"startLine":564}}}],"partialFingerprints":{"codehealthFindingId/v1":"d17a28b9ea558a51f79bbbaa3fc04e1dd8c3b2605a53ef6efdab60a3e315a9b0"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_config::policy::split_shell_words_with_metadata (cyclomatic 39): zeroclaw_config::policy::split_shell_words_with_metadata has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-config/src/policy.rs"},"region":{"startLine":2193}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dc1b0d69908511bebc7c4cf67b78b4ec93f31941af1d94906f21547da9469bf"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_gateway::api_sections::select_section (cyclomatic 39): zeroclaw_gateway::api_sections::select_section has cyclomatic complexity 39 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-gateway/src/api_sections.rs"},"region":{"startLine":900}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa2e9a9674cb9d21349c940c12485dd1b9c18c6bb833a68532f470bc86310612"}},{"ruleId":"D1","level":"warning","message":{"text":"DelegateTool::execute_agentic_with_approval_registry (cyclomatic 39): DelegateTool::execute_agentic_with_approval_registry has cyclomatic complexity 39 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":5225}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc0b1322cb5b25cb269298edbd1039008ec8f38c7d839e65ca537437bea6ab7b"}},{"ruleId":"D1","level":"warning","message":{"text":"zerocode::run (cyclomatic 38): zerocode::run 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":"apps/zerocode/src/main.rs"},"region":{"startLine":891}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c24d39401dfc91aa32f03330f1c924b1c3e0bd91365fc66f2d40491ac60a0d2"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::agent::turn::provider_call::call_provider (cyclomatic 38): zeroclaw_runtime::agent::turn::provider_call::call_provider 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/zeroclaw-runtime/src/agent/turn/provider_call.rs"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"60bacb29175e82c88b7cfac5d4f5a9dbd3165e5d59a34c5db34adf03ff3cb60f"}},{"ruleId":"D1","level":"warning","message":{"text":"GoogleWorkspaceTool::execute (cyclomatic 38): GoogleWorkspaceTool::execute 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/zeroclaw-tools/src/google_workspace.rs"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"f54e83c355067666b62c3ef006de4d7028cb2f453d668e2582caf577f45e8021"}},{"ruleId":"D1","level":"warning","message":{"text":"WhatsAppWebChannel::listen (cyclomatic 37): WhatsAppWebChannel::listen 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/zeroclaw-channels/src/whatsapp_web.rs"},"region":{"startLine":3927}}}],"partialFingerprints":{"codehealthFindingId/v1":"51aafc1de96136c774f2743f87b7bde6963fc64a251fb6ad5b8402796150f85b"}},{"ruleId":"D1","level":"warning","message":{"text":"zerorelay::handle_daemon (cyclomatic 36): zerorelay::handle_daemon has cyclomatic complexity 36 (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":"apps/zerorelay/src/lib.rs"},"region":{"startLine":1175}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec4a653fd9d96fc2096b9f904e3c1699f80b1b3f8b54e73315beee645b72f498"}},{"ruleId":"D1","level":"warning","message":{"text":"zerorelay::handle_client (cyclomatic 36): zerorelay::handle_client 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":"apps/zerorelay/src/lib.rs"},"region":{"startLine":1607}}}],"partialFingerprints":{"codehealthFindingId/v1":"a751f7199afce5c918103d53c18b7fb22a02bdf7a2e6abd777d24dd3048ecbef"}},{"ruleId":"D1","level":"warning","message":{"text":"TelegramChannel::markdown_to_telegram_html (cyclomatic 36): TelegramChannel::markdown_to_telegram_html 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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":6189}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b8219cb2f07793229817468f7cf0ce7f5e30efda53bbb0122f6845ab0509244"}},{"ruleId":"D1","level":"warning","message":{"text":"WhatsAppWebChannel::handle_one_inbound_message (cyclomatic 36): WhatsAppWebChannel::handle_one_inbound_message 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/zeroclaw-channels/src/whatsapp_web.rs"},"region":{"startLine":864}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d178a8a1445b46f5fce17680aa1be072f39962588cb30ee9ace673cac9ebe87"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_channels::orchestrator::handle_runtime_command_for_delivery (cyclomatic 36): zeroclaw_channels::orchestrator::handle_runtime_command_for_delivery 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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":5262}}}],"partialFingerprints":{"codehealthFindingId/v1":"148811bf0c0bc4d50cce82b9b8c1e58813e8fcc698797c346eb5bc7e88b429da"}},{"ruleId":"D1","level":"warning","message":{"text":"V2Config::migrate (cyclomatic 36): V2Config::migrate has cyclomatic complexity 36 (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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"00e0c99438a7a3864f735da54bd4488c1d6cc08da7319b5ef14e272c59d292a8"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::daemon::run_heartbeat_worker (cyclomatic 36): zeroclaw_runtime::daemon::run_heartbeat_worker 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/zeroclaw-runtime/src/daemon/mod.rs"},"region":{"startLine":2473}}}],"partialFingerprints":{"codehealthFindingId/v1":"73990bcb10fe6f16988aaaffcfd010a1094f3f18687c35d0e001d5500a9c8d2b"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw::cron::handle_command (cyclomatic 36): zeroclaw::cron::handle_command 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":"src/cron/mod.rs"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"40dfa56797734d63873a34505df425e102d3bd73460d2dfe98c9a680cf3b09a5"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_gateway::api_config::handle_patch (cyclomatic 35): zeroclaw_gateway::api_config::handle_patch 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/zeroclaw-gateway/src/api_config.rs"},"region":{"startLine":2575}}}],"partialFingerprints":{"codehealthFindingId/v1":"072a7468e826eb2c9099e525a7a514a53e57c1b557e31465c1e5d295f2b338dd"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_providers::compatible::sse_bytes_to_events_for_contract (cyclomatic 35): zeroclaw_providers::compatible::sse_bytes_to_events_for_contract 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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":2833}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c62bb66766fbffff3d3d2247bc029bd5c2260fc928a422e5844a20522195ff5"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_channels::util::strip_tool_call_tags (cyclomatic 34): zeroclaw_channels::util::strip_tool_call_tags has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 11 of the 34 points are its own statements and the rest belongs to 5 function items inside it that branch (matching_close_tag, extract_first_json_end, looks_like_prose, \u2026). 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/zeroclaw-channels/src/util.rs"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"5030457989e56d2fd41c17a79502715f047678c3dffba8ef265bf47cb9fa8543"}},{"ruleId":"D1","level":"warning","message":{"text":"AnthropicModelProvider::stream_chat_with_tool_round_policy (cyclomatic 34): AnthropicModelProvider::stream_chat_with_tool_round_policy 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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":3255}}}],"partialFingerprints":{"codehealthFindingId/v1":"96114388cbd18ec55e58023dc63425cf47f419d79d298970b41a085747ed7f2a"}},{"ruleId":"D1","level":"warning","message":{"text":"HailoOllamaModelProvider::normalize_messages (cyclomatic 34): HailoOllamaModelProvider::normalize_messages 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/zeroclaw-providers/src/hailo_ollama.rs"},"region":{"startLine":692}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ffd14a21b09e63e3a4e6bc28d8ed882afbf34bf4f1f45edb95ed01c6d6fda7b"}},{"ruleId":"D1","level":"warning","message":{"text":"OidcAuthProvider::claims_to_identity (cyclomatic 34): OidcAuthProvider::claims_to_identity 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/zeroclaw-runtime/src/security/auth_provider/oidc.rs"},"region":{"startLine":809}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9a4999f11b0ec6aa66fec342ff9e7cc6d5f25d187a3577856f4056b07b1d322"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::agent::loop_::process_message_inner (cyclomatic 34): zeroclaw_runtime::agent::loop_::process_message_inner has cyclomatic complexity 34 (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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":3753}}}],"partialFingerprints":{"codehealthFindingId/v1":"16521bad28cf22bb65ef7e2eb55b98955f4d744739378522ab6b3e7dffc12bab"}},{"ruleId":"D1","level":"warning","message":{"text":"ReliableModelProvider::chat_with_tool_round_policy (cyclomatic 33): ReliableModelProvider::chat_with_tool_round_policy 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/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":3594}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c8ce9daec6cbf62d4437b815f5df488b92704040cb7cdc591096132e8e7c52d"}},{"ruleId":"D1","level":"warning","message":{"text":"FileExplorerState::handle_key (cyclomatic 32): FileExplorerState::handle_key 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":"apps/zerocode/src/file_explorer.rs"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"052eaffcaec372f99d1aace8c66936d363989c18729be1070cf285e6745c886f"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_config::policy::read_heredoc_delimiter (cyclomatic 32): zeroclaw_config::policy::read_heredoc_delimiter 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/zeroclaw-config/src/policy.rs"},"region":{"startLine":1359}}}],"partialFingerprints":{"codehealthFindingId/v1":"b05278da6fa6d8ca481e4dbc8599c5aa3366dd66d364cc1d25ce4f9ba9abc00f"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_config::policy::contains_unmodeled_shell_word_expansion (cyclomatic 32): zeroclaw_config::policy::contains_unmodeled_shell_word_expansion 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/zeroclaw-config/src/policy.rs"},"region":{"startLine":3216}}}],"partialFingerprints":{"codehealthFindingId/v1":"01e6b6fdfe772eac76673fe3255ba9464eef54859aa1a585bcf5408450967fc6"}},{"ruleId":"D1","level":"warning","message":{"text":"FileUploadBundleTool::execute (cyclomatic 32): FileUploadBundleTool::execute 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. This is NOT this file\u0027s highest cyclomatic complexity: FileUploadBundleTool::mime_for_filename (cyclomatic 81) 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/zeroclaw-tools/src/file_upload_bundle.rs"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fd15e5f74ef4dd25b09948cb7bbdd60f0d6bf5e3e9e8c7628480a4cdd0f29e0"}},{"ruleId":"D1","level":"warning","message":{"text":"JiraTool::execute (cyclomatic 32): JiraTool::execute 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/zeroclaw-tools/src/jira_tool.rs"},"region":{"startLine":1038}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bcc9a91ef9510123f392b027e7884dc48ee7dcd60508fcb036cbe4fd2ac4ed2"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_field_list (cyclomatic 31): App::handle_field_list 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":3491}}}],"partialFingerprints":{"codehealthFindingId/v1":"35731aa550829c7b39a24ff1096d921294246cb56ef5607a09b69d324f9ed85f"}},{"ruleId":"D1","level":"warning","message":{"text":"SopPane::handle_key (cyclomatic 31): SopPane::handle_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":"apps/zerocode/src/sop_pane.rs"},"region":{"startLine":898}}}],"partialFingerprints":{"codehealthFindingId/v1":"3083152c1927fd476a9e8e34c3ddc44ab2c8524d892291c9ae47042468621145"}},{"ruleId":"D1","level":"warning","message":{"text":"zerocode::client::dial_through_relay_unbounded (cyclomatic 31): zerocode::client::dial_through_relay_unbounded 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":"apps/zerocode/src/client.rs"},"region":{"startLine":1442}}}],"partialFingerprints":{"codehealthFindingId/v1":"dff188b1336b10812ace1e9667a346f43cdd3dd4ade9f8617f8fc1751bd190e7"}},{"ruleId":"D1","level":"warning","message":{"text":"AcpServer::handle_session_prompt (cyclomatic 31): AcpServer::handle_session_prompt 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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":1881}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfd6112dec06c10c3e78a399b2dccdb4b7ab9910043841d4bbaab6b60bc73e59"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_channels::matrix::inbound::handle_message (cyclomatic 31): zeroclaw_channels::matrix::inbound::handle_message 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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":2279}}}],"partialFingerprints":{"codehealthFindingId/v1":"0dac17c1c828486424fed20ca3e72d0de177e1f40645cf5a7745006619664ae9"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::quickstart::apply_channels (cyclomatic 31): zeroclaw_runtime::quickstart::apply_channels 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/zeroclaw-runtime/src/quickstart/mod.rs"},"region":{"startLine":1645}}}],"partialFingerprints":{"codehealthFindingId/v1":"394040a1965ffe96c13e0a63cbe6146ce6c1d6886f1cc98017710e4d29e85a9f"}},{"ruleId":"D1","level":"warning","message":{"text":"NativeBrowserState::execute_action (cyclomatic 31): NativeBrowserState::execute_action 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/zeroclaw-tools/src/browser.rs"},"region":{"startLine":1623}}}],"partialFingerprints":{"codehealthFindingId/v1":"61b7393d2866b914d39c5a3bcbdfe741f245fb77e49d098270983300c2b3a23c"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_key_inner (cyclomatic 30): App::handle_key_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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":1233}}}],"partialFingerprints":{"codehealthFindingId/v1":"204a24e4dc0343a0909594bbaa4f605c2a5c0b4d76d79437672ed09471d0f3e9"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_channels::orchestrator::deliver_announcement (cyclomatic 30): zeroclaw_channels::orchestrator::deliver_announcement has cyclomatic complexity 30 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":17898}}}],"partialFingerprints":{"codehealthFindingId/v1":"91ee66e261ae5c1ab4e44251e7a3f952653e6a0276887b4fd3496f8f26d377e6"}},{"ruleId":"D1","level":"warning","message":{"text":"V1Config::migrate (cyclomatic 30): V1Config::migrate 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":"crates/zeroclaw-config/src/schema/v1.rs"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"b07dd5da81cb91b5d7e2f45a1725e1299154d169389532e1c1eaa388de833a6e"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_config::schema::v2::fold_providers_globals_into_models (cyclomatic 30): zeroclaw_config::schema::v2::fold_providers_globals_into_models 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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":1285}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0b8169c140637c41a556531c4c90a28bf7c9e372f395db993e6c0ffa76d1b5d"}},{"ruleId":"D1","level":"warning","message":{"text":"EventCollector::put (cyclomatic 30): EventCollector::put 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/zeroclaw-log/src/layer.rs"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"acefc360ab8f819052de54862f03e39d6d2786ef0c2dbf1b00480234364b5998"}},{"ruleId":"D1","level":"warning","message":{"text":"ReliableModelProvider::chat_with_tools (cyclomatic 30): ReliableModelProvider::chat_with_tools 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/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":3251}}}],"partialFingerprints":{"codehealthFindingId/v1":"9427e63decf28f33247343753f4213d987e69c84158a164eb0b70f468d3fa7ae"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_providers::openai_codex::process_responses_stream_event (cyclomatic 30): zeroclaw_providers::openai_codex::process_responses_stream_event 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/zeroclaw-providers/src/openai_codex.rs"},"region":{"startLine":720}}}],"partialFingerprints":{"codehealthFindingId/v1":"d003f3655f7ea2d88e55eb5e12475e94a6ad4c058ec756375bb441a1c5494d45"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::agent::system_prompt::build_system_prompt_with_mode_and_effective_tools (cyclomatic 30): zeroclaw_runtime::agent::system_prompt::build_system_prompt_with_mode_and_effective_tools 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":"crates/zeroclaw-runtime/src/agent/system_prompt.rs"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"32cf247bf1be3fe428f52b679d50eb2decdfbeb23a75e97d42dfbc45972720b7"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_tool_call_parser::parse_glm_shortened_body (cyclomatic 30): zeroclaw_tool_call_parser::parse_glm_shortened_body 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/zeroclaw-tool-call-parser/src/lib.rs"},"region":{"startLine":1727}}}],"partialFingerprints":{"codehealthFindingId/v1":"acaab6606dedb9acd661c7c0c93a4a868ec4f807303c2fa5175279914f62c358"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw::sop::handle_command (cyclomatic 30): zeroclaw::sop::handle_command 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":"src/sop/mod.rs"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"b72e3309d0fff136a7b441d0a730ef6dd4cbff16c396d9cc8a1a6870411088ff"}},{"ruleId":"D1","level":"warning","message":{"text":"InputBarState::handle_mouse (cyclomatic 29): InputBarState::handle_mouse 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":"apps/zerocode/src/input_bar.rs"},"region":{"startLine":1826}}}],"partialFingerprints":{"codehealthFindingId/v1":"96daf23d9ef7519431a1bc89b9c5452fbda909cddebd2ab9e12454e8ff7d7b52"}},{"ruleId":"D1","level":"warning","message":{"text":"RpcDispatcher::rehydrate_reaped_session_under_guard (cyclomatic 29): RpcDispatcher::rehydrate_reaped_session_under_guard 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. This is NOT this file\u0027s highest cyclomatic complexity: Method::authz (cyclomatic 44) 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":5989}}}],"partialFingerprints":{"codehealthFindingId/v1":"76b0c8b2bb4128a730dcb72ef6c88216b7ab38a2ac620f128a183fa3379237eb"}},{"ruleId":"D1","level":"warning","message":{"text":"RpcDispatcher::handle_session_messages_record (cyclomatic 29): RpcDispatcher::handle_session_messages_record 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. This is NOT this file\u0027s highest cyclomatic complexity: Method::authz (cyclomatic 44) 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":8941}}}],"partialFingerprints":{"codehealthFindingId/v1":"d813e7fa5e8f43af3ea2f9e7cda592fce6b96fc45c446abe0734fe3c0874620b"}},{"ruleId":"D1","level":"warning","message":{"text":"SopEngine::decide_checkpoint_with_principal (cyclomatic 29): SopEngine::decide_checkpoint_with_principal 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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":4505}}}],"partialFingerprints":{"codehealthFindingId/v1":"69cd9b9d1875801d4e0b99530ab97c2c92b5666b4906dca2b3d6f9db44cb20a3"}},{"ruleId":"D1","level":"warning","message":{"text":"Chat::execute_context_menu_request (cyclomatic 28): Chat::execute_context_menu_request 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":"apps/zerocode/src/chat.rs"},"region":{"startLine":3448}}}],"partialFingerprints":{"codehealthFindingId/v1":"35a4966550e5fb39e7185604ffa4ede0bbb5dd48d58a4a90bf7fbb1ace2ab5a2"}},{"ruleId":"D1","level":"warning","message":{"text":"SignalChannel::listen (cyclomatic 28): SignalChannel::listen 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/zeroclaw-channels/src/signal.rs"},"region":{"startLine":1248}}}],"partialFingerprints":{"codehealthFindingId/v1":"5004978848e55dd96a687233941a0f8da94a6d2ce6694919f3a177954e593483"}},{"ruleId":"D1","level":"warning","message":{"text":"VoiceWakeChannel::listen (cyclomatic 28): VoiceWakeChannel::listen 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/zeroclaw-channels/src/voice_wake.rs"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"144d26111222d52f4f01b8f8ee6adf2f25cfc51682b0ab459de1f421946e5c1b"}},{"ruleId":"D1","level":"warning","message":{"text":"WhatsAppWebChannel::send (cyclomatic 28): WhatsAppWebChannel::send 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/zeroclaw-channels/src/whatsapp_web.rs"},"region":{"startLine":3666}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef66c2268d555be8276f1091c3f4150534c931feec720807693b1bbcc587b42c"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_channels::orchestrator::dispatch_channel_sop_gate (cyclomatic 28): zeroclaw_channels::orchestrator::dispatch_channel_sop_gate 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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":11925}}}],"partialFingerprints":{"codehealthFindingId/v1":"27c9295f5c52f20a55459582d4d5329fff5e1bedc05c3b6ce248d4bd5d116144"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_config::schema::v2::source_identity_matches_inner (cyclomatic 28): zeroclaw_config::schema::v2::source_identity_matches_inner 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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":992}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dc819a3e9cf838e15a3bf1e7d5248acb40b0ac6cd59945bee88066123bc06f2"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_config::schema::v2::synthesize_agent_brains (cyclomatic 28): zeroclaw_config::schema::v2::synthesize_agent_brains 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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":1982}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc6ab544acfcc3b753c698139efcdbbd7088dbb2e7277f6588b6c595a8fc0405"}},{"ruleId":"D1","level":"warning","message":{"text":"Chat::serve (cyclomatic 28): Chat::serve 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/zeroclaw-gateway/src/chat_core.rs"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"12900bd04fb0559b1e4ff762292c0612024d8b3301033f605a151b3c76fce2ca"}},{"ruleId":"D1","level":"warning","message":{"text":"LogCaptureLayer::on_event (cyclomatic 28): LogCaptureLayer::on_event 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/zeroclaw-log/src/layer.rs"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2bdf09628bf47bd1c18493f5a419a349bdbd308eaaabca03cadf4f71634e3ed"}},{"ruleId":"D1","level":"warning","message":{"text":"SseTransport::send_and_recv (cyclomatic 28): SseTransport::send_and_recv 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/zeroclaw-tools/src/mcp_transport.rs"},"region":{"startLine":1940}}}],"partialFingerprints":{"codehealthFindingId/v1":"8401f3c0be623f9da4e4bd8e97002fd20f5f008e17a75f1a8310c6d07d8985af"}},{"ruleId":"D1","level":"warning","message":{"text":"Chat::after_session_start (cyclomatic 27): Chat::after_session_start 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":"apps/zerocode/src/chat.rs"},"region":{"startLine":2448}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f94694f8cf871b7502978c2c3b8033fc5165919c5566f28d1cd9f6790ef40a4"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_alias_list (cyclomatic 27): App::handle_alias_list 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":2833}}}],"partialFingerprints":{"codehealthFindingId/v1":"577a15632a3f8c52489f711b7014f357526d8333ddfd14a2a1c9af47ec1660b8"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_channels::whatsapp_web::parse_link_destination (cyclomatic 27): zeroclaw_channels::whatsapp_web::parse_link_destination 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/zeroclaw-channels/src/whatsapp_web.rs"},"region":{"startLine":3532}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7bc1faabdefea6fec38f2a25e76c9c4df8825e5ddd39bd2e18c74b094100031"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_config::agent_bundle::plan_export (cyclomatic 27): zeroclaw_config::agent_bundle::plan_export 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/zeroclaw-config/src/agent_bundle.rs"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"6609a9bc09e2511ac37bec06307154f2952478b1534a94a4c25b55679c57327d"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_config::typed_value::coerce_for_set_prop (cyclomatic 27): zeroclaw_config::typed_value::coerce_for_set_prop 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-config/src/typed_value.rs"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"622de191b215f85e049e8a23fcc6a0e0146c66ffdf4002b1102ac1fd26865be4"}},{"ruleId":"D1","level":"warning","message":{"text":"CronAddTool::execute (cyclomatic 27): CronAddTool::execute 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/tools/cron_add.rs"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa941443c1c5bc5df08c441781a9ad27a1c31aa44d26546e9a16d059b9bcf9c5"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::agent::turn::call_prep::prepare_tool_calls (cyclomatic 27): zeroclaw_runtime::agent::turn::call_prep::prepare_tool_calls 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/zeroclaw-runtime/src/agent/turn/call_prep.rs"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1a300ab3c25750ea395c2380c04f4cd512be89dcbd2b4195a5f82192abafed3"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::quickstart::apply_model_provider (cyclomatic 27): zeroclaw_runtime::quickstart::apply_model_provider 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/zeroclaw-runtime/src/quickstart/mod.rs"},"region":{"startLine":1233}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdddb6dd667b005df7406be361850888346445ceee9fe06719896b0ceb009ab1"}},{"ruleId":"D1","level":"warning","message":{"text":"ConversationDock::layout (cyclomatic 26): ConversationDock::layout 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":"apps/zerocode/src/app.rs"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"5be16f0b5a4a36f52918bff2b2dbef3f1ad260d5905cb0cdf0c0001e9d72cc1c"}},{"ruleId":"D1","level":"warning","message":{"text":"SopPane::render_canvas (cyclomatic 26): SopPane::render_canvas 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":"apps/zerocode/src/sop_pane.rs"},"region":{"startLine":1796}}}],"partialFingerprints":{"codehealthFindingId/v1":"33f16a000008bc76583eb538cadc4fd24567d88fe48255f4e1b57a7c6e020b57"}},{"ruleId":"D1","level":"warning","message":{"text":"zerocode::chat::render_table (cyclomatic 26): zerocode::chat::render_table has cyclomatic complexity 26 (threshold 15). Of this number, 24 points are the body\u0027s own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/chat.rs"},"region":{"startLine":9587}}}],"partialFingerprints":{"codehealthFindingId/v1":"897f4afb2d26329f73ad64f2d257620beb8986538ccf388dcfd2aaecdbe20cab"}},{"ruleId":"D1","level":"warning","message":{"text":"MatrixChannel::finalize_draft (cyclomatic 26): MatrixChannel::finalize_draft 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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":5084}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bbadf6cf0c3b7b446b85cae3c549d2cebe1d3e669a239ce97d2c49c45c7f57a"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_channels::orchestrator::strip_tool_call_tags (cyclomatic 26): zeroclaw_channels::orchestrator::strip_tool_call_tags has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 10 of the 26 points are its own statements and the rest belongs to 4 function items inside it that branch (extract_first_json_end, looks_like_prose, strip_leading_close_tags, \u2026). 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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":1936}}}],"partialFingerprints":{"codehealthFindingId/v1":"3361b26fe59f8dcc49ab14dfa3934a43e92d03b69f2643ee2bdfa68e85c97d39"}},{"ruleId":"D1","level":"warning","message":{"text":"BrowserTool::execute_agent_browser_action (cyclomatic 26): BrowserTool::execute_agent_browser_action 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/zeroclaw-tools/src/browser.rs"},"region":{"startLine":609}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6993c2fa228ebb32d3fe8e0a0b1b15044a20fd91fbcbba530ae493c0c76e8e1"}},{"ruleId":"D1","level":"warning","message":{"text":"FileDownloadTool::execute (cyclomatic 26): FileDownloadTool::execute 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/zeroclaw-tools/src/file_download.rs"},"region":{"startLine":451}}}],"partialFingerprints":{"codehealthFindingId/v1":"15a2d291176e865178a554b19c1db3ad479bbfc842a5db7665829826f274cd34"}},{"ruleId":"D1","level":"warning","message":{"text":"FileWriteTool::execute (cyclomatic 26): FileWriteTool::execute 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/zeroclaw-tools/src/file_write.rs"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"38159d84b72b741545489f2eae1b31a99ebcfe04f8b806c2d8f7d868befee295"}},{"ruleId":"D1","level":"warning","message":{"text":"LinkedInTool::execute (cyclomatic 26): LinkedInTool::execute 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/zeroclaw-tools/src/linkedin.rs"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"15a78fb1bf99c5e3c173128f6abdac82c86d8fa41d1c30e9c479fc61b5141b92"}},{"ruleId":"D1","level":"warning","message":{"text":"SseTransport::ensure_connected (cyclomatic 26): SseTransport::ensure_connected 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/zeroclaw-tools/src/mcp_transport.rs"},"region":{"startLine":1413}}}],"partialFingerprints":{"codehealthFindingId/v1":"23508bad3735ed87884523eed681d89b1dc588cafb88095bb99cee74f20bee73"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_tools::embedded_resource::format_mcp_tool_result_for_model (cyclomatic 26): zeroclaw_tools::embedded_resource::format_mcp_tool_result_for_model 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/zeroclaw-tools/src/embedded_resource.rs"},"region":{"startLine":538}}}],"partialFingerprints":{"codehealthFindingId/v1":"de4de3f575feaaebe583e6f17831cd497c8909fa1bae72cd0c0b157ae0532731"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw::quickstart_plugins::install_one (cyclomatic 26): zeroclaw::quickstart_plugins::install_one has cyclomatic complexity 26 (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":"src/quickstart_plugins/mod.rs"},"region":{"startLine":1314}}}],"partialFingerprints":{"codehealthFindingId/v1":"53cd9c15727919bfd5706270ad171196cdc88549ecbab9c6c341a0af824ed56c"}},{"ruleId":"D1","level":"warning","message":{"text":"WeComWsChannel::listen (cyclomatic 25): WeComWsChannel::listen 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/zeroclaw-channels/src/wecom_ws.rs"},"region":{"startLine":1548}}}],"partialFingerprints":{"codehealthFindingId/v1":"69931258f5d18b2f6175782bb397ce4f9df9a0a2990a8cf377d63869a060467b"}},{"ruleId":"D1","level":"warning","message":{"text":"SecurityPolicy::ensure_no_escalation_beyond (cyclomatic 25): SecurityPolicy::ensure_no_escalation_beyond 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/zeroclaw-config/src/policy.rs"},"region":{"startLine":5562}}}],"partialFingerprints":{"codehealthFindingId/v1":"9247e72e15bf6442623916de4ef88f3f0f2a4a097a8a4de07b14e7a2a3f71fca"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_log::reader::matches_filter (cyclomatic 25): zeroclaw_log::reader::matches_filter 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/zeroclaw-log/src/reader.rs"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f6af7eaa39f85a0031ad8ce2b6bd711271153c9212d028fc3f863994b1ec1ed"}},{"ruleId":"D1","level":"warning","message":{"text":"ReliableModelProvider::chat_with_system (cyclomatic 25): ReliableModelProvider::chat_with_system 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/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":2520}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b02ab7f736aa5f760e0e00461214736b63f12225c2e4b127992c6ac812e2e82"}},{"ruleId":"D1","level":"warning","message":{"text":"ReliableModelProvider::chat_with_history (cyclomatic 25): ReliableModelProvider::chat_with_history 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/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":2820}}}],"partialFingerprints":{"codehealthFindingId/v1":"ced8182c584ec58bac6689c7a0826b8a3f32654e6bd19fe04013921ae7bdda11"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::agent::turn::approval_gate::gate_tool_approval (cyclomatic 25): zeroclaw_runtime::agent::turn::approval_gate::gate_tool_approval 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/zeroclaw-runtime/src/agent/turn/approval_gate.rs"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"413be3dcf705b69677389e6a71535671499b07ad28faff12620417f7362c197a"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::sop::executor::drive_headless_run (cyclomatic 25): zeroclaw_runtime::sop::executor::drive_headless_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/zeroclaw-runtime/src/sop/executor.rs"},"region":{"startLine":932}}}],"partialFingerprints":{"codehealthFindingId/v1":"e57fb30c67163d6ea3a5e7bb5fd8dc42b4bf862a14d0246fdfdc1adbd7bba9a5"}},{"ruleId":"D1","level":"warning","message":{"text":"ClaudeCodeTool::execute (cyclomatic 25): ClaudeCodeTool::execute 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/zeroclaw-tools/src/claude_code.rs"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"a76bd8800b14b9133686c9a45d64284d418e55c80e389c79eb2d63617c82e96d"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_tools::content_search::format_line_output (cyclomatic 25): zeroclaw_tools::content_search::format_line_output 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/zeroclaw-tools/src/content_search.rs"},"region":{"startLine":863}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8caeda900d93b66c982e3bda3ce95b88badfb541b13bb51d65b6afc12d86352"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_field_edit (cyclomatic 24): App::handle_field_edit 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":4547}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7157ca4ce3277de98e207ef388cf2d8f9c815bf8a6703d797c810321bca2254"}},{"ruleId":"D1","level":"warning","message":{"text":"App::zeroclaw_help_context (cyclomatic 24): App::zeroclaw_help_context 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":6073}}}],"partialFingerprints":{"codehealthFindingId/v1":"484ddc21007c28de11e681d94d481fcc16e9766749f4a30418a6c4ba36a100e0"}},{"ruleId":"D1","level":"warning","message":{"text":"Dashboard::poll_data (cyclomatic 24): Dashboard::poll_data has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: Dashboard::handle_normal_key (cyclomatic 30) 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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8b55eaff552118f53661b39640e34636099fb577c56cc8eb70fd6f5abc038b1"}},{"ruleId":"D1","level":"warning","message":{"text":"InputBarState::handle_enter (cyclomatic 24): InputBarState::handle_enter 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":"apps/zerocode/src/input_bar.rs"},"region":{"startLine":1964}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8313db29b79308072add8c0aad93727aa873497a4829ed1e4ae30db763669fa"}},{"ruleId":"D1","level":"warning","message":{"text":"Logs::handle_mouse (cyclomatic 24): Logs::handle_mouse 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":"apps/zerocode/src/logs.rs"},"region":{"startLine":1823}}}],"partialFingerprints":{"codehealthFindingId/v1":"cff4a1d18b1bf955b3e9291b163733077ed8a4dc9fb85d97048f01327713b244"}},{"ruleId":"D1","level":"warning","message":{"text":"zerocode::chat::render_with_plan_placement (cyclomatic 24): zerocode::chat::render_with_plan_placement 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":"apps/zerocode/src/chat.rs"},"region":{"startLine":6523}}}],"partialFingerprints":{"codehealthFindingId/v1":"870f0dc3f416e2a9af9e1f340b9c4e31228f383d69cf2909b0e44e3a2484a439"}},{"ruleId":"D1","level":"warning","message":{"text":"zerocode::chat::render_conversation (cyclomatic 24): zerocode::chat::render_conversation 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":"apps/zerocode/src/chat.rs"},"region":{"startLine":8194}}}],"partialFingerprints":{"codehealthFindingId/v1":"42d6545d3eb7b882cfe3771df979bcf383d35d4f89eadd54392a41ff915f1be4"}},{"ruleId":"D1","level":"warning","message":{"text":"zerocode::chat::wrap_table_cell (cyclomatic 24): zerocode::chat::wrap_table_cell 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":"apps/zerocode/src/chat.rs"},"region":{"startLine":9490}}}],"partialFingerprints":{"codehealthFindingId/v1":"670450254c6a027ebcd9333e4091620727d70e76b7ff10efaed6765cad241862"}},{"ruleId":"D1","level":"warning","message":{"text":"zerocode::config::load_persisted (cyclomatic 24): zerocode::config::load_persisted 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":"apps/zerocode/src/config/mod.rs"},"region":{"startLine":919}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c5c6aa78f1051f24442b3287bc4b3478fe4db0bb2fa27835e936c423d99f1c9"}},{"ruleId":"D1","level":"warning","message":{"text":"OidcConfig::validate (cyclomatic 24): OidcConfig::validate 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/zeroclaw-config/src/schema.rs"},"region":{"startLine":14698}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ed2dd0744bf61428817333506b1ed9974e8f1c105b5d979fe195aa566542098"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_config::schema::v2::rewrite_dangling_peer_group_agents (cyclomatic 24): zeroclaw_config::schema::v2::rewrite_dangling_peer_group_agents 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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":2297}}}],"partialFingerprints":{"codehealthFindingId/v1":"e158855aa37b17e1e9b7f837f85bbbe485518f08cca41a4b560b41e48175e953"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_gateway::api_oidc_enroll::handle_certificate (cyclomatic 24): zeroclaw_gateway::api_oidc_enroll::handle_certificate 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/zeroclaw-gateway/src/api_oidc_enroll.rs"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7e8d8dff8f932f0c6b8d4b1451b9c8643ff067b6e845bbc6c01c5f300de7610"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_gateway::api_sop_author::handle_sop_decide (cyclomatic 24): zeroclaw_gateway::api_sop_author::handle_sop_decide 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/zeroclaw-gateway/src/api_sop_author.rs"},"region":{"startLine":460}}}],"partialFingerprints":{"codehealthFindingId/v1":"78ea5f27b3cce268184798d67019233c22f08b8d5e04de46599caee47dfbb9b7"}},{"ruleId":"D1","level":"warning","message":{"text":"AnthropicModelProvider::convert_messages (cyclomatic 24): AnthropicModelProvider::convert_messages 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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":1407}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5a7b89960808b7de45ae81e8850607e39be7ca07f9dcd79a35fd0911a9bce08"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_providers::reliable::provider_error_diagnostic (cyclomatic 24): zeroclaw_providers::reliable::provider_error_diagnostic 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/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":1343}}}],"partialFingerprints":{"codehealthFindingId/v1":"79a844637e7374283bfd77b92b5aa40c443dc7c959b7fcb6409f3adb5cdbdd81"}},{"ruleId":"D1","level":"warning","message":{"text":"RpcDispatcher::prepare_live_sessions_refresh (cyclomatic 24): RpcDispatcher::prepare_live_sessions_refresh has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: Method::authz (cyclomatic 44) 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":10373}}}],"partialFingerprints":{"codehealthFindingId/v1":"32d96434a3afc0208c80e55421aa3c383a84be83592534f5111c91856a970f40"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw::run_plugin_update (cyclomatic 24): zeroclaw::run_plugin_update 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":"src/main.rs"},"region":{"startLine":6481}}}],"partialFingerprints":{"codehealthFindingId/v1":"48bd90b7c95ee8f245cec1ea3c09ff919e3c6b2a917dce352ebbd8ed2fd5e2f1"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw::handle_auth_command (cyclomatic 24): zeroclaw::handle_auth_command 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/main.rs"},"region":{"startLine":15571}}}],"partialFingerprints":{"codehealthFindingId/v1":"1036b571647b00e26c1541704405000d6f4a5a97d1ad90303fe849cbe4cd159c"}},{"ruleId":"D1","level":"warning","message":{"text":"Chat::start_session_with_cancel (cyclomatic 23): Chat::start_session_with_cancel 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":"apps/zerocode/src/chat.rs"},"region":{"startLine":2251}}}],"partialFingerprints":{"codehealthFindingId/v1":"e263c04dbc8be3184d3704b5774b337166766dc3459e9987307cea476301409c"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_channels::orchestrator::run_matrix_single_message_draft_updater (cyclomatic 23): zeroclaw_channels::orchestrator::run_matrix_single_message_draft_updater 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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":8960}}}],"partialFingerprints":{"codehealthFindingId/v1":"e893dada8873dd3990f4561e47db92c307aaf163f83f836263a095f2ad5efc83"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_config::policy::powershell_variables_are_simple (cyclomatic 23): zeroclaw_config::policy::powershell_variables_are_simple 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/zeroclaw-config/src/policy.rs"},"region":{"startLine":3795}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6decaba557dd95586191b39e107b521641dac87a6a09fc32760c03b0a5dcc13"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_providers::openai::run_responses_sse (cyclomatic 23): zeroclaw_providers::openai::run_responses_sse 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/zeroclaw-providers/src/openai.rs"},"region":{"startLine":890}}}],"partialFingerprints":{"codehealthFindingId/v1":"7584d60e124ec6948ca62f0534ec4e1607a5124fab8028e86044f0fa9bdfb4e1"}},{"ruleId":"D1","level":"warning","message":{"text":"SopAdvanceTool::execute (cyclomatic 23): SopAdvanceTool::execute has cyclomatic complexity 23 (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/zeroclaw-runtime/src/tools/sop_advance.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"5186fa26752aa94bef3857ea2471c4f8aefc19dab9a6c71813772500c75d698a"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_desktop::daemon::terminate_supervisor_tree (cyclomatic 22): zeroclaw_desktop::daemon::terminate_supervisor_tree 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":"apps/tauri/src/daemon.rs"},"region":{"startLine":415}}}],"partialFingerprints":{"codehealthFindingId/v1":"82e10edf74f994f7698701c34e8e5f24ef0b7ea6b7165460bc296740feb1a009"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_alias_rename (cyclomatic 22): App::handle_alias_rename 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":3347}}}],"partialFingerprints":{"codehealthFindingId/v1":"993d29f5eec59947a72c67a61c33df58078656194522ffd9680bd2e339bd4684"}},{"ruleId":"D1","level":"warning","message":{"text":"App::draw_alias_list (cyclomatic 22): App::draw_alias_list 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":5046}}}],"partialFingerprints":{"codehealthFindingId/v1":"e836c7704b6fa91acdf1965d453ba5bb9b5822f29023e4ac3187c290c3b319f0"}},{"ruleId":"D1","level":"warning","message":{"text":"App::draw_field_list (cyclomatic 22): App::draw_field_list 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":5355}}}],"partialFingerprints":{"codehealthFindingId/v1":"034aef5f3bd3a7c633fc607a23fde82b25e717618275dd86ee6e9b2bc07641b3"}},{"ruleId":"D1","level":"warning","message":{"text":"Dashboard::draw_cron_detail (cyclomatic 22): Dashboard::draw_cron_detail has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: Dashboard::handle_normal_key (cyclomatic 30) 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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":1694}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bb0661a1af961420f8c3d972587b1a094130029aa83af7b1952d47d7d7df5ec"}},{"ruleId":"D1","level":"warning","message":{"text":"SopPane::editor_lines (cyclomatic 22): SopPane::editor_lines 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":"apps/zerocode/src/sop_pane.rs"},"region":{"startLine":2045}}}],"partialFingerprints":{"codehealthFindingId/v1":"b55593de97e1783f26f5ca7eab5f3fd0c42aae718536e6f0660429005517805c"}},{"ruleId":"D1","level":"warning","message":{"text":"DiscordChannel::send (cyclomatic 22): DiscordChannel::send 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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":1816}}}],"partialFingerprints":{"codehealthFindingId/v1":"03431793870cc6fce2ea51526bb40bc66eb7dab9c00219d7868896970e22f5f6"}},{"ruleId":"D1","level":"warning","message":{"text":"DiscordChannel::update_draft (cyclomatic 22): DiscordChannel::update_draft 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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":3562}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5849cf1b635a6c929741e0f879d026df2dee0aace91e72d4f020bcea56be0d3"}},{"ruleId":"D1","level":"warning","message":{"text":"AcpServer::handle_session_load (cyclomatic 22): AcpServer::handle_session_load 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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":1153}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9a5fd644566d390f2f7845bd23f973025ec597777d9664eef23d19cb192e21f"}},{"ruleId":"D1","level":"warning","message":{"text":"WhatsAppChannel::parse_webhook_payload (cyclomatic 22): WhatsAppChannel::parse_webhook_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/zeroclaw-channels/src/whatsapp.rs"},"region":{"startLine":464}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bbba1f4b46e5d5308796259b3a7473a17435613665ff4eb390122c00ee28229"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_config::alias_refs::collect_agent_refs (cyclomatic 22): zeroclaw_config::alias_refs::collect_agent_refs 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/zeroclaw-config/src/alias_refs.rs"},"region":{"startLine":1227}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef38e220724188c2c4b9c57008418154b385914505376508f7f1de3c9efc3969"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_config::policy::split_powershell_pipeline_syntax (cyclomatic 22): zeroclaw_config::policy::split_powershell_pipeline_syntax 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/zeroclaw-config/src/policy.rs"},"region":{"startLine":3640}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc5a3b125f60f24e8e0477e8c12e2287eca06ad97523b6b2148366781a91a4aa"}},{"ruleId":"D1","level":"warning","message":{"text":"TurnRelay::relay (cyclomatic 22): TurnRelay::relay 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/zeroclaw-gateway/src/chat_core.rs"},"region":{"startLine":891}}}],"partialFingerprints":{"codehealthFindingId/v1":"68d3f9284765de7a448de383c635e867177f20d2a170c249adc551f17d1066b8"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_gateway::api_config::handle_migrate (cyclomatic 22): zeroclaw_gateway::api_config::handle_migrate 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/zeroclaw-gateway/src/api_config.rs"},"region":{"startLine":2985}}}],"partialFingerprints":{"codehealthFindingId/v1":"89f31050d5f5f13d1f7e8bb9730459bc27d547ba68f72e48bc07599a36e1e730"}},{"ruleId":"D1","level":"warning","message":{"text":"GeminiModelProvider::send_generate_content (cyclomatic 22): GeminiModelProvider::send_generate_content 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/zeroclaw-providers/src/gemini.rs"},"region":{"startLine":1173}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dacd9a28b848ecebb55c6d03816de0bcbfd4bb30e3ef7416592cf2e510116d4"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_providers::openai_codex::build_responses_input (cyclomatic 22): zeroclaw_providers::openai_codex::build_responses_input 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/zeroclaw-providers/src/openai_codex.rs"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"d86f4f2150f49ce6f5528d1515a57c86cdddc79492e70392ed69355b63ca8bdf"}},{"ruleId":"D1","level":"warning","message":{"text":"RpcDispatcher::handle_session_kill (cyclomatic 22): RpcDispatcher::handle_session_kill 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. This is NOT this file\u0027s highest cyclomatic complexity: Method::authz (cyclomatic 44) 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":5760}}}],"partialFingerprints":{"codehealthFindingId/v1":"8be2f2a0c7b1eadc052d7084de42179cc239bd24849fb816a54978ed92022dd8"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::skills::parse_simple_frontmatter (cyclomatic 22): zeroclaw_runtime::skills::parse_simple_frontmatter 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/zeroclaw-runtime/src/skills/mod.rs"},"region":{"startLine":1558}}}],"partialFingerprints":{"codehealthFindingId/v1":"cda12771a8712d16ecd02246da76279379c8093ef8777d853f655e89e2afb9cc"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::sop::render_step_bullets (cyclomatic 22): zeroclaw_runtime::sop::render_step_bullets 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: SopStepSyntaxKey::bullet_prefixes (cyclomatic 24) 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/zeroclaw-runtime/src/sop/mod.rs"},"region":{"startLine":1681}}}],"partialFingerprints":{"codehealthFindingId/v1":"497bf49e32146b00b4e804ef30a17321a4490af63ecc9fb10104ef380b5ab0a3"}},{"ruleId":"D1","level":"warning","message":{"text":"SopGraph::from_sop_with_specs (cyclomatic 22): SopGraph::from_sop_with_specs 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/zeroclaw-runtime/src/sop/graph.rs"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"ede7c04ce203a72ae47fd304ce6d7308dcfdf467f5f0a8176f7f4c4d55f49a80"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw::issue_wss_client_cert (cyclomatic 22): zeroclaw::issue_wss_client_cert 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/main.rs"},"region":{"startLine":8225}}}],"partialFingerprints":{"codehealthFindingId/v1":"036ff962c949f1ad9dfe9b123c92d8174b30cf7162384986e8862ee2f9a669d7"}},{"ruleId":"D1","level":"warning","message":{"text":"Dashboard::draw_health (cyclomatic 21): Dashboard::draw_health 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: Dashboard::handle_normal_key (cyclomatic 30) 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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":1287}}}],"partialFingerprints":{"codehealthFindingId/v1":"e43c8eb43f089dd3f899d36a647cc0e399dbe99aa1fab742754b4180385e80e4"}},{"ruleId":"D1","level":"warning","message":{"text":"MattermostChannel::listen_websocket (cyclomatic 21): MattermostChannel::listen_websocket 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/zeroclaw-channels/src/mattermost.rs"},"region":{"startLine":1466}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d3bdcff5d2d78b8a15fb7c4039be460a0a58f16d572cdcb80b65f42e6d28dfe"}},{"ruleId":"D1","level":"warning","message":{"text":"QQChannel::compose_qq_message (cyclomatic 21): QQChannel::compose_qq_message 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/zeroclaw-channels/src/qq.rs"},"region":{"startLine":1067}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4b6723eb872a6e56424e365fdfcfeb1d64ab981752416ff2ba3181aafba84ec"}},{"ruleId":"D1","level":"warning","message":{"text":"TelegramChannel::process_model_picker_callback (cyclomatic 21): TelegramChannel::process_model_picker_callback 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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":2087}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b6d644d65e756e095083276d177fc7fb6c7d5f026a1af14cf9a339f74a02b60"}},{"ruleId":"D1","level":"warning","message":{"text":"TelegramChannel::finalize_multi_message_draft (cyclomatic 21): TelegramChannel::finalize_multi_message_draft 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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":3143}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ae8515109058293518b23d6fe2999cce5546f8a4cad3c727bf97fad0de3da20"}},{"ruleId":"D1","level":"warning","message":{"text":"WeComWsChannel::normalize_message (cyclomatic 21): WeComWsChannel::normalize_message 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/zeroclaw-channels/src/wecom_ws.rs"},"region":{"startLine":1099}}}],"partialFingerprints":{"codehealthFindingId/v1":"614edc92ef379ba831574d5543e14da154c6ead5769bddf0e9300a39562bec42"}},{"ruleId":"D1","level":"warning","message":{"text":"SecurityPolicy::is_posix_like_command_allowed (cyclomatic 21): SecurityPolicy::is_posix_like_command_allowed 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":"crates/zeroclaw-config/src/policy.rs"},"region":{"startLine":4509}}}],"partialFingerprints":{"codehealthFindingId/v1":"77278e6890037b6195c24bf8a49681cb4831ef761733b607bab2cbb29440c4db"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_config::policy::git_delegates_to_external_command (cyclomatic 21): zeroclaw_config::policy::git_delegates_to_external_command 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/zeroclaw-config/src/policy.rs"},"region":{"startLine":2668}}}],"partialFingerprints":{"codehealthFindingId/v1":"9593659e46056ee29e09ab992c69e2837080412ac58b0aa97796a662e34fc074"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_gateway::api::handle_api_cron_patch (cyclomatic 21): zeroclaw_gateway::api::handle_api_cron_patch 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/zeroclaw-gateway/src/api.rs"},"region":{"startLine":747}}}],"partialFingerprints":{"codehealthFindingId/v1":"149e5ed639d5a1853cf5b660097cdafdad47a9799cfb6bae7518566d753875c6"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_gateway::principal_gate::config_route_auth (cyclomatic 21): zeroclaw_gateway::principal_gate::config_route_auth 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/zeroclaw-gateway/src/principal_gate.rs"},"region":{"startLine":701}}}],"partialFingerprints":{"codehealthFindingId/v1":"125632e120dfc644f1f85628e57c19398a575a60242ab462fded95ee38efdec6"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_hardware::peripherals::create_peripheral_tools (cyclomatic 21): zeroclaw_hardware::peripherals::create_peripheral_tools 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/zeroclaw-hardware/src/peripherals/mod.rs"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"2486edd6a16bfe38080d54bb224fa3b06a624d8badb379ccb651c7c90d0eae35"}},{"ruleId":"D1","level":"warning","message":{"text":"SopMetricsCollector::rebuild_from_persistence (cyclomatic 21): SopMetricsCollector::rebuild_from_persistence 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/zeroclaw-runtime/src/sop/metrics.rs"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"645bc5a8437f63506ed3fe04d5f57e95e4e378f5844cd6b656ada5345cead209"}},{"ruleId":"D1","level":"warning","message":{"text":"ShellTool::execute (cyclomatic 21): ShellTool::execute 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/zeroclaw-runtime/src/tools/shell.rs"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b3633727710da8054d119be47df4a005cb8b1c0cfea3ddd24f703d68c366706"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::agent::memory_inject::render_memory_context (cyclomatic 21): zeroclaw_runtime::agent::memory_inject::render_memory_context 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/zeroclaw-runtime/src/agent/memory_inject.rs"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"50376c553c9c8d033cad185610f83884d80e18ff14d8590a520405600095413d"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::agent_lifecycle::cascade_owned_state (cyclomatic 21): zeroclaw_runtime::agent_lifecycle::cascade_owned_state 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/zeroclaw-runtime/src/agent_lifecycle.rs"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"df8b1780a82f162437271192feb1e650b4e3ef6012f21da81026d73175355944"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::cron::store::update_job_authorized (cyclomatic 21): zeroclaw_runtime::cron::store::update_job_authorized 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":"crates/zeroclaw-runtime/src/cron/store.rs"},"region":{"startLine":786}}}],"partialFingerprints":{"codehealthFindingId/v1":"01eabeea8766c17304a4e29dad48d7f9db254fdb7f54fd33e3cfc25d407c440c"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::observability::otel_logs::otel_attributes (cyclomatic 21): zeroclaw_runtime::observability::otel_logs::otel_attributes 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. This is NOT this file\u0027s highest cyclomatic complexity: zeroclaw_runtime::observability::otel_logs::otel_severity (cyclomatic 24) 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/zeroclaw-runtime/src/observability/otel_logs.rs"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"50927765fc56553cdd99a0a030db2a7f4e24b509b5b661f9a6c7060314316293"}},{"ruleId":"D1","level":"warning","message":{"text":"ClaudeCodeRunnerTool::execute (cyclomatic 21): ClaudeCodeRunnerTool::execute 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":"crates/zeroclaw-tools/src/claude_code_runner.rs"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"6711b54a8361cea3fb95acd541e13f06f1e9b190b7ba5242790200e13b79d57b"}},{"ruleId":"D1","level":"warning","message":{"text":"GitOperationsTool::execute (cyclomatic 21): GitOperationsTool::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/zeroclaw-tools/src/git_operations.rs"},"region":{"startLine":2055}}}],"partialFingerprints":{"codehealthFindingId/v1":"70253fdf3db59603cbd2ef85673194a5c7fa75a92ed4e139c622e1bdcf1ed70f"}},{"ruleId":"D1","level":"warning","message":{"text":"AgentSidebar::draw_session_rows (cyclomatic 20): AgentSidebar::draw_session_rows 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":"apps/zerocode/src/agent_sidebar.rs"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dfa9f2b5af2d43fb9c9071880ebdc7e038d3a3c05aaa099d8c18d107ee92270"}},{"ruleId":"D1","level":"warning","message":{"text":"ConversationDock::handle_mouse (cyclomatic 20): ConversationDock::handle_mouse 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":"apps/zerocode/src/app.rs"},"region":{"startLine":462}}}],"partialFingerprints":{"codehealthFindingId/v1":"37706975bc5bb5ba703cf84b9ef09e1b0541720b4e83ae1263f0509291229547"}},{"ruleId":"D1","level":"warning","message":{"text":"RpcClient::spawn_ws_session (cyclomatic 20): RpcClient::spawn_ws_session 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":"apps/zerocode/src/client.rs"},"region":{"startLine":2010}}}],"partialFingerprints":{"codehealthFindingId/v1":"18676a16220271e9f65cb7471f80fd73b158c4ac2cff1a258d62a76f26bbfdc4"}},{"ruleId":"D1","level":"warning","message":{"text":"App::bottom_hint (cyclomatic 20): App::bottom_hint 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":980}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5eadf949b9c1398d43d5cedda419ac50990a2ddb76d9ba889afb77db09ff061"}},{"ruleId":"D1","level":"warning","message":{"text":"App::set_visible_cursor (cyclomatic 20): App::set_visible_cursor 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":1900}}}],"partialFingerprints":{"codehealthFindingId/v1":"9655703e8e5c5eee9f2c46e8b104fca94335b87fec6f84f0551ddbf58e7c15e0"}},{"ruleId":"D1","level":"warning","message":{"text":"Dashboard::handle_mouse (cyclomatic 20): Dashboard::handle_mouse has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: Dashboard::handle_normal_key (cyclomatic 30) 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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":2422}}}],"partialFingerprints":{"codehealthFindingId/v1":"57a7698bc822ae6fd0dc6afb44617cc8071bc9a1d2964eb146e54bf6a29f10d9"}},{"ruleId":"D1","level":"warning","message":{"text":"InputBarState::render (cyclomatic 20): InputBarState::render has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/input_bar.rs"},"region":{"startLine":2240}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0224877ec3063007c4925f3e9e132e7c30c2af3f2b5cb9a163f38bc94d4ae66"}},{"ruleId":"D1","level":"warning","message":{"text":"SopPane::handle_editor_key (cyclomatic 20): SopPane::handle_editor_key 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":"apps/zerocode/src/sop_pane.rs"},"region":{"startLine":1193}}}],"partialFingerprints":{"codehealthFindingId/v1":"baf1ffa86ea82488791080dfcb3619b2bce295074e1ef72e2c958ebf35950960"}},{"ruleId":"D1","level":"warning","message":{"text":"DiscordChannel::handle_reaction_event (cyclomatic 20): DiscordChannel::handle_reaction_event 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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":533}}}],"partialFingerprints":{"codehealthFindingId/v1":"512b7dd5677bf4e82536f5da8c211973cd66c8db8d74d3de88b8516f60bbc847"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_channels::whatsapp_web::markdown_to_whatsapp (cyclomatic 20): zeroclaw_channels::whatsapp_web::markdown_to_whatsapp has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: WhatsAppMediaKind::mime_for_path (cyclomatic 26) 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/zeroclaw-channels/src/whatsapp_web.rs"},"region":{"startLine":3201}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d7b108bf116dcb8ffd67429c641e3d73599888f7462d63c1a23ad73c0050a76"}},{"ruleId":"D1","level":"warning","message":{"text":"SecurityPolicy::command_risk_level_for_shell (cyclomatic 20): SecurityPolicy::command_risk_level_for_shell 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/zeroclaw-config/src/policy.rs"},"region":{"startLine":4175}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0a6dddc30d38be5dff75bf96d591fa99c9478cb218bf9ced77ceed5740adcf3"}},{"ruleId":"D1","level":"warning","message":{"text":"Config::load_or_init (cyclomatic 20): Config::load_or_init 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/zeroclaw-config/src/schema.rs"},"region":{"startLine":23448}}}],"partialFingerprints":{"codehealthFindingId/v1":"b75e5cf9d5a16d0a3e9961a0c2bb90c40a6871d041905aedec1b5f4181f6de81"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_config::alias_refs::collect_provider_refs (cyclomatic 20): zeroclaw_config::alias_refs::collect_provider_refs 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/zeroclaw-config/src/alias_refs.rs"},"region":{"startLine":1019}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b79ce52f5f529dc51e79520902eeacc3b6aa09e4a26846191fcb7aa67c3804c"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_config::schema_markdown::type_label (cyclomatic 20): zeroclaw_config::schema_markdown::type_label 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/zeroclaw-config/src/schema_markdown.rs"},"region":{"startLine":694}}}],"partialFingerprints":{"codehealthFindingId/v1":"554263500b6d67a1b09886cbafcb45aacd89b6959496150e635434f36e5d27aa"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_infra::net_guard::normalize_egress_pattern (cyclomatic 20): zeroclaw_infra::net_guard::normalize_egress_pattern 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/zeroclaw-infra/src/net_guard.rs"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"d831a6f781129a31be9ac43b4024dd515e152f8fe3568ef92b11695432a8678e"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_plugins::component_websocket::run_connection (cyclomatic 20): zeroclaw_plugins::component_websocket::run_connection 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/zeroclaw-plugins/src/component_websocket.rs"},"region":{"startLine":499}}}],"partialFingerprints":{"codehealthFindingId/v1":"d19c0ef433e17944549fc956f7deaaf5b806c2ff780b9014f7ac74db26e64a54"}},{"ruleId":"D1","level":"warning","message":{"text":"OpenAiCompatibleModelProvider::stream_chat (cyclomatic 20): OpenAiCompatibleModelProvider::stream_chat 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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":4779}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ddb242b55f56b4aba74007379ef9169e2993813d69238b1660e0a3b5a03c82c"}},{"ruleId":"D1","level":"warning","message":{"text":"Agent::build_with_capabilities (cyclomatic 20): Agent::build_with_capabilities 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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":3274}}}],"partialFingerprints":{"codehealthFindingId/v1":"fce3019fd72a30e922c4573702bb72475196a46531288770feccb68ea54424b7"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::agent::turn::parse_response::recover_structured_arguments (cyclomatic 20): zeroclaw_runtime::agent::turn::parse_response::recover_structured_arguments 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/zeroclaw-runtime/src/agent/turn/parse_response.rs"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d3186ba229959dcb3a55b3f6d29dac85d066bdabc20ed591ef64edae7555ff7"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::sop::schema::validate_node (cyclomatic 20): zeroclaw_runtime::sop::schema::validate_node 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/zeroclaw-runtime/src/sop/schema/mod.rs"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"badb6eaae59dd3a9dfb19ba87e1c4bf31b6191aeccce017e123eec929a26afbc"}},{"ruleId":"D1","level":"warning","message":{"text":"FileUploadTool::execute (cyclomatic 20): FileUploadTool::execute 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. This is NOT this file\u0027s highest cyclomatic complexity: FileUploadTool::mime_for_filename (cyclomatic 58) 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/zeroclaw-tools/src/file_upload.rs"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"b841f7842ce8b4a99df6454c757dc705629c5a4dc6833a671fd0e0aa8648e6ab"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_tools::mcp_transport::read_first_jsonrpc_from_sse_response (cyclomatic 20): zeroclaw_tools::mcp_transport::read_first_jsonrpc_from_sse_response 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/zeroclaw-tools/src/mcp_transport.rs"},"region":{"startLine":1845}}}],"partialFingerprints":{"codehealthFindingId/v1":"87097f2867c0186c757e9e9d6f0223489ec5701449f88dd6f52218fd257ac168"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw::commands::update::detect_arch_from_header (cyclomatic 20): zeroclaw::commands::update::detect_arch_from_header 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":"src/commands/update.rs"},"region":{"startLine":893}}}],"partialFingerprints":{"codehealthFindingId/v1":"6afbad3f32699c9b4c98016d2680d98bfc116c55ba9b2a0526f1d12f0b246710"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw::update_one_plugin (cyclomatic 20): zeroclaw::update_one_plugin 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":"src/main.rs"},"region":{"startLine":6880}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b0e0b7ac961488b903aa4c40a81dd93b051588bcacc558ac65ade4af320b978"}},{"ruleId":"D1","level":"warning","message":{"text":"xtask::cmd::mdbook::peer_groups::parse_kv_args (cyclomatic 20): xtask::cmd::mdbook::peer_groups::parse_kv_args has cyclomatic complexity 20 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"xtask/src/cmd/mdbook/peer_groups.rs"},"region":{"startLine":619}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0f944db4cf10fd910438d6ca3962f740b067130ae68885ff6a7b09a1a6814ba"}},{"ruleId":"D1","level":"warning","message":{"text":"Chat::close_session (cyclomatic 19): Chat::close_session 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":"apps/zerocode/src/chat.rs"},"region":{"startLine":1346}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8e77b87db7749b56641907110474046953f157f912a5131414e1755e7063b0a"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_paste (cyclomatic 19): App::handle_paste 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":5902}}}],"partialFingerprints":{"codehealthFindingId/v1":"6648d279ed089361e2b911864cb0f374192523e3d997a4ab83cc5247a5b14e0b"}},{"ruleId":"D1","level":"warning","message":{"text":"SopPane::editor_backspace (cyclomatic 19): SopPane::editor_backspace 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":"apps/zerocode/src/sop_pane.rs"},"region":{"startLine":1488}}}],"partialFingerprints":{"codehealthFindingId/v1":"39d3286b6333e158325aac818b69b3880a0dc8cd6b45eb7a30946084e4d13497"}},{"ruleId":"D1","level":"warning","message":{"text":"zerocode::chat::recognized_url_ranges (cyclomatic 19): zerocode::chat::recognized_url_ranges 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":"apps/zerocode/src/chat.rs"},"region":{"startLine":9315}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab334a850bf12b3fa43e42395279a8a848502f5e83d036ae2707d3bdef6eb0f8"}},{"ruleId":"D1","level":"warning","message":{"text":"zerocode::input_bar::push_wrapped_physical_line (cyclomatic 19): zerocode::input_bar::push_wrapped_physical_line 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: SlashCommandRegistry::parse (cyclomatic 20) 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":"apps/zerocode/src/input_bar.rs"},"region":{"startLine":379}}}],"partialFingerprints":{"codehealthFindingId/v1":"629c867599a8aa9e00426a95d25c2b0b120a2c23530dde9634d2ac4fe2c8d637"}},{"ruleId":"D1","level":"warning","message":{"text":"LarkChannel::parse_event_payload (cyclomatic 19): LarkChannel::parse_event_payload 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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":2623}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfa667ae66c2ba838498e72d5364475fc83f2eea6d06408a6e57a5d67103760a"}},{"ruleId":"D1","level":"warning","message":{"text":"TelegramChannel::handle_unauthorized_message (cyclomatic 19): TelegramChannel::handle_unauthorized_message 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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":4790}}}],"partialFingerprints":{"codehealthFindingId/v1":"030a3edaf66cdb7564308b8a1027126eff137179eb7e8b58f40a2458318a76b0"}},{"ruleId":"D1","level":"warning","message":{"text":"TelegramChannel::try_parse_voice_message (cyclomatic 19): TelegramChannel::try_parse_voice_message 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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":5650}}}],"partialFingerprints":{"codehealthFindingId/v1":"4886149a6a1d64e8995f31d7886f6a4d3da65b262b29c01c2edb46fd59274da7"}},{"ruleId":"D1","level":"warning","message":{"text":"TelegramChannel::handle_approval_callback (cyclomatic 19): TelegramChannel::handle_approval_callback 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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":7176}}}],"partialFingerprints":{"codehealthFindingId/v1":"245bd6ff6a010a23b64d4b0b46023d0c28d5eda52dde5a9a62d4875e5ce65141"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_config::alias_refs::collect_channel_refs (cyclomatic 19): zeroclaw_config::alias_refs::collect_channel_refs 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/zeroclaw-config/src/alias_refs.rs"},"region":{"startLine":1129}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b6cae6624c9c5e8e2a7902c7252af00c8e91a300936929d02afc2918c9d134c"}},{"ruleId":"D1","level":"warning","message":{"text":"AcpSessionStore::load_message_page (cyclomatic 19): AcpSessionStore::load_message_page 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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":911}}}],"partialFingerprints":{"codehealthFindingId/v1":"45ec3569898bdb32e933e490b4641ff67301cb0f9420d44614f38e85305b9b8f"}},{"ruleId":"D1","level":"warning","message":{"text":"WasmChannel::listen (cyclomatic 19): WasmChannel::listen 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/zeroclaw-plugins/src/wasm_channel.rs"},"region":{"startLine":1067}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b1934fb2835171f66e821036a13b7882f58031ad507fc5286773b4fdb32dc5d"}},{"ruleId":"D1","level":"warning","message":{"text":"FrameScanner::feed (cyclomatic 19): FrameScanner::feed 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/zeroclaw-runtime/src/rpc/wss.rs"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"a14119e9ac06431ee6c1064a7c0fbd275ca5070c5610428174e41369c20279fe"}},{"ruleId":"D1","level":"warning","message":{"text":"SdJwt::resolve_disclosures (cyclomatic 19): SdJwt::resolve_disclosures 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/zeroclaw-runtime/src/verifiable_intent/crypto.rs"},"region":{"startLine":660}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba517695c764e389bc5ff480f4bcda9ff3b0e43d812c7cb70ea0180965ea9458"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::relay::serve_established (cyclomatic 19): zeroclaw_runtime::relay::serve_established 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/zeroclaw-runtime/src/relay.rs"},"region":{"startLine":773}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d07f982384a8155ad9b2157bab61dd7ec5c899df7050af270564642e337df4b"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::rpc::dispatch::deliver_subscription (cyclomatic 19): zeroclaw_runtime::rpc::dispatch::deliver_subscription 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: Method::authz (cyclomatic 44) 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":13847}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2a96a5416fba7a815adf864e2522277d2e067bd0144cfe252c203879613ee84"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::rpc::wss::serve_wss_listener (cyclomatic 19): zeroclaw_runtime::rpc::wss::serve_wss_listener 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/zeroclaw-runtime/src/rpc/wss.rs"},"region":{"startLine":931}}}],"partialFingerprints":{"codehealthFindingId/v1":"d55b32762832a3cd4ae1907435e4afd4f237732fe8003746b4104b3fb7e5d9dd"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::skills::skills_to_prompt_with_mode_and_availability (cyclomatic 19): zeroclaw_runtime::skills::skills_to_prompt_with_mode_and_availability 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/zeroclaw-runtime/src/skills/mod.rs"},"region":{"startLine":1786}}}],"partialFingerprints":{"codehealthFindingId/v1":"f73ae3ec299f14d4051f6167d955bf398fdb6c02a89748344186bf0832db7be5"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_tool_call_parser::decode_recovered_json_string_fragment (cyclomatic 19): zeroclaw_tool_call_parser::decode_recovered_json_string_fragment 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/zeroclaw-tool-call-parser/src/lib.rs"},"region":{"startLine":1206}}}],"partialFingerprints":{"codehealthFindingId/v1":"96ca87c0017f96bec37809861e45d189aed3d27eb9660f48c5ef84afe5fba788"}},{"ruleId":"D1","level":"warning","message":{"text":"EscalateToHumanTool::execute (cyclomatic 19): EscalateToHumanTool::execute 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/zeroclaw-tools/src/escalate.rs"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6b721a39bb4d82e774f56b79c15fe5852a860c789ac69d8cd928378b9287a2e"}},{"ruleId":"D1","level":"warning","message":{"text":"GitOperationsTool::validate_metadata_tree (cyclomatic 19): GitOperationsTool::validate_metadata_tree 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/zeroclaw-tools/src/git_operations.rs"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"71e912c08afb337f7923c957105487ea33549a0f48c3c798912c3d42b4f8f80b"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_tools::jira_tool::parse_inline (cyclomatic 19): zeroclaw_tools::jira_tool::parse_inline 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/zeroclaw-tools/src/jira_tool.rs"},"region":{"startLine":1520}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a3f2c57ad5e975cf7d62901386affce7e3af833d2babeece2c48d59ccc4eb66"}},{"ruleId":"D1","level":"warning","message":{"text":"xtask::cmd::fluent::scan::run (cyclomatic 19): xtask::cmd::fluent::scan::run 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":"xtask/src/cmd/fluent/scan.rs"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a7e5c8bbfcdae11d0966c86c71364c74fb21713b229755742f8e7ba75ad4f68"}},{"ruleId":"D1","level":"warning","message":{"text":"AgentSidebar::draw (cyclomatic 18): AgentSidebar::draw 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":"apps/zerocode/src/agent_sidebar.rs"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b13472e27a408c6e37263da83b265efc5dce72ad1c0a08472c23c7bc07cc66f"}},{"ruleId":"D1","level":"warning","message":{"text":"Chat::drain_prompt_completions (cyclomatic 18): Chat::drain_prompt_completions 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":"apps/zerocode/src/chat.rs"},"region":{"startLine":2851}}}],"partialFingerprints":{"codehealthFindingId/v1":"835e8ab6786ea12094bf8d0aa3b6ccaf99dd76c4c48c1e82b173d5354b3fb580"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_personality_tab (cyclomatic 18): App::handle_personality_tab 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":3747}}}],"partialFingerprints":{"codehealthFindingId/v1":"39bbcafc4fb6f0a637a942ca464a0b566356f00c38cc947f71fba9d2efb957f4"}},{"ruleId":"D1","level":"warning","message":{"text":"SopPane::handle_mouse (cyclomatic 18): SopPane::handle_mouse 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":"apps/zerocode/src/sop_pane.rs"},"region":{"startLine":960}}}],"partialFingerprints":{"codehealthFindingId/v1":"0731616c10d2fffcffbc10f6d88f56428de9d2b5bc761dc4ac67826eed9340dd"}},{"ruleId":"D1","level":"warning","message":{"text":"ZerocodePane::move_cursor (cyclomatic 18): ZerocodePane::move_cursor 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":"apps/zerocode/src/zerocode_pane.rs"},"region":{"startLine":1271}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0ec8ff556b1ebddc85d92694bc3cea60220ba80d46b8d15ba9b8277e1c9b67d"}},{"ruleId":"D1","level":"warning","message":{"text":"DiscordChannel::finalize_draft (cyclomatic 18): DiscordChannel::finalize_draft 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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":3740}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a446dd24e5136276ba6706e594d20abb99e6c5dacecd6bfe77708a09c0d545b"}},{"ruleId":"D1","level":"warning","message":{"text":"AcpServer::materialize_prompt (cyclomatic 18): AcpServer::materialize_prompt 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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":2932}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb71c38df6c1d14dae9f2efd91edc2abf65eb42bc2b77ab8509631f6f4ecb76c"}},{"ruleId":"D1","level":"warning","message":{"text":"TelegramChannel::send_attachment (cyclomatic 18): TelegramChannel::send_attachment 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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":6627}}}],"partialFingerprints":{"codehealthFindingId/v1":"374e4e2bc3113b600886828110f22844b807d6d92bc7d9fc2be01a9246d18a98"}},{"ruleId":"D1","level":"warning","message":{"text":"TelegramChannel::finalize_draft (cyclomatic 18): TelegramChannel::finalize_draft 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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":8237}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4daa06c18fc827559c0b8326ae7ff1e9bd82921a48280a4b8eb8b507c62c44b"}},{"ruleId":"D1","level":"warning","message":{"text":"TelegramChannel::listen (cyclomatic 18): TelegramChannel::listen 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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":8553}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe8ceb6b5153a0a35921e98ff1a6edf7887db737911e904db08f4184b897dc3c"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_channels::discord::process_attachments (cyclomatic 18): zeroclaw_channels::discord::process_attachments 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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":1213}}}],"partialFingerprints":{"codehealthFindingId/v1":"b95b3be0af144b4a3c753cbc361d6da06941f89bc3bd5b835370a7e185230243"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_channels::matrix::streaming::normalize_matrix_progress (cyclomatic 18): zeroclaw_channels::matrix::streaming::normalize_matrix_progress 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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":829}}}],"partialFingerprints":{"codehealthFindingId/v1":"f765b1d8a1979f33d4af6e5434a42e06cdb39455ebdde1b1bad9a8d11b6e1a98"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_channels::orchestrator::acp_server::notification_for_turn_event_titled (cyclomatic 18): zeroclaw_channels::orchestrator::acp_server::notification_for_turn_event_titled 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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":3534}}}],"partialFingerprints":{"codehealthFindingId/v1":"280a9764dc010e1f44395f690597a28be7bb1bff108b713c01cdd27fdef51fd1"}},{"ruleId":"D1","level":"warning","message":{"text":"Config::validate_auth (cyclomatic 18): Config::validate_auth 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/zeroclaw-config/src/schema.rs"},"region":{"startLine":14471}}}],"partialFingerprints":{"codehealthFindingId/v1":"850053fbe3f30456235d6f5e314db50bc4c8c7550add2731571d74d5d20b1882"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_config::alias_refs::rewrite_agent_refs (cyclomatic 18): zeroclaw_config::alias_refs::rewrite_agent_refs 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/zeroclaw-config/src/alias_refs.rs"},"region":{"startLine":712}}}],"partialFingerprints":{"codehealthFindingId/v1":"53a200c2b6554f0a3e2eb5ccc026d3fd3f428cfac9e453a79140f8febc817818"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_config::alias_refs::rewrite_model_provider_refs (cyclomatic 18): zeroclaw_config::alias_refs::rewrite_model_provider_refs 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/zeroclaw-config/src/alias_refs.rs"},"region":{"startLine":799}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5978bd8b197e5cb28e20740988594c8be0b9214d366632ac8116d96714d04fa"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_eval::grader::evaluate_expects (cyclomatic 18): zeroclaw_eval::grader::evaluate_expects 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/zeroclaw-eval/src/grader.rs"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"00a559faacb9636b3d88c3c265535dd068b98d8d938c555bbb1d055b3679928b"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_gateway::handle_webhook (cyclomatic 18): zeroclaw_gateway::handle_webhook 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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":4061}}}],"partialFingerprints":{"codehealthFindingId/v1":"418aa3068c20a2ab673903f083d438706cf1683685e5aeeea9112c2536ce4651"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_gateway::api_sop_author::handle_sop_run (cyclomatic 18): zeroclaw_gateway::api_sop_author::handle_sop_run 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/zeroclaw-gateway/src/api_sop_author.rs"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"179398d8e0004d5a6afe1aafaf37c430eb706f6f8ba0ef4eaaeb071782b5a6da"}},{"ruleId":"D1","level":"warning","message":{"text":"ArduinoUploadTool::execute (cyclomatic 18): ArduinoUploadTool::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/zeroclaw-hardware/src/peripherals/arduino_upload.rs"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"a382e7248178006dea8cf8788d772c18a15a6e026342339017915dc55422153c"}},{"ruleId":"D1","level":"warning","message":{"text":"PluginHost::remove_with_report (cyclomatic 18): PluginHost::remove_with_report 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/zeroclaw-plugins/src/host.rs"},"region":{"startLine":774}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2554532df661ac3b1c779cd4e4f299e9b9cc4b8918790db676bc25cb58fc310"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_providers::factory::apply_compat_options (cyclomatic 18): zeroclaw_providers::factory::apply_compat_options has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-providers/src/factory.rs"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"a146e5d84b0a92bd1aca33b9df17a931dc67887a3f70602091d78dde357b9a6e"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_providers::multimodal::jpeg_frame_header (cyclomatic 18): zeroclaw_providers::multimodal::jpeg_frame_header 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/zeroclaw-providers/src/multimodal.rs"},"region":{"startLine":3184}}}],"partialFingerprints":{"codehealthFindingId/v1":"50ec5cf18b0341045d6b4ecf6622ad22f4ff841845064c3741772e0ba9b6a3a8"}},{"ruleId":"D1","level":"warning","message":{"text":"StreamTextGuard::evaluate_pending (cyclomatic 18): StreamTextGuard::evaluate_pending 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/zeroclaw-runtime/src/agent/turn/stream_guard.rs"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a57b932f77b3d2216982c2999ddbefc061365772d45837d59db0cb2a843e1ec"}},{"ruleId":"D1","level":"warning","message":{"text":"PrometheusObserver::record_event (cyclomatic 18): PrometheusObserver::record_event 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/zeroclaw-runtime/src/observability/prometheus.rs"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"f886390fd5292b99db59db5a9a9389a625c5c57eea009e9576a159305a25b361"}},{"ruleId":"D1","level":"warning","message":{"text":"PluginActivationPlan::build (cyclomatic 18): PluginActivationPlan::build 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/zeroclaw-runtime/src/plugin_runtime.rs"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"69f8e5a7e7114baf4e882b440361c326b3fcc6d4001165a94d0a8fe4e1b4f7ef"}},{"ruleId":"D1","level":"warning","message":{"text":"WssTransport::next_frame (cyclomatic 18): WssTransport::next_frame 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/zeroclaw-runtime/src/rpc/wss.rs"},"region":{"startLine":733}}}],"partialFingerprints":{"codehealthFindingId/v1":"d65fc29a21e149cddd6e59915d9d77615119e3ddc5c83c056cdc563b27f0979b"}},{"ruleId":"D1","level":"warning","message":{"text":"BuildRegistry::claim_search (cyclomatic 18): BuildRegistry::claim_search 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/zeroclaw-runtime/src/tools/scoped.rs"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9b3f99c0a61107c366ed0da6be9de422cb7c8988f6d1ad57ebecf0558a39c21"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::quickstart::field_shape (cyclomatic 18): zeroclaw_runtime::quickstart::field_shape 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/zeroclaw-runtime/src/quickstart/mod.rs"},"region":{"startLine":853}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9054292c8d103d4340ad1f09c2c6e139061c76b574006674223367fd291f7d4"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::skills::document::parse_frontmatter (cyclomatic 18): zeroclaw_runtime::skills::document::parse_frontmatter 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/zeroclaw-runtime/src/skills/document.rs"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"ceaa30d1a3874e3fb379864ebe53bc740be6ca31621ae7b1c0d60f1c6d74d66c"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::skills::improver::extract_skill_executions_from_history (cyclomatic 18): zeroclaw_runtime::skills::improver::extract_skill_executions_from_history 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/zeroclaw-runtime/src/skills/improver.rs"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"acbad313c22d78685388e0fa3fe89a534d146dc431458f4c38f6195e51ea4a60"}},{"ruleId":"D1","level":"warning","message":{"text":"HttpRequestTool::execute (cyclomatic 18): HttpRequestTool::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/zeroclaw-tools/src/http_request.rs"},"region":{"startLine":564}}}],"partialFingerprints":{"codehealthFindingId/v1":"da4a16c79f5fa13364f24cb35593fdd9b301dc6fac7af4dc54d175ea6b0d5fd9"}},{"ruleId":"D1","level":"warning","message":{"text":"ModelRoutingConfigTool::handle_upsert_scenario (cyclomatic 18): ModelRoutingConfigTool::handle_upsert_scenario 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/zeroclaw-tools/src/model_routing_config.rs"},"region":{"startLine":976}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c6adb4230cb6dad66de0e7773579404ef43a64e74d7188d6e26d80d8f3d80c3"}},{"ruleId":"D1","level":"warning","message":{"text":"SendViaTool::execute (cyclomatic 18): SendViaTool::execute 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/zeroclaw-tools/src/send_via.rs"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa3391eeb13a6d1e9a94a416a535adbf92d1f5941fecc1a52197892173528df1"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_tools::content_search::visit_internal_search_path (cyclomatic 18): zeroclaw_tools::content_search::visit_internal_search_path 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/zeroclaw-tools/src/content_search.rs"},"region":{"startLine":496}}}],"partialFingerprints":{"codehealthFindingId/v1":"1eb01fcfd7d13a2e7d02165eaef86bfd1ff8207c5f00b8f35a2edfbe982d3ae0"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw::channel_instance_readiness_lines_with_admission (cyclomatic 18): zeroclaw::channel_instance_readiness_lines_with_admission 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/main.rs"},"region":{"startLine":4769}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa0a7880e057dd596e533772683a24158135bc43d976b9938de1556612b96d79"}},{"ruleId":"D1","level":"warning","message":{"text":"nucleo::main (cyclomatic 18): nucleo::main 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":"firmware/nucleo/src/main.rs"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"44d35326b11cbcd5c393f85343df070374e7e92378af908569a6e6510cda8f5f"}},{"ruleId":"D1","level":"warning","message":{"text":"RpcClient::connect (cyclomatic 17): RpcClient::connect 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":"apps/zerocode/src/client.rs"},"region":{"startLine":1732}}}],"partialFingerprints":{"codehealthFindingId/v1":"50b7b7042f08460e058618b43a7718ed5abdeafeebcd45e1b54e5136353a3fe3"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_skills_tab (cyclomatic 17): App::handle_skills_tab 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":3944}}}],"partialFingerprints":{"codehealthFindingId/v1":"68e77a3d53db91b0a01c8ee50ff66ae5968065bdeae15da1d9240bba05806d33"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_filter_key (cyclomatic 17): App::handle_filter_key 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":4409}}}],"partialFingerprints":{"codehealthFindingId/v1":"a058c49f5f2b4dd5ec047e21637ea0f975342041c7c682873cc3f0ceae8823cb"}},{"ruleId":"D1","level":"warning","message":{"text":"FileExplorerState::handle_search_key (cyclomatic 17): FileExplorerState::handle_search_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":"apps/zerocode/src/file_explorer.rs"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"8290507120968d5568e56df47e51aaad8f1cf3c37fccf97520153fb216e1ccf1"}},{"ruleId":"D1","level":"warning","message":{"text":"LogDetail::detail_lines (cyclomatic 17): LogDetail::detail_lines 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. This is NOT this file\u0027s highest cyclomatic complexity: Logs::handle_detail_key (cyclomatic 18) 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":"apps/zerocode/src/logs.rs"},"region":{"startLine":318}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8407be18443ddf8551004614566bb4d615509ee0aa65266c533130b6fd8dd2d"}},{"ruleId":"D1","level":"warning","message":{"text":"Logs::load_page (cyclomatic 17): Logs::load_page 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. This is NOT this file\u0027s highest cyclomatic complexity: Logs::handle_detail_key (cyclomatic 18) 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":"apps/zerocode/src/logs.rs"},"region":{"startLine":648}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f2228d9a18142a655f4a9073912582e1e67bf40d84074db6a1097b671efa4a0"}},{"ruleId":"D1","level":"warning","message":{"text":"ZerocodePane::handle_key (cyclomatic 17): ZerocodePane::handle_key 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":"apps/zerocode/src/zerocode_pane.rs"},"region":{"startLine":1141}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a7410a84a1d8df3a13420dd1045904774590e7348a39f6a90226628b55c5795"}},{"ruleId":"D1","level":"warning","message":{"text":"TelegramChannel::try_queue_voice_reply (cyclomatic 17): TelegramChannel::try_queue_voice_reply 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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":4208}}}],"partialFingerprints":{"codehealthFindingId/v1":"949e2afc1e15d4e6a40090d5a6089c50db5f93b07ea3bd206377093039dc1644"}},{"ruleId":"D1","level":"warning","message":{"text":"WeComWsChannel::materialize_quote_attachments (cyclomatic 17): WeComWsChannel::materialize_quote_attachments 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/zeroclaw-channels/src/wecom_ws.rs"},"region":{"startLine":933}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d8a9b6a17a174521542c1ebe8a578f20301c6b061a9440aaed2a85b2d4a35b8"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_channels::git::events::event_to_message (cyclomatic 17): zeroclaw_channels::git::events::event_to_message 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/zeroclaw-channels/src/git/events.rs"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"37d7ebe3654384ad8f26bb09fcc39abe059e8072bb16fafe713b09e3a53a994f"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_channels::lark::handle_lark_http_event (cyclomatic 17): zeroclaw_channels::lark::handle_lark_http_event 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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":918}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cace33fee51be216b56298b667a25900602fae4cd81fe481eef0bd2a268b01a"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_channels::matrix::outbound::opus_duration (cyclomatic 17): zeroclaw_channels::matrix::outbound::opus_duration 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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":4077}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fd20c42a3675617d6d853d16ba44073d5af5920e13cf9fc52f2bef67af5b5fa"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_channels::orchestrator::parse_runtime_command (cyclomatic 17): zeroclaw_channels::orchestrator::parse_runtime_command 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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":2790}}}],"partialFingerprints":{"codehealthFindingId/v1":"a294bc953e9192f716d605ba3aca9d81e1e6e2708ba70377c7493d7e4ba2f6b9"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_channels::orchestrator::hydrate_session_transcript (cyclomatic 17): zeroclaw_channels::orchestrator::hydrate_session_transcript 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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":16791}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4e1290c5a1949bbb5ee199c8dc58f2bcb4c248221257debbd2003cc7196536f"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_channels::wecom_ws::strip_edge_mentions (cyclomatic 17): zeroclaw_channels::wecom_ws::strip_edge_mentions 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/zeroclaw-channels/src/wecom_ws.rs"},"region":{"startLine":2264}}}],"partialFingerprints":{"codehealthFindingId/v1":"a973293f69921c0241926149734266a07719f61ef504eb26f0beec1dfa9255f2"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_gateway::api_oidc::finish_pkce_callback (cyclomatic 17): zeroclaw_gateway::api_oidc::finish_pkce_callback 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/zeroclaw-gateway/src/api_oidc.rs"},"region":{"startLine":1458}}}],"partialFingerprints":{"codehealthFindingId/v1":"04ba2b735d0d2ea947e908042e180e5fffe50224068713c6d231d18fbdeb169a"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_hardware::wizard::run_setup (cyclomatic 17): zeroclaw_hardware::wizard::run_setup 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/zeroclaw-hardware/src/wizard.rs"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"277afef5c226023d7583bcebfe202f45f333d3d94cfa3843166efca9e4f3b9b7"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_log::observer_bridge::project (cyclomatic 17): zeroclaw_log::observer_bridge::project 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/zeroclaw-log/src/observer_bridge.rs"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c55af49e1f16c978647d68b3daea82a2c9ebad71516d354d39ba7639b3623c7"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_macros::build_integration_descriptor_method (cyclomatic 17): zeroclaw_macros::build_integration_descriptor_method 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/zeroclaw-macros/src/lib.rs"},"region":{"startLine":2898}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c19ced37f077c2f4f51be480007bd17abb82ce495a581fa59fd4386d47545d0"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_plugins::config::compile_manifest_config (cyclomatic 17): zeroclaw_plugins::config::compile_manifest_config 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/zeroclaw-plugins/src/config.rs"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"7617948196186b4eaa94117f4050305d0f28a4a9480b4f8981892872e6b62add"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_providers::catalog::model_catalog_with_config_result (cyclomatic 17): zeroclaw_providers::catalog::model_catalog_with_config_result 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. This is NOT this file\u0027s highest cyclomatic complexity: zeroclaw_providers::catalog::catalog_source_for (cyclomatic 55) 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/zeroclaw-providers/src/catalog.rs"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"59b83ff4034217d2cbc906035cc3c1304615df8ffa53ec99a87aaf92eccae7a8"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_providers::multimodal::jpeg_first_scan (cyclomatic 17): zeroclaw_providers::multimodal::jpeg_first_scan 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/zeroclaw-providers/src/multimodal.rs"},"region":{"startLine":3273}}}],"partialFingerprints":{"codehealthFindingId/v1":"53f9c74b3e3f30907f319266fb0842071560c51f955cfe8bf28a279547527c7f"}},{"ruleId":"D1","level":"warning","message":{"text":"RpcClient::connect_over (cyclomatic 17): RpcClient::connect_over 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/zeroclaw-rpc-client/src/client.rs"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"280e53243bcd1d083059249efe569bb22a56bbe77340cac457906dadd0866603"}},{"ruleId":"D1","level":"warning","message":{"text":"Agent::turn (cyclomatic 17): Agent::turn 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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":4385}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bbea79064fa875751e169520c5681af21c7dceaf809a4af5843f2effb0cee69"}},{"ruleId":"D1","level":"warning","message":{"text":"RpcDispatcher::resolve_session_record_for_mode (cyclomatic 17): RpcDispatcher::resolve_session_record_for_mode 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. This is NOT this file\u0027s highest cyclomatic complexity: Method::authz (cyclomatic 44) 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":2323}}}],"partialFingerprints":{"codehealthFindingId/v1":"15e54655a9920198416df5266d649eb0b66cf18b33fd4c06187c68a745c6e6cc"}},{"ruleId":"D1","level":"warning","message":{"text":"RpcDispatcher::handle_session_delete (cyclomatic 17): RpcDispatcher::handle_session_delete 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. This is NOT this file\u0027s highest cyclomatic complexity: Method::authz (cyclomatic 44) 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":9250}}}],"partialFingerprints":{"codehealthFindingId/v1":"afda73b60a84fff81e7a9eb11dffeee1d31f79f60b810cfcd17ede98ea601ddc"}},{"ruleId":"D1","level":"warning","message":{"text":"RpcDispatcher::handle_sops_run (cyclomatic 17): RpcDispatcher::handle_sops_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. This is NOT this file\u0027s highest cyclomatic complexity: Method::authz (cyclomatic 44) 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":12965}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f986e97d760bc51b55cdc4c12b29f812910c523df3c182dc3007bbfdadb91ac"}},{"ruleId":"D1","level":"warning","message":{"text":"SopEngine::restore_runs (cyclomatic 17): SopEngine::restore_runs 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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":687}}}],"partialFingerprints":{"codehealthFindingId/v1":"28e7733626873fa42e05e39d831b38783f4b329c1ff1badcfa0d3b38eb423873"}},{"ruleId":"D1","level":"warning","message":{"text":"SopEngine::evaluate_admission (cyclomatic 17): SopEngine::evaluate_admission 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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":2050}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4d694bbbc67f2cb864a8b770f4ad5e925bd5d3f7f48a1b2035fd97647b617bc"}},{"ruleId":"D1","level":"warning","message":{"text":"DelegateTool::execute_background (cyclomatic 17): DelegateTool::execute_background 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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":3525}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef38932cd67ac393773cbf19f184b57e7921b138f5001c8adf5b0d076385b41d"}},{"ruleId":"D1","level":"warning","message":{"text":"FileReadTool::read_path (cyclomatic 17): FileReadTool::read_path 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/zeroclaw-runtime/src/tools/file_read.rs"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"7346cd4b5aca2441a7bfab067c91be6f5a673cffaffe673e7f4fb50f25edb631"}},{"ruleId":"D1","level":"warning","message":{"text":"ScheduleTool::handle_create_like (cyclomatic 17): ScheduleTool::handle_create_like 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/zeroclaw-runtime/src/tools/schedule.rs"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"42419f8d33545f91cd63e46582b7eb2ed01490587b2905125d9d0395950899aa"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::agent::history_pruner::remove_orphaned_tool_messages (cyclomatic 17): zeroclaw_runtime::agent::history_pruner::remove_orphaned_tool_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/zeroclaw-runtime/src/agent/history_pruner.rs"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"081bc38af2322ffc3789367f90d3eff5eefbcc1311d76b5ee5393e8235903a3e"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::observability::otel::message_attrs (cyclomatic 17): zeroclaw_runtime::observability::otel::message_attrs 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/zeroclaw-runtime/src/observability/otel.rs"},"region":{"startLine":1093}}}],"partialFingerprints":{"codehealthFindingId/v1":"e127fdc70b5ff522234192e05956f89ce443d16f56a428fd2d5a1535479153e7"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::skills::audit::audit_markdown_link_target (cyclomatic 17): zeroclaw_runtime::skills::audit::audit_markdown_link_target 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/zeroclaw-runtime/src/skills/audit.rs"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ef0aa855acfd701179935a767513426451649e19828c55d9635e53c790020f7"}},{"ruleId":"D1","level":"warning","message":{"text":"GitOperationsTool::validate_metadata_config (cyclomatic 17): GitOperationsTool::validate_metadata_config 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/zeroclaw-tools/src/git_operations.rs"},"region":{"startLine":588}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffaea5662464bca2df8ccfa23ed97d3d07a72b10a2a5eee0ee58bb7e7992d432"}},{"ruleId":"D1","level":"warning","message":{"text":"GlobSearchTool::execute (cyclomatic 17): GlobSearchTool::execute 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/zeroclaw-tools/src/glob_search.rs"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac1115560f1870573bdb07b37ba1a7169a63124f2e88c887b0e9fca56639e130"}},{"ruleId":"D1","level":"warning","message":{"text":"pico::main (cyclomatic 17): pico::main 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":"firmware/pico/src/main.rs"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"18b5dbaa9ee6ea3f68879f95528bfe3c88c0168d3300bfbe900395bde8686039"}},{"ruleId":"D1","level":"warning","message":{"text":"App::handle_select_edit (cyclomatic 16): App::handle_select_edit 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":4675}}}],"partialFingerprints":{"codehealthFindingId/v1":"d40eebee413f81dff539ca8bd6cd597616a5550c0aad6821ee7eb1afefee59a3"}},{"ruleId":"D1","level":"warning","message":{"text":"App::draw_field_edit (cyclomatic 16): App::draw_field_edit 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":5711}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a2e973d6aa7f0693575c7322f5650d2c7c8925ffaf4b36af23abc0fd57bafc8"}},{"ruleId":"D1","level":"warning","message":{"text":"QuickstartPane::handle_mouse (cyclomatic 16): QuickstartPane::handle_mouse 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":"apps/zerocode/src/quickstart_pane.rs"},"region":{"startLine":1314}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d49c25dc821db75a34e8a70edadf91d8aa831100d3da0ea3f06139f9df3bc23"}},{"ruleId":"D1","level":"warning","message":{"text":"JsonRpcFrame::from_value (cyclomatic 16): JsonRpcFrame::from_value 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/zeroclaw-api/src/jsonrpc.rs"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b5ddbdbdc2dcc3b40ece53280f5dbcf42ff1e4efd40665a93ddefeba4911687"}},{"ruleId":"D1","level":"warning","message":{"text":"AcpServer::handle_session_resume (cyclomatic 16): AcpServer::handle_session_resume 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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":1498}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb3580fb0b8f4932914175b7ced0bac7f3c67e51e0d9f38fbf0eb1a226684c56"}},{"ruleId":"D1","level":"warning","message":{"text":"TwitterChannel::listen (cyclomatic 16): TwitterChannel::listen 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/zeroclaw-channels/src/twitter.rs"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f9fb4f4425719a75a1c6395e300eb7d97f793b23d273778e15b447d9b829b17"}},{"ruleId":"D1","level":"warning","message":{"text":"WeChatChannel::qr_login (cyclomatic 16): WeChatChannel::qr_login 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/zeroclaw-channels/src/wechat.rs"},"region":{"startLine":2100}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8f6afff7981ccd813341fc58493226a8c0180ec9f3d46f0b925812829778b15"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_channels::discord::slash::reconcile_one_endpoint (cyclomatic 16): zeroclaw_channels::discord::slash::reconcile_one_endpoint 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/zeroclaw-channels/src/discord/slash.rs"},"region":{"startLine":608}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dff4d97273c15254597d4bb1766d644a0b3094e1919036a338622536a23569e"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_channels::irc::split_message (cyclomatic 16): zeroclaw_channels::irc::split_message 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/zeroclaw-channels/src/irc.rs"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1fe0ac4bba42d4ed2883c33bb788e3a1bc398095db0d6929e72f11d48e09f46"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_channels::matrix::outbound::deliver_attachments (cyclomatic 16): zeroclaw_channels::matrix::outbound::deliver_attachments 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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":3500}}}],"partialFingerprints":{"codehealthFindingId/v1":"3eaa553b553326c0e03d3f6cb28e7e4560ae34bbb62a946d3b3840c97cf6fce4"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_config::agent_bundle::collect_risk_flags (cyclomatic 16): zeroclaw_config::agent_bundle::collect_risk_flags 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/zeroclaw-config/src/agent_bundle.rs"},"region":{"startLine":1087}}}],"partialFingerprints":{"codehealthFindingId/v1":"a41937b073a4bc0ba365ee807e13093b01d584627d353f0f5be1e9cc2edc83ca"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_config::policy::contains_unquoted_shell_variable_expansion (cyclomatic 16): zeroclaw_config::policy::contains_unquoted_shell_variable_expansion 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/zeroclaw-config/src/policy.rs"},"region":{"startLine":3133}}}],"partialFingerprints":{"codehealthFindingId/v1":"adcdcd7fad26ac030280f3554798df8ed91b31f996dcbb62a3d151b2006acfa7"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_gateway::api::handle_api_cron_add (cyclomatic 16): zeroclaw_gateway::api::handle_api_cron_add 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/zeroclaw-gateway/src/api.rs"},"region":{"startLine":487}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b54edd62392d753594081da23dc39326c55fa3125dc1e572da9e769232cc042"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_gateway::api_oidc::handle_dashboard_sign_in (cyclomatic 16): zeroclaw_gateway::api_oidc::handle_dashboard_sign_in 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/zeroclaw-gateway/src/api_oidc.rs"},"region":{"startLine":999}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5c886dddfab780bd6a18176fb9b16d469fc18d87921c24f17f195165403a443"}},{"ruleId":"D1","level":"warning","message":{"text":"DatasheetTool::execute (cyclomatic 16): DatasheetTool::execute 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/zeroclaw-hardware/src/datasheet.rs"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a044ade9b83afd999446d95bf17c66c652dbfd638805742f8147098183e8190"}},{"ruleId":"D1","level":"warning","message":{"text":"AcpSessionStore::provider_safe_history (cyclomatic 16): AcpSessionStore::provider_safe_history 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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":2752}}}],"partialFingerprints":{"codehealthFindingId/v1":"c917cac2bad261001828284aa9d28c13339e6d1ee51c5c104167391f58b5fd3e"}},{"ruleId":"D1","level":"warning","message":{"text":"PluginHost::recover_update (cyclomatic 16): PluginHost::recover_update 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/zeroclaw-plugins/src/host.rs"},"region":{"startLine":1563}}}],"partialFingerprints":{"codehealthFindingId/v1":"77b8c59bc7d7305a883ed0658238a1d3389b739e2250345bd05560e871645bef"}},{"ruleId":"D1","level":"warning","message":{"text":"OpenAiCompatibleModelProvider::relocate_tool_result_images (cyclomatic 16): OpenAiCompatibleModelProvider::relocate_tool_result_images 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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":3708}}}],"partialFingerprints":{"codehealthFindingId/v1":"69d01ad8c19d8f5219e98dfeb8c27fe7829cfdacaaf48b794ba1d34b0e5559fd"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_providers::multimodal::jpeg_retained_metadata_allocation (cyclomatic 16): zeroclaw_providers::multimodal::jpeg_retained_metadata_allocation 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/zeroclaw-providers/src/multimodal.rs"},"region":{"startLine":3372}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f5dfb09c293c6445c979045bd897db434b43a6518bc8a97f78887d0dcc03510"}},{"ruleId":"D1","level":"warning","message":{"text":"OidcAuthProvider::verify_jwks (cyclomatic 16): OidcAuthProvider::verify_jwks 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/zeroclaw-runtime/src/security/auth_provider/oidc.rs"},"region":{"startLine":651}}}],"partialFingerprints":{"codehealthFindingId/v1":"d84793cdead0fb6ccfa1502cc1052ab24c7b1f693cbe143fe95b4668a26874fe"}},{"ruleId":"D1","level":"warning","message":{"text":"SopEngine::dispatch_llm_step (cyclomatic 16): SopEngine::dispatch_llm_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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":3157}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfc9d70496ee962cf0e647b2a86eedf4f5b1608fcf0440b276183bdb9d8526d6"}},{"ruleId":"D1","level":"warning","message":{"text":"DelegateTool::handle_await_sessions (cyclomatic 16): DelegateTool::handle_await_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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":4699}}}],"partialFingerprints":{"codehealthFindingId/v1":"65ede77a23e969092505974886bb63c7af7d6333f301cc0ec2b52b64e8c59dce"}},{"ruleId":"D1","level":"warning","message":{"text":"SkillShellTool::execute (cyclomatic 16): SkillShellTool::execute 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/zeroclaw-runtime/src/tools/skill_tool.rs"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"53c444132dd6f49ceb636c9c7f9c0ad99e3668eceff0fc7ecd79277b16c94b29"}},{"ruleId":"D1","level":"warning","message":{"text":"SopStatusTool::execute (cyclomatic 16): SopStatusTool::execute 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/zeroclaw-runtime/src/tools/sop_status.rs"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e62e936dd1cf2960789fb043ab223ef66b8660111f946d0d1e5afeeb6137935"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::agent::tool_execution::execute_one_tool_with_provenance (cyclomatic 16): zeroclaw_runtime::agent::tool_execution::execute_one_tool_with_provenance 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/zeroclaw-runtime/src/agent/tool_execution.rs"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"87de27037135ba89fe1654b1810ce24841f53e8a1a42d2970d5718e37f2757b3"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::agent::turn::apply_builtin_prompt_scope (cyclomatic 16): zeroclaw_runtime::agent::turn::apply_builtin_prompt_scope 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/zeroclaw-runtime/src/agent/turn/mod.rs"},"region":{"startLine":740}}}],"partialFingerprints":{"codehealthFindingId/v1":"9019791f89e4c1e926d26d70b8e81ece3016cc987256735efb36c9d7e2bd8cd9"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::daemon::load_heartbeat_session_context (cyclomatic 16): zeroclaw_runtime::daemon::load_heartbeat_session_context 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/zeroclaw-runtime/src/daemon/mod.rs"},"region":{"startLine":2984}}}],"partialFingerprints":{"codehealthFindingId/v1":"e59d314d10483fdba0acf157c55db3c8a607b54fd09ef19a53f54f6399087079"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::doctor::check_daemon_state (cyclomatic 16): zeroclaw_runtime::doctor::check_daemon_state 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/zeroclaw-runtime/src/doctor/mod.rs"},"region":{"startLine":1798}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d57b67d85dcfc959b9104c1ce362aab15fc7d179fc06918b1aea6bdbf47ed80"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_runtime::skills::creator::extract_tool_calls_from_history (cyclomatic 16): zeroclaw_runtime::skills::creator::extract_tool_calls_from_history 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/zeroclaw-runtime/src/skills/creator.rs"},"region":{"startLine":575}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ff1d87222e38ee6c8655749d26c9b2fad2a526bd57a093a318a728a9ea7dbb9"}},{"ruleId":"D1","level":"warning","message":{"text":"zeroclaw_tool_call_parser::parse_glm_style_tool_calls (cyclomatic 16): zeroclaw_tool_call_parser::parse_glm_style_tool_calls 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/zeroclaw-tool-call-parser/src/lib.rs"},"region":{"startLine":1648}}}],"partialFingerprints":{"codehealthFindingId/v1":"48c8c55841e91813a5742a0c5210947257419018ef759f85b4ce76c2b4961908"}},{"ruleId":"D1","level":"warning","message":{"text":"BrowserTool::resolve_backend (cyclomatic 16): BrowserTool::resolve_backend 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: zeroclaw_tools::browser::parse_browser_action (cyclomatic 20) 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/zeroclaw-tools/src/browser.rs"},"region":{"startLine":370}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef13cb63eb4c26b13b581c314cf421e8a476441d297e7e944d22bc3e91abb3d7"}},{"ruleId":"D1","level":"warning","message":{"text":"BrowserTool::execute_computer_use_action (cyclomatic 16): BrowserTool::execute_computer_use_action 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: zeroclaw_tools::browser::parse_browser_action (cyclomatic 20) 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/zeroclaw-tools/src/browser.rs"},"region":{"startLine":1086}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bf8c66f3aead0e51d90875532a081667d11cda2435ac9a9782139c19cd88329"}},{"ruleId":"D1","level":"warning","message":{"text":"CodexCliTool::execute (cyclomatic 16): CodexCliTool::execute 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/zeroclaw-tools/src/codex_cli.rs"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"30de5e1333a7e7a0a19aa9dba55f976e791abc94d3b5cca3d03a50524b520b0e"}},{"ruleId":"D1","level":"warning","message":{"text":"ComposioTool::execute (cyclomatic 16): ComposioTool::execute 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/zeroclaw-tools/src/composio.rs"},"region":{"startLine":614}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e7f7ecaaae77e19790ecb2c8da125e1b71934579c759e176c0394008d8922f7"}},{"ruleId":"D1","level":"warning","message":{"text":"ContentSearchTool::execute (cyclomatic 16): ContentSearchTool::execute 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/zeroclaw-tools/src/content_search.rs"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"afe7f547a721121811ce9165b994c9fa0ebbacfcedc42f6e18e9b04b672f355f"}},{"ruleId":"D1","level":"warning","message":{"text":"GeminiCliTool::execute (cyclomatic 16): GeminiCliTool::execute 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/zeroclaw-tools/src/gemini_cli.rs"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"2acb9c3189e42af9df82325ed7dba844e89d09595467be54ca855b043bea47f5"}},{"ruleId":"D1","level":"warning","message":{"text":"GitOperationsTool::validate_metadata_closure (cyclomatic 16): GitOperationsTool::validate_metadata_closure 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/zeroclaw-tools/src/git_operations.rs"},"region":{"startLine":305}}}],"partialFingerprints":{"codehealthFindingId/v1":"1664380f952fa4a84a5ff297b6011098a6d1ef37b92ff7a011b095451981725c"}},{"ruleId":"D1","level":"warning","message":{"text":"HttpRequestTool::validate_url_policy (cyclomatic 16): HttpRequestTool::validate_url_policy 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/zeroclaw-tools/src/http_request.rs"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a2622091e6a66a17a5c4375b37b0bc03818ec3d93f896640bdf63de94a53f5b"}},{"ruleId":"D1","level":"warning","message":{"text":"NotionTool::execute (cyclomatic 16): NotionTool::execute 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/zeroclaw-tools/src/notion_tool.rs"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"3991468e4c731c1620de10290b273317053d6786a3fa92979193696e13dc3e85"}},{"ruleId":"D1","level":"warning","message":{"text":"OpenCodeCliTool::execute (cyclomatic 16): OpenCodeCliTool::execute 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/zeroclaw-tools/src/opencode_cli.rs"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a8f5b74daa051abe5e9375ba07eb2547c8470cf59b1272ef5f43a6cf2b19c36"}},{"ruleId":"D1","level":"warning","message":{"text":"ProxyConfigTool::handle_set (cyclomatic 16): ProxyConfigTool::handle_set 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/zeroclaw-tools/src/proxy_config.rs"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"26634f886396922c25e7dcbdbeac30f77f9ff3e4d13210a645fb3c543f437ea0"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw::async_main_inner (cognitive 907): zeroclaw::async_main_inner has cognitive complexity 907 (threshold 15). Drivers by points: if/else 246 (584 pts), match/switch 60 (185 pts), loops 36 (111 pts), boolean chains 27 (nesting depth added 538). To reduce it, split the body into named stages: move each independent step or branch into 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/main.rs"},"region":{"startLine":9633}}}],"partialFingerprints":{"codehealthFindingId/v1":"06fb546d6bf09b0ca59280b2bcc76ed394296187ff218c548284541e72ff462d"}},{"ruleId":"D2","level":"warning","message":{"text":"DiscordChannel::listen (cognitive 713): DiscordChannel::listen has cognitive complexity 713 (threshold 15). Drivers by points: if/else 130 (557 pts), match/switch 21 (117 pts), boolean chains 29, loops 3 (10 pts) (nesting depth added 530). 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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":1999}}}],"partialFingerprints":{"codehealthFindingId/v1":"455673080d46e46397c04d7e65b488f4993fc899f7930778576509507f80ae81"}},{"ruleId":"D2","level":"warning","message":{"text":"Config::validate (cognitive 486): Config::validate has cognitive complexity 486 (threshold 15). Drivers by points: if/else 179 (341 pts), loops 51 (80 pts), match/switch 15 (34 pts), boolean chains 31 (nesting depth added 210). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-config/src/schema.rs"},"region":{"startLine":24639}}}],"partialFingerprints":{"codehealthFindingId/v1":"503fba3b14adc002da8eee886aebeaf52a825e2ee01a89dadf658f1cd87e4bc5"}},{"ruleId":"D2","level":"warning","message":{"text":"zerocode::app::run (cognitive 437): zerocode::app::run has cognitive complexity 437 (threshold 15). Drivers by points: if/else 93 (274 pts), match/switch 75 (137 pts), boolean chains 25, loops 1 (nesting depth added 243). 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":"apps/zerocode/src/app.rs"},"region":{"startLine":1673}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab17351b1a3a38e09dd0263df62f22d006381ae6cb3e1b725aa7a583976bde88"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw::run_quickstart_cli (cognitive 353): zeroclaw::run_quickstart_cli has cognitive complexity 353 (threshold 15). Drivers by points: if/else 87 (275 pts), match/switch 22 (45 pts), loops 7 (20 pts), boolean chains 13 (nesting depth added 224). To reduce it, split the body into named stages: move each independent step or branch into 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/main.rs"},"region":{"startLine":1847}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fb169d2d3293087ed4de15622a7e3ba44e78a1703970cc865c90f21188fc93a"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::agent::turn::run_tool_call_loop_impl (cognitive 350): zeroclaw_runtime::agent::turn::run_tool_call_loop_impl has cognitive complexity 350 (threshold 15). Drivers by points: if/else 113 (262 pts), boolean chains 36, match/switch 14 (33 pts), loops 7 (19 pts) (nesting depth added 180). 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/zeroclaw-runtime/src/agent/turn/mod.rs"},"region":{"startLine":1657}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6a35aa39ef362aef754ccc89b77e15b2d541545aa54568be26d0746320d375c"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::orchestrator::process_channel_message_body (cognitive 347): zeroclaw_channels::orchestrator::process_channel_message_body has cognitive complexity 347 (threshold 15). Drivers by points: if/else 138 (254 pts), match/switch 18 (43 pts), boolean chains 40, loops 4 (10 pts) (nesting depth added 147). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":9281}}}],"partialFingerprints":{"codehealthFindingId/v1":"e052a052e06773baf11e36f205b061efc368fef46016d5e3764b52c51e0f25a9"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::agent::loop_::run_inner (cognitive 293): zeroclaw_runtime::agent::loop_::run_inner has cognitive complexity 293 (threshold 15). Drivers by points: if/else 95 (221 pts), match/switch 15 (37 pts), loops 6 (19 pts), boolean chains 16 (nesting depth added 161). 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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":1620}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc8ae24ad04ff3129f31eb10666f4cdf10a72c5855dab17977c64413ae4278e5"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_tool_call_parser::parse_tool_calls (cognitive 254): zeroclaw_tool_call_parser::parse_tool_calls has cognitive complexity 254 (threshold 15). Drivers by points: if/else 73 (202 pts), loops 13 (39 pts), boolean chains 11, match/switch 1 (2 pts) (nesting depth added 156). 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/zeroclaw-tool-call-parser/src/lib.rs"},"region":{"startLine":2090}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce46bb7f04a6b324145bf74bbff8ee37ea8d1be494362e531fa58c93516da9af"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::agent::turn::stream_consume::consume_provider_streaming_response_with_policy (cognitive 244): zeroclaw_runtime::agent::turn::stream_consume::consume_provider_streaming_response_with_policy has cognitive complexity 244 (threshold 15). Drivers by points: if/else 69 (220 pts), boolean chains 16, match/switch 3 (7 pts), loops 1 (nesting depth added 155). 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/zeroclaw-runtime/src/agent/turn/stream_consume.rs"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ec2097f428deae2d7c083167c6a6a4060dec30cab78fb1e021298c156fe6191"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::orchestrator::collect_configured_channels_with_authority (cognitive 239): zeroclaw_channels::orchestrator::collect_configured_channels_with_authority has cognitive complexity 239 (threshold 15). Drivers by points: if/else 112 (189 pts), loops 32, match/switch 7 (15 pts), boolean chains 3 (nesting depth added 85). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":14744}}}],"partialFingerprints":{"codehealthFindingId/v1":"70b9ad70c274c0b1f964c1cb619010e60ebefdff0fdcf1f858df4f7b171f094f"}},{"ruleId":"D2","level":"warning","message":{"text":"Chat::handle_mouse (cognitive 208): Chat::handle_mouse has cognitive complexity 208 (threshold 15). Drivers by points: if/else 53 (142 pts), match/switch 15 (51 pts), boolean chains 15 (nesting depth added 125). 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":"apps/zerocode/src/chat.rs"},"region":{"startLine":5387}}}],"partialFingerprints":{"codehealthFindingId/v1":"b32bdc9348a4ce4020af83a3cbfb93b2783a955e9f9d113e2020de99ea1df98c"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::policy::scan_unquoted_segments (cognitive 201): zeroclaw_config::policy::scan_unquoted_segments has cognitive complexity 201 (threshold 15). Drivers by points: if/else 45 (140 pts), boolean chains 31, match/switch 6 (24 pts), loops 3 (6 pts) (nesting depth added 116). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-config/src/policy.rs"},"region":{"startLine":1614}}}],"partialFingerprints":{"codehealthFindingId/v1":"fea14119489d30d11e26c8ca7c0a4cea411794b30a0a3ec8a8ec5c097837fdb4"}},{"ruleId":"D2","level":"warning","message":{"text":"Chat::handle_key (cognitive 194): Chat::handle_key has cognitive complexity 194 (threshold 15). Drivers by points: if/else 74 (147 pts), match/switch 15 (29 pts), boolean chains 18 (nesting depth added 87). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/chat.rs"},"region":{"startLine":4024}}}],"partialFingerprints":{"codehealthFindingId/v1":"79e08e0e7d9460ee335bf1efb86c3be8e810352a6e44a6bbcd449b44b3dc5099"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_gateway::ws::handle_socket (cognitive 189): zeroclaw_gateway::ws::handle_socket has cognitive complexity 189 (threshold 15). Drivers by points: if/else 48 (132 pts), match/switch 20 (51 pts), boolean chains 4, loops 2 (nesting depth added 115). 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/zeroclaw-gateway/src/ws.rs"},"region":{"startLine":592}}}],"partialFingerprints":{"codehealthFindingId/v1":"4dd9e1b532171d41cda133f44774cabc3ac0f8a239c5882c04279e1eb5da04b4"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_macros::derive_configurable (cognitive 166): zeroclaw_macros::derive_configurable has cognitive complexity 166 (threshold 15). Drivers by points: if/else 57 (143 pts), match/switch 9 (16 pts), boolean chains 6, loops 1 (nesting depth added 93). 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/zeroclaw-macros/src/lib.rs"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"467f9a1dac336f962c79ac5f03e32ecc960da6e00c8ea1c4042b06082951edfd"}},{"ruleId":"D2","level":"warning","message":{"text":"ScopedToolRegistry::assemble_prepared (cognitive 163): ScopedToolRegistry::assemble_prepared has cognitive complexity 163 (threshold 15). Drivers by points: if/else 46 (115 pts), boolean chains 19, loops 6 (18 pts), match/switch 6 (11 pts) (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/zeroclaw-runtime/src/tools/scoped.rs"},"region":{"startLine":699}}}],"partialFingerprints":{"codehealthFindingId/v1":"24af75ee8a08aa2006eaeed476f06f429eaf7f6089ca9669bab298bb6af8caad"}},{"ruleId":"D2","level":"warning","message":{"text":"RpcDispatcher::session_new_with_mode (cognitive 157): RpcDispatcher::session_new_with_mode has cognitive complexity 157 (threshold 15). Drivers by points: if/else 60 (114 pts), match/switch 12 (26 pts), boolean chains 13, loops 1 (4 pts) (nesting depth added 71). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":4484}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5f646715e5250f97cf843d30ea265e44df8eba3785f317ac6a0ac034cd3b57f"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::agent::turn::drive_live_sop_actions (cognitive 157): zeroclaw_runtime::agent::turn::drive_live_sop_actions has cognitive complexity 157 (threshold 15). Drivers by points: if/else 26 (96 pts), match/switch 13 (53 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 111). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/agent/turn/mod.rs"},"region":{"startLine":4330}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a584d8f216c145b194c7109ce1647b4b3cb71d7bf1467984ce041cad2928827"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::tools::all_tools_with_runtime_on_thread (cognitive 156): zeroclaw_runtime::tools::all_tools_with_runtime_on_thread has cognitive complexity 156 (threshold 15). Drivers by points: if/else 74 (92 pts), boolean chains 37, match/switch 11 (23 pts), loops 2 (4 pts) (nesting depth added 32). 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/zeroclaw-runtime/src/tools/mod.rs"},"region":{"startLine":2306}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa2fea0c589435230936120fea7547c8f9569e0b961cc488b8e7040733489962"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelRoutingConfigTool::handle_upsert_agent (cognitive 155): ModelRoutingConfigTool::handle_upsert_agent has cognitive complexity 155 (threshold 15). Drivers by points: if/else 71 (124 pts), match/switch 9 (21 pts), boolean chains 10 (nesting depth added 65). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/model_routing_config.rs"},"region":{"startLine":1157}}}],"partialFingerprints":{"codehealthFindingId/v1":"d535bcbf46b7b808391db409deb725756cb6ea6784205956fea2a307052d1514"}},{"ruleId":"D2","level":"warning","message":{"text":"QuickstartPane::handle_modal_key (cognitive 152): QuickstartPane::handle_modal_key has cognitive complexity 152 (threshold 15). Drivers by points: if/else 41 (114 pts), match/switch 11 (25 pts), boolean chains 8, loops 1 (5 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":"apps/zerocode/src/quickstart_pane.rs"},"region":{"startLine":1610}}}],"partialFingerprints":{"codehealthFindingId/v1":"65e320169dd05d967d486fa0ba5ded6b59276fe159e9779fc938b9725ca647ef"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_gateway::run_gateway_with_plugin_webhooks (cognitive 152): zeroclaw_gateway::run_gateway_with_plugin_webhooks has cognitive complexity 152 (threshold 15). Drivers by points: if/else 53 (72 pts), match/switch 31 (67 pts), loops 4 (8 pts), boolean chains 5 (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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":1386}}}],"partialFingerprints":{"codehealthFindingId/v1":"52abcff1628172b95a31823e365a105ad9869294b2eba77354d0e68207a348f2"}},{"ruleId":"D2","level":"warning","message":{"text":"zerocode::chat::render_tool_entry (cognitive 146): zerocode::chat::render_tool_entry has cognitive complexity 146 (threshold 15). Drivers by points: if/else 60 (119 pts), loops 6 (14 pts), match/switch 4 (8 pts), boolean chains 5 (nesting depth added 71). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/chat.rs"},"region":{"startLine":7173}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cc9a8098b413029c76ff222be843b5b7f04e2846f4566c0e1a7cb456f6dd62d"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::line::handle_webhook (cognitive 146): zeroclaw_channels::line::handle_webhook has cognitive complexity 146 (threshold 15). Drivers by points: if/else 30 (110 pts), match/switch 13 (34 pts), boolean chains 1, loops 1 (nesting depth added 101). 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/zeroclaw-channels/src/line.rs"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc73504f5eb73d2262ece6c7628c74d654b49c9ad279fe32a3f2db00f24d160a"}},{"ruleId":"D2","level":"warning","message":{"text":"zerocode::quickstart_pane::draw_modal (cognitive 142): zerocode::quickstart_pane::draw_modal has cognitive complexity 142 (threshold 15). Drivers by points: if/else 59 (118 pts), loops 6 (15 pts), match/switch 4 (5 pts), boolean chains 4 (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":"apps/zerocode/src/quickstart_pane.rs"},"region":{"startLine":2913}}}],"partialFingerprints":{"codehealthFindingId/v1":"53bfdd92ad9db0e82b621d36b1917d645ccc99b254e1ef543f5fc1aeb512ee10"}},{"ruleId":"D2","level":"warning","message":{"text":"LarkChannel::listen_ws (cognitive 142): LarkChannel::listen_ws has cognitive complexity 142 (threshold 15). Drivers by points: if/else 27 (82 pts), match/switch 17 (55 pts), boolean chains 4, loops 1 (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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":1420}}}],"partialFingerprints":{"codehealthFindingId/v1":"d04904ca745dd5b73efb2d6c3fdd557d65968f828a706da266b88c3a624c7159"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::orchestrator::start_channels_with_authority_and_plugin_webhooks (cognitive 142): zeroclaw_channels::orchestrator::start_channels_with_authority_and_plugin_webhooks has cognitive complexity 142 (threshold 15). Drivers by points: if/else 50 (105 pts), loops 11 (26 pts), match/switch 3 (6 pts), boolean chains 5 (nesting depth added 73). 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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":17020}}}],"partialFingerprints":{"codehealthFindingId/v1":"5aa5d4c1cb1872e49cdf6913de354c3a3b69039dca02274c834b223f07c32bcd"}},{"ruleId":"D2","level":"warning","message":{"text":"WeChatChannel::listen (cognitive 137): WeChatChannel::listen has cognitive complexity 137 (threshold 15). Drivers by points: if/else 32 (104 pts), match/switch 7 (17 pts), loops 4 (9 pts), boolean chains 7 (nesting depth added 87). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/wechat.rs"},"region":{"startLine":2808}}}],"partialFingerprints":{"codehealthFindingId/v1":"145beac847a445ad15dee6281ec41cafa08dd7386ac887f39b1be0f4aebdb6e9"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_gateway::ws::process_chat_message (cognitive 134): zeroclaw_gateway::ws::process_chat_message has cognitive complexity 134 (threshold 15). Drivers by points: if/else 32 (84 pts), match/switch 18 (44 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 79). 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/zeroclaw-gateway/src/ws.rs"},"region":{"startLine":2038}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cc1efecc9c64a18199eceed00aad03e96dc6699ac3a6d13293e9fe9e71ccb30"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_providers::compatible::sse_bytes_to_events_for_contract (cognitive 134): zeroclaw_providers::compatible::sse_bytes_to_events_for_contract has cognitive complexity 134 (threshold 15). Drivers by points: if/else 21 (101 pts), loops 6 (21 pts), match/switch 4 (10 pts), boolean chains 2 (nesting depth added 101). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":2833}}}],"partialFingerprints":{"codehealthFindingId/v1":"613136757cf370cb044ae633c8847f84bac96525a901045b85bdb425c29ad1c5"}},{"ruleId":"D2","level":"warning","message":{"text":"Agent::turn_streamed_with_steering_body (cognitive 133): Agent::turn_streamed_with_steering_body has cognitive complexity 133 (threshold 15). Drivers by points: if/else 36 (101 pts), match/switch 7 (17 pts), boolean chains 8, loops 3 (7 pts) (nesting depth added 79). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":4912}}}],"partialFingerprints":{"codehealthFindingId/v1":"afbb3765cd9c21910322abf4eeb2a7424d7c49271781b68b2176f4ed2e699c24"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::identity::aieos_to_system_prompt (cognitive 132): zeroclaw_runtime::identity::aieos_to_system_prompt has cognitive complexity 132 (threshold 15). Drivers by points: if/else 45 (84 pts), loops 12 (36 pts), boolean chains 12 (nesting depth added 63). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/identity.rs"},"region":{"startLine":719}}}],"partialFingerprints":{"codehealthFindingId/v1":"10aef30284a79bd4991bb05550b54fe23278a8f82a5b83c37a61d536757b8209"}},{"ruleId":"D2","level":"warning","message":{"text":"SlackChannel::listen (cognitive 131): SlackChannel::listen has cognitive complexity 131 (threshold 15). Drivers by points: if/else 31 (106 pts), loops 6 (16 pts), boolean chains 5, match/switch 1 (4 pts) (nesting depth added 88). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/slack.rs"},"region":{"startLine":5808}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdb52902e71654f8f4c09f858ec96a4ef7818f0d2579f1d67fdf8b434cabfe07"}},{"ruleId":"D2","level":"warning","message":{"text":"SlackChannel::listen_socket_mode (cognitive 128): SlackChannel::listen_socket_mode has cognitive complexity 128 (threshold 15). Drivers by points: if/else 30 (109 pts), match/switch 4 (10 pts), boolean chains 6, loops 2 (3 pts) (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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":4229}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e3061348ca20e846854731046b64ed5c163be823585790ba36bf8f09d783d88"}},{"ruleId":"D2","level":"warning","message":{"text":"RpcDispatcher::run_session_prompt (cognitive 118): RpcDispatcher::run_session_prompt has cognitive complexity 118 (threshold 15). Drivers by points: if/else 48 (69 pts), match/switch 23 (34 pts), boolean chains 13, loops 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":6590}}}],"partialFingerprints":{"codehealthFindingId/v1":"feeeb98d6095cd9193cc62e135e6e5a733bbd3b8102aa6826b0e5e1a938d4fde"}},{"ruleId":"D2","level":"warning","message":{"text":"SignalChannel::listen (cognitive 117): SignalChannel::listen has cognitive complexity 117 (threshold 15). Drivers by points: if/else 14 (79 pts), loops 5 (19 pts), match/switch 5 (17 pts), boolean chains 2 (nesting depth added 91). 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/zeroclaw-channels/src/signal.rs"},"region":{"startLine":1248}}}],"partialFingerprints":{"codehealthFindingId/v1":"d01b5129a69b3ba68803c40b63e231f6f9eddfef822127253d11e9cdccc7f651"}},{"ruleId":"D2","level":"warning","message":{"text":"AnthropicModelProvider::parse_anthropic_sse_from_reader (cognitive 116): AnthropicModelProvider::parse_anthropic_sse_from_reader has cognitive complexity 116 (threshold 15). Drivers by points: if/else 29 (97 pts), match/switch 5 (13 pts), boolean chains 5, loops 1 (nesting depth added 76). 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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":2485}}}],"partialFingerprints":{"codehealthFindingId/v1":"8514819041b9b887ef46a88000ed7aab05455430cfa6751c92571e08265c0fdc"}},{"ruleId":"D2","level":"warning","message":{"text":"QQChannel::listen (cognitive 115): QQChannel::listen has cognitive complexity 115 (threshold 15). Drivers by points: if/else 30 (94 pts), match/switch 7 (18 pts), loops 2, boolean chains 1 (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/zeroclaw-channels/src/qq.rs"},"region":{"startLine":1401}}}],"partialFingerprints":{"codehealthFindingId/v1":"c834505cc4d8a04f44611aa1d27576c87631b1e412f4b65b3c04162d29ac61b3"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::sop::dispatch::dispatch_sop_event_filtered (cognitive 113): zeroclaw_runtime::sop::dispatch::dispatch_sop_event_filtered has cognitive complexity 113 (threshold 15). Drivers by points: loops 17 (40 pts), if/else 21 (36 pts), match/switch 15 (35 pts), boolean chains 2 (nesting depth added 58). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/sop/dispatch.rs"},"region":{"startLine":688}}}],"partialFingerprints":{"codehealthFindingId/v1":"57430504d21de1ad5090fb1c695053ace1065cd87d89727726d1263954093d6d"}},{"ruleId":"D2","level":"warning","message":{"text":"ReliableModelProvider::chat_with_tool_round_policy (cognitive 111): ReliableModelProvider::chat_with_tool_round_policy has cognitive complexity 111 (threshold 15). Drivers by points: if/else 21 (93 pts), boolean chains 8, loops 3 (6 pts), match/switch 1 (4 pts) (nesting depth added 78). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":3594}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d6f2ac0387304ecb7d4bd47b7619522d16c3919296fe15e5ccf17d0d604a48c"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::agent::turn::provider_call::call_provider (cognitive 111): zeroclaw_runtime::agent::turn::provider_call::call_provider has cognitive complexity 111 (threshold 15). Drivers by points: if/else 28 (59 pts), match/switch 12 (47 pts), boolean chains 5 (nesting depth added 66). 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/zeroclaw-runtime/src/agent/turn/provider_call.rs"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cec0da6cab7e8706fbc5eed20bc0d8f9c3a5060d2f1b1d5579357a667ba927a"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_mouse_inner (cognitive 109): App::handle_mouse_inner has cognitive complexity 109 (threshold 15). Drivers by points: if/else 38 (96 pts), boolean chains 12, match/switch 1 (nesting depth added 58). 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":1385}}}],"partialFingerprints":{"codehealthFindingId/v1":"acc922ad57642a8f70265ae1c3a42127f0ec60a2406c65f8e3b5040ca3fded03"}},{"ruleId":"D2","level":"warning","message":{"text":"ReliableModelProvider::chat_with_tools (cognitive 105): ReliableModelProvider::chat_with_tools has cognitive complexity 105 (threshold 15). Drivers by points: if/else 19 (88 pts), boolean chains 7, loops 3 (6 pts), match/switch 1 (4 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/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":3251}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b79640ec56bb8ef88031d87901161b05635699d1c68e8c412ff211a35cb2d07"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::daemon::run_heartbeat_worker (cognitive 104): zeroclaw_runtime::daemon::run_heartbeat_worker has cognitive complexity 104 (threshold 15). Drivers by points: if/else 28 (63 pts), match/switch 7 (26 pts), loops 4 (11 pts), boolean chains 4 (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/zeroclaw-runtime/src/daemon/mod.rs"},"region":{"startLine":2473}}}],"partialFingerprints":{"codehealthFindingId/v1":"59db321f3ba763659d1417485262f571bd67f6e0bc2bfebce5b737a30c2d4a90"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::orchestrator::run_message_dispatch_loop_until_cancelled (cognitive 99): zeroclaw_channels::orchestrator::run_message_dispatch_loop_until_cancelled has cognitive complexity 99 (threshold 15). Drivers by points: if/else 22 (50 pts), match/switch 8 (26 pts), loops 6 (15 pts), boolean chains 8 (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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":12325}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0f8e65aea37dff30ff8b93056d17406b1a24f81aafccf33ee3809afa0fce756"}},{"ruleId":"D2","level":"warning","message":{"text":"SqliteMemory::recall_scoped (cognitive 99): SqliteMemory::recall_scoped has cognitive complexity 99 (threshold 15). Drivers by points: if/else 40 (79 pts), loops 5 (14 pts), boolean chains 6 (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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":1050}}}],"partialFingerprints":{"codehealthFindingId/v1":"d94636f14a5e2ca0fe77f6e046b0d84442485e35aa06f2b1660d09059cda5cd0"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw::skills::handle_command (cognitive 95): zeroclaw::skills::handle_command has cognitive complexity 95 (threshold 15). Drivers by points: if/else 32 (65 pts), loops 5 (15 pts), match/switch 5 (11 pts), boolean chains 4 (nesting depth added 49). 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/skills/mod.rs"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"0467f6f6849ba4b73159da264e5d9034a9dc2a299d7e1d60e4cda255a9911445"}},{"ruleId":"D2","level":"warning","message":{"text":"SqliteSessionBackend::migrate_from_jsonl_with_handlers (cognitive 89): SqliteSessionBackend::migrate_from_jsonl_with_handlers has cognitive complexity 89 (threshold 15). Drivers by points: if/else 28 (61 pts), match/switch 9 (19 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddc007697ac50f2397e741fce1aa0166c556874e53347f6e31b14d7bd565065a"}},{"ruleId":"D2","level":"warning","message":{"text":"ReliableModelProvider::chat_with_history (cognitive 89): ReliableModelProvider::chat_with_history has cognitive complexity 89 (threshold 15). Drivers by points: if/else 16 (74 pts), loops 3 (6 pts), boolean chains 5, match/switch 1 (4 pts) (nesting depth added 64). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":2820}}}],"partialFingerprints":{"codehealthFindingId/v1":"91270e8b29a0a46808cc80883d31c4db855a07f419eed037589c95e4ba5313a4"}},{"ruleId":"D2","level":"warning","message":{"text":"Chat::relay_turn (cognitive 88): Chat::relay_turn has cognitive complexity 88 (threshold 15). Drivers by points: if/else 16 (55 pts), match/switch 9 (28 pts), loops 2 (4 pts), boolean chains 1 (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":"crates/zeroclaw-gateway/src/chat_core.rs"},"region":{"startLine":564}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c8eb60c21178d2b844c6595aefc4a15749a7da4151e4c22ec540e99ba809d2f"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::policy::split_shell_words_with_metadata (cognitive 85): zeroclaw_config::policy::split_shell_words_with_metadata has cognitive complexity 85 (threshold 15). Drivers by points: if/else 27 (69 pts), match/switch 4 (13 pts), boolean chains 2, loops 1 (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/zeroclaw-config/src/policy.rs"},"region":{"startLine":2193}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5434302813e7d1dc0507a74ee06b2fc67e6939dfe2c9e8c5d9e93917938af8d"}},{"ruleId":"D2","level":"warning","message":{"text":"ReliableModelProvider::chat_with_system (cognitive 85): ReliableModelProvider::chat_with_system has cognitive complexity 85 (threshold 15). Drivers by points: if/else 16 (70 pts), loops 3 (6 pts), boolean chains 5, match/switch 1 (4 pts) (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":"crates/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":2520}}}],"partialFingerprints":{"codehealthFindingId/v1":"64a99646ac318538c48bf16855555507859edc4ae137a6a6d614cc2dc6b7600d"}},{"ruleId":"D2","level":"warning","message":{"text":"IrcChannel::listen (cognitive 83): IrcChannel::listen has cognitive complexity 83 (threshold 15). Drivers by points: if/else 28 (72 pts), boolean chains 5, loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 47). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/irc.rs"},"region":{"startLine":419}}}],"partialFingerprints":{"codehealthFindingId/v1":"038eb2b291811198ef09d081574b100be71b625b0ae6f39d7ac5dceaa5554e25"}},{"ruleId":"D2","level":"warning","message":{"text":"zerocode::chat::markdown_to_lines (cognitive 79): zerocode::chat::markdown_to_lines has cognitive complexity 79 (threshold 15). Drivers by points: if/else 25 (58 pts), match/switch 5 (16 pts), boolean chains 4, loops 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":"apps/zerocode/src/chat.rs"},"region":{"startLine":9014}}}],"partialFingerprints":{"codehealthFindingId/v1":"463c10bbea79adf894212d5ca448f8cd48b9d5fb460afe582eacb4852e811042"}},{"ruleId":"D2","level":"warning","message":{"text":"WhatsAppWebChannel::listen (cognitive 79): WhatsAppWebChannel::listen has cognitive complexity 79 (threshold 15). Drivers by points: if/else 21 (53 pts), match/switch 5 (16 pts), boolean chains 5, loops 2 (5 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/zeroclaw-channels/src/whatsapp_web.rs"},"region":{"startLine":3927}}}],"partialFingerprints":{"codehealthFindingId/v1":"697738dc78030d875753ca1becb5ca2c6615a5a483ae2245032d73c9f3bfcd60"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatState::apply_update (cognitive 76): ChatState::apply_update has cognitive complexity 76 (threshold 15). Drivers by points: if/else 31 (64 pts), match/switch 4 (7 pts), boolean chains 3, loops 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":"apps/zerocode/src/chat.rs"},"region":{"startLine":11831}}}],"partialFingerprints":{"codehealthFindingId/v1":"6716f2e805ed6c4acc6ca7bb73c596845641aaf0ad47642fb72037e0cf7622d9"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::daemon::run_with_authority (cognitive 76): zeroclaw_runtime::daemon::run_with_authority has cognitive complexity 76 (threshold 15). Drivers by points: if/else 37 (50 pts), match/switch 9 (16 pts), loops 4 (6 pts), boolean chains 4 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/daemon/mod.rs"},"region":{"startLine":715}}}],"partialFingerprints":{"codehealthFindingId/v1":"531c34c3576a77db14b36d2572e3fd7ca520e0ee7273811cf6647853c4cc90e1"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw::cron::handle_command (cognitive 76): zeroclaw::cron::handle_command has cognitive complexity 76 (threshold 15). Drivers by points: if/else 34 (67 pts), match/switch 2 (4 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 36). 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/cron/mod.rs"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"61cd7b5a1f14d98eb3714dd59c57922bedae08219c683b31c6caa843c3b4e0b0"}},{"ruleId":"D2","level":"warning","message":{"text":"SecurityPolicy::forbidden_path_argument_impl (cognitive 75): SecurityPolicy::forbidden_path_argument_impl has cognitive complexity 75 (threshold 15). Drivers by points: if/else 24 (55 pts), match/switch 4 (9 pts), boolean chains 8, loops 2 (3 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/zeroclaw-config/src/policy.rs"},"region":{"startLine":4719}}}],"partialFingerprints":{"codehealthFindingId/v1":"03dceb7d19afeec7cf2f9a974e100a93aecf9a43317080ab79c6dbfeb2e44e6e"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::quickstart::apply_channels (cognitive 75): zeroclaw_runtime::quickstart::apply_channels has cognitive complexity 75 (threshold 15). Drivers by points: if/else 19 (60 pts), boolean chains 9, loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 44). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/quickstart/mod.rs"},"region":{"startLine":1645}}}],"partialFingerprints":{"codehealthFindingId/v1":"ead7bc7f7f3313a222da864f6517f6fe5b04f61d41f082c9b0b2197711ef431d"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::sop::parse_steps (cognitive 71): zeroclaw_runtime::sop::parse_steps has cognitive complexity 71 (threshold 15). Drivers by points: if/else 21 (63 pts), match/switch 1 (4 pts), boolean chains 3, loops 1 (nesting depth added 45). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/sop/mod.rs"},"region":{"startLine":1309}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4d133ddc5a7f443f4f9e322b9dd134695f2430306a16db8c97199169eb1ab01"}},{"ruleId":"D2","level":"warning","message":{"text":"OtelObserver::record_event (cognitive 70): OtelObserver::record_event has cognitive complexity 70 (threshold 15). Drivers by points: if/else 27 (64 pts), boolean chains 5, match/switch 1 (nesting depth added 37). 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/zeroclaw-runtime/src/observability/otel.rs"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"f223db4e1253b587f7914e69f11e632a8d0f70fe283f6fdb954cbeed952bdf61"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::agent::turn::max_iter::finish_after_max_iterations (cognitive 70): zeroclaw_runtime::agent::turn::max_iter::finish_after_max_iterations has cognitive complexity 70 (threshold 15). Drivers by points: if/else 29 (44 pts), match/switch 8 (17 pts), boolean chains 5, loops 2 (4 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/zeroclaw-runtime/src/agent/turn/max_iter.rs"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"07a3c07581bd4beac9202822e64c6773119664312cb12e8f0c25969fd772f6af"}},{"ruleId":"D2","level":"warning","message":{"text":"WhatsAppChannel::parse_webhook_payload (cognitive 69): WhatsAppChannel::parse_webhook_payload has cognitive complexity 69 (threshold 15). Drivers by points: if/else 16 (43 pts), match/switch 4 (20 pts), loops 3 (6 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/zeroclaw-channels/src/whatsapp.rs"},"region":{"startLine":464}}}],"partialFingerprints":{"codehealthFindingId/v1":"b006f4e3d0fd9ddf2e5de0a2e2980d18fba4d9d9548839161eb53d4ef44d4585"}},{"ruleId":"D2","level":"warning","message":{"text":"Dashboard::draw_health (cognitive 64): Dashboard::draw_health has cognitive complexity 64 (threshold 15). Drivers by points: if/else 17 (42 pts), loops 4 (13 pts), match/switch 2 (8 pts), boolean chains 1 (nesting depth added 40). 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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":1287}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ca2a0d6c717af3a5e73ad818f447bf7fb4bf4b747d2225167c57cd351642ed6"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_gateway::api_config::handle_patch (cognitive 64): zeroclaw_gateway::api_config::handle_patch has cognitive complexity 64 (threshold 15). Drivers by points: if/else 15 (37 pts), match/switch 12 (22 pts), loops 3, 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/zeroclaw-gateway/src/api_config.rs"},"region":{"startLine":2575}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb58a5d194de823cadc15f430f0010e741888de41ccf93f0dcfc2258683dd012"}},{"ruleId":"D2","level":"warning","message":{"text":"zerocode::config::load_persisted (cognitive 63): zerocode::config::load_persisted has cognitive complexity 63 (threshold 15). Drivers by points: if/else 14 (36 pts), match/switch 7 (22 pts), loops 2 (5 pts) (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/config/mod.rs"},"region":{"startLine":919}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3b3f0c6ce0d851d857a96e433b1f9cd8eccdda8a5bc6c53a483b6b0d927234e"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::doctor::check_config_semantics (cognitive 63): zeroclaw_runtime::doctor::check_config_semantics has cognitive complexity 63 (threshold 15). Drivers by points: if/else 31 (45 pts), loops 9, match/switch 3 (6 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/zeroclaw-runtime/src/doctor/mod.rs"},"region":{"startLine":1163}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ef6138a3859a20ef68a0957e370080da1d7d62815466fc41a762739505be829"}},{"ruleId":"D2","level":"warning","message":{"text":"TelegramChannel::markdown_to_telegram_html (cognitive 62): TelegramChannel::markdown_to_telegram_html has cognitive complexity 62 (threshold 15). Drivers by points: if/else 17 (43 pts), boolean chains 12, loops 3 (4 pts), match/switch 1 (3 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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":6189}}}],"partialFingerprints":{"codehealthFindingId/v1":"81a765dbd245044ccccdb73672eaf1f81e473c7bd31772b36e3badfd3a54274b"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::skills::improver::extract_skill_executions_from_history (cognitive 61): zeroclaw_runtime::skills::improver::extract_skill_executions_from_history has cognitive complexity 61 (threshold 15). Drivers by points: if/else 12 (49 pts), loops 3 (7 pts), match/switch 1 (4 pts), boolean chains 1 (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/zeroclaw-runtime/src/skills/improver.rs"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"19287d5e55e45f039eaf19f9fcb7eb1d4258355cf3bf1c5bcc11459c4672da39"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw::sop::handle_command (cognitive 61): zeroclaw::sop::handle_command has cognitive complexity 61 (threshold 15). Drivers by points: if/else 16 (39 pts), loops 6 (16 pts), match/switch 3 (5 pts), boolean chains 1 (nesting depth added 35). 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/sop/mod.rs"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"001e8f2053bf6125c948987ed4bd7e378a7a7a66ec1630633a354abeb54c826a"}},{"ruleId":"D2","level":"warning","message":{"text":"zerocode::run (cognitive 60): zerocode::run has cognitive complexity 60 (threshold 15). Drivers by points: if/else 21 (35 pts), match/switch 9 (18 pts), boolean chains 7 (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":"apps/zerocode/src/main.rs"},"region":{"startLine":891}}}],"partialFingerprints":{"codehealthFindingId/v1":"75423ff4a6d5f508c3618acaf7a2afed7a5ab9965bd5e43c7d8a91a76a7f5285"}},{"ruleId":"D2","level":"warning","message":{"text":"AnthropicModelProvider::stream_chat_with_tool_round_policy (cognitive 60): AnthropicModelProvider::stream_chat_with_tool_round_policy has cognitive complexity 60 (threshold 15). Drivers by points: if/else 26 (42 pts), match/switch 6 (8 pts), loops 2 (7 pts), boolean chains 3 (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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":3255}}}],"partialFingerprints":{"codehealthFindingId/v1":"30eec797dac7831e4cf161646087033af853d6fc26c2df3a76a75f0902f91c6d"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::agent::turn::approval_gate::gate_tool_approval (cognitive 59): zeroclaw_runtime::agent::turn::approval_gate::gate_tool_approval has cognitive complexity 59 (threshold 15). Drivers by points: if/else 16 (38 pts), match/switch 5 (19 pts), boolean chains 2 (nesting depth added 36). 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/zeroclaw-runtime/src/agent/turn/approval_gate.rs"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"d989009684809fffddd39261d18497b44951508debf09a4b16996b69d69176b4"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::agent::turn::call_prep::prepare_tool_calls (cognitive 59): zeroclaw_runtime::agent::turn::call_prep::prepare_tool_calls has cognitive complexity 59 (threshold 15). Drivers by points: if/else 14 (40 pts), loops 3 (8 pts), boolean chains 6, match/switch 2 (5 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/zeroclaw-runtime/src/agent/turn/call_prep.rs"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf3cf346cd256a3afbbf25a66bee847f4b049cb858da8a44e33eca645062a897"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_tools::content_search::format_line_output (cognitive 59): zeroclaw_tools::content_search::format_line_output has cognitive complexity 59 (threshold 15). Drivers by points: if/else 17 (52 pts), boolean chains 3, match/switch 2 (3 pts), loops 1 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/content_search.rs"},"region":{"startLine":863}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f7ac7e5841feebc58efb61b2ade4d3d52e10f61b55f9c41072ef60983ba6a09"}},{"ruleId":"D2","level":"warning","message":{"text":"WeComWsChannel::listen (cognitive 58): WeComWsChannel::listen has cognitive complexity 58 (threshold 15). Drivers by points: if/else 10 (31 pts), match/switch 7 (23 pts), loops 2 (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":"crates/zeroclaw-channels/src/wecom_ws.rs"},"region":{"startLine":1548}}}],"partialFingerprints":{"codehealthFindingId/v1":"6918053110ef3089ef000510e305febbf78590afd5a3571dbba7bb8b61db0a64"}},{"ruleId":"D2","level":"warning","message":{"text":"RpcDispatcher::handle_session_messages_record (cognitive 58): RpcDispatcher::handle_session_messages_record has cognitive complexity 58 (threshold 15). Drivers by points: if/else 24 (47 pts), boolean chains 7, 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":8941}}}],"partialFingerprints":{"codehealthFindingId/v1":"855ae46755d9e0efb33310078555f1a01f88659e6ede7bc247da30a4f249e7a5"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_tool_call_parser::parse_glm_shortened_body (cognitive 58): zeroclaw_tool_call_parser::parse_glm_shortened_body has cognitive complexity 58 (threshold 15). Drivers by points: if/else 22 (41 pts), match/switch 2 (7 pts), boolean chains 6, loops 2 (4 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/zeroclaw-tool-call-parser/src/lib.rs"},"region":{"startLine":1727}}}],"partialFingerprints":{"codehealthFindingId/v1":"369afb56843e7d2129024b1803ed24af79d1697b649bf5a65fcf8636baba2734"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::schema::v2::synthesize_agent_brains (cognitive 57): zeroclaw_config::schema::v2::synthesize_agent_brains has cognitive complexity 57 (threshold 15). Drivers by points: if/else 22 (47 pts), match/switch 2 (5 pts), boolean chains 4, loops 1 (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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":1982}}}],"partialFingerprints":{"codehealthFindingId/v1":"65431f01c6efee6d54ce29ccfe3e291cbd30c7bcc33eb155df15fa4466271722"}},{"ruleId":"D2","level":"warning","message":{"text":"AnthropicModelProvider::convert_messages (cognitive 56): AnthropicModelProvider::convert_messages has cognitive complexity 56 (threshold 15). Drivers by points: if/else 18 (36 pts), match/switch 4 (14 pts), loops 2 (4 pts), boolean chains 2 (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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":1407}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7b504e2f09aa736da2216b2661c6ad795ebd8c68395ba95d574c163388f029c"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_providers::openai::run_responses_sse (cognitive 56): zeroclaw_providers::openai::run_responses_sse has cognitive complexity 56 (threshold 15). Drivers by points: if/else 15 (39 pts), loops 4 (9 pts), match/switch 3 (6 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/zeroclaw-providers/src/openai.rs"},"region":{"startLine":890}}}],"partialFingerprints":{"codehealthFindingId/v1":"1066334f3a3188df8380675b8529bcce24def755c55f1bea96ed2692ca4b4f33"}},{"ruleId":"D2","level":"warning","message":{"text":"DelegateTool::execute_agentic_with_approval_registry (cognitive 56): DelegateTool::execute_agentic_with_approval_registry has cognitive complexity 56 (threshold 15). Drivers by points: if/else 16 (29 pts), match/switch 13 (18 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":5225}}}],"partialFingerprints":{"codehealthFindingId/v1":"29c0d34f45058f9dd18c6356ebd9df8abff9d5ddcc558983b26e05e415dc3b95"}},{"ruleId":"D2","level":"warning","message":{"text":"GoogleWorkspaceTool::execute (cognitive 56): GoogleWorkspaceTool::execute has cognitive complexity 56 (threshold 15). Drivers by points: if/else 21 (29 pts), match/switch 9 (15 pts), loops 4 (8 pts), boolean chains 4 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/google_workspace.rs"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fcdea2483a3e9daa0e498a91d646acab18b884432e853a4fb48e1a34a67d76d"}},{"ruleId":"D2","level":"warning","message":{"text":"zerorelay::handle_client (cognitive 55): zerorelay::handle_client has cognitive complexity 55 (threshold 15). Drivers by points: if/else 14 (38 pts), match/switch 5 (14 pts), loops 2, 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":"apps/zerorelay/src/lib.rs"},"region":{"startLine":1607}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e6df8cb8495dae3ecbb0dbc619b00187bbbb42d210ccbddbf354b180a996670"}},{"ruleId":"D2","level":"warning","message":{"text":"WhatsAppWebChannel::send (cognitive 55): WhatsAppWebChannel::send has cognitive complexity 55 (threshold 15). Drivers by points: if/else 19 (31 pts), match/switch 6 (18 pts), boolean chains 5, 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/zeroclaw-channels/src/whatsapp_web.rs"},"region":{"startLine":3666}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb18b088f8d97f7072bcb30b59e6fcbea3af7d3fa5cd73c61b370190ad479465"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_tools::embedded_resource::format_mcp_tool_result_for_model (cognitive 55): zeroclaw_tools::embedded_resource::format_mcp_tool_result_for_model has cognitive complexity 55 (threshold 15). Drivers by points: if/else 17 (33 pts), match/switch 7 (19 pts), boolean chains 2, loops 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/embedded_resource.rs"},"region":{"startLine":538}}}],"partialFingerprints":{"codehealthFindingId/v1":"fee51dd4c6a1c74fbaf44077299d5c00bbf1c6ee704f4fba51c10a7e0a0fcf32"}},{"ruleId":"D2","level":"warning","message":{"text":"Chat::after_session_start (cognitive 54): Chat::after_session_start has cognitive complexity 54 (threshold 15). Drivers by points: if/else 16 (38 pts), match/switch 3 (7 pts), boolean chains 5, 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":"apps/zerocode/src/chat.rs"},"region":{"startLine":2448}}}],"partialFingerprints":{"codehealthFindingId/v1":"499d6a0af2bf71b3585df194a7026093b73d58dd93104590088d48be4e710ecb"}},{"ruleId":"D2","level":"warning","message":{"text":"zerocode::client::dial_through_relay_unbounded (cognitive 54): zerocode::client::dial_through_relay_unbounded has cognitive complexity 54 (threshold 15). Drivers by points: if/else 9 (30 pts), match/switch 7 (21 pts), loops 2, boolean chains 1 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/client.rs"},"region":{"startLine":1442}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0146d67268c43e5104abb873304e2837eb34a7158f2166c7925a34be0d41938"}},{"ruleId":"D2","level":"warning","message":{"text":"QQChannel::compose_qq_message (cognitive 54): QQChannel::compose_qq_message has cognitive complexity 54 (threshold 15). Drivers by points: if/else 20 (43 pts), match/switch 3 (8 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 29). 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/zeroclaw-channels/src/qq.rs"},"region":{"startLine":1067}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8afa92e2e3130a43c80b8dfbaaea99bcadf61489d2c636f67ff37812f7ee207"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_providers::openai_codex::process_responses_stream_event (cognitive 54): zeroclaw_providers::openai_codex::process_responses_stream_event has cognitive complexity 54 (threshold 15). Drivers by points: if/else 16 (44 pts), match/switch 2 (4 pts), boolean chains 3, loops 1 (3 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/zeroclaw-providers/src/openai_codex.rs"},"region":{"startLine":720}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2ed65a2c928c8f1c2100b6fe45de61bebe0ce478deb8337c0a4c4bc12dc5868"}},{"ruleId":"D2","level":"warning","message":{"text":"FrameScanner::feed (cognitive 53): FrameScanner::feed has cognitive complexity 53 (threshold 15). Drivers by points: if/else 13 (38 pts), loops 3 (7 pts), match/switch 2 (6 pts), boolean chains 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":"crates/zeroclaw-runtime/src/rpc/wss.rs"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"70b7315de23f0e79f929aff45ae76a50540f3ec8404c641c4ec3c8007483ccb1"}},{"ruleId":"D2","level":"warning","message":{"text":"MatrixChannel::finalize_draft (cognitive 52): MatrixChannel::finalize_draft has cognitive complexity 52 (threshold 15). Drivers by points: if/else 16 (37 pts), match/switch 4 (12 pts), boolean chains 3 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":5084}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f57d310e7d5f7299e8d58ab6092c68477b792a2cb5eee17a0964b92eda13618"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::policy::contains_unmodeled_shell_word_expansion (cognitive 52): zeroclaw_config::policy::contains_unmodeled_shell_word_expansion has cognitive complexity 52 (threshold 15). Drivers by points: if/else 14 (37 pts), boolean chains 9, match/switch 2 (5 pts), loops 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-config/src/policy.rs"},"region":{"startLine":3216}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e5e6d8ba0f180a4dcbdeb454bb909860037c99b050892eccee90e1d8ccba1fc"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::quickstart::apply_model_provider (cognitive 52): zeroclaw_runtime::quickstart::apply_model_provider has cognitive complexity 52 (threshold 15). Drivers by points: if/else 21 (42 pts), boolean chains 5, match/switch 2 (3 pts), loops 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/zeroclaw-runtime/src/quickstart/mod.rs"},"region":{"startLine":1233}}}],"partialFingerprints":{"codehealthFindingId/v1":"e45811091c701926c6ce62f8abbddb167fd4e3e967850bb75c13873102d7b7fa"}},{"ruleId":"D2","level":"warning","message":{"text":"SseTransport::ensure_connected (cognitive 52): SseTransport::ensure_connected has cognitive complexity 52 (threshold 15). Drivers by points: if/else 17 (42 pts), match/switch 2 (5 pts), boolean chains 3, loops 2 (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/zeroclaw-tools/src/mcp_transport.rs"},"region":{"startLine":1413}}}],"partialFingerprints":{"codehealthFindingId/v1":"86a9fa6739e3a5b0e21f18ecc656b8d2a78a07f710c98f033ae99d7efbf24f3b"}},{"ruleId":"D2","level":"warning","message":{"text":"TwitterChannel::listen (cognitive 51): TwitterChannel::listen has cognitive complexity 51 (threshold 15). Drivers by points: if/else 10 (41 pts), loops 2 (5 pts), match/switch 2 (5 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/zeroclaw-channels/src/twitter.rs"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fc923674bdb14b05614a895175c85b942776c649a4e9683fdbd33422033b5c5"}},{"ruleId":"D2","level":"warning","message":{"text":"zerocode::chat::wrap_table_cell (cognitive 50): zerocode::chat::wrap_table_cell has cognitive complexity 50 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 7 (16 pts), boolean chains 7 (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":"apps/zerocode/src/chat.rs"},"region":{"startLine":9490}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9f584cd624c767937904a7df11f4abaaf6ffd6525360c99c278a5033acf1f09"}},{"ruleId":"D2","level":"warning","message":{"text":"WeComWsChannel::normalize_message (cognitive 50): WeComWsChannel::normalize_message has cognitive complexity 50 (threshold 15). Drivers by points: if/else 14 (36 pts), match/switch 4 (11 pts), loops 1 (3 pts) (nesting depth added 31). 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/zeroclaw-channels/src/wecom_ws.rs"},"region":{"startLine":1099}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cf15e3a48e8fc7f39a424f52daa7276b22e3f5d94117fb1791d7bf75a9b327b"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_gateway::api_sections::select_section (cognitive 50): zeroclaw_gateway::api_sections::select_section has cognitive complexity 50 (threshold 15). Drivers by points: if/else 15 (27 pts), match/switch 10 (16 pts), boolean chains 7 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-gateway/src/api_sections.rs"},"region":{"startLine":900}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4e315eaedf89ff447ab2f062bde57c96150ebcef260d1f170c160a7780e89eb"}},{"ruleId":"D2","level":"warning","message":{"text":"SseTransport::send_and_recv (cognitive 50): SseTransport::send_and_recv has cognitive complexity 50 (threshold 15). Drivers by points: if/else 22 (39 pts), boolean chains 6, loops 2 (3 pts), 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/zeroclaw-tools/src/mcp_transport.rs"},"region":{"startLine":1940}}}],"partialFingerprints":{"codehealthFindingId/v1":"819a272758d13e0207be18ef01d32dd182ba9615e6899c0822639ff7e6d35a1e"}},{"ruleId":"D2","level":"warning","message":{"text":"AcpServer::materialize_prompt (cognitive 49): AcpServer::materialize_prompt has cognitive complexity 49 (threshold 15). Drivers by points: if/else 11 (42 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":2932}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8f281a376964094766c9ed6809dce0c43811460e5b60139e41c34d6649ea9dc"}},{"ruleId":"D2","level":"warning","message":{"text":"HailoOllamaModelProvider::normalize_messages (cognitive 49): HailoOllamaModelProvider::normalize_messages has cognitive complexity 49 (threshold 15). Drivers by points: if/else 20 (32 pts), match/switch 4 (7 pts), boolean chains 6, loops 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/zeroclaw-providers/src/hailo_ollama.rs"},"region":{"startLine":692}}}],"partialFingerprints":{"codehealthFindingId/v1":"faddf9b13e22c66cfea136cc4dcf89410e78c2d0e9142ffda2314381ff942bb2"}},{"ruleId":"D2","level":"warning","message":{"text":"SopPane::render_canvas (cognitive 48): SopPane::render_canvas has cognitive complexity 48 (threshold 15). Drivers by points: if/else 19 (37 pts), match/switch 3 (5 pts), loops 3 (4 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":"apps/zerocode/src/sop_pane.rs"},"region":{"startLine":1796}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f631e5658ec549967454947b7ed67b44d4e49ca8132eb96b20222a048a3b4e6"}},{"ruleId":"D2","level":"warning","message":{"text":"LogCaptureLayer::on_event (cognitive 48): LogCaptureLayer::on_event has cognitive complexity 48 (threshold 15). Drivers by points: if/else 20 (34 pts), loops 3 (10 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/zeroclaw-log/src/layer.rs"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"43babb9de82f2ffd13674ac250e37f18b0b44c604ad38ccd5dce3a0ed8725dc0"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::skills::creator::extract_tool_calls_from_history (cognitive 48): zeroclaw_runtime::skills::creator::extract_tool_calls_from_history has cognitive complexity 48 (threshold 15). Drivers by points: if/else 12 (39 pts), loops 3 (6 pts), boolean chains 3 (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/zeroclaw-runtime/src/skills/creator.rs"},"region":{"startLine":575}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4c433c340fa54d76edef759e96c7048960989bfedcdeddf3cf315cc40086a40"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_tools::jira_tool::parse_inline (cognitive 48): zeroclaw_tools::jira_tool::parse_inline has cognitive complexity 48 (threshold 15). Drivers by points: if/else 14 (35 pts), loops 3 (7 pts), match/switch 1 (4 pts), boolean chains 2 (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/zeroclaw-tools/src/jira_tool.rs"},"region":{"startLine":1520}}}],"partialFingerprints":{"codehealthFindingId/v1":"58becec570305193231b44ec869e4d6d2a4b090fb1a6468636799f84c584bf9f"}},{"ruleId":"D2","level":"warning","message":{"text":"zerocode::chat::render_table (cognitive 47): zerocode::chat::render_table has cognitive complexity 47 (threshold 15). Drivers by points: if/else 15 (27 pts), loops 10 (18 pts), boolean chains 1, match/switch 1 (nesting depth added 20). Of this number, 46 points are the body\u0027s own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/chat.rs"},"region":{"startLine":9587}}}],"partialFingerprints":{"codehealthFindingId/v1":"c67d64c06bf7b250fffc52e61a53a6cf3aba84196b34817603bb103c4ff75f96"}},{"ruleId":"D2","level":"warning","message":{"text":"AcpServer::handle_session_prompt (cognitive 47): AcpServer::handle_session_prompt has cognitive complexity 47 (threshold 15). Drivers by points: if/else 21 (35 pts), match/switch 7 (10 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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":1881}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae518f96e8638697e59fcd95067581a0e47e65e1de036c8a3bd00a6645f2ee3b"}},{"ruleId":"D2","level":"warning","message":{"text":"TelegramChannel::listen (cognitive 47): TelegramChannel::listen has cognitive complexity 47 (threshold 15). Drivers by points: if/else 12 (34 pts), match/switch 5 (11 pts), loops 2 (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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":8553}}}],"partialFingerprints":{"codehealthFindingId/v1":"61705be349f7c4f76c14d07ea5f250e77b47441fb16ba370ad1aea7a51f7c0b0"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::sop::executor::drive_headless_run (cognitive 47): zeroclaw_runtime::sop::executor::drive_headless_run has cognitive complexity 47 (threshold 15). Drivers by points: match/switch 14 (39 pts), if/else 3 (7 pts), loops 1 (nesting depth added 29). 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/zeroclaw-runtime/src/sop/executor.rs"},"region":{"startLine":932}}}],"partialFingerprints":{"codehealthFindingId/v1":"3987630e1f7a89f36739444de31b92ffde61e1fb2d128dec951310fb7ba3f781"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_tool_call_parser::parse_glm_style_tool_calls (cognitive 47): zeroclaw_tool_call_parser::parse_glm_style_tool_calls has cognitive complexity 47 (threshold 15). Drivers by points: if/else 11 (38 pts), match/switch 1 (5 pts), boolean chains 3, loops 1 (nesting depth added 31). 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/zeroclaw-tool-call-parser/src/lib.rs"},"region":{"startLine":1648}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e36738f208b6fbf84fbc1aa01e4aa2fdcd08a848e2043cb10b3bfeeeba42821"}},{"ruleId":"D2","level":"warning","message":{"text":"ClaudeCodeTool::execute (cognitive 47): ClaudeCodeTool::execute has cognitive complexity 47 (threshold 15). Drivers by points: if/else 22 (35 pts), loops 2 (5 pts), match/switch 3 (5 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/zeroclaw-tools/src/claude_code.rs"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"49e1c8bfa73ef254e83c82c92e52934e56631dbb0be14f221fb07624d26602aa"}},{"ruleId":"D2","level":"warning","message":{"text":"App::zeroclaw_help_context (cognitive 46): App::zeroclaw_help_context has cognitive complexity 46 (threshold 15). Drivers by points: if/else 24 (42 pts), match/switch 2 (4 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":6073}}}],"partialFingerprints":{"codehealthFindingId/v1":"593b648d2f364796408e93616c1413305395916181693faa0875303d2461b0f4"}},{"ruleId":"D2","level":"warning","message":{"text":"VoiceWakeChannel::listen (cognitive 46): VoiceWakeChannel::listen has cognitive complexity 46 (threshold 15). Drivers by points: if/else 9 (32 pts), match/switch 4 (11 pts), boolean chains 2, 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/zeroclaw-channels/src/voice_wake.rs"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"449782baceae450cbf5f3cd8e0a467e7ba073d62cb7534e7b17eabbf6cfc4e8b"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::orchestrator::handle_runtime_command_for_delivery (cognitive 46): zeroclaw_channels::orchestrator::handle_runtime_command_for_delivery has cognitive complexity 46 (threshold 15). Drivers by points: if/else 19 (31 pts), match/switch 5 (10 pts), boolean chains 5 (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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":5262}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d0d15ad47c82d32b7f35a620c661aa6da841dae904c5d6729c1b74e87bac51f"}},{"ruleId":"D2","level":"warning","message":{"text":"V2Config::migrate (cognitive 46): V2Config::migrate has cognitive complexity 46 (threshold 15). Drivers by points: if/else 31 (41 pts), match/switch 3 (4 pts), boolean chains 1 (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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"36d60a7fb4627bef2807ddd9d34637d44583267e0843810a6e4e61c608bf446d"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_providers::openai_codex::build_responses_input (cognitive 46): zeroclaw_providers::openai_codex::build_responses_input has cognitive complexity 46 (threshold 15). Drivers by points: if/else 13 (34 pts), loops 3 (8 pts), boolean chains 2, match/switch 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/zeroclaw-providers/src/openai_codex.rs"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"8749bda02a3c4dff876599c435a9b4c4f97e1d2bf9b587cef9e8d23ad8fd5e65"}},{"ruleId":"D2","level":"warning","message":{"text":"DiscordChannel::update_draft (cognitive 45): DiscordChannel::update_draft has cognitive complexity 45 (threshold 15). Drivers by points: if/else 15 (34 pts), loops 2 (5 pts), boolean chains 3, match/switch 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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":3562}}}],"partialFingerprints":{"codehealthFindingId/v1":"bba68136e381c96e805a9b7d59cc74a9fdf290557fe4a169e51f5f786e559df7"}},{"ruleId":"D2","level":"warning","message":{"text":"WhatsAppWebChannel::handle_one_inbound_message (cognitive 45): WhatsAppWebChannel::handle_one_inbound_message has cognitive complexity 45 (threshold 15). Drivers by points: if/else 24 (32 pts), boolean chains 7, match/switch 4 (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/zeroclaw-channels/src/whatsapp_web.rs"},"region":{"startLine":864}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5b943a4c8a063c68098ae2b5b5beda1294ade0ea05d7c5b884992b88a993023"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::policy::powershell_variables_are_simple (cognitive 45): zeroclaw_config::policy::powershell_variables_are_simple has cognitive complexity 45 (threshold 15). Drivers by points: if/else 10 (29 pts), loops 4 (8 pts), boolean chains 6, 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/zeroclaw-config/src/policy.rs"},"region":{"startLine":3795}}}],"partialFingerprints":{"codehealthFindingId/v1":"585055e48962bfb3aab4475f25226a71f233e4b3db09f2feea18ab9249848366"}},{"ruleId":"D2","level":"warning","message":{"text":"FileUploadBundleTool::execute (cognitive 45): FileUploadBundleTool::execute has cognitive complexity 45 (threshold 15). Drivers by points: if/else 23 (30 pts), match/switch 5 (9 pts), loops 4, boolean chains 2 (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/zeroclaw-tools/src/file_upload_bundle.rs"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7e0e2da4de026399bf714840591c49fdb87c594a59c877f59eb6538105b4cd6"}},{"ruleId":"D2","level":"warning","message":{"text":"Dashboard::poll_data (cognitive 44): Dashboard::poll_data has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (30 pts), match/switch 7 (12 pts), loops 1 (2 pts) (nesting depth added 21). 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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"83b57da2e5bd81e33dcd428e6fcd34258eca3fd1d40c9d750bebf5155c028c85"}},{"ruleId":"D2","level":"warning","message":{"text":"TelegramChannel::finalize_multi_message_draft (cognitive 44): TelegramChannel::finalize_multi_message_draft has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (31 pts), loops 2 (5 pts), boolean chains 4, match/switch 1 (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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":3143}}}],"partialFingerprints":{"codehealthFindingId/v1":"d168b94b564abf71d158abb997a800794feddf723c473c0dd42495ed519c5d44"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::policy::split_powershell_pipeline_syntax (cognitive 44): zeroclaw_config::policy::split_powershell_pipeline_syntax has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (37 pts), match/switch 2 (5 pts), boolean chains 1, 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/zeroclaw-config/src/policy.rs"},"region":{"startLine":3640}}}],"partialFingerprints":{"codehealthFindingId/v1":"a42ad1bd96c0cd902c5ba946a07ea31428f00f028534d60327dafa93e694d92e"}},{"ruleId":"D2","level":"warning","message":{"text":"CronAddTool::execute (cognitive 44): CronAddTool::execute has cognitive complexity 44 (threshold 15). Drivers by points: match/switch 16 (27 pts), if/else 9 (17 pts) (nesting depth added 19). 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/zeroclaw-runtime/src/tools/cron_add.rs"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"81f05c7cc755d1d0300f1ee07d5e5b9a8c9b4e64f43876da547da3bcdeb4d21a"}},{"ruleId":"D2","level":"warning","message":{"text":"Chat::execute_context_menu_request (cognitive 43): Chat::execute_context_menu_request has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (33 pts), match/switch 4 (8 pts), boolean chains 2 (nesting depth added 23). 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":"apps/zerocode/src/chat.rs"},"region":{"startLine":3448}}}],"partialFingerprints":{"codehealthFindingId/v1":"8101c3146e171740c606b12518e56e622a0fc14e9cc8300c6588ac3291ca79ad"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_alias_rename (cognitive 43): App::handle_alias_rename has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (31 pts), match/switch 4 (11 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":3347}}}],"partialFingerprints":{"codehealthFindingId/v1":"84510b9aecd10944d223b4a28616c43898a03f7bed996de21d7ab9980f480689"}},{"ruleId":"D2","level":"warning","message":{"text":"SopEngine::decide_checkpoint_with_principal (cognitive 43): SopEngine::decide_checkpoint_with_principal has cognitive complexity 43 (threshold 15). Drivers by points: if/else 21 (34 pts), match/switch 5 (7 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":4505}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a266fe87d2af5a2700651bb693a5b00160360de9d97daacf0c0714570c52fe9"}},{"ruleId":"D2","level":"warning","message":{"text":"nucleo::main (cognitive 43): nucleo::main has cognitive complexity 43 (threshold 15). Drivers by points: if/else 12 (34 pts), match/switch 1 (5 pts), boolean chains 3, loops 1 (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":"firmware/nucleo/src/main.rs"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"81725f81e9c9dc63711f0ff6753baee942586fc288bcdee144197a569738028e"}},{"ruleId":"D2","level":"warning","message":{"text":"FileExplorerState::handle_key (cognitive 42): FileExplorerState::handle_key has cognitive complexity 42 (threshold 15). Drivers by points: if/else 20 (38 pts), boolean chains 3, 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":"apps/zerocode/src/file_explorer.rs"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b8e1d7da49d79b2468f4ad7ec0eab6114ec3c1ae45fe7ab14173dec8b9adddc"}},{"ruleId":"D2","level":"warning","message":{"text":"zerocode::input_bar::push_wrapped_physical_line (cognitive 42): zerocode::input_bar::push_wrapped_physical_line has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (36 pts), loops 3 (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":"apps/zerocode/src/input_bar.rs"},"region":{"startLine":379}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d94dda281b19cc19c2dacc2bf918b4f07d5c975e6c57aab0cd5d5e3004a4f56"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::matrix::inbound::handle_message (cognitive 42): zeroclaw_channels::matrix::inbound::handle_message has cognitive complexity 42 (threshold 15). Drivers by points: if/else 21 (29 pts), match/switch 4 (8 pts), boolean chains 5 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":2279}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ce6268d9e9bef65cf744ba13974314fdb40b7b09b42bdf80650350405ee8745"}},{"ruleId":"D2","level":"warning","message":{"text":"V1Config::migrate (cognitive 42): V1Config::migrate has cognitive complexity 42 (threshold 15). Drivers by points: if/else 25 (33 pts), match/switch 2 (5 pts), boolean chains 2, loops 1 (2 pts) (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/zeroclaw-config/src/schema/v1.rs"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"9af76ee41ad475bc068d585618b7694c1b700c84cfcbcbdd2e0598c32b35771f"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::alias_refs::collect_provider_refs (cognitive 42): zeroclaw_config::alias_refs::collect_provider_refs has cognitive complexity 42 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 8 (17 pts), match/switch 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/zeroclaw-config/src/alias_refs.rs"},"region":{"startLine":1019}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bdc435350dc604064c66baa0b5ec7dcdb88b1ae635d335a529074bbb778bd93"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::schema::v2::source_identity_matches_inner (cognitive 42): zeroclaw_config::schema::v2::source_identity_matches_inner has cognitive complexity 42 (threshold 15). Drivers by points: if/else 15 (31 pts), boolean chains 9, loops 1, match/switch 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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":992}}}],"partialFingerprints":{"codehealthFindingId/v1":"23c24ad300195d254ad65b948ce94948e99e94f8631f593231221add0975253b"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenAiCompatibleModelProvider::relocate_tool_result_images (cognitive 42): OpenAiCompatibleModelProvider::relocate_tool_result_images has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (29 pts), loops 2 (5 pts), match/switch 1 (5 pts), boolean chains 3 (nesting depth added 24). 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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":3708}}}],"partialFingerprints":{"codehealthFindingId/v1":"f681b24a9ab17e8d734aad009055179b132aa720ce1e0b888191ecbbe659d3c7"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::rpc::wss::serve_wss_listener (cognitive 42): zeroclaw_runtime::rpc::wss::serve_wss_listener has cognitive complexity 42 (threshold 15). Drivers by points: if/else 7 (22 pts), match/switch 7 (18 pts), loops 2 (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/zeroclaw-runtime/src/rpc/wss.rs"},"region":{"startLine":931}}}],"partialFingerprints":{"codehealthFindingId/v1":"53dc386edc12d34e3fd63894be3f60c1e3fa999da36626cfabd4afb9ec46e8cf"}},{"ruleId":"D2","level":"warning","message":{"text":"pico::main (cognitive 42): pico::main has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (33 pts), match/switch 1 (5 pts), boolean chains 3, loops 1 (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":"firmware/pico/src/main.rs"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"415f2daf1fe3a8a4db1a95f70fc8804014d033701e5bdad3a953d5de55254243"}},{"ruleId":"D2","level":"warning","message":{"text":"Chat::serve (cognitive 41): Chat::serve has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (27 pts), match/switch 5 (11 pts), loops 2, 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/zeroclaw-gateway/src/chat_core.rs"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2f509db06eacb82bc8cbdef6e8f2b38b38212b942cceeb1e92a4219f72272e9"}},{"ruleId":"D2","level":"warning","message":{"text":"AcpSessionStore::provider_safe_history (cognitive 41): AcpSessionStore::provider_safe_history has cognitive complexity 41 (threshold 15). Drivers by points: if/else 8 (25 pts), loops 3 (9 pts), match/switch 2 (5 pts), boolean chains 2 (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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":2752}}}],"partialFingerprints":{"codehealthFindingId/v1":"03d616243601f75a4edae57593ae4f76fef46c51c0b93883bea02a8fdb53c772"}},{"ruleId":"D2","level":"warning","message":{"text":"PluginHost::discovered_named (cognitive 41): PluginHost::discovered_named has cognitive complexity 41 (threshold 15). Drivers by points: if/else 8 (29 pts), match/switch 2 (9 pts), boolean chains 2, loops 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-plugins/src/host.rs"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"92dfe32d9719d3a3a42b9eda3e993ea24eed43cf0f87c03b27decb67541febf3"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::agent::loop_::process_message_inner (cognitive 41): zeroclaw_runtime::agent::loop_::process_message_inner has cognitive complexity 41 (threshold 15). Drivers by points: if/else 29 (31 pts), boolean chains 5, match/switch 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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":3753}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf7fc9c197fe2fa7c28180e0cd76856a03035c63e1477cd0a3eb05e46ef5f731"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::rpc::dispatch::deliver_subscription (cognitive 41): zeroclaw_runtime::rpc::dispatch::deliver_subscription has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (32 pts), loops 2 (4 pts), match/switch 2 (4 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":13847}}}],"partialFingerprints":{"codehealthFindingId/v1":"17069e62a3fa2b598b39bd910dc2e4c2d01800621eb46a02161ace6580da80c4"}},{"ruleId":"D2","level":"warning","message":{"text":"DiscordChannel::finalize_draft (cognitive 40): DiscordChannel::finalize_draft has cognitive complexity 40 (threshold 15). Drivers by points: if/else 18 (35 pts), loops 2 (4 pts), 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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":3740}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5be5a517e05e7321b0b604b2fcf7b7f42c7f8f808e184d1eac1660940fa01a2"}},{"ruleId":"D2","level":"warning","message":{"text":"MochatChannel::listen (cognitive 40): MochatChannel::listen has cognitive complexity 40 (threshold 15). Drivers by points: if/else 7 (30 pts), loops 2 (5 pts), match/switch 2 (5 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/zeroclaw-channels/src/mochat.rs"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"de9899e9615d6ff9665ca388876fbf9a15a49ced870ce67e3de91175e02a0413"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::util::strip_tool_call_tags (cognitive 40): zeroclaw_channels::util::strip_tool_call_tags has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 6, loops 6, match/switch 2 (3 pts) (nesting depth added 13). Most of this is not in the body itself: 15 of the 40 points are its own statements and the rest belongs to 5 function items inside it that branch (extract_first_json_end, looks_like_prose, strip_leading_close_tags, \u2026). 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/zeroclaw-channels/src/util.rs"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"78af9c6760d31689bd3f2c9ab5c43324eae5eadfe1f0b83e5f8f438052e66232"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::agent_bundle::plan_export (cognitive 40): zeroclaw_config::agent_bundle::plan_export has cognitive complexity 40 (threshold 15). Drivers by points: if/else 18 (31 pts), loops 5 (6 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/zeroclaw-config/src/agent_bundle.rs"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe19c4506af9867a407a327e3483cbdf240164223789ea9cdb6ad72195a05dc6"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::agent::history_pruner::remove_orphaned_tool_messages (cognitive 40): zeroclaw_runtime::agent::history_pruner::remove_orphaned_tool_messages has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (19 pts), match/switch 4 (13 pts), loops 3 (5 pts), boolean chains 3 (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/zeroclaw-runtime/src/agent/history_pruner.rs"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"16ecf00c554f294f3b00469fdf4e8232c7d9fdce36186efedfb9e3702f4d2ec8"}},{"ruleId":"D2","level":"warning","message":{"text":"SopGraph::from_sop_with_specs (cognitive 40): SopGraph::from_sop_with_specs has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 6 (9 pts), match/switch 2 (5 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/zeroclaw-runtime/src/sop/graph.rs"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"c256021c98df4994a2fef7e5e6fa1b1e8d5a012e151171b521714ff781282301"}},{"ruleId":"D2","level":"warning","message":{"text":"NostrChannel::listen (cognitive 39): NostrChannel::listen has cognitive complexity 39 (threshold 15). Drivers by points: if/else 6 (25 pts), match/switch 4 (13 pts), loops 1 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/nostr.rs"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf4ec7fc52c8decb47e0af99ed019053b003ee9dcca98f408e7b5e631954c39c"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::alias_refs::collect_agent_refs (cognitive 39): zeroclaw_config::alias_refs::collect_agent_refs has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 8 (13 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/zeroclaw-config/src/alias_refs.rs"},"region":{"startLine":1227}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ce2ba0b4d2976e06fbd6319c665afe587a144ca07a6dbf15eb6936cb98b9819"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::schema::v2::fold_providers_globals_into_models (cognitive 39): zeroclaw_config::schema::v2::fold_providers_globals_into_models has cognitive complexity 39 (threshold 15). Drivers by points: if/else 17 (24 pts), match/switch 6 (8 pts), boolean chains 5, 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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":1285}}}],"partialFingerprints":{"codehealthFindingId/v1":"270e9c39d2f60faaf4c58600266817d02ec59352df03139621c872fa009402a5"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::relay::serve_established (cognitive 39): zeroclaw_runtime::relay::serve_established has cognitive complexity 39 (threshold 15). Drivers by points: match/switch 5 (20 pts), if/else 5 (18 pts), loops 1 (nesting depth added 28). 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/zeroclaw-runtime/src/relay.rs"},"region":{"startLine":773}}}],"partialFingerprints":{"codehealthFindingId/v1":"595890d354a6fc29695ab5562023ac7f043e827f3cfb388e54d0879ec9e25dc3"}},{"ruleId":"D2","level":"warning","message":{"text":"RpcClient::spawn_ws_session (cognitive 38): RpcClient::spawn_ws_session has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (30 pts), match/switch 4 (6 pts), loops 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":"apps/zerocode/src/client.rs"},"region":{"startLine":2010}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa1e9853938e6745075f52ee24ddfb336103a83385b60716914b1fd407da685e"}},{"ruleId":"D2","level":"warning","message":{"text":"InputBarState::handle_mouse (cognitive 38): InputBarState::handle_mouse has cognitive complexity 38 (threshold 15). Drivers by points: if/else 16 (27 pts), match/switch 3 (5 pts), boolean chains 3, 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":"apps/zerocode/src/input_bar.rs"},"region":{"startLine":1826}}}],"partialFingerprints":{"codehealthFindingId/v1":"895c1f129b4f9d333a6c0b0db8808fde4be68270f04c85707b372cf43dbd8a6d"}},{"ruleId":"D2","level":"warning","message":{"text":"zerorelay::handle_daemon (cognitive 38): zerorelay::handle_daemon has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (20 pts), match/switch 7 (13 pts), boolean chains 3, loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerorelay/src/lib.rs"},"region":{"startLine":1175}}}],"partialFingerprints":{"codehealthFindingId/v1":"5059325cad1e0fb282e24b32c8f65f526fb8c34afad74236f90206e1639eaa97"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_plugins::component_websocket::run_connection (cognitive 38): zeroclaw_plugins::component_websocket::run_connection has cognitive complexity 38 (threshold 15). Drivers by points: if/else 6 (23 pts), match/switch 5 (14 pts), loops 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-plugins/src/component_websocket.rs"},"region":{"startLine":499}}}],"partialFingerprints":{"codehealthFindingId/v1":"1405a28a7c5829bf1215595834ff7900d0563f23b4d25b3f3c67c5957cf5a77e"}},{"ruleId":"D2","level":"warning","message":{"text":"GeminiModelProvider::send_generate_content (cognitive 38): GeminiModelProvider::send_generate_content has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (26 pts), match/switch 4 (9 pts), boolean chains 3 (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/zeroclaw-providers/src/gemini.rs"},"region":{"startLine":1173}}}],"partialFingerprints":{"codehealthFindingId/v1":"c36f1f911157f78ef56f16f7cc4a7d419526cc6479cc82f036df533879c919f2"}},{"ruleId":"D2","level":"warning","message":{"text":"SopEngine::restore_runs (cognitive 38): SopEngine::restore_runs has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 3 (6 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 21). 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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":687}}}],"partialFingerprints":{"codehealthFindingId/v1":"51529d63aebaf11c2da14fc479fd55bc2c09bcbb273cdd892ab151a4d068f582"}},{"ruleId":"D2","level":"warning","message":{"text":"AgentSidebar::draw_session_rows (cognitive 37): AgentSidebar::draw_session_rows has cognitive complexity 37 (threshold 15). Drivers by points: if/else 19 (28 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":"apps/zerocode/src/agent_sidebar.rs"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c0b38169e335296b30e9aa4860a708b6c70904eeae10bd04d5d78382244e050"}},{"ruleId":"D2","level":"warning","message":{"text":"Chat::start_session_with_cancel (cognitive 37): Chat::start_session_with_cancel has cognitive complexity 37 (threshold 15). Drivers by points: if/else 20 (29 pts), match/switch 3 (6 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/chat.rs"},"region":{"startLine":2251}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a505708c7433279014eda7034d42056bd8da0e98d705bf89e3fe2b585ad6dab"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_field_list (cognitive 37): App::handle_field_list has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (28 pts), match/switch 4 (8 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":3491}}}],"partialFingerprints":{"codehealthFindingId/v1":"87d55f9ca54f1d1bbb78f61dc621221a8c47af580bc31b788bb2b199aa5fdcbb"}},{"ruleId":"D2","level":"warning","message":{"text":"Dashboard::handle_mouse (cognitive 37): Dashboard::handle_mouse has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (31 pts), boolean chains 5, 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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":2422}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea5673765b076bc90ad58fad46549065cd8e0a8984da00e5be1e0c5cb5c5e980"}},{"ruleId":"D2","level":"warning","message":{"text":"WeComWsChannel::materialize_quote_attachments (cognitive 37): WeComWsChannel::materialize_quote_attachments has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (23 pts), match/switch 3 (9 pts), loops 2 (5 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/zeroclaw-channels/src/wecom_ws.rs"},"region":{"startLine":933}}}],"partialFingerprints":{"codehealthFindingId/v1":"be40077bdd468dff2637fd7a7b26d471ef564b148533ce5718c04aea33c75b9c"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::discord::process_attachments (cognitive 37): zeroclaw_channels::discord::process_attachments has cognitive complexity 37 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 7 (17 pts), boolean chains 2, 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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":1213}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3a5f83044fa6b1baef87528aaac68302a16d958f089997a9c02c678fcfebeaf"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::lark::parse_post_content_details (cognitive 37): zeroclaw_channels::lark::parse_post_content_details has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (25 pts), loops 2 (6 pts), match/switch 1 (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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":4074}}}],"partialFingerprints":{"codehealthFindingId/v1":"23ff16d7014f1f3633ae28741db5894530a1b6015800488669725cac5c047630"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::orchestrator::strip_tool_call_tags (cognitive 37): zeroclaw_channels::orchestrator::strip_tool_call_tags has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 6, loops 6, match/switch 1 (2 pts) (nesting depth added 12). Most of this is not in the body itself: 13 of the 37 points are its own statements and the rest belongs to 4 function items inside it that branch (extract_first_json_end, looks_like_prose, strip_leading_close_tags, \u2026). 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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":1936}}}],"partialFingerprints":{"codehealthFindingId/v1":"1788bed1b67f763b5789f1196d7060cb09df3392ebfce6fece3cc933a570ddfb"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_gateway::api_config::handle_migrate (cognitive 37): zeroclaw_gateway::api_config::handle_migrate has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (19 pts), match/switch 11 (17 pts), boolean chains 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/zeroclaw-gateway/src/api_config.rs"},"region":{"startLine":2985}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e8b99e7d5d9051db52985c20c59947ae88b8963e93e0e701be8174ba76cae12"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_providers::compatible::sse_bytes_to_chunks (cognitive 37): zeroclaw_providers::compatible::sse_bytes_to_chunks has cognitive complexity 37 (threshold 15). Drivers by points: if/else 6 (22 pts), match/switch 4 (10 pts), loops 2 (4 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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":2718}}}],"partialFingerprints":{"codehealthFindingId/v1":"a157d6146564ac3679a11abcaa1d9ae85be091848785e7a417aac58dc032a4c2"}},{"ruleId":"D2","level":"warning","message":{"text":"RpcDispatcher::prepare_live_sessions_refresh (cognitive 37): RpcDispatcher::prepare_live_sessions_refresh has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (28 pts), boolean chains 4, match/switch 2 (4 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":10373}}}],"partialFingerprints":{"codehealthFindingId/v1":"f69bbd5fe6de32126442a3c1296b7ca3c922a91b26eed5a5da996e6e65057f81"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::agent::memory_inject::render_memory_context (cognitive 37): zeroclaw_runtime::agent::memory_inject::render_memory_context has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (24 pts), match/switch 3 (6 pts), loops 3 (5 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/zeroclaw-runtime/src/agent/memory_inject.rs"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e503d31a42b8e98eb141803c78e162a57eb7bc7c0840aee1ae30838e2dea83d"}},{"ruleId":"D2","level":"warning","message":{"text":"InputBarState::handle_key (cognitive 36): InputBarState::handle_key has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (22 pts), match/switch 3 (6 pts), boolean chains 4, loops 1 (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":"apps/zerocode/src/input_bar.rs"},"region":{"startLine":1555}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e70767fe8ba703e7351fd6a3e19e615af56397e250b5daab462dd14ea8a870d"}},{"ruleId":"D2","level":"warning","message":{"text":"Logs::handle_mouse (cognitive 36): Logs::handle_mouse has cognitive complexity 36 (threshold 15). Drivers by points: if/else 16 (29 pts), boolean chains 6, 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":"apps/zerocode/src/logs.rs"},"region":{"startLine":1823}}}],"partialFingerprints":{"codehealthFindingId/v1":"f68dead4bd3eca11f250e6856a16d6b418416bc4e21b7245ca82bcab23265243"}},{"ruleId":"D2","level":"warning","message":{"text":"SopPane::editor_lines (cognitive 36): SopPane::editor_lines has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 7, match/switch 2 (5 pts), loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/sop_pane.rs"},"region":{"startLine":2045}}}],"partialFingerprints":{"codehealthFindingId/v1":"237becb6516a799b114b753fca6c6f2509e9abed85f7f03fe8b2ffe68fb595d6"}},{"ruleId":"D2","level":"warning","message":{"text":"DiscordChannel::send (cognitive 36): DiscordChannel::send has cognitive complexity 36 (threshold 15). Drivers by points: if/else 19 (29 pts), boolean chains 5, loops 1, 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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":1816}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a1d3e42467e363935bd2fb6e60e1f21b2737642a645da1a64494c078681354e"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::orchestrator::run_matrix_single_message_draft_updater (cognitive 36): zeroclaw_channels::orchestrator::run_matrix_single_message_draft_updater has cognitive complexity 36 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 4 (8 pts), loops 3 (6 pts), boolean chains 5 (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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":8960}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2d6bc2141da55765f5d7d259d873dbb6215ea4bdcf9f7d580c5edd90b3fbd59"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::policy::read_heredoc_delimiter (cognitive 36): zeroclaw_config::policy::read_heredoc_delimiter has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 6, match/switch 2 (5 pts), loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-config/src/policy.rs"},"region":{"startLine":1359}}}],"partialFingerprints":{"codehealthFindingId/v1":"2573d52b42e98c34b776eb35db1c059ecd5c45e7ccd4a72929b4ca1d85dceda2"}},{"ruleId":"D2","level":"warning","message":{"text":"OidcAuthProvider::claims_to_identity (cognitive 36): OidcAuthProvider::claims_to_identity has cognitive complexity 36 (threshold 15). Drivers by points: if/else 17 (23 pts), boolean chains 8, match/switch 5 (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/zeroclaw-runtime/src/security/auth_provider/oidc.rs"},"region":{"startLine":809}}}],"partialFingerprints":{"codehealthFindingId/v1":"e39cbdcb1a9a9b5a1845b77c525db6909c8f6522660fdfebdd8ff4c2aca3a575"}},{"ruleId":"D2","level":"warning","message":{"text":"ConversationDock::layout (cognitive 35): ConversationDock::layout has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 5, match/switch 4, 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":"apps/zerocode/src/app.rs"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd98ad551bed658c28339578ac1a43ca7b2892111a30063ab3af8fecd55fee5a"}},{"ruleId":"D2","level":"warning","message":{"text":"App::draw_field_list (cognitive 35): App::draw_field_list has cognitive complexity 35 (threshold 15). Drivers by points: if/else 24 (28 pts), match/switch 2 (4 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":5355}}}],"partialFingerprints":{"codehealthFindingId/v1":"35892f67edbf82f8e20b9804ead66a3b4da76b9757e592b86a2c193a77fb01a3"}},{"ruleId":"D2","level":"warning","message":{"text":"Dashboard::draw_cron_detail (cognitive 35): Dashboard::draw_cron_detail has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (18 pts), loops 6 (14 pts), boolean chains 2, 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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":1694}}}],"partialFingerprints":{"codehealthFindingId/v1":"9157cbaa747575c6c9adbedb9a8e3e870f4f9e0ebe9d4c6909d537097bfaec5f"}},{"ruleId":"D2","level":"warning","message":{"text":"zerocode::chat::render_with_plan_placement (cognitive 35): zerocode::chat::render_with_plan_placement has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (27 pts), boolean chains 4, match/switch 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/chat.rs"},"region":{"startLine":6523}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f99db0b5481502ac797bbc581cdd96e8552df4193ed4d6def9c4e75a834afbc"}},{"ruleId":"D2","level":"warning","message":{"text":"zerocode::chat::render_conversation (cognitive 35): zerocode::chat::render_conversation has cognitive complexity 35 (threshold 15). Drivers by points: if/else 24 (27 pts), boolean chains 7, 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":"apps/zerocode/src/chat.rs"},"region":{"startLine":8194}}}],"partialFingerprints":{"codehealthFindingId/v1":"70982933ba8135cce35385d1562e91829b27c3db05681baea6929192f977badd"}},{"ruleId":"D2","level":"warning","message":{"text":"TelegramChannel::handle_unauthorized_message (cognitive 35): TelegramChannel::handle_unauthorized_message has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (24 pts), match/switch 2 (8 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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":4790}}}],"partialFingerprints":{"codehealthFindingId/v1":"2431eb7d727fabfa1e3b45cad5cc0173231a609274d16524419b6dec2f8b4c4e"}},{"ruleId":"D2","level":"warning","message":{"text":"Config::validate_auth (cognitive 35): Config::validate_auth has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 7 (11 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/zeroclaw-config/src/schema.rs"},"region":{"startLine":14471}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4e9f3095be8bae12c576c477b91be93c904bf70aba021bfe54051f379027edc"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_memory::chunker::chunk_markdown (cognitive 35): zeroclaw_memory::chunker::chunk_markdown has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 4 (10 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-memory/src/chunker.rs"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ce0606915a2005e64fc9ea4226593468e6a221886f91f1f6b73ac7d95b42f27"}},{"ruleId":"D2","level":"warning","message":{"text":"SopStatusTool::execute (cognitive 35): SopStatusTool::execute has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 4 (11 pts), match/switch 1 (2 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/zeroclaw-runtime/src/tools/sop_status.rs"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"83f1622ed8237cbdca9573a1ffca40a5a5131c192398ab91561d3ee7a86dbe9c"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::agent::system_prompt::build_system_prompt_with_mode_and_effective_tools (cognitive 35): zeroclaw_runtime::agent::system_prompt::build_system_prompt_with_mode_and_effective_tools has cognitive complexity 35 (threshold 15). Drivers by points: if/else 20 (23 pts), boolean chains 6, loops 1 (3 pts), match/switch 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/zeroclaw-runtime/src/agent/system_prompt.rs"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"f09c785a52bc7e694d454aa17cfe3f732b768df5130f4e135b4d9c269106641c"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::agent::turn::apply_builtin_prompt_scope (cognitive 35): zeroclaw_runtime::agent::turn::apply_builtin_prompt_scope has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (25 pts), loops 3 (6 pts), boolean chains 4 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/agent/turn/mod.rs"},"region":{"startLine":740}}}],"partialFingerprints":{"codehealthFindingId/v1":"ced9ce86ec6ad80c9e2fc1be327834076d962593bbfdd16ce2d765fc38a0c1da"}},{"ruleId":"D2","level":"warning","message":{"text":"LinkedInTool::execute (cognitive 35): LinkedInTool::execute has cognitive complexity 35 (threshold 15). Drivers by points: match/switch 9 (18 pts), if/else 8 (14 pts), boolean chains 3 (nesting depth added 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. 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/zeroclaw-tools/src/linkedin.rs"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8b9b66742d9bbc7f687e9ccfe862fc1081abfcffa77b98543fa6bb13668e1a2"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw::run_plugin_update (cognitive 35): zeroclaw::run_plugin_update has cognitive complexity 35 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 5, loops 3 (5 pts), match/switch 1 (3 pts) (nesting depth added 9). 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/main.rs"},"region":{"startLine":6481}}}],"partialFingerprints":{"codehealthFindingId/v1":"92a66285ed3c65507eea15ea6c0dcc943431fa7225fef3edd1ccbc8143ba777b"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_alias_list (cognitive 34): App::handle_alias_list has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (23 pts), match/switch 4 (7 pts), boolean chains 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":2833}}}],"partialFingerprints":{"codehealthFindingId/v1":"45d674593a3e884551263880f0bf1f8252f46dc538a9eca80372affa09754fab"}},{"ruleId":"D2","level":"warning","message":{"text":"App::draw_field_edit (cognitive 34): App::draw_field_edit has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (25 pts), match/switch 2 (5 pts), loops 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":5711}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc676424f8975fd435d0b6f02cc1064b8fbd10be249b49ec6a2a382a97d4eab2"}},{"ruleId":"D2","level":"warning","message":{"text":"Config::load_or_init (cognitive 34): Config::load_or_init has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 4 (8 pts), boolean chains 5 (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/zeroclaw-config/src/schema.rs"},"region":{"startLine":23448}}}],"partialFingerprints":{"codehealthFindingId/v1":"dae0cd6c675251e7a222b3601ee95d91ae0467febf20d96f1e43285d9e97b8fe"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::alias_refs::collect_channel_refs (cognitive 34): zeroclaw_config::alias_refs::collect_channel_refs has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 7 (10 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/zeroclaw-config/src/alias_refs.rs"},"region":{"startLine":1129}}}],"partialFingerprints":{"codehealthFindingId/v1":"19e71bfc264a884c086527d5f4f8df1c8833e485dbde67f9cc2b03835b2ab69c"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::policy::contains_unquoted_shell_variable_expansion (cognitive 34): zeroclaw_config::policy::contains_unquoted_shell_variable_expansion has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (30 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-config/src/policy.rs"},"region":{"startLine":3133}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d05631f6f5cc2031b92d44f5e1fe2ed2fcc678431bbff701253304de3d8bca9"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::schema::v2::rewrite_dangling_peer_group_agents (cognitive 34): zeroclaw_config::schema::v2::rewrite_dangling_peer_group_agents has cognitive complexity 34 (threshold 15). Drivers by points: if/else 17 (25 pts), loops 4 (7 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":2297}}}],"partialFingerprints":{"codehealthFindingId/v1":"92552cc1f7122bb7a2f529d02bc69ceb82e67cda6a3ab2b5b680d5fd3c60231f"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_tools::mcp_transport::read_first_jsonrpc_from_sse_response (cognitive 34): zeroclaw_tools::mcp_transport::read_first_jsonrpc_from_sse_response has cognitive complexity 34 (threshold 15). Drivers by points: if/else 12 (28 pts), boolean chains 3, 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/zeroclaw-tools/src/mcp_transport.rs"},"region":{"startLine":1845}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2c8ada84cabe78ce3a78e43bbd1e6e3e45d9242cc665ceee12582e64e9d3036"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw::tokenize_exec_line (cognitive 34): zeroclaw::tokenize_exec_line has cognitive complexity 34 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 4 (9 pts), match/switch 2 (9 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":"src/main.rs"},"region":{"startLine":9224}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2f130982497ece17dd827edfcbada70c69e6b3f1205015af034c6add9276563"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw::handle_auth_command (cognitive 34): zeroclaw::handle_auth_command has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (21 pts), match/switch 4 (7 pts), loops 3 (6 pts) (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":"src/main.rs"},"region":{"startLine":15571}}}],"partialFingerprints":{"codehealthFindingId/v1":"abeef96a8f3060b18b460c7f7711b335b9c30f889568a802c764b82ac927685a"}},{"ruleId":"D2","level":"warning","message":{"text":"MattermostChannel::listen_websocket (cognitive 33): MattermostChannel::listen_websocket has cognitive complexity 33 (threshold 15). Drivers by points: match/switch 6 (17 pts), if/else 4 (13 pts), boolean chains 2, loops 1 (nesting depth added 20). 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/zeroclaw-channels/src/mattermost.rs"},"region":{"startLine":1466}}}],"partialFingerprints":{"codehealthFindingId/v1":"e871996e960eee19ab6d16a562e3c1942245784e811892453f57d77b8cc9a21d"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::orchestrator::strip_isolated_tool_json_artifacts (cognitive 33): zeroclaw_channels::orchestrator::strip_isolated_tool_json_artifacts has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (30 pts), loops 2, 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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":7558}}}],"partialFingerprints":{"codehealthFindingId/v1":"75c027561bb0bbbdd9b66325dd2dc9d0f1e92baddaabe92175f7fc715b29895c"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::orchestrator::dispatch_channel_sop_gate (cognitive 33): zeroclaw_channels::orchestrator::dispatch_channel_sop_gate has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (19 pts), match/switch 8 (12 pts), boolean chains 2 (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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":11925}}}],"partialFingerprints":{"codehealthFindingId/v1":"43912997efad7649ddfb48f3a129aaae10f9c1a22370360ec96ee83f1285e3ca"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::alias_refs::rewrite_agent_refs (cognitive 33): zeroclaw_config::alias_refs::rewrite_agent_refs has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (22 pts), loops 7 (11 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/zeroclaw-config/src/alias_refs.rs"},"region":{"startLine":712}}}],"partialFingerprints":{"codehealthFindingId/v1":"93f05685d26ee2ba2e011466cc194f7075cfe7a4fb0d0d18a5bbed7cdf534fcf"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_hardware::peripherals::create_peripheral_tools (cognitive 33): zeroclaw_hardware::peripherals::create_peripheral_tools has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 7, 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/zeroclaw-hardware/src/peripherals/mod.rs"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"65902828aeadc009956e5315feea2c999deb0a7d25f77e8d841b2b73926955f5"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_providers::multimodal::jpeg_frame_header (cognitive 33): zeroclaw_providers::multimodal::jpeg_frame_header has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 3 (6 pts), boolean chains 3, match/switch 1 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-providers/src/multimodal.rs"},"region":{"startLine":3184}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce51465cc7094403a59428a694e45f0b7ddd9fdcd3f8b7b00c629f1581cc882d"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_providers::multimodal::jpeg_first_scan (cognitive 33): zeroclaw_providers::multimodal::jpeg_first_scan has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 3 (6 pts), boolean chains 3 (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/zeroclaw-providers/src/multimodal.rs"},"region":{"startLine":3273}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d2ac36ec364e6b6b0552742727eb73935f797ed8c8b2e71a46555e0a00df54a"}},{"ruleId":"D2","level":"warning","message":{"text":"SopMetricsCollector::rebuild_from_persistence (cognitive 33): SopMetricsCollector::rebuild_from_persistence has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 9 (11 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/zeroclaw-runtime/src/sop/metrics.rs"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3bfb0f8de4eeeac4f7068fb33fc22d1883c9ab4eac07c75d4a742fcb34b206c"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::rpc::local::run_local_listener_with_factory_and_limits (cognitive 33): zeroclaw_runtime::rpc::local::run_local_listener_with_factory_and_limits has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (22 pts), match/switch 4 (9 pts), loops 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/zeroclaw-runtime/src/rpc/local.rs"},"region":{"startLine":636}}}],"partialFingerprints":{"codehealthFindingId/v1":"c87542b81fffff3393656acfe1afab6f8f5a61a27f712daf05e10b62f318d55c"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::skills::document::parse_frontmatter (cognitive 33): zeroclaw_runtime::skills::document::parse_frontmatter has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (30 pts), boolean chains 2, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/skills/document.rs"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf24af732cfd8a3495d0f65283bf33652af9df2a8be2b31964410af355b974d1"}},{"ruleId":"D2","level":"warning","message":{"text":"FileDownloadTool::execute (cognitive 33): FileDownloadTool::execute has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (18 pts), match/switch 7 (8 pts), loops 2 (4 pts), boolean chains 3 (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/zeroclaw-tools/src/file_download.rs"},"region":{"startLine":451}}}],"partialFingerprints":{"codehealthFindingId/v1":"c59c9e731b1cc0b9b0a6b3f5b566aa5a0b283796c99cd6c29a39c6b3a1f8e79c"}},{"ruleId":"D2","level":"warning","message":{"text":"xtask::cmd::mdbook::peer_groups::parse_kv_args (cognitive 33): xtask::cmd::mdbook::peer_groups::parse_kv_args has cognitive complexity 33 (threshold 15). Drivers by points: loops 7 (15 pts), if/else 5 (10 pts), boolean chains 8 (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"xtask/src/cmd/mdbook/peer_groups.rs"},"region":{"startLine":619}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7443f89f5837a9296182539f7d1347b13e4952fe3114e0c65c002a14a6a1c11"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_desktop::daemon::terminate_supervisor_tree (cognitive 32): zeroclaw_desktop::daemon::terminate_supervisor_tree has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (17 pts), match/switch 5 (8 pts), loops 2 (5 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":"apps/tauri/src/daemon.rs"},"region":{"startLine":415}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dd1ecf3121fdfb78a20ca4329ed1efcf9bef4c186ed17d10136fd6f3c489845"}},{"ruleId":"D2","level":"warning","message":{"text":"Chat::drain_prompt_completions (cognitive 32): Chat::drain_prompt_completions has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 3, 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":"apps/zerocode/src/chat.rs"},"region":{"startLine":2851}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f1b2a8507934f6b7cae8dffbc009f9ad150ad6c5bc2a4411e9b965feb65afeb"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_paste (cognitive 32): App::handle_paste has cognitive complexity 32 (threshold 15). Drivers by points: if/else 14 (27 pts), loops 2 (4 pts), 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":5902}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b31250820835eefc11698bfdd70bdcbbdbc4b95f28d40ca057a623646975031"}},{"ruleId":"D2","level":"warning","message":{"text":"NotionChannel::listen (cognitive 32): NotionChannel::listen has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (20 pts), match/switch 3 (7 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/notion.rs"},"region":{"startLine":370}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6578a5fff24779bb9015a4d87ea5926878ed5d3e927be45de08534a4f099dee"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::irc::split_message (cognitive 32): zeroclaw_channels::irc::split_message has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 5 (12 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/zeroclaw-channels/src/irc.rs"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"449f12c0ae6dd541728849cb1c79cbc6906d0fb3df411c185e78075be63b2b75"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::whatsapp_web::markdown_to_whatsapp (cognitive 32): zeroclaw_channels::whatsapp_web::markdown_to_whatsapp has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 6, 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/zeroclaw-channels/src/whatsapp_web.rs"},"region":{"startLine":3201}}}],"partialFingerprints":{"codehealthFindingId/v1":"2439d0aafa4e49e6913d8d9947052bd85480485014b0fc307452f1c64b7c0e6b"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenAiCompatibleModelProvider::stream_chat (cognitive 32): OpenAiCompatibleModelProvider::stream_chat has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (19 pts), match/switch 6 (9 pts), boolean chains 2, 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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":4779}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff5f789691af2694959a048c22550e284cc9bb401c2ed22f2b3912dc6af72795"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::skills::skills_to_prompt_with_mode_and_availability (cognitive 32): zeroclaw_runtime::skills::skills_to_prompt_with_mode_and_availability has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4 (12 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/zeroclaw-runtime/src/skills/mod.rs"},"region":{"startLine":1786}}}],"partialFingerprints":{"codehealthFindingId/v1":"08a428d35b953232535b6b5c3ec4bf67a24e4c5ea1c6b27f95e5a2ae41d9c753"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::sop::schema::validate_node (cognitive 32): zeroclaw_runtime::sop::schema::validate_node has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (23 pts), loops 3 (7 pts), boolean chains 1, 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/zeroclaw-runtime/src/sop/schema/mod.rs"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae39328732e12af7444b0939ef5d9cccd8e5c958d4eab03c9488f28a75884bd2"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw::channel_instance_readiness_lines_with_admission (cognitive 32): zeroclaw::channel_instance_readiness_lines_with_admission has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (23 pts), loops 1 (4 pts), boolean chains 3, 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":"src/main.rs"},"region":{"startLine":4769}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c99e3cef6618de443c8d66108d1714c8173b664adccf585ed45b1b2bb06c0ce"}},{"ruleId":"D2","level":"warning","message":{"text":"Chat::apply_session_resync_result (cognitive 31): Chat::apply_session_resync_result has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (28 pts), boolean chains 2, 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":"apps/zerocode/src/chat.rs"},"region":{"startLine":3132}}}],"partialFingerprints":{"codehealthFindingId/v1":"498810c34cb77103ff30ba860ff2fa9dff1433410debfaf4b70a0273da49d476"}},{"ruleId":"D2","level":"warning","message":{"text":"App::draw_alias_list (cognitive 31): App::draw_alias_list has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19 (23 pts), boolean chains 5, loops 1 (2 pts), match/switch 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":5046}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9d247a1f86b4c064bb3a23839eaef010d00b8b05e4ec2aaa7af3b84c3d456f2"}},{"ruleId":"D2","level":"warning","message":{"text":"InputBarState::handle_enter (cognitive 31): InputBarState::handle_enter has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (25 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":"apps/zerocode/src/input_bar.rs"},"region":{"startLine":1964}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbac98adbdf79721532993543e4bf9445848e8edbb2a59482b30bb847332f1c9"}},{"ruleId":"D2","level":"warning","message":{"text":"InputBarState::render (cognitive 31): InputBarState::render has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18 (25 pts), boolean chains 4, loops 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":"apps/zerocode/src/input_bar.rs"},"region":{"startLine":2240}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9e2c6a603c5ce099cdd109b9f0b9b3bf70d2122ba1c6207c1caf49bdd4c07ac"}},{"ruleId":"D2","level":"warning","message":{"text":"QuickstartPane::handle_mouse (cognitive 31): QuickstartPane::handle_mouse has cognitive complexity 31 (threshold 15). Drivers by points: if/else 10 (27 pts), match/switch 2 (3 pts), boolean chains 1 (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":"apps/zerocode/src/quickstart_pane.rs"},"region":{"startLine":1314}}}],"partialFingerprints":{"codehealthFindingId/v1":"017cc8e920302fb1d0e2aa8cdaf8b76aa51b2ff2f72fa7324984d641c03be1d8"}},{"ruleId":"D2","level":"warning","message":{"text":"SopPane::handle_mouse (cognitive 31): SopPane::handle_mouse has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (30 pts), match/switch 1 (nesting depth added 18). 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":"apps/zerocode/src/sop_pane.rs"},"region":{"startLine":960}}}],"partialFingerprints":{"codehealthFindingId/v1":"06c9fad7379cc5746a3c5b950c91f682d11258eaeb40dca69f19d0fae8bd53b6"}},{"ruleId":"D2","level":"warning","message":{"text":"PluginActivationPlan::build (cognitive 31): PluginActivationPlan::build has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 5 (7 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/zeroclaw-runtime/src/plugin_runtime.rs"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b5cac7307fc4579ec9cf6d68d483007c2d98c69751f21b79eb55da0b32e83d0"}},{"ruleId":"D2","level":"warning","message":{"text":"SdJwt::resolve_disclosures (cognitive 31): SdJwt::resolve_disclosures has cognitive complexity 31 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 3 (4 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/verifiable_intent/crypto.rs"},"region":{"startLine":660}}}],"partialFingerprints":{"codehealthFindingId/v1":"d94cff0420ad7ec091153dde7a7d77edbb3ec0af8fb983ee59e4e7c10f62b96f"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::skills::parse_simple_frontmatter (cognitive 31): zeroclaw_runtime::skills::parse_simple_frontmatter has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (24 pts), match/switch 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/skills/mod.rs"},"region":{"startLine":1558}}}],"partialFingerprints":{"codehealthFindingId/v1":"604c4767e02dfc5b8f9324771c46b413476a7687cbe2ae646a837124fe9561b8"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelRoutingConfigTool::handle_upsert_scenario (cognitive 31): ModelRoutingConfigTool::handle_upsert_scenario has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (20 pts), match/switch 4 (10 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/zeroclaw-tools/src/model_routing_config.rs"},"region":{"startLine":976}}}],"partialFingerprints":{"codehealthFindingId/v1":"03e1e1c0f0cb52020b2c327cd1af8ae1d5a4d78556228074c473d08a1de30d3f"}},{"ruleId":"D2","level":"warning","message":{"text":"xtask::cmd::mdbook::sync::run (cognitive 31): xtask::cmd::mdbook::sync::run has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (28 pts), loops 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":"xtask/src/cmd/mdbook/sync.rs"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e93305b4d685f1ccaeced38261889abae8414c923b4573e5d76645dda5745ed"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::discord::markers::repair_brackets (cognitive 30): zeroclaw_channels::discord::markers::repair_brackets has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (16 pts), match/switch 3 (9 pts), loops 3 (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/zeroclaw-channels/src/discord/markers.rs"},"region":{"startLine":670}}}],"partialFingerprints":{"codehealthFindingId/v1":"939adecd1c1b3ee084bfe087714e4f91e64d365cc76a089dd9461b043d11c79b"}},{"ruleId":"D2","level":"warning","message":{"text":"SecurityPolicy::ensure_no_escalation_beyond (cognitive 30): SecurityPolicy::ensure_no_escalation_beyond has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (19 pts), loops 6, boolean chains 5 (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/zeroclaw-config/src/policy.rs"},"region":{"startLine":5562}}}],"partialFingerprints":{"codehealthFindingId/v1":"97d7691f92559cee242c60ea17f9e99bcf25c7465ae6a069a3b883d6e006449b"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::schema::validate_mcp_config (cognitive 30): zeroclaw_config::schema::validate_mcp_config has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (27 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/zeroclaw-config/src/schema.rs"},"region":{"startLine":11633}}}],"partialFingerprints":{"codehealthFindingId/v1":"5511b9aa08ddabe08405ed385c3bbfd90a5033f89f1942d8a1f6eb0f5d601955"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_gateway::principal_gate::config_route_auth (cognitive 30): zeroclaw_gateway::principal_gate::config_route_auth has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (18 pts), match/switch 6 (10 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/zeroclaw-gateway/src/principal_gate.rs"},"region":{"startLine":701}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f0f3f684a85eaadea0a4e07ae65df0bc4d189a89d9c6b29478f3f94009007fa"}},{"ruleId":"D2","level":"warning","message":{"text":"HardwareCapabilitiesTool::execute (cognitive 30): HardwareCapabilitiesTool::execute has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (26 pts), match/switch 1 (2 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/zeroclaw-hardware/src/peripherals/capabilities_tool.rs"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"f977d6e09165e97dac14e38ed7e9fc3599f6b2fac5bf481a05022a56178ea230"}},{"ruleId":"D2","level":"warning","message":{"text":"EventCollector::put (cognitive 30): EventCollector::put has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 4, match/switch 1 (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":"crates/zeroclaw-log/src/layer.rs"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3fd79e52c34456720e4115f1174791e3f57d47d285af075580be73ef4bbe51e"}},{"ruleId":"D2","level":"warning","message":{"text":"BuildRegistry::seal (cognitive 30): BuildRegistry::seal has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (21 pts), match/switch 3 (6 pts), boolean chains 2, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/tools/scoped.rs"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f1524ee7f14b62efcdad3154108a9674527ebce5af199fb4474f33b7c49569a"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::doctor::check_daemon_state (cognitive 30): zeroclaw_runtime::doctor::check_daemon_state has cognitive complexity 30 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 2, loops 1 (2 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/zeroclaw-runtime/src/doctor/mod.rs"},"region":{"startLine":1798}}}],"partialFingerprints":{"codehealthFindingId/v1":"d99022e8546762e35b5b0d9fa705960b34348acd4d603ae3fe8916b48a8ce6b9"}},{"ruleId":"D2","level":"warning","message":{"text":"BrowserTool::execute_computer_use_action (cognitive 30): BrowserTool::execute_computer_use_action has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/browser.rs"},"region":{"startLine":1086}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b5640dde34ee90b6c9e01a914d6f8321c2292cf10cd8fa51d7001610d38c701"}},{"ruleId":"D2","level":"warning","message":{"text":"JiraTool::execute (cognitive 30): JiraTool::execute has cognitive complexity 30 (threshold 15). Drivers by points: match/switch 14 (21 pts), if/else 5 (7 pts), boolean chains 2 (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/zeroclaw-tools/src/jira_tool.rs"},"region":{"startLine":1038}}}],"partialFingerprints":{"codehealthFindingId/v1":"9244864457ee930b8eb4d05f57d08619670abfafd466cee7f661455b4a24f7b9"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw::quickstart_plugins::install_one (cognitive 30): zeroclaw::quickstart_plugins::install_one has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (16 pts), match/switch 7 (9 pts), boolean chains 4, loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \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/quickstart_plugins/mod.rs"},"region":{"startLine":1314}}}],"partialFingerprints":{"codehealthFindingId/v1":"aeb5a777ce9c5c6c20ffc0e4909586ed78666a7c0a24cb505d5b7b0f732ea126"}},{"ruleId":"D2","level":"warning","message":{"text":"RpcClient::connect (cognitive 29): RpcClient::connect has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 6 (10 pts), loops 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":"apps/zerocode/src/client.rs"},"region":{"startLine":1732}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e9bea3ab0dcc41baa27897ff1bd4ffa77454d079597e7a73300ee7e8458f171"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_key_inner (cognitive 29): App::handle_key_inner has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 6, match/switch 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":1233}}}],"partialFingerprints":{"codehealthFindingId/v1":"5686738560b161b1b5f12c4e64955a263529285fa061102243f24bf9b145c9f7"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_personality_tab (cognitive 29): App::handle_personality_tab has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (21 pts), match/switch 3 (7 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":3747}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bfc3e4b29624caf5bda538ac9ca59e9adcd69600f3f40d57dd9e9be17c1f01a"}},{"ruleId":"D2","level":"warning","message":{"text":"zerocode::chat::render_queue_sidebar (cognitive 29): zerocode::chat::render_queue_sidebar has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (22 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":"apps/zerocode/src/chat.rs"},"region":{"startLine":6854}}}],"partialFingerprints":{"codehealthFindingId/v1":"426eb4012948a6ffa072ba3bc1509ee9111b58a3523b20e427538317244c6094"}},{"ruleId":"D2","level":"warning","message":{"text":"zerocode::dashboard::overview_status_lines (cognitive 29): zerocode::dashboard::overview_status_lines has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17 (27 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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":3091}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3052ba02fab3274e20b957658c69ed087bd116dba3a462a7d92d9406fdd7ab1"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_eval::grader::evaluate_expects (cognitive 29): zeroclaw_eval::grader::evaluate_expects has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (20 pts), loops 7, match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-eval/src/grader.rs"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c26044969b28a6a0cb1940f4d50ef2c8a629ac461bb11e385be8d8e318dcd14"}},{"ruleId":"D2","level":"warning","message":{"text":"BedrockModelProvider::send_converse_request (cognitive 29): BedrockModelProvider::send_converse_request has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 2 (6 pts), boolean chains 2, match/switch 1 (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/zeroclaw-providers/src/bedrock.rs"},"region":{"startLine":1524}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a9aea4e45c506d85523cc4cb9076712cdd16086132f5ff902b63f8bd310bef6"}},{"ruleId":"D2","level":"warning","message":{"text":"Agent::replay_loop_messages (cognitive 29): Agent::replay_loop_messages has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 2 (4 pts), boolean chains 3 (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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":4209}}}],"partialFingerprints":{"codehealthFindingId/v1":"98bfafbe0f3929685906a8aa513c15db05b81322dbe64dc7f2c24318f8387da3"}},{"ruleId":"D2","level":"warning","message":{"text":"WssTransport::next_frame (cognitive 29): WssTransport::next_frame has cognitive complexity 29 (threshold 15). Drivers by points: match/switch 6 (17 pts), if/else 5 (11 pts), loops 1 (nesting depth added 17). 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/zeroclaw-runtime/src/rpc/wss.rs"},"region":{"startLine":733}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb33e704209d4fe1470e9a2f2e146ec4f35352d87d7048fab86e9be5fd18e0fa"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::agent::turn::parse_response::recover_structured_arguments (cognitive 29): zeroclaw_runtime::agent::turn::parse_response::recover_structured_arguments has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 2 (6 pts), boolean chains 5, 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/zeroclaw-runtime/src/agent/turn/parse_response.rs"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"971eb2b006c07857cb2e8016d28ba3a1e0c388a2467f66370396c6803833222f"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_tool_call_parser::parse_xml_tool_calls (cognitive 29): zeroclaw_tool_call_parser::parse_xml_tool_calls has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 2 (4 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/zeroclaw-tool-call-parser/src/lib.rs"},"region":{"startLine":883}}}],"partialFingerprints":{"codehealthFindingId/v1":"2113b08bc43445a7d4b585f9c383ee95299a9602b9d20dca11eb41303bcf39eb"}},{"ruleId":"D2","level":"warning","message":{"text":"GitOperationsTool::validate_metadata_config (cognitive 29): GitOperationsTool::validate_metadata_config has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/git_operations.rs"},"region":{"startLine":588}}}],"partialFingerprints":{"codehealthFindingId/v1":"65a1dd07dcca10e48bca5ee8d50a584d1365af9ea3e4bfe0a9559c98c58623f2"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw::alias_cli::handle_providers (cognitive 29): zeroclaw::alias_cli::handle_providers has cognitive complexity 29 (threshold 15). Drivers by points: loops 3 (12 pts), if/else 3 (10 pts), match/switch 3 (6 pts), boolean chains 1 (nesting depth added 19). 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/alias_cli/mod.rs"},"region":{"startLine":912}}}],"partialFingerprints":{"codehealthFindingId/v1":"c873668d0a2bba33a5c507e4c14e98f6fb1eff9e855ef8d1740ab5da3df3b185"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw::issue_wss_client_cert (cognitive 29): zeroclaw::issue_wss_client_cert has cognitive complexity 29 (threshold 15). Drivers by points: if/else 20 (23 pts), boolean chains 5, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \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/main.rs"},"region":{"startLine":8225}}}],"partialFingerprints":{"codehealthFindingId/v1":"0abc332d1fcccebc371a63cd6286af88d38aff69331e3663ab94482f3d073ac8"}},{"ruleId":"D2","level":"warning","message":{"text":"xtask::cmd::fluent::scan::run (cognitive 29): xtask::cmd::fluent::scan::run has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 8 (14 pts), boolean chains 1 (nesting depth added 9). 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":"xtask/src/cmd/fluent/scan.rs"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"472c58e534ee6ca7e27734eb27a208aebbbc57961e569f783ace4ed4c69fe964"}},{"ruleId":"D2","level":"warning","message":{"text":"xtask::cmd::mdbook::seo::run_in (cognitive 29): xtask::cmd::mdbook::seo::run_in has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 4 (8 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":"xtask/src/cmd/mdbook/seo.rs"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c8b817abb8c2a23a6ab92a6501a9eabbcce04a4079e3375ef66624710fe9a45"}},{"ruleId":"D2","level":"warning","message":{"text":"App::visible_count (cognitive 28): App::visible_count has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (23 pts), match/switch 2 (4 pts), boolean chains 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":1734}}}],"partialFingerprints":{"codehealthFindingId/v1":"8754a0b70f0ab741ffbf86d32cfb9fa0107f785b239c0d65f94b943a9ebd6dbb"}},{"ruleId":"D2","level":"warning","message":{"text":"App::set_visible_cursor (cognitive 28): App::set_visible_cursor has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (23 pts), match/switch 2 (4 pts), boolean chains 1 (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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":1900}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d28779c1e1c9254470f548e8045f7b72a780578ece6d6d056603d4f95c9333f"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_field_edit (cognitive 28): App::handle_field_edit has cognitive complexity 28 (threshold 15). Drivers by points: if/else 8 (17 pts), match/switch 4 (8 pts), boolean chains 3 (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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":4547}}}],"partialFingerprints":{"codehealthFindingId/v1":"068c31973f7f7860e0b2cd70bc1d7376bd3e3d8064ff0bd6287dd7aa2e8d48ae"}},{"ruleId":"D2","level":"warning","message":{"text":"Logs::load_page (cognitive 28): Logs::load_page has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 5, 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":"apps/zerocode/src/logs.rs"},"region":{"startLine":648}}}],"partialFingerprints":{"codehealthFindingId/v1":"87102feaa71810d008636043e1b1044a3d46621fc6304959b658228d4e10c40f"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::whatsapp_web::parse_link_destination (cognitive 28): zeroclaw_channels::whatsapp_web::parse_link_destination has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 4 (7 pts), match/switch 3 (7 pts), boolean chains 5 (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/zeroclaw-channels/src/whatsapp_web.rs"},"region":{"startLine":3532}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e35363986e7687fee4bdc78bacbe04e0f97cc90039dff605352af54c0de94fe"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::alias_refs::rewrite_model_provider_refs (cognitive 28): zeroclaw_config::alias_refs::rewrite_model_provider_refs has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 6 (7 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-config/src/alias_refs.rs"},"region":{"startLine":799}}}],"partialFingerprints":{"codehealthFindingId/v1":"880ac9dfcc83df62dc5e7c95f2079f1d6d97556f3a6f3b0efa03c8cb8c994fe9"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_gateway::run_gateway_chat_streaming_response (cognitive 28): zeroclaw_gateway::run_gateway_chat_streaming_response has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (20 pts), match/switch 4 (7 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":4432}}}],"partialFingerprints":{"codehealthFindingId/v1":"983340e17867358e5e1390ab84c96cd449db797edb0637f4bf042e7541303a3c"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_log::reader::matches_filter (cognitive 28): zeroclaw_log::reader::matches_filter has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 9, 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/zeroclaw-log/src/reader.rs"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf90c19004ee8ff34fdb9e6107a09f971e85b017da21c7409adf81a7bb56797b"}},{"ruleId":"D2","level":"warning","message":{"text":"DelegateTool::read_background_view (cognitive 28): DelegateTool::read_background_view has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (19 pts), match/switch 2 (9 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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":4463}}}],"partialFingerprints":{"codehealthFindingId/v1":"b040a72e2dd6990deba407ca035b3124a068b66690c83f35e65c4bc03e32b69b"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::quickstart::field_shape (cognitive 28): zeroclaw_runtime::quickstart::field_shape has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 4, loops 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":"crates/zeroclaw-runtime/src/quickstart/mod.rs"},"region":{"startLine":853}}}],"partialFingerprints":{"codehealthFindingId/v1":"e387caa1dd14a9e36e22119959be86243a82800170fd2d0f0b007fc7c09a4061"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::quickstart::apply_peer_groups (cognitive 28): zeroclaw_runtime::quickstart::apply_peer_groups has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (24 pts), match/switch 1 (2 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/zeroclaw-runtime/src/quickstart/mod.rs"},"region":{"startLine":1974}}}],"partialFingerprints":{"codehealthFindingId/v1":"6af1d0566b8cd5304017a2df739bbee79fbdde50f64ba2fd7d0f90f239dc84a8"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::rag::parse_pin_aliases (cognitive 28): zeroclaw_runtime::rag::parse_pin_aliases has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (23 pts), boolean chains 3, loops 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/zeroclaw-runtime/src/rag/mod.rs"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"60af7c5085b35837b076dd8ea4ec258ce6089deea68320cc0df2c3c6fe336b1c"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::sop::validate_planned_call_bindings (cognitive 28): zeroclaw_runtime::sop::validate_planned_call_bindings has cognitive complexity 28 (threshold 15). Drivers by points: match/switch 3 (15 pts), if/else 1 (6 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 20). 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/zeroclaw-runtime/src/sop/mod.rs"},"region":{"startLine":1883}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd4184d5a2ab999757cd565fc8925622bf0090bb81db09b88c34466c52605cd4"}},{"ruleId":"D2","level":"warning","message":{"text":"SendViaTool::execute (cognitive 28): SendViaTool::execute has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (15 pts), match/switch 6 (12 pts), boolean chains 1 (nesting depth added 9). 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/zeroclaw-tools/src/send_via.rs"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"460e5d163a655701e2369dfeb59dd90d57eab740ff387b15a5990ac1a9bd1225"}},{"ruleId":"D2","level":"warning","message":{"text":"Chat::close_session (cognitive 27): Chat::close_session has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (20 pts), loops 2 (3 pts), boolean chains 2, match/switch 1 (2 pts) (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":"apps/zerocode/src/chat.rs"},"region":{"startLine":1346}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f7b413d317f6bf006973db6a9251302269577d14db586e364b5e91bd2a82c3f"}},{"ruleId":"D2","level":"warning","message":{"text":"App::draw_sections_pane (cognitive 27): App::draw_sections_pane has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17 (24 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":4831}}}],"partialFingerprints":{"codehealthFindingId/v1":"71d0b8550aebdba2bc8ba1409ad0ae33076fa4f3c11b85b48e94eb9b31f8052f"}},{"ruleId":"D2","level":"warning","message":{"text":"FileExplorerState::handle_search_key (cognitive 27): FileExplorerState::handle_search_key has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (25 pts), boolean chains 1, match/switch 1 (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":"apps/zerocode/src/file_explorer.rs"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2eeb3ed4be652c3ad7064a5ec3630b61b2f0d3fb921f44ba9959a5422e0b9f1"}},{"ruleId":"D2","level":"warning","message":{"text":"zerocode::chat::project_url_hit_regions (cognitive 27): zerocode::chat::project_url_hit_regions has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 3 (6 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":"apps/zerocode/src/chat.rs"},"region":{"startLine":7896}}}],"partialFingerprints":{"codehealthFindingId/v1":"e431c85d67c89965a9e40d67d661d17f73986b79788dffb441c990f9533511df"}},{"ruleId":"D2","level":"warning","message":{"text":"zerorelay::enroll_route::pump_route (cognitive 27): zerorelay::enroll_route::pump_route has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (18 pts), match/switch 3 (8 pts), 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":"apps/zerorelay/src/enroll_route.rs"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"adf46651be5269f19894e3337c56d879c7225f5732a47129700737b6260e22bd"}},{"ruleId":"D2","level":"warning","message":{"text":"AcpServer::handle_session_load (cognitive 27): AcpServer::handle_session_load has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (15 pts), match/switch 5, boolean chains 4, loops 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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":1153}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f544330876a52ea024fa18d43398813bbab6d480502a3a032724dec562e7ff1"}},{"ruleId":"D2","level":"warning","message":{"text":"WeChatChannel::qr_login (cognitive 27): WeChatChannel::qr_login has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 4 (11 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/zeroclaw-channels/src/wechat.rs"},"region":{"startLine":2100}}}],"partialFingerprints":{"codehealthFindingId/v1":"9142f260fd8ee005fea81bdbbedef325e41cac3b57bd02413bbb01259e5f42fd"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_gateway::api::handle_api_cron_patch (cognitive 27): zeroclaw_gateway::api::handle_api_cron_patch has cognitive complexity 27 (threshold 15). Drivers by points: match/switch 7 (12 pts), if/else 9 (11 pts), boolean chains 4 (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/zeroclaw-gateway/src/api.rs"},"region":{"startLine":747}}}],"partialFingerprints":{"codehealthFindingId/v1":"777514c58e8e2a3a4d0bdf171b0336608791f7baf90cd3e134c6bd5cd84bf49c"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_gateway::nodes::handle_node_socket (cognitive 27): zeroclaw_gateway::nodes::handle_node_socket has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 4 (8 pts), loops 2, 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/zeroclaw-gateway/src/nodes.rs"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef66c6cfec48122f4a8142053dd8e0c0228a9f55847232f11051287023449757"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_plugins::config::validate_secret_annotations::visit_schema (cognitive 27): zeroclaw_plugins::config::validate_secret_annotations::visit_schema has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 5 (9 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/zeroclaw-plugins/src/config.rs"},"region":{"startLine":627}}}],"partialFingerprints":{"codehealthFindingId/v1":"5422de211fffc15ad9b41f43c88676355f5c8a77f2c655033c562e015e6d6367"}},{"ruleId":"D2","level":"warning","message":{"text":"Agent::build_with_capabilities (cognitive 27): Agent::build_with_capabilities has cognitive complexity 27 (threshold 15). Drivers by points: if/else 21 (22 pts), match/switch 4, 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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":3274}}}],"partialFingerprints":{"codehealthFindingId/v1":"c220d54d01f584ed9d46d3b15318f9617f7231309a610a1f71f39a34968a21bb"}},{"ruleId":"D2","level":"warning","message":{"text":"RpcDispatcher::handle_sops_run (cognitive 27): RpcDispatcher::handle_sops_run has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 3 (11 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":12965}}}],"partialFingerprints":{"codehealthFindingId/v1":"b115f3471c94455f2463281aa611894df54fd080f90271783d6194c25c2983ee"}},{"ruleId":"D2","level":"warning","message":{"text":"LandlockSandbox::build_ruleset (cognitive 27): LandlockSandbox::build_ruleset has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 2 (5 pts), loops 3 (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/zeroclaw-runtime/src/security/landlock.rs"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"1379fb8b308a679f8e1e89ec5134a40738f148312077ea9d91d270f124f8bd55"}},{"ruleId":"D2","level":"warning","message":{"text":"BuildRegistry::claim_search (cognitive 27): BuildRegistry::claim_search has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 6, 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/zeroclaw-runtime/src/tools/scoped.rs"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"80ab021ad739731331fbb908cbb1fd9d3ca6c66bbd251346915eec77dbffceb5"}},{"ruleId":"D2","level":"warning","message":{"text":"ShellTool::execute (cognitive 27): ShellTool::execute has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (18 pts), match/switch 4, loops 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/zeroclaw-runtime/src/tools/shell.rs"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e7bd4a631eda4fd393a70b0d34cbab1f1cd81221d0df8a8cea989a3d6b07d9e"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::observability::otel_logs::otel_attributes (cognitive 27): zeroclaw_runtime::observability::otel_logs::otel_attributes has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 3, loops 2 (3 pts) (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/zeroclaw-runtime/src/observability/otel_logs.rs"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8fe87a0e6303a78f5ded47892a56be4be29d3fa6fea4ebbf4269b9f80694f8d"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_tool_call_parser::parse_minimax_invoke_calls (cognitive 27): zeroclaw_tool_call_parser::parse_minimax_invoke_calls has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 1 (4 pts), 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/zeroclaw-tool-call-parser/src/lib.rs"},"region":{"startLine":942}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a5cd2b6fcf8d37c7d12525965b07d379b1891ed2ce0c668550dc5f4ba47af9b"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_tool_call_parser::decode_recovered_json_string_fragment (cognitive 27): zeroclaw_tool_call_parser::decode_recovered_json_string_fragment has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 2 (4 pts), match/switch 1 (2 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/zeroclaw-tool-call-parser/src/lib.rs"},"region":{"startLine":1206}}}],"partialFingerprints":{"codehealthFindingId/v1":"e115b03b249cb482f00d70874dd9bd21c7072ee348cdc356977894b22a72fe67"}},{"ruleId":"D2","level":"warning","message":{"text":"ClaudeCodeRunnerTool::execute (cognitive 27): ClaudeCodeRunnerTool::execute has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (16 pts), match/switch 6 (9 pts), boolean chains 1, loops 1 (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/zeroclaw-tools/src/claude_code_runner.rs"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"76c55ae6677a446bf06bb597c3972be55e986fb5afc25fdb2a1d48d1a3570986"}},{"ruleId":"D2","level":"warning","message":{"text":"EscalateToHumanTool::execute (cognitive 27): EscalateToHumanTool::execute has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth \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/zeroclaw-tools/src/escalate.rs"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5009c165e50601f56329aa6175b73b17ac8546068a61487f09b777a6ee05015"}},{"ruleId":"D2","level":"warning","message":{"text":"FileWriteTool::execute (cognitive 27): FileWriteTool::execute has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (14 pts), match/switch 8 (11 pts), boolean chains 1, loops 1 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/file_write.rs"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"b75309a79bf53e8533db110390efb7b4af9512801929bd1390b176bdff55e1e2"}},{"ruleId":"D2","level":"warning","message":{"text":"GitOperationsTool::has_repository_within_authorized_roots (cognitive 27): GitOperationsTool::has_repository_within_authorized_roots has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (22 pts), boolean chains 4, 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/zeroclaw-tools/src/git_operations.rs"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f8b92819e28248f0b4b24eb44afb98a8e8146ce88964c665e788af7a1f40dda"}},{"ruleId":"D2","level":"warning","message":{"text":"App::bottom_hint (cognitive 26): App::bottom_hint has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (19 pts), match/switch 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":980}}}],"partialFingerprints":{"codehealthFindingId/v1":"a78322ba391e3354274e91fd0ecfbdadd430ff550250be7ae05a062b7e010a76"}},{"ruleId":"D2","level":"warning","message":{"text":"DiscordChannel::handle_reaction_event (cognitive 26): DiscordChannel::handle_reaction_event has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19 (23 pts), boolean chains 3 (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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":533}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6cc6096c742b992d5a0347c1bbfa0342100d1d63d24b60661dd1d5c01681cf8"}},{"ruleId":"D2","level":"warning","message":{"text":"SlackChannel::fetch_thread_replies_page_with_request_budget (cognitive 26): SlackChannel::fetch_thread_replies_page_with_request_budget has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (18 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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":4916}}}],"partialFingerprints":{"codehealthFindingId/v1":"7886359bb3c1a2017495768855dd7da0614367f948cf48754ea52fcff7560efa"}},{"ruleId":"D2","level":"warning","message":{"text":"TelegramChannel::process_model_picker_callback (cognitive 26): TelegramChannel::process_model_picker_callback has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (19 pts), loops 2 (4 pts), boolean chains 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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":2087}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f6b8eeb11af3ad4eb44fe7edf884bc75817dea1f359c7fafa47c04c3e1a6730"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::matrix::outbound::deliver_attachments (cognitive 26): zeroclaw_channels::matrix::outbound::deliver_attachments has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 7 (17 pts), if/else 5 (7 pts), loops 2 (nesting depth added 12). 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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":3500}}}],"partialFingerprints":{"codehealthFindingId/v1":"98c4757a8dd8c1bd351846a2d2135095466429906fd69ac42394641cd7ac766a"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::matrix::outbound::opus_duration (cognitive 26): zeroclaw_channels::matrix::outbound::opus_duration has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (17 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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":4077}}}],"partialFingerprints":{"codehealthFindingId/v1":"87ccf46d1aaa152d15492a600dca6543c19ff24a8218673b029c955f98821619"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::policy::contains_unquoted_single_ampersand (cognitive 26): zeroclaw_config::policy::contains_unquoted_single_ampersand has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (18 pts), match/switch 2 (5 pts), boolean chains 2, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-config/src/policy.rs"},"region":{"startLine":2948}}}],"partialFingerprints":{"codehealthFindingId/v1":"288d44aa75bae5544cce47bc3f6f7a310c0c3a5a5c2be1665cc1b0fc161354ae"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::policy::contains_unquoted_char (cognitive 26): zeroclaw_config::policy::contains_unquoted_char has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (18 pts), match/switch 2 (5 pts), boolean chains 2, loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-config/src/policy.rs"},"region":{"startLine":3002}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6101dd31588ab91f23f9640ca4065d75e6e181a7c8860a2d3f762212a9bbdd4"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::schema::v2::normalize_provider_type (cognitive 26): zeroclaw_config::schema::v2::normalize_provider_type has cognitive complexity 26 (threshold 15). Drivers by points: if/else 25, 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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":619}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0495a3c6b0bde6238c39793d7ab642da385a3d08d3fb60f219fb78ee192bab7"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::schema_markdown::field_table (cognitive 26): zeroclaw_config::schema_markdown::field_table has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17 (23 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/zeroclaw-config/src/schema_markdown.rs"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"491c4f780eb2065f8e77b9569ee9b321894a733edb0965dc0056d4549d1306ca"}},{"ruleId":"D2","level":"warning","message":{"text":"AcpSessionStore::load_message_page (cognitive 26): AcpSessionStore::load_message_page has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 4, 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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":911}}}],"partialFingerprints":{"codehealthFindingId/v1":"623d8236681cb5a40a5a9afde448baba49c06d881101b9a8530c42da6b23807d"}},{"ruleId":"D2","level":"warning","message":{"text":"AcpSessionStore::insert_messages (cognitive 26): AcpSessionStore::insert_messages has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 3 (7 pts), match/switch 2 (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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":1665}}}],"partialFingerprints":{"codehealthFindingId/v1":"22bd996dfc45dbad4cc9b1a6268cf0070d0acda926957739c9dcacd4452120e8"}},{"ruleId":"D2","level":"warning","message":{"text":"WasmChannel::listen (cognitive 26): WasmChannel::listen has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 5 (9 pts), loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-plugins/src/wasm_channel.rs"},"region":{"startLine":1067}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4437ccdba11326248113daa725c1659ed8de5df6c52e030d71cdb453b32a8b2"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::cron::store::update_job_authorized (cognitive 26): zeroclaw_runtime::cron::store::update_job_authorized has cognitive complexity 26 (threshold 15). Drivers by points: if/else 22 (26 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/zeroclaw-runtime/src/cron/store.rs"},"region":{"startLine":786}}}],"partialFingerprints":{"codehealthFindingId/v1":"616a60d9ee167beba198d9a1a7272515ae424f04411b1d659f491710eb8a5920"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::doctor::run_models (cognitive 26): zeroclaw_runtime::doctor::run_models has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 3 (8 pts), match/switch 3 (8 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/zeroclaw-runtime/src/doctor/mod.rs"},"region":{"startLine":575}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0e72dd26c9d06656bd913091981fa41fe13f143ea6bf5699a3e54e4fb54b0df"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::observability::otel::message_attrs (cognitive 26): zeroclaw_runtime::observability::otel::message_attrs has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17 (20 pts), boolean chains 3, match/switch 1 (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/zeroclaw-runtime/src/observability/otel.rs"},"region":{"startLine":1093}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd3ada6694777ee7a36bc2ed88f7c89f0aeabcbfe7707765176c5d2542c7380b"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::sop::render_step_bullets (cognitive 26): zeroclaw_runtime::sop::render_step_bullets has cognitive complexity 26 (threshold 15). Drivers by points: if/else 20 (25 pts), 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/sop/mod.rs"},"region":{"startLine":1681}}}],"partialFingerprints":{"codehealthFindingId/v1":"0971e1fb57da9e0efc835c21d87114ffcb1b8332666a81d1256d0d3edaba20ae"}},{"ruleId":"D2","level":"warning","message":{"text":"CodexCliTool::execute (cognitive 26): CodexCliTool::execute has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 3 (5 pts), loops 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/zeroclaw-tools/src/codex_cli.rs"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"a566febddaca5d97bdd1b3860993b6a40d6d8b612e5ba6ce4f53f63eb56284db"}},{"ruleId":"D2","level":"warning","message":{"text":"ComposioTool::execute (cognitive 26): ComposioTool::execute has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (16 pts), match/switch 5 (9 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/zeroclaw-tools/src/composio.rs"},"region":{"startLine":614}}}],"partialFingerprints":{"codehealthFindingId/v1":"f046a8d68a009ee3b5db2b42ae882a4e40c865b6c6fb570a44c5899b72f869e3"}},{"ruleId":"D2","level":"warning","message":{"text":"GeminiCliTool::execute (cognitive 26): GeminiCliTool::execute has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 3 (5 pts), loops 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/zeroclaw-tools/src/gemini_cli.rs"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"767adb08621bd4d77b27ab3509da649a2879d8753393a3c877c99afdc6693346"}},{"ruleId":"D2","level":"warning","message":{"text":"GitOperationsTool::validate_metadata_closure (cognitive 26): GitOperationsTool::validate_metadata_closure has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/git_operations.rs"},"region":{"startLine":305}}}],"partialFingerprints":{"codehealthFindingId/v1":"3912efba240acf7d05c2c3353d8dabc7feca0dfdd1ff3b165b35c5e8f9232139"}},{"ruleId":"D2","level":"warning","message":{"text":"GitOperationsTool::git_diff (cognitive 26): GitOperationsTool::git_diff has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/git_operations.rs"},"region":{"startLine":1360}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ead15ca33e7c8b4e6b63e16fb709125b666dd96c32bafc51589cedcd0ce2645"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenCodeCliTool::execute (cognitive 26): OpenCodeCliTool::execute has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 3 (5 pts), loops 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/zeroclaw-tools/src/opencode_cli.rs"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab573b1a1063f783fac736fe302695416961b2dcc48c84a7cc22f39d1c60ef4e"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_tools::content_search::visit_internal_search_path (cognitive 26): zeroclaw_tools::content_search::visit_internal_search_path has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (23 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/zeroclaw-tools/src/content_search.rs"},"region":{"startLine":496}}}],"partialFingerprints":{"codehealthFindingId/v1":"e79a041d796babc58ecd56a3a5497662026f80125f78194af66296629c115219"}},{"ruleId":"D2","level":"warning","message":{"text":"ConversationDock::handle_mouse (cognitive 25): ConversationDock::handle_mouse has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 4 (7 pts), boolean chains 2, 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":"apps/zerocode/src/app.rs"},"region":{"startLine":462}}}],"partialFingerprints":{"codehealthFindingId/v1":"4791ab3937300dd2ec225439f027384c1341a33fa6051dfbe32065ec29de0c38"}},{"ruleId":"D2","level":"warning","message":{"text":"Chat::help_context (cognitive 25): Chat::help_context has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (22 pts), match/switch 2 (3 pts) (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":"apps/zerocode/src/chat.rs"},"region":{"startLine":6087}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbfcfdf25ae4bfb73d42deb9327ddacb2c50a4df5e63fca690db05cb73d9486a"}},{"ruleId":"D2","level":"warning","message":{"text":"zerocode::diff::diff_lines_limited (cognitive 25): zerocode::diff::diff_lines_limited has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (6 pts), match/switch 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":"apps/zerocode/src/diff.rs"},"region":{"startLine":254}}}],"partialFingerprints":{"codehealthFindingId/v1":"f759fdb6ccf2002f6587f918a296eae664f9cd1f54d436f04c631093a7a2d76b"}},{"ruleId":"D2","level":"warning","message":{"text":"DingTalkChannel::listen (cognitive 25): DingTalkChannel::listen has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (15 pts), match/switch 4 (9 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/dingtalk.rs"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc21414182df171b602a2ee4934aeffa8e2300214dba731ab8858fe8196923c7"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::orchestrator::run_draft_updater_with_leak_detection (cognitive 25): zeroclaw_channels::orchestrator::run_draft_updater_with_leak_detection has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (22 pts), match/switch 1 (2 pts), 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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":6467}}}],"partialFingerprints":{"codehealthFindingId/v1":"f604bd7413759273f9ea80a6b8ffc657c3914683f1a869512b9720e0c669d19e"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::wecom_ws::extract_quote_context (cognitive 25): zeroclaw_channels::wecom_ws::extract_quote_context has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 1 (3 pts), match/switch 1 (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/zeroclaw-channels/src/wecom_ws.rs"},"region":{"startLine":2482}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8539c423f1b4457c07f59bb83017015fca83f68514b079918714a7e82637c20"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::migration::lower_capped_keys (cognitive 25): zeroclaw_config::migration::lower_capped_keys has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 3 (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/zeroclaw-config/src/migration.rs"},"region":{"startLine":2695}}}],"partialFingerprints":{"codehealthFindingId/v1":"97a9456d96df6caa84e31626822989c076e8a07b1346dd9c8933bedb66cc8d03"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::schema_markdown::type_label (cognitive 25): zeroclaw_config::schema_markdown::type_label has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (23 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/zeroclaw-config/src/schema_markdown.rs"},"region":{"startLine":694}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c34d900812f5089c257d5651bb441dde070beaecfb0f94c1ec8f9a26d531248"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_log::reader::find_event_across_segments (cognitive 25): zeroclaw_log::reader::find_event_across_segments has cognitive complexity 25 (threshold 15). Drivers by points: if/else 3 (10 pts), match/switch 2 (7 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-log/src/reader.rs"},"region":{"startLine":1481}}}],"partialFingerprints":{"codehealthFindingId/v1":"dac3fc76fd24d0f7317d483f00a186fb6ce88bad4237d6ca91ff39b2c49f2a9e"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_log::writer::worker_main (cognitive 25): zeroclaw_log::writer::worker_main has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 2 (5 pts), boolean chains 2, 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/zeroclaw-log/src/writer.rs"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"19af1d270e22e38e4a04b4fd86f09f743385f59d839148248c1932e5c7018f13"}},{"ruleId":"D2","level":"warning","message":{"text":"BedrockModelProvider::convert_messages (cognitive 25): BedrockModelProvider::convert_messages has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (21 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/zeroclaw-providers/src/bedrock.rs"},"region":{"startLine":945}}}],"partialFingerprints":{"codehealthFindingId/v1":"68398e007d2b00715624f60bcfd6d7c74d62ebc2e56c904f5f3ee54fe5372b5c"}},{"ruleId":"D2","level":"warning","message":{"text":"LeakDetector::check_private_keys (cognitive 25): LeakDetector::check_private_keys has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 4 (9 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/zeroclaw-runtime/src/security/leak_detector.rs"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"87ea33a69b9728830b9b492e0adafb6d2cce6717b7dfdc587eba0fbfd1c7aa4f"}},{"ruleId":"D2","level":"warning","message":{"text":"FileReadTool::read_path (cognitive 25): FileReadTool::read_path has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (16 pts), match/switch 6 (8 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/zeroclaw-runtime/src/tools/file_read.rs"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"10d3ff0ee553c180af1c69f4345aaf47c367b5c3c068a48472995db8957e4696"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::agent::tool_execution::execute_one_tool_with_provenance (cognitive 25): zeroclaw_runtime::agent::tool_execution::execute_one_tool_with_provenance has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 3, match/switch 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/agent/tool_execution.rs"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"0349685527aba85ed271ddafbcd4fb26fb7b8a1891e755bcfb4b5c70b4bc79b3"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::cron::schedule::normalize_weekday_field (cognitive 25): zeroclaw_runtime::cron::schedule::normalize_weekday_field has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 3, 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/zeroclaw-runtime/src/cron/schedule.rs"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc2c856c30d6de6f4ca5de1fc534e57502f39724e1049691fed2ba53b09e941a"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::cron::store::sync_declarative_jobs (cognitive 25): zeroclaw_runtime::cron::store::sync_declarative_jobs has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 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/zeroclaw-runtime/src/cron/store.rs"},"region":{"startLine":1769}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd9fffeb35f472713da086d1670aeceac79c331469d0b19db236725c7f637978"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::rpc::turn::join_with_draining_grace (cognitive 25): zeroclaw_runtime::rpc::turn::join_with_draining_grace has cognitive complexity 25 (threshold 15). Drivers by points: if/else 4 (16 pts), match/switch 2 (5 pts), loops 2 (4 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/rpc/turn.rs"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3e557bb96f4b2a2940584ebc4fc63dc1970b54ab1dbcb1a352c4ea7bfc636d3"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::skills::audit::audit_markdown_link_target (cognitive 25): zeroclaw_runtime::skills::audit::audit_markdown_link_target has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (22 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/zeroclaw-runtime/src/skills/audit.rs"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8dd78e7753d0f2f73543fa2841fb6a251eee3d7e4ce328f3d632c7c50d0767a"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw::update_one_plugin (cognitive 25): zeroclaw::update_one_plugin has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 7 (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":"src/main.rs"},"region":{"startLine":6880}}}],"partialFingerprints":{"codehealthFindingId/v1":"7884f7b669d57a720d85d8cc3f98ccb3d9e588524b18cd98b04a47bbd740df79"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw::quickstart_plugins::collect_settings (cognitive 25): zeroclaw::quickstart_plugins::collect_settings has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3 (6 pts), match/switch 2 (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/quickstart_plugins/mod.rs"},"region":{"startLine":2062}}}],"partialFingerprints":{"codehealthFindingId/v1":"a62dfe53f249b19611c13b006921cac5a961462906c18bbcdaa6bde51f03493d"}},{"ruleId":"D2","level":"warning","message":{"text":"AgentSidebar::draw (cognitive 24): AgentSidebar::draw has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 5, 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":"apps/zerocode/src/agent_sidebar.rs"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"88386df1561fde3e4f023435b207adc0044eb32e10c3df5f3a2455629382b316"}},{"ruleId":"D2","level":"warning","message":{"text":"Chat::drain_notifications (cognitive 24): Chat::drain_notifications has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (18 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":"apps/zerocode/src/chat.rs"},"region":{"startLine":2752}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed23d6e907bf0d9f822d9d0b16cd31feee544e5692b484a3e2f8428ad1721ef3"}},{"ruleId":"D2","level":"warning","message":{"text":"LogDetail::detail_lines (cognitive 24): LogDetail::detail_lines has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (15 pts), loops 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":"apps/zerocode/src/logs.rs"},"region":{"startLine":318}}}],"partialFingerprints":{"codehealthFindingId/v1":"b99b5102e2e09d478e7a8a79278ceb4dadfecf60ce3bbb52334bfed4b050d0f5"}},{"ruleId":"D2","level":"warning","message":{"text":"TelegramChannel::handle_model_picker_callback (cognitive 24): TelegramChannel::handle_model_picker_callback has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (18 pts), match/switch 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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":2523}}}],"partialFingerprints":{"codehealthFindingId/v1":"18e8d2a1303eb29116a8c3be3cb1d27b07b18fa3ecc8bdb6e46373274dde967e"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::git::providers::gitea::provider::translate_to_gitea (cognitive 24): zeroclaw_channels::git::providers::gitea::provider::translate_to_gitea has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (22 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/zeroclaw-channels/src/git/providers/gitea/provider.rs"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"11f31232a4f215855ea05aa5d3f29bce434cf8f32d991e9fe1b3814dd34dff8f"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::orchestrator::maybe_restart_managed_daemon_service (cognitive 24): zeroclaw_channels::orchestrator::maybe_restart_managed_daemon_service has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (23 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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":13035}}}],"partialFingerprints":{"codehealthFindingId/v1":"7db2cd4d4304a755a4cc74fb4d700fbe3c8fe3d98ab8ed7d5d11c32e4681a273"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::wecom_ws::strip_edge_mentions (cognitive 24): zeroclaw_channels::wecom_ws::strip_edge_mentions has cognitive complexity 24 (threshold 15). Drivers by points: loops 6 (10 pts), if/else 5 (8 pts), boolean chains 6 (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/zeroclaw-channels/src/wecom_ws.rs"},"region":{"startLine":2264}}}],"partialFingerprints":{"codehealthFindingId/v1":"91c9181b8021c5ad22caad1505faa1996dcdee31eaee017f3015492aa259899c"}},{"ruleId":"D2","level":"warning","message":{"text":"SecurityPolicy::is_posix_like_command_allowed (cognitive 24): SecurityPolicy::is_posix_like_command_allowed has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 6, 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/zeroclaw-config/src/policy.rs"},"region":{"startLine":4509}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1167c75daf4fbda2c950eff4872c831b77a212bb856d8660c9d8f6fcd8232c3"}},{"ruleId":"D2","level":"warning","message":{"text":"Config::extra_nested_model_provider_tables (cognitive 24): Config::extra_nested_model_provider_tables has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (6 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/zeroclaw-config/src/schema.rs"},"region":{"startLine":23381}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e9c0d24edcdb3f2dca2be3d4cf5b61af8011f8c9f7dcc9caf463202b77a3cb9"}},{"ruleId":"D2","level":"warning","message":{"text":"OidcConfig::validate (cognitive 24): OidcConfig::validate has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 5, match/switch 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-config/src/schema.rs"},"region":{"startLine":14698}}}],"partialFingerprints":{"codehealthFindingId/v1":"800efb401a8a38c03c861c7bdcf0ad007d2768acfc84bc3256f163a9f494837a"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::migration::use_written_spellings (cognitive 24): zeroclaw_config::migration::use_written_spellings has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 1 (4 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/zeroclaw-config/src/migration.rs"},"region":{"startLine":824}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5833728f7d27e35c0f0db846687340a06383c1fe471bae701959823207329f5"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::schema::v2::fold_v2_tts_into_providers (cognitive 24): zeroclaw_config::schema::v2::fold_v2_tts_into_providers has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (9 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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":2540}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ef7d56a82a51c70c8129229d0f79a29c7475370f2ea4f88c3c6a37344e7bb22"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_gateway::acp::handle_socket (cognitive 24): zeroclaw_gateway::acp::handle_socket has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 2 (5 pts), loops 2, 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/zeroclaw-gateway/src/acp.rs"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"88b89caf11c4b443ee0e47a103927b4f1f881c345e5b0b50f806cc7b70d1b22a"}},{"ruleId":"D2","level":"warning","message":{"text":"AcpSessionStore::fold_checkpoint_fragments (cognitive 24): AcpSessionStore::fold_checkpoint_fragments has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 2 (6 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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":2661}}}],"partialFingerprints":{"codehealthFindingId/v1":"496252d1eed3bd335913f7cc14c4bed9af372ac61074a5b393dc1936e0ea4516"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_providers::openai_codex::extract_responses_text (cognitive 24): zeroclaw_providers::openai_codex::extract_responses_text has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 4 (8 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/zeroclaw-providers/src/openai_codex.rs"},"region":{"startLine":541}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7eebe6a7bca4d94fa891fbc3a8226758d6b680430fa85401d469c0b5d80e687"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_providers::reliable::provider_error_diagnostic (cognitive 24): zeroclaw_providers::reliable::provider_error_diagnostic has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (17 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/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":1343}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a3a7be2db61dec87125d2615301e28af3800e1a0bed4cf914889ba74289c61c"}},{"ruleId":"D2","level":"warning","message":{"text":"RpcDispatcher::rehydrate_reaped_session_under_guard (cognitive 24): RpcDispatcher::rehydrate_reaped_session_under_guard has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (16 pts), match/switch 5 (6 pts), boolean chains 2 (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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":5989}}}],"partialFingerprints":{"codehealthFindingId/v1":"18dfab58afcb9001685fe059d4c4704ea8179d5ae954874f49c8c43396ac5269"}},{"ruleId":"D2","level":"warning","message":{"text":"RpcDispatcher::handle_config_alias_rename (cognitive 24): RpcDispatcher::handle_config_alias_rename has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (18 pts), loops 2 (4 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":"crates/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":11161}}}],"partialFingerprints":{"codehealthFindingId/v1":"afdf12d70eaba14fbfc8a5667b09403f536acfc47c051f3b19c81ef2ab360a50"}},{"ruleId":"D2","level":"warning","message":{"text":"DelegateTool::handle_await_sessions (cognitive 24): DelegateTool::handle_await_sessions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 5, loops 2 (3 pts), match/switch 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":4699}}}],"partialFingerprints":{"codehealthFindingId/v1":"810e458a46fc8da657d64d216976580f6d76080f83b09a7ce38c7845dda49753"}},{"ruleId":"D2","level":"warning","message":{"text":"DelegateTool::build_enriched_system_prompt_from_config (cognitive 24): DelegateTool::build_enriched_system_prompt_from_config has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 3, loops 1 (2 pts), match/switch 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":5040}}}],"partialFingerprints":{"codehealthFindingId/v1":"30103b990b593396d300df26a95f950814d0885737d1ff962cf5b50905726def"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::agent::history_pruner::strip_orphaned_tool_calls_from_assistants (cognitive 24): zeroclaw_runtime::agent::history_pruner::strip_orphaned_tool_calls_from_assistants has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (19 pts), match/switch 1 (3 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/zeroclaw-runtime/src/agent/history_pruner.rs"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe9b7a521dc400720fe7ffd4b3d3bab6975d248f37a29c040db0c5e7923743bc"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::daemon::load_heartbeat_session_context (cognitive 24): zeroclaw_runtime::daemon::load_heartbeat_session_context has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 5, loops 1, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/daemon/mod.rs"},"region":{"startLine":2984}}}],"partialFingerprints":{"codehealthFindingId/v1":"89b958eafc5b3d0263f0f7b3961a729ec599bdd200b38515cab0e857052fad66"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::doctor::update_context_windows (cognitive 24): zeroclaw_runtime::doctor::update_context_windows has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 2 (6 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/zeroclaw-runtime/src/doctor/mod.rs"},"region":{"startLine":744}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd6b7a1edb055f55a45dd2fbbb07d5447eed6bff49c15ee1a66e2446d17a38a4"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::skills::document::parse_slash_options (cognitive 24): zeroclaw_runtime::skills::document::parse_slash_options has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (23 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/zeroclaw-runtime/src/skills/document.rs"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"845ebb9e752a46d25d45f898ff124d09f84f7ef317596231dbe70131680b3415"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::sop::decision::resolve (cognitive 24): zeroclaw_runtime::sop::decision::resolve has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 6 (11 pts), if/else 6 (9 pts), boolean chains 3, loops 1 (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/zeroclaw-runtime/src/sop/decision.rs"},"region":{"startLine":512}}}],"partialFingerprints":{"codehealthFindingId/v1":"277a0b0f3e58b2a86d7338f0640b72186a7fa9c2b1788eed7b4be4f6862da50a"}},{"ruleId":"D2","level":"warning","message":{"text":"BrowserTool::resolve_backend (cognitive 24): BrowserTool::resolve_backend has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 2 (3 pts), boolean chains 1 (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":"crates/zeroclaw-tools/src/browser.rs"},"region":{"startLine":370}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bd7bcb9566cd02eb2309ad35897c1570255f1fd5a738116e7272be0dc555acd"}},{"ruleId":"D2","level":"warning","message":{"text":"Dashboard::drain_cron_trigger_updates (cognitive 23): Dashboard::drain_cron_trigger_updates has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), match/switch 2 (5 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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":2334}}}],"partialFingerprints":{"codehealthFindingId/v1":"e25678ed9be2fb946902b0258fa36de1cb4ad53fd4236807add42443d8efb797"}},{"ruleId":"D2","level":"warning","message":{"text":"QuickstartPane::commit_field_form (cognitive 23): QuickstartPane::commit_field_form has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 3, loops 1 (2 pts), match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/quickstart_pane.rs"},"region":{"startLine":2276}}}],"partialFingerprints":{"codehealthFindingId/v1":"2918c94eb77d9c97ab75d257eb1c7a199ddfd6a9f3cacce056d90948f66726ab"}},{"ruleId":"D2","level":"warning","message":{"text":"WideCellCleanupBackend::draw (cognitive 23): WideCellCleanupBackend::draw has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 3, 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":"apps/zerocode/src/terminal_backend.rs"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"06551ff09ee78cda2f77590960d43652f43c64a1469b3cf70b0f53d8fa0d7093"}},{"ruleId":"D2","level":"warning","message":{"text":"RelayServer::serve (cognitive 23): RelayServer::serve has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (14 pts), match/switch 4 (8 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":"apps/zerorelay/src/lib.rs"},"region":{"startLine":710}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a2e2828085f6b9d07f5766d6634390144829224d12d5903b631e450616e9e59"}},{"ruleId":"D2","level":"warning","message":{"text":"EmailChannel::build_email_message (cognitive 23): EmailChannel::build_email_message has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (16 pts), loops 2 (6 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/zeroclaw-channels/src/email_channel.rs"},"region":{"startLine":884}}}],"partialFingerprints":{"codehealthFindingId/v1":"c519af76b51db687b0314b49b292b5e12c3f1f686293d272a1af8057cd801260"}},{"ruleId":"D2","level":"warning","message":{"text":"LarkChannel::parse_event_payload (cognitive 23): LarkChannel::parse_event_payload has cognitive complexity 23 (threshold 15). Drivers by points: match/switch 9 (18 pts), if/else 4, boolean chains 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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":2623}}}],"partialFingerprints":{"codehealthFindingId/v1":"969a6a5c3848f27642ea36a12133459e58e95f1e05d0aeca75b6609a2fdbc7f4"}},{"ruleId":"D2","level":"warning","message":{"text":"SlackChannel::send (cognitive 23): SlackChannel::send has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (20 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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":5295}}}],"partialFingerprints":{"codehealthFindingId/v1":"32c1c2ff7ab3e5c1522dab1671f4deef72ad1dc692fe340aafa54b88b393433c"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::wecom_ws::split_markdown_chunks (cognitive 23): zeroclaw_channels::wecom_ws::split_markdown_chunks has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 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/zeroclaw-channels/src/wecom_ws.rs"},"region":{"startLine":2585}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a84c0c1146044ecec1a49f9babe8b55ca1d08ccc9e437b2a7b61e247a4694cc"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::whatsapp_web::markdown_inline_to_whatsapp_in (cognitive 23): zeroclaw_channels::whatsapp_web::markdown_inline_to_whatsapp_in has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 4, match/switch 1 (3 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/zeroclaw-channels/src/whatsapp_web.rs"},"region":{"startLine":3392}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c6fd63d5a69584cd78fd5879470c77d28516fbabc5d0e80f3b583990904594e"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::agent_bundle::collect_risk_flags (cognitive 23): zeroclaw_config::agent_bundle::collect_risk_flags has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (21 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/zeroclaw-config/src/agent_bundle.rs"},"region":{"startLine":1087}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8f9b01a785aaed3af4aabe7e26556a15027d183ca5772d8795c0d93a27f4465"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::schema::ws_connect_via_proxy (cognitive 23): zeroclaw_config::schema::ws_connect_via_proxy has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 1 (2 pts), 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/zeroclaw-config/src/schema.rs"},"region":{"startLine":12549}}}],"partialFingerprints":{"codehealthFindingId/v1":"a464455714fea91a408ac161f09f3bba0f09886fdf14ec4c03835eb389f6ab2b"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_gateway::api_oidc_enroll::handle_certificate (cognitive 23): zeroclaw_gateway::api_oidc_enroll::handle_certificate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13, boolean chains 6, match/switch 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/zeroclaw-gateway/src/api_oidc_enroll.rs"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"970b627fb24336b3a98aa18f46cb21f350b82758997b78dd6c9d07f9cf87e4f7"}},{"ruleId":"D2","level":"warning","message":{"text":"ProjectedGroup::entries_to_messages (cognitive 23): ProjectedGroup::entries_to_messages has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":3263}}}],"partialFingerprints":{"codehealthFindingId/v1":"15541c54e1f2aadc51393c5fba4bbaf231127697cb38c9afd308a99bb6fdae41"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_log::reader::scan_segment (cognitive 23): zeroclaw_log::reader::scan_segment has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 4 (8 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/zeroclaw-log/src/reader.rs"},"region":{"startLine":775}}}],"partialFingerprints":{"codehealthFindingId/v1":"e869173f590838804350cc8181ccd65bb134c3b44614f34cc8f6c797471ddbe4"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_plugins::sockets::connection_actor (cognitive 23): zeroclaw_plugins::sockets::connection_actor has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 3 (8 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-plugins/src/sockets.rs"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bb3c9fdb54fd24d6289bab29ba24e8d3cab34d551c19aee0e2a2f7114ca4697"}},{"ruleId":"D2","level":"warning","message":{"text":"BedrockModelProvider::parse_converse_response (cognitive 23): BedrockModelProvider::parse_converse_response has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (17 pts), match/switch 1 (3 pts), loops 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/zeroclaw-providers/src/bedrock.rs"},"region":{"startLine":1456}}}],"partialFingerprints":{"codehealthFindingId/v1":"de202a7b53c87a2e38dcacfd991d6b5260fcff3c0a2e80415cc73f411f2a646e"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_providers::multimodal::prepare_messages_inner (cognitive 23): zeroclaw_providers::multimodal::prepare_messages_inner has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (17 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/zeroclaw-providers/src/multimodal.rs"},"region":{"startLine":1893}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c935a7315234deffc10fbe9d904a88ce86bfacd20b03b0d9094927e48ff6e6e"}},{"ruleId":"D2","level":"warning","message":{"text":"RpcClient::connect_over (cognitive 23): RpcClient::connect_over has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 6 (9 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/zeroclaw-rpc-client/src/client.rs"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"5185c91daaaa9eed4181ab2480ab7cdf5e48f828b10318eea8ada7464b46ded1"}},{"ruleId":"D2","level":"warning","message":{"text":"RpcDispatcher::process_line (cognitive 23): RpcDispatcher::process_line has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 6 (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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":3281}}}],"partialFingerprints":{"codehealthFindingId/v1":"23ae25d24763be5d6789644740f9ca0cc72aac98b64b49c46dd80d30cf983af4"}},{"ruleId":"D2","level":"warning","message":{"text":"RpcDispatcher::handle_session_kill (cognitive 23): RpcDispatcher::handle_session_kill has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 5 (7 pts), boolean chains 5 (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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":5760}}}],"partialFingerprints":{"codehealthFindingId/v1":"95f544b03be9db302940013b9c8607381dee17ae04aa189fab1f7640d30e8102"}},{"ruleId":"D2","level":"warning","message":{"text":"SopEngine::evaluate_admission (cognitive 23): SopEngine::evaluate_admission has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 4, match/switch 3 (4 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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":2050}}}],"partialFingerprints":{"codehealthFindingId/v1":"639602d000db5c2b6791700625edb16e858c9cf1af356500c64b47adb6fdd7cf"}},{"ruleId":"D2","level":"warning","message":{"text":"SkillShellTool::execute (cognitive 23): SkillShellTool::execute has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (7 pts), match/switch 3, 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/zeroclaw-runtime/src/tools/skill_tool.rs"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9ca6103938f092edc0baa15c5809ff582034d5acb5c4e5b5127743a5e542122"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::agent::turn::vision_route::resolve_vision_provider_with_allowed_refs (cognitive 23): zeroclaw_runtime::agent::turn::vision_route::resolve_vision_provider_with_allowed_refs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 2 (7 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/zeroclaw-runtime/src/agent/turn/vision_route.rs"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"38aedbf618e97fa3f89b25c84fd7d4b55d2b2129e0532906750483dbca689c1a"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_tools::mcp_transport::read_bounded_line (cognitive 23): zeroclaw_tools::mcp_transport::read_bounded_line has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (21 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/zeroclaw-tools/src/mcp_transport.rs"},"region":{"startLine":792}}}],"partialFingerprints":{"codehealthFindingId/v1":"59f91a2ebe68829cfeb9e8374e26a2d2dfc620c961792e17e88514ec4d049429"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw::alias_cli::handle_agents (cognitive 23): zeroclaw::alias_cli::handle_agents has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 4 (7 pts), boolean chains 1 (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/alias_cli/mod.rs"},"region":{"startLine":566}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6c7078f05a13f989031f90267887b9cd7959d595536b8b8716a4c88934ee770"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw::alias_cli::export::copy_tree (cognitive 23): zeroclaw::alias_cli::export::copy_tree has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (21 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":"src/alias_cli/export.rs"},"region":{"startLine":1240}}}],"partialFingerprints":{"codehealthFindingId/v1":"e540a0b17962a3bb22a502b15dec636b77c1474fa1e23e201aea2e7b3a7cbf38"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw::commands::update::install_companion_artifacts (cognitive 23): zeroclaw::commands::update::install_companion_artifacts has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (17 pts), match/switch 3 (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":"src/commands/update.rs"},"region":{"startLine":1124}}}],"partialFingerprints":{"codehealthFindingId/v1":"194b6d63987ceb94681a1cfde0f2c006f0b3fd17dc8ed36bcb3ac9a0228161c8"}},{"ruleId":"D2","level":"warning","message":{"text":"xtask::bin::web::collect_string_enum_members (cognitive 23): xtask::bin::web::collect_string_enum_members has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4 (9 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":"xtask/src/bin/web.rs"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b4642c665176aa8a2368788ac731cdcadff8c76a61b011f19dc8da8a39f4604"}},{"ruleId":"D2","level":"warning","message":{"text":"xtask::cmd::mdbook::linkcheck::check_internal_links (cognitive 23): xtask::cmd::mdbook::linkcheck::check_internal_links has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (17 pts), 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":"xtask/src/cmd/mdbook/linkcheck.rs"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"51901859ecbb3ca958c795c0fdb50f37f6768c7c430f569724431f53cec87d5e"}},{"ruleId":"D2","level":"warning","message":{"text":"xtask::cmd::mdbook::llms::strip_inline_markup (cognitive 23): xtask::cmd::mdbook::llms::strip_inline_markup has cognitive complexity 23 (threshold 15). Drivers by points: if/else 3 (12 pts), loops 3 (8 pts), match/switch 1 (2 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":"xtask/src/cmd/mdbook/llms.rs"},"region":{"startLine":360}}}],"partialFingerprints":{"codehealthFindingId/v1":"15df210d2dc4258459734dc30446f45bd5a0d76500c2901df2c474d86541a7cc"}},{"ruleId":"D2","level":"warning","message":{"text":"zerocode::chat::recognized_url_ranges (cognitive 22): zerocode::chat::recognized_url_ranges has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 2 (7 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/chat.rs"},"region":{"startLine":9315}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ceebc88a96e21cee717717919e554604f31ce3b944c5294fcdcd50800304154"}},{"ruleId":"D2","level":"warning","message":{"text":"zerocode::diff::highlight_all (cognitive 22): zerocode::diff::highlight_all has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 2 (4 pts), match/switch 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":"apps/zerocode/src/diff.rs"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"17739f74524ac5e73b797dd3a6ddb1f7596b6c69cce741e62878e45099eb4076"}},{"ruleId":"D2","level":"warning","message":{"text":"TelegramChannel::try_parse_voice_message (cognitive 22): TelegramChannel::try_parse_voice_message has cognitive complexity 22 (threshold 15). Drivers by points: if/else 17, match/switch 4 (5 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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":5650}}}],"partialFingerprints":{"codehealthFindingId/v1":"1319637874f91e533828f2c401a2d3b3bc197e14b232b2ce06bf7c44351fafc6"}},{"ruleId":"D2","level":"warning","message":{"text":"TelegramChannel::parse_update_message (cognitive 22): TelegramChannel::parse_update_message has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 5 (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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":6067}}}],"partialFingerprints":{"codehealthFindingId/v1":"cef8a229c2b61027ff4caa51f9d64e8520395274bdbd8ddef2342058d460cd9e"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::discord::slash::reconcile_one_endpoint (cognitive 22): zeroclaw_channels::discord::slash::reconcile_one_endpoint has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (17 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/zeroclaw-channels/src/discord/slash.rs"},"region":{"startLine":608}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b710aee8b95cca2b31bda6cfe1de423478b5687f68e87200e075efb33b37ddb"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::schema::resolve_ws_proxy_url (cognitive 22): zeroclaw_config::schema::resolve_ws_proxy_url has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (19 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/zeroclaw-config/src/schema.rs"},"region":{"startLine":12384}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7d8c40fcc7776e4f9a62c9c7a6d9b359764bec0b0c99f1312165fe88563133c"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_gateway::api::handle_api_cron_add (cognitive 22): zeroclaw_gateway::api::handle_api_cron_add has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 8 (13 pts), if/else 6 (7 pts), boolean chains 2 (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/zeroclaw-gateway/src/api.rs"},"region":{"startLine":487}}}],"partialFingerprints":{"codehealthFindingId/v1":"420d12d6f961471b5fb6ebfc946526647d82457c1f50444838a896172234abf3"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_gateway::api_sop_author::handle_sop_decide (cognitive 22): zeroclaw_gateway::api_sop_author::handle_sop_decide has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 8 (10 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/zeroclaw-gateway/src/api_sop_author.rs"},"region":{"startLine":460}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfbcf3385b5802a642d85e58218742a5c6f4ebd9bfdc8620d31ced905b29cd7f"}},{"ruleId":"D2","level":"warning","message":{"text":"AcpSessionStore::load_messages (cognitive 22): AcpSessionStore::load_messages has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":1422}}}],"partialFingerprints":{"codehealthFindingId/v1":"7158e5e9088a278ae56911d4fd5b4aa1132311889884d95ad927ecaeea2b246c"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_log::reader::list_archives_reporting (cognitive 22): zeroclaw_log::reader::list_archives_reporting has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (16 pts), match/switch 3 (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/zeroclaw-log/src/reader.rs"},"region":{"startLine":568}}}],"partialFingerprints":{"codehealthFindingId/v1":"2af4d44b9b95e3fa57a25e056a9e35a438b0627311c4a2cfa5e3407c489341f9"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_macros::build_integration_descriptor_method (cognitive 22): zeroclaw_macros::build_integration_descriptor_method has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 6 (16 pts), if/else 2 (3 pts), loops 2 (3 pts) (nesting depth added 12). 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/zeroclaw-macros/src/lib.rs"},"region":{"startLine":2898}}}],"partialFingerprints":{"codehealthFindingId/v1":"f40da851905aad6502fb5f5e388800a3cc5fd9e7fa804e98cf177ce7f95c381b"}},{"ruleId":"D2","level":"warning","message":{"text":"QdrantMemory::list_limited (cognitive 22): QdrantMemory::list_limited has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 2 (5 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-memory/src/qdrant.rs"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"03949b5af883413a1bb47d556fcf371fb655ce9eec2499437f8580aa0369c6b4"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_memory::consolidation::consolidate_turn (cognitive 22): zeroclaw_memory::consolidation::consolidate_turn has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (15 pts), match/switch 2 (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/zeroclaw-memory/src/consolidation.rs"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e8eec9b1a4a247bf3a6fb265da6ae14420e4398e94f7820fc6a724a0dfb02c8"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_plugins::config::validate_schema_node (cognitive 22): zeroclaw_plugins::config::validate_schema_node has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (6 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/zeroclaw-plugins/src/config.rs"},"region":{"startLine":582}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8be613d11389c12f3545e3a6a97abe2d2c275a8a7ee01498609a1fcddb8d697"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_providers::grok_cli::acp::rpc_request (cognitive 22): zeroclaw_providers::grok_cli::acp::rpc_request has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 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/zeroclaw-providers/src/grok_cli/acp.rs"},"region":{"startLine":432}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8557a335f98ec4f57f010427b6ea8ee4ba105a31c646ddb4a7bcb002ec15d61"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_providers::pricing::assemble_snapshot (cognitive 22): zeroclaw_providers::pricing::assemble_snapshot has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 5 (9 pts), match/switch 1 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-providers/src/pricing.rs"},"region":{"startLine":391}}}],"partialFingerprints":{"codehealthFindingId/v1":"339fa451b6c7699a0db9c83cfd6e820fd82fcfd9b8b5601f9bbae1c810a43e3a"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::cron::scheduler::execute_job_with_retry (cognitive 22): zeroclaw_runtime::cron::scheduler::execute_job_with_retry has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 2 (4 pts), boolean chains 3, 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/zeroclaw-runtime/src/cron/scheduler.rs"},"region":{"startLine":857}}}],"partialFingerprints":{"codehealthFindingId/v1":"43abdb793e0c63c2404dae7a7c1705bfb3465db7acc6e45bdf398aaa9b049deb"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::hooks::builtin::webhook_audit::glob_matches (cognitive 22): zeroclaw_runtime::hooks::builtin::webhook_audit::glob_matches has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16 (21 pts), 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/zeroclaw-runtime/src/hooks/builtin/webhook_audit.rs"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"61c9cd5fdf41cc0e5e6ec0476ac3fec985ee03bcfe646d6c84817d11285f0c72"}},{"ruleId":"D2","level":"warning","message":{"text":"GlobSearchTool::execute (cognitive 22): GlobSearchTool::execute has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 4 (6 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/zeroclaw-tools/src/glob_search.rs"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d4c2a3615deaf1cac7305d1a0af76b90af2f01a8882d595cbf6f2e3bbdf4881"}},{"ruleId":"D2","level":"warning","message":{"text":"HttpRequestTool::execute (cognitive 22): HttpRequestTool::execute has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 8 (11 pts), if/else 7 (9 pts), boolean chains 2 (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/zeroclaw-tools/src/http_request.rs"},"region":{"startLine":564}}}],"partialFingerprints":{"codehealthFindingId/v1":"7926f5b64f3ca02c20914e7d9aa3fccc3057454866b4b3523237f28751c1653f"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_tools::a2a_client::select_interface (cognitive 22): zeroclaw_tools::a2a_client::select_interface has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 2 (5 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/a2a_client.rs"},"region":{"startLine":790}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fa58f33a536d9cbd8945c2702ab563476de19101944c1da8423781ed512e28b"}},{"ruleId":"D2","level":"warning","message":{"text":"xtask::cmd::mdbook::llms::first_paragraph (cognitive 22): xtask::cmd::mdbook::llms::first_paragraph has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (19 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":"xtask/src/cmd/mdbook/llms.rs"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"d879e4e3da74f102402c39c60433252445ac1e69897573f8fa49b606b0e5aa29"}},{"ruleId":"D2","level":"warning","message":{"text":"App::visible_cursor (cognitive 21): App::visible_cursor has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 2 (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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":1828}}}],"partialFingerprints":{"codehealthFindingId/v1":"71695e6ad8c60c904298d92c38d809abc0495e12d8c9477210c7ab456687e0f0"}},{"ruleId":"D2","level":"warning","message":{"text":"App::activate_alias_list (cognitive 21): App::activate_alias_list 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":2968}}}],"partialFingerprints":{"codehealthFindingId/v1":"519bf1bca57eb99fbd4dea81fe3d339e8dff17f1d36f4b5f0f71ba5e68358630"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_skills_tab (cognitive 21): App::handle_skills_tab has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":3944}}}],"partialFingerprints":{"codehealthFindingId/v1":"007fd25926aed238bfb020aa86d46f9f3d024775ddba0693f362c16827278189"}},{"ruleId":"D2","level":"warning","message":{"text":"TextSnapshot::selected_text (cognitive 21): TextSnapshot::selected_text has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), 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":"apps/zerocode/src/text_selection.rs"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"e574111bee04bdb130a5af4fe1d152f99346510a53671fab2a2a48c64efc4ac3"}},{"ruleId":"D2","level":"warning","message":{"text":"BlueskyChannel::listen (cognitive 21): BlueskyChannel::listen has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 3 (6 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/bluesky.rs"},"region":{"startLine":514}}}],"partialFingerprints":{"codehealthFindingId/v1":"14fb26ee1c5fe8b09a2acaa09feb99b67ed5ece501b17951ca9572e51b039136"}},{"ruleId":"D2","level":"warning","message":{"text":"DiscordChannel::sweep_message_reactions (cognitive 21): DiscordChannel::sweep_message_reactions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 2, loops 1, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":675}}}],"partialFingerprints":{"codehealthFindingId/v1":"804a3e74e32b2ade2baec5540279ae72b887dd2794adc0855c3c2217b8b4344d"}},{"ruleId":"D2","level":"warning","message":{"text":"TelegramChannel::update_draft (cognitive 21): TelegramChannel::update_draft has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 1 (3 pts), match/switch 2 (3 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":"crates/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":8069}}}],"partialFingerprints":{"codehealthFindingId/v1":"64a01567cd488204f40db40b69723a7cc1444c08714f3de6ae1418c4e25b6ee0"}},{"ruleId":"D2","level":"warning","message":{"text":"TelegramChannel::finalize_draft (cognitive 21): TelegramChannel::finalize_draft has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (14 pts), match/switch 4, loops 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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":8237}}}],"partialFingerprints":{"codehealthFindingId/v1":"450ec8e4a8078ca287f755f62033202e5aec7e103c173fb4fe505486b49c5c7a"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::git::events::event_to_message (cognitive 21): zeroclaw_channels::git::events::event_to_message has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (17 pts), match/switch 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/zeroclaw-channels/src/git/events.rs"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"12a825c4da95f92992582e293897cb043b31fb31bc1b6f05daec63f724e65d18"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::wechat::extract_text_from_items (cognitive 21): zeroclaw_channels::wechat::extract_text_from_items has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (17 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/zeroclaw-channels/src/wechat.rs"},"region":{"startLine":920}}}],"partialFingerprints":{"codehealthFindingId/v1":"aada87d4fbfc4d4a0db16c1f07eea83fe051f9e0cfd6ba1985cc4df943f0e0aa"}},{"ruleId":"D2","level":"warning","message":{"text":"SecurityPolicy::command_risk_level_for_shell (cognitive 21): SecurityPolicy::command_risk_level_for_shell has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 3 (5 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/zeroclaw-config/src/policy.rs"},"region":{"startLine":4175}}}],"partialFingerprints":{"codehealthFindingId/v1":"8532fe03052a9dbd984890cf390cb1b052ab3755ed1feb902931e318f630d838"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_gateway::handle_webhook (cognitive 21): zeroclaw_gateway::handle_webhook has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (14 pts), match/switch 4, 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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":4061}}}],"partialFingerprints":{"codehealthFindingId/v1":"c69738fe73036cab0445fe7b64dbaeae1f95ed4f8877432f2b5586c3b07ff365"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_gateway::api_config::handle_rename_map_key (cognitive 21): zeroclaw_gateway::api_config::handle_rename_map_key has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 6 (12 pts), if/else 5 (9 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/zeroclaw-gateway/src/api_config.rs"},"region":{"startLine":2051}}}],"partialFingerprints":{"codehealthFindingId/v1":"65a44c55ebdb1a796bb1b743e7e58703b43831776aeddf5ab7591927e9a3519c"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_gateway::api_config::rename_agent_cascade (cognitive 21): zeroclaw_gateway::api_config::rename_agent_cascade has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7, match/switch 3 (6 pts), boolean chains 4, loops 2 (4 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/zeroclaw-gateway/src/api_config.rs"},"region":{"startLine":2298}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8a0427b8d5b502372805292b7c62f93e5eddb308b2a1c77c43ffbc1b92fc044"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_infra::net_guard::normalize_egress_pattern (cognitive 21): zeroclaw_infra::net_guard::normalize_egress_pattern has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 3, match/switch 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \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/zeroclaw-infra/src/net_guard.rs"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"710bd47758e6542254098b7c4ad988dc536e3b9c7f63caee60a849af5b39b939"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_infra::net_guard::validate_resolved_ips_are_public (cognitive 21): zeroclaw_infra::net_guard::validate_resolved_ips_are_public has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (4 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/zeroclaw-infra/src/net_guard.rs"},"region":{"startLine":894}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4010f67f43911a1c1a84d65e8c0278cc3e48f196360e48f3aeb503c7db2b058"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_macros::derive_trigger_fields (cognitive 21): zeroclaw_macros::derive_trigger_fields has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 3 (4 pts), match/switch 2 (4 pts) (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/zeroclaw-macros/src/lib.rs"},"region":{"startLine":2425}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f71aa984fb409b56a0c0d9d2c62faf3354b3f6e4c6e27cb8c25c18a0aa9cad8"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_providers::catalog::model_catalog_with_config_result (cognitive 21): zeroclaw_providers::catalog::model_catalog_with_config_result has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 4 (5 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/zeroclaw-providers/src/catalog.rs"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3e9048ca2b8614f1bf6cff0704e64896391037b86ef5b44da59c68f6374666e"}},{"ruleId":"D2","level":"warning","message":{"text":"StreamTextGuard::protocol_suppression_detector (cognitive 21): StreamTextGuard::protocol_suppression_detector 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/zeroclaw-runtime/src/agent/turn/stream_guard.rs"},"region":{"startLine":643}}}],"partialFingerprints":{"codehealthFindingId/v1":"266a4df4de67e3d096af7062f4140e0d39ee749d79d958d5a6a8d94cc7b7060c"}},{"ruleId":"D2","level":"warning","message":{"text":"RpcDispatcher::resolve_session_record_for_mode (cognitive 21): RpcDispatcher::resolve_session_record_for_mode has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 pts), match/switch 2 (3 pts), loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":2323}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fa6bfbf3859d838e8629a31d07841017d5f9d90ee7fff9b21e6264faef03a70"}},{"ruleId":"D2","level":"warning","message":{"text":"ScheduleTool::handle_create_like (cognitive 21): ScheduleTool::handle_create_like has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 4 (6 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/zeroclaw-runtime/src/tools/schedule.rs"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4bcc6014d9ae40da2b7c0e3cbf4a8d5fe88614c6bcf24be0a3a5ff036d40de1"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::agent::turn::results_collect::collect_tool_results (cognitive 21): zeroclaw_runtime::agent::turn::results_collect::collect_tool_results has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 1 (3 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/zeroclaw-runtime/src/agent/turn/results_collect.rs"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"73293689ee635c05557d5524f7b690f1eb750ae19401471514b539378cdaf18b"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::approval::summarize_args (cognitive 21): zeroclaw_runtime::approval::summarize_args has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (13 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":"crates/zeroclaw-runtime/src/approval/mod.rs"},"region":{"startLine":416}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c04a6bc851eea56ed2ad08a173def8de669d65dc6e7233e8715a0b297d7ff3b"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::control_plane::reaper::recover_terminal_settlements (cognitive 21): zeroclaw_runtime::control_plane::reaper::recover_terminal_settlements 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/zeroclaw-runtime/src/control_plane/reaper.rs"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"1de90777edd034098a5a48593d66efb5954464d4b7475d7e4a757f58443f4315"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::relay::shuttle (cognitive 21): zeroclaw_runtime::relay::shuttle has cognitive complexity 21 (threshold 15). Drivers by points: if/else 3 (12 pts), match/switch 3 (8 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/relay.rs"},"region":{"startLine":1339}}}],"partialFingerprints":{"codehealthFindingId/v1":"17481bb02d1f84fc5446b3f2c991f1a1bf6dba06cda928e55d5369757a9a3e13"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::rpc::dispatch::conversation_message_entries (cognitive 21): zeroclaw_runtime::rpc::dispatch::conversation_message_entries has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (7 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":13706}}}],"partialFingerprints":{"codehealthFindingId/v1":"67d829794653006d381ec0eb2368c764b52ff7c7949df8280c8e631aa97d61af"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::skills::prepare_skill_tools_with_runtime (cognitive 21): zeroclaw_runtime::skills::prepare_skill_tools_with_runtime has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (15 pts), loops 2 (3 pts), match/switch 1 (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/zeroclaw-runtime/src/skills/mod.rs"},"region":{"startLine":2037}}}],"partialFingerprints":{"codehealthFindingId/v1":"0da6d147d2703597943707be790b90ce796c8c7dc016a9f1b18fdcda1a5eb2f9"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::tunnel::tailscale::start_forwarder (cognitive 21): zeroclaw_runtime::tunnel::tailscale::start_forwarder has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 2 (7 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/zeroclaw-runtime/src/tunnel/tailscale.rs"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb09e22dfe7ba21b5a620d619f945a0403ef57767935aa0bfee78fd874c034c3"}},{"ruleId":"D2","level":"warning","message":{"text":"FileUploadTool::execute (cognitive 21): FileUploadTool::execute has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, match/switch 5, boolean chains 1, 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/zeroclaw-tools/src/file_upload.rs"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"639ad8c49215f27e1b38da912880a76972d0db4387a2ffb329fb66afb9b89d3e"}},{"ruleId":"D2","level":"warning","message":{"text":"GitOperationsTool::validate_metadata_tree (cognitive 21): GitOperationsTool::validate_metadata_tree has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 5 (9 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/zeroclaw-tools/src/git_operations.rs"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"37208894bbbf8e1507f03e72e5ec09085b3f5725b18a530134152db10d8f6f70"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw::sop_admin_request (cognitive 21): zeroclaw::sop_admin_request has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (5 pts), match/switch 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":"src/main.rs"},"region":{"startLine":14580}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc5e50bebc7cf55232fec49831545f6fd7588349e3ac57bd8bd5ba6c9fc12bfb"}},{"ruleId":"D2","level":"warning","message":{"text":"xtask::cmd::fluent::fill::parse_ftl (cognitive 21): xtask::cmd::fluent::fill::parse_ftl has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 3, 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":"xtask/src/cmd/fluent/fill.rs"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4b753bc2052122be275bb68c4309a567564564793e5a137da6b77e3ea2f0045"}},{"ruleId":"D2","level":"warning","message":{"text":"GmailPushChannel::fetch_history_inner (cognitive 20): GmailPushChannel::fetch_history_inner has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (8 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/gmail_push.rs"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"112b4398ff99583db5972e4385f4d7d06460057cea7391f3b219eb31e8f810f9"}},{"ruleId":"D2","level":"warning","message":{"text":"LarkChannel::download_image_as_marker (cognitive 20): LarkChannel::download_image_as_marker has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 3 (6 pts), boolean chains 3, 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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":1855}}}],"partialFingerprints":{"codehealthFindingId/v1":"23956dfb973247b8f655957e09ce3a3171f40df1731821b6f6ffe5ae6ab0170b"}},{"ruleId":"D2","level":"warning","message":{"text":"MattermostChannel::listen_polling (cognitive 20): MattermostChannel::listen_polling has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (11 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/zeroclaw-channels/src/mattermost.rs"},"region":{"startLine":1357}}}],"partialFingerprints":{"codehealthFindingId/v1":"9db910df78fcb175edcf03e78475f7da5ab1cbd040e7a8186a7c5a434721baa3"}},{"ruleId":"D2","level":"warning","message":{"text":"SlackChannel::render_thread_backfill_block (cognitive 20): SlackChannel::render_thread_backfill_block has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (4 pts), 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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":2333}}}],"partialFingerprints":{"codehealthFindingId/v1":"56bae09aa619b9b95ba43a457594c5c90f46a08470b1ee0eab9cd3e040797d01"}},{"ruleId":"D2","level":"warning","message":{"text":"TelegramChannel::register_bot_commands (cognitive 20): TelegramChannel::register_bot_commands has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (3 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":"crates/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":4044}}}],"partialFingerprints":{"codehealthFindingId/v1":"9222a6554ebf231d24d390b18a23e78ebd77243731ff48e008afd7486b86563b"}},{"ruleId":"D2","level":"warning","message":{"text":"TelegramChannel::process_queued_updates (cognitive 20): TelegramChannel::process_queued_updates has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":7731}}}],"partialFingerprints":{"codehealthFindingId/v1":"2da13bc316fa40034aa7da44dd9f370c9f28f9a1cdeaa4a3da1859bb1aa7f664"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::lark::handle_lark_http_event (cognitive 20): zeroclaw_channels::lark::handle_lark_http_event has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3, match/switch 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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":918}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccec5da42df1a76bafbaf6850134119e625a98cb0c4b1c1d08de9589de5e7333"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::orchestrator::hydrate_session_transcript (cognitive 20): zeroclaw_channels::orchestrator::hydrate_session_transcript has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (13 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":"crates/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":16791}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbcda6b05489016a4b9bcc81e7f76a0775474993a3c674c84d9f16a7ae11ae88"}},{"ruleId":"D2","level":"warning","message":{"text":"MatrixConfig::validate_stream_tool_arguments (cognitive 20): MatrixConfig::validate_stream_tool_arguments has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (4 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/zeroclaw-config/src/schema.rs"},"region":{"startLine":18281}}}],"partialFingerprints":{"codehealthFindingId/v1":"e168ba112de7a920b7b26dfebf56280a572aff2385caef99a543f7af2749ce92"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::migration::unversioned_shape (cognitive 20): zeroclaw_config::migration::unversioned_shape has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, match/switch 2 (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/zeroclaw-config/src/migration.rs"},"region":{"startLine":630}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d971fd30d3d34736a459c2346366d7c543066b52d01b39ef2bad8af53aa0bd3"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_gateway::api_sop_author::handle_sop_run (cognitive 20): zeroclaw_gateway::api_sop_author::handle_sop_run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 3 (7 pts), boolean chains 1, loops 1 (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/zeroclaw-gateway/src/api_sop_author.rs"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"325ae1bd7b6ff338427972a86d6039bd630e873e7efe5586d71460eb3a4b9a19"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_memory::budget::compact_category_to_budget (cognitive 20): zeroclaw_memory::budget::compact_category_to_budget has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 4 (6 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/zeroclaw-memory/src/budget.rs"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"e69eb748791bd51a52cdea2c1afc363b665274994ff677095a83652afa3de2eb"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenAiCompatibleModelProvider::stream_chat_with_system (cognitive 20): OpenAiCompatibleModelProvider::stream_chat_with_system has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 6 (8 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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":5035}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7902849f9414788bd6c45753db7152bc84a563d7d622ae3e068234595ca4938"}},{"ruleId":"D2","level":"warning","message":{"text":"RouterModelProvider::resolve_cost_optimized (cognitive 20): RouterModelProvider::resolve_cost_optimized has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 3, 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/zeroclaw-providers/src/router.rs"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4939e376edceefd6e9edeccbd7d4874f9c443c4bad023ed692b52c12c534f57"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_providers::multimodal::parse_image_markers_inner (cognitive 20): zeroclaw_providers::multimodal::parse_image_markers_inner 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/zeroclaw-providers/src/multimodal.rs"},"region":{"startLine":694}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e0bd80efa5ec30c3c3b11cd2da7fee53b72879039825a2e0f5b9ca108f95076"}},{"ruleId":"D2","level":"warning","message":{"text":"RepetitionGuard::observe_round (cognitive 20): RepetitionGuard::observe_round has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (17 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/zeroclaw-runtime/src/agent/turn/repetition.rs"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7880b9ed5a170a303eb271cd4602221baf08e72858ba6ba4c95da26d0018851"}},{"ruleId":"D2","level":"warning","message":{"text":"RpcDispatcher::dispatch_method (cognitive 20): RpcDispatcher::dispatch_method has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 6 (11 pts), if/else 5 (8 pts), boolean chains 1 (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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":3391}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8f1c271bd99fc11a6177f5f43abfd474f0be56381b01f1003b6d2b7d03a7509"}},{"ruleId":"D2","level":"warning","message":{"text":"SkillsService::list_skills (cognitive 20): SkillsService::list_skills has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (16 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/zeroclaw-runtime/src/skills/service.rs"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"222d5f493d5652f9f91ea7f32805744af19b91499ae02fab0c177dad49123ddc"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::agent::turn::parse_response::interpret_chat_response (cognitive 20): zeroclaw_runtime::agent::turn::parse_response::interpret_chat_response has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (16 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/zeroclaw-runtime/src/agent/turn/parse_response.rs"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ae5324771bda1a9dea6814c9d068783f2437fd04943e86e1f5636f575265bf2"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::security::playbook::load_playbooks (cognitive 20): zeroclaw_runtime::security::playbook::load_playbooks has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 2 (9 pts), if/else 4 (7 pts), loops 2 (3 pts), boolean chains 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/zeroclaw-runtime/src/security/playbook.rs"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"2286424059b550f15216c8b26333abc021de24991c5d3c89128525b2d759f0c4"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::sop::route::resolve_next (cognitive 20): zeroclaw_runtime::sop::route::resolve_next has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 2 (4 pts), loops 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/zeroclaw-runtime/src/sop/route/mod.rs"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9ad59f819e1c87bccd835f24c1ed5a2c745f7c4250a788751785bcdd942f246"}},{"ruleId":"D2","level":"warning","message":{"text":"ToolSearchTool::search_tools (cognitive 20): ToolSearchTool::search_tools has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (4 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/zeroclaw-tools/src/tool_search.rs"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"db3f779692dfb0096793bf52fdabf24a1fbe039ed55acc6d55887a3477bd6d95"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_tools::backup_tool::validate_copy_destination (cognitive 20): zeroclaw_tools::backup_tool::validate_copy_destination has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (8 pts), match/switch 3 (8 pts), boolean chains 3, 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/zeroclaw-tools/src/backup_tool.rs"},"region":{"startLine":1181}}}],"partialFingerprints":{"codehealthFindingId/v1":"015b898e362d50f5bcd51be58ee7bb3299758ac28a05fff88c509bdd5ff2a6ce"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw::prompt_for_field (cognitive 20): zeroclaw::prompt_for_field has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (16 pts), match/switch 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":"src/main.rs"},"region":{"startLine":3354}}}],"partialFingerprints":{"codehealthFindingId/v1":"b24989d4dad428362aa3c30fc9e7785a99d843efe45196d93021f6fbcc3e8bed"}},{"ruleId":"D2","level":"warning","message":{"text":"xtask::cmd::fluent::check::run (cognitive 20): xtask::cmd::fluent::check::run has cognitive complexity 20 (threshold 15). Drivers by points: loops 4 (11 pts), if/else 5 (9 pts) (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"xtask/src/cmd/fluent/check.rs"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fa2dad0ea490e100418e095d402b7425391123fb0035a118f0051b2316de92b"}},{"ruleId":"D2","level":"warning","message":{"text":"Chat::drain_entry_retry_results (cognitive 19): Chat::drain_entry_retry_results has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), boolean chains 3, loops 1 (2 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":"apps/zerocode/src/chat.rs"},"region":{"startLine":2161}}}],"partialFingerprints":{"codehealthFindingId/v1":"55519931a084a3e1d6f1c88eef9fb34d080516a702d4f99dcbb95b97eba31bd6"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplicationFeedback::summary_line (cognitive 19): ApplicationFeedback::summary_line has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (16 pts), 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":"apps/zerocode/src/config_application.rs"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"06fd37be5b4c0966f064add6d5838a362e08cd0fd440e30b4ed1ccad11b8d4bb"}},{"ruleId":"D2","level":"warning","message":{"text":"App::load_fields (cognitive 19): App::load_fields has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":2305}}}],"partialFingerprints":{"codehealthFindingId/v1":"590fc6aa690a8606bf4d08a637272ebaf81923502d4d375ffcf39f1169f5a051"}},{"ruleId":"D2","level":"warning","message":{"text":"Dashboard::draw_cost (cognitive 19): Dashboard::draw_cost 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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":1452}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a4b6860ca79d89cd142887b127c86d0d9877322244b074b3e26dcbfd9fa688c"}},{"ruleId":"D2","level":"warning","message":{"text":"zerocode::chat::style_recognized_urls (cognitive 19): zerocode::chat::style_recognized_urls has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 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":"apps/zerocode/src/chat.rs"},"region":{"startLine":9381}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c8e9a874c35aa770a61712786263b4e9052995f4b28e2cb040aa4c051581371"}},{"ruleId":"D2","level":"warning","message":{"text":"GitChannel::poll_repo (cognitive 19): GitChannel::poll_repo has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 4 (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/zeroclaw-channels/src/git/channel.rs"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"f25b89060ee541374b4cc5057ee4c58ab53582e763ff0a82933f0e3670907376"}},{"ruleId":"D2","level":"warning","message":{"text":"MattermostChannel::authenticate_websocket (cognitive 19): MattermostChannel::authenticate_websocket has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (12 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/zeroclaw-channels/src/mattermost.rs"},"region":{"startLine":723}}}],"partialFingerprints":{"codehealthFindingId/v1":"eeef8a9ee9e771117db4bd5b1a6e0992166f260ff13a40c0d1a44553e7668358"}},{"ruleId":"D2","level":"warning","message":{"text":"PacedChannel::paced_dispatch (cognitive 19): PacedChannel::paced_dispatch has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (17 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/zeroclaw-channels/src/paced_channel.rs"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f22d30149f4332e69ff8ae9f7f73e9fc0e122b745d139bf25e2a20b439db59b"}},{"ruleId":"D2","level":"warning","message":{"text":"TelegramChannel::flush_unsent (cognitive 19): TelegramChannel::flush_unsent has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 1, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":3005}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a7c43d483ac8dc02fe3003a2f862df81cbf520435f65ceda17fc44bd7f424b1"}},{"ruleId":"D2","level":"warning","message":{"text":"TelegramChannel::try_queue_voice_reply (cognitive 19): TelegramChannel::try_queue_voice_reply has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 5, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":4208}}}],"partialFingerprints":{"codehealthFindingId/v1":"21981f369168c119676e9b0f20d0d548dc1215a3aa7dfee567fe5621c0e742b3"}},{"ruleId":"D2","level":"warning","message":{"text":"TelegramChannel::find_bot_mention_spans (cognitive 19): TelegramChannel::find_bot_mention_spans has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":4561}}}],"partialFingerprints":{"codehealthFindingId/v1":"90eee55790b032ad7c84955d6efd33279e1e02bab5b9de79204023503090ba45"}},{"ruleId":"D2","level":"warning","message":{"text":"TelegramChannel::process_update (cognitive 19): TelegramChannel::process_update has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (16 pts), match/switch 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":7403}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cf8bd38d1973f8551ea8040a7be1b2ce70b9e97eac86286aedb70d9023299b8"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::discord::chunk::budget_embeds (cognitive 19): zeroclaw_channels::discord::chunk::budget_embeds has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 4 (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/zeroclaw-channels/src/discord/chunk.rs"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"428c9552115c7b1c035c5fab62cd416f0989c9a594030dc7bdff961a9e51f8c7"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::lark::collect_list_items (cognitive 19): zeroclaw_channels::lark::collect_list_items has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3 (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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":4198}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6ad5af9c132322f4b43c562bf8fae982c13d6c0b019200f15f8f2329fdcaeae"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::orchestrator::hydrate_sender_history_if_missing (cognitive 19): zeroclaw_channels::orchestrator::hydrate_sender_history_if_missing has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 3 (12 pts), if/else 3 (6 pts), boolean chains 1 (nesting depth added 12). 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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":3964}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c47d18d282424698b724abcb44105e9db7057fa682d8c7d666ea67223024e1f"}},{"ruleId":"D2","level":"warning","message":{"text":"SecurityPolicy::is_path_allowed (cognitive 19): SecurityPolicy::is_path_allowed has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 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/zeroclaw-config/src/policy.rs"},"region":{"startLine":5035}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecf73b76d429dfe9547adf5674a2672afaf2022ea47b3242d7eca0f90a4e5aad"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::agent_bundle::sanitize_agent (cognitive 19): zeroclaw_config::agent_bundle::sanitize_agent has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (16 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-config/src/agent_bundle.rs"},"region":{"startLine":691}}}],"partialFingerprints":{"codehealthFindingId/v1":"3487ff411d4a3e1f4c68af5d1e160cc8f35477e6f6f6e5f9664f15cb1706bda1"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::schema::prune_default_values (cognitive 19): zeroclaw_config::schema::prune_default_values has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 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/zeroclaw-config/src/schema.rs"},"region":{"startLine":22441}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f10053424b190562a3175b8886f551373860d9c20a698e8a8cf1dfe7af51582"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::schema::v2::fold_v2_storage_subsystems (cognitive 19): zeroclaw_config::schema::v2::fold_v2_storage_subsystems has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), match/switch 3 (4 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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":2655}}}],"partialFingerprints":{"codehealthFindingId/v1":"9970691f7189820b5507bf91d5b2b397e86780e2ac9e1c537511a3dd57a89357"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_gateway::api_config::handle_map_key (cognitive 19): zeroclaw_gateway::api_config::handle_map_key has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 4 (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/zeroclaw-gateway/src/api_config.rs"},"region":{"startLine":1740}}}],"partialFingerprints":{"codehealthFindingId/v1":"e76c9779277e95c496a394344cc9414a4f5dc4b5890364fe8bd7b13fdb670bfb"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_gateway::api_oidc::finish_pkce_callback (cognitive 19): zeroclaw_gateway::api_oidc::finish_pkce_callback has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 7 (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/zeroclaw-gateway/src/api_oidc.rs"},"region":{"startLine":1458}}}],"partialFingerprints":{"codehealthFindingId/v1":"4258a48d391a3940fdff3322296ae693df1d293793806447c23c7673e9619de0"}},{"ruleId":"D2","level":"warning","message":{"text":"QdrantMemory::migrate_session_ids_to_sanitized (cognitive 19): QdrantMemory::migrate_session_ids_to_sanitized has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-memory/src/qdrant.rs"},"region":{"startLine":440}}}],"partialFingerprints":{"codehealthFindingId/v1":"b35bf30e489671ef582c539dceee355591a24ef87efd384bafe3879326a38931"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_memory::create_memory_for_agent (cognitive 19): zeroclaw_memory::create_memory_for_agent has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 3 (4 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/zeroclaw-memory/src/lib.rs"},"region":{"startLine":1019}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5812a7cc6b9a2479c0aa04de5a2527e104ad8c0fbcfbb2490926ac62b97d924"}},{"ruleId":"D2","level":"warning","message":{"text":"PluginHost::remove_with_report (cognitive 19): PluginHost::remove_with_report has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 7 (11 pts), if/else 6 (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/zeroclaw-plugins/src/host.rs"},"region":{"startLine":774}}}],"partialFingerprints":{"codehealthFindingId/v1":"df288296c344553536c109033362fa080b61e1b592374dd2f77a2cec95a288a9"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_plugins::component_websocket::dial_authorized (cognitive 19): zeroclaw_plugins::component_websocket::dial_authorized has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 4 (10 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/zeroclaw-plugins/src/component_websocket.rs"},"region":{"startLine":397}}}],"partialFingerprints":{"codehealthFindingId/v1":"192375efa2715091f36fc571cb18eb492e42bbc2e61f3bb429308756eb9016cd"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_plugins::config::compile_manifest_config (cognitive 19): zeroclaw_plugins::config::compile_manifest_config has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (15 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-plugins/src/config.rs"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"980378e12c84c0e795a2d2b8db53b5fd3fd417f7bbf811b3847c0ef7d4fa47d7"}},{"ruleId":"D2","level":"warning","message":{"text":"AnthropicModelProvider::parse_native_response (cognitive 19): AnthropicModelProvider::parse_native_response has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, 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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":2162}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf917570e6d70925f795fc7645bcf7f870e97da51107ccb290377e89717b679b"}},{"ruleId":"D2","level":"warning","message":{"text":"BedrockModelProvider::parse_user_content_blocks (cognitive 19): BedrockModelProvider::parse_user_content_blocks has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (17 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/zeroclaw-providers/src/bedrock.rs"},"region":{"startLine":1167}}}],"partialFingerprints":{"codehealthFindingId/v1":"daf47365d015681e06c5a4df49398cc01bef2e0bab7f5d6c83dc33fb89a36aab"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_providers::multimodal::count_latest_user_resolvable_image_markers (cognitive 19): zeroclaw_providers::multimodal::count_latest_user_resolvable_image_markers has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3, loops 1, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-providers/src/multimodal.rs"},"region":{"startLine":1054}}}],"partialFingerprints":{"codehealthFindingId/v1":"05c1c0a2b21912eae59e1e03302a84600a1a6dd851401e05fd33f996633e70fe"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_providers::multimodal::jpeg_retained_metadata_allocation (cognitive 19): zeroclaw_providers::multimodal::jpeg_retained_metadata_allocation has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 3 (6 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/zeroclaw-providers/src/multimodal.rs"},"region":{"startLine":3372}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d5fb0f4882c5383e5da1b4ccc371066ac63c78bd1d0d1a8209d3d8fa570ab03"}},{"ruleId":"D2","level":"warning","message":{"text":"Agent::turn (cognitive 19): Agent::turn has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 3, match/switch 3, loops 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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":4385}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf99466cce185af171cc1c7405a3a119e7d75d173ffa71f43ceee3e469b7ee47"}},{"ruleId":"D2","level":"warning","message":{"text":"StreamTextGuard::evaluate_pending (cognitive 19): StreamTextGuard::evaluate_pending has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (13 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/zeroclaw-runtime/src/agent/turn/stream_guard.rs"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f23d16fffc2be88787ebef5e4594e2715c345304a8f3b8c112e6b970a6c7dc4"}},{"ruleId":"D2","level":"warning","message":{"text":"InprocConnector::connect_with (cognitive 19): InprocConnector::connect_with has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/rpc/inproc.rs"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d7b74b59fc132060d59332b709f0fa12816e35506591ed5f40519d4dd846723"}},{"ruleId":"D2","level":"warning","message":{"text":"PrincipalResolver::resolve_grants (cognitive 19): PrincipalResolver::resolve_grants has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (18 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/zeroclaw-runtime/src/security/principal_resolver.rs"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dd997401dde5934b2784ed527412ce3b96531f8547bca5c0a42bc1577da041f"}},{"ruleId":"D2","level":"warning","message":{"text":"ApprovalBroker::count_qualified_voters (cognitive 19): ApprovalBroker::count_qualified_voters has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2, 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/zeroclaw-runtime/src/sop/approval/broker.rs"},"region":{"startLine":569}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c95842d5735992ac64a0240d39ffe59c59a80583288527d72395f532558cfd4"}},{"ruleId":"D2","level":"warning","message":{"text":"SopEngine::dispatch_llm_step (cognitive 19): SopEngine::dispatch_llm_step has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (14 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":3157}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fc494df43623afd781a5e1760f1c8c20eabaa890d8146b5399df85e1300fd66"}},{"ruleId":"D2","level":"warning","message":{"text":"DelegateTool::execute_background (cognitive 19): DelegateTool::execute_background has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, match/switch 5 (6 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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":3525}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7e3e8923fd9dfd27b9b6c728eac20a8d471490288a0a1963d0880202b2a38f5"}},{"ruleId":"D2","level":"warning","message":{"text":"CustomTunnel::start (cognitive 19): CustomTunnel::start has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 1 (3 pts), boolean chains 2, 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/zeroclaw-runtime/src/tunnel/custom.rs"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd16b1e8c02375b2f4ae0e1056ce6a3fa2401cdb1a7565da84500a0b76ced0bb"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::agent::turn::enforce_reported_budget (cognitive 19): zeroclaw_runtime::agent::turn::enforce_reported_budget has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 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":"crates/zeroclaw-runtime/src/agent/turn/mod.rs"},"region":{"startLine":1193}}}],"partialFingerprints":{"codehealthFindingId/v1":"062d1c5b174965ae963134e51f9f45564b4cd9de9a1e786b7cac2b8ad6aea933"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::agent_lifecycle::cascade_owned_state (cognitive 19): zeroclaw_runtime::agent_lifecycle::cascade_owned_state has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 9 (11 pts), if/else 7 (8 pts) (nesting depth added 3). 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/zeroclaw-runtime/src/agent_lifecycle.rs"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e3bb52b43ac42294459907c8949131cc0e3f3c92771bed48b57b210600ddac5"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::cron::scheduler::run_agent_job_inner (cognitive 19): zeroclaw_runtime::cron::scheduler::run_agent_job_inner has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 4 (5 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/cron/scheduler.rs"},"region":{"startLine":1177}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc4c3965b5c3ae51d62a86bde50a3cd56b84548b2d7df07cf1a6a2cc503b6431"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::daemon::wait_for_exit_signal (cognitive 19): zeroclaw_runtime::daemon::wait_for_exit_signal has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4, 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/zeroclaw-runtime/src/daemon/mod.rs"},"region":{"startLine":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"6560952e9b2e2bd8025b45853b7a71656d50621e476d5c6eb82d60666a369c0f"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::rpc::locales::handle_locales_fetch (cognitive 19): zeroclaw_runtime::rpc::locales::handle_locales_fetch has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 4 (9 pts), if/else 3 (5 pts), loops 3 (5 pts) (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/zeroclaw-runtime/src/rpc/locales.rs"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"357e4b2c368ea7c0f013c80e65297882e25161e6d0af7c81fd7dd7eb4a20b101"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::security::audit::verify_chain_file (cognitive 19): zeroclaw_runtime::security::audit::verify_chain_file 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/zeroclaw-runtime/src/security/audit.rs"},"region":{"startLine":710}}}],"partialFingerprints":{"codehealthFindingId/v1":"00cb7b286dd20b19f3bd585d7cd8c0ce829960b75ff849d9af8c0fb2242e3909"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::sop::graph::binding_data_wires (cognitive 19): zeroclaw_runtime::sop::graph::binding_data_wires has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 3 (6 pts), match/switch 1 (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/zeroclaw-runtime/src/sop/graph.rs"},"region":{"startLine":550}}}],"partialFingerprints":{"codehealthFindingId/v1":"19b59442a92c818022da4cf87e6dc3cfae3b115593da4009cebf86f96451f0e1"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_tool_call_parser::extract_json_values (cognitive 19): zeroclaw_tool_call_parser::extract_json_values has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 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/zeroclaw-tool-call-parser/src/lib.rs"},"region":{"startLine":1105}}}],"partialFingerprints":{"codehealthFindingId/v1":"e69ec696a0036171df22de0f923860449bcc8291ba135329f18625071d418dd9"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_tool_call_parser::detect_tool_call_parse_issue (cognitive 19): zeroclaw_tool_call_parser::detect_tool_call_parse_issue has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 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/zeroclaw-tool-call-parser/src/lib.rs"},"region":{"startLine":2598}}}],"partialFingerprints":{"codehealthFindingId/v1":"28986e3aa4a0d981f9d07340644d6bcc099d5a1290e6ec6a2e17ba4d41f54afc"}},{"ruleId":"D2","level":"warning","message":{"text":"BrowserTool::execute_agent_browser_action (cognitive 19): BrowserTool::execute_agent_browser_action has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (18 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/zeroclaw-tools/src/browser.rs"},"region":{"startLine":609}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c1394b1665f836dc8d05f831bc25d42865941aa2f7099265576899f1cc73ada"}},{"ruleId":"D2","level":"warning","message":{"text":"GitForgeTool::execute (cognitive 19): GitForgeTool::execute has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 6 (10 pts), if/else 7 (9 pts) (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/zeroclaw-tools/src/git_forge.rs"},"region":{"startLine":897}}}],"partialFingerprints":{"codehealthFindingId/v1":"b42b0777e0046650ef4291539b8a41ef5627d38240b9894932dcc5717514d66a"}},{"ruleId":"D2","level":"warning","message":{"text":"GitOperationsTool::git_status (cognitive 19): GitOperationsTool::git_status has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 3, 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/zeroclaw-tools/src/git_operations.rs"},"region":{"startLine":1294}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d73127a67b2f1d6768b07931301ab8688b83ed147a3fba16f87ab93211be8d3"}},{"ruleId":"D2","level":"warning","message":{"text":"LinkedInClient::update_env_token (cognitive 19): LinkedInClient::update_env_token has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (17 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/zeroclaw-tools/src/linkedin_client.rs"},"region":{"startLine":744}}}],"partialFingerprints":{"codehealthFindingId/v1":"89f97a3e0c0a93dd13e20876474c83ce37a6354eb1fb6876e02704f81482bc5d"}},{"ruleId":"D2","level":"warning","message":{"text":"McpPromptsTool::execute (cognitive 19): McpPromptsTool::execute has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 9 (19 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/zeroclaw-tools/src/mcp_prompts_tool.rs"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee4199440c547a5405a282ceae7ab9615920ccb7ca712b7beac892574ea954a2"}},{"ruleId":"D2","level":"warning","message":{"text":"McpResourcesTool::execute (cognitive 19): McpResourcesTool::execute has cognitive complexity 19 (threshold 15). Drivers by points: match/switch 9 (19 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/zeroclaw-tools/src/mcp_resources_tool.rs"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"18a22caa9ec0fcf22545dc1ad9ffbf462f95cdc10e4f15a82269043771cb7cfa"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw::peripherals::handle_command (cognitive 19): zeroclaw::peripherals::handle_command has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 1 (3 pts), boolean chains 1, 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":"src/peripherals/mod.rs"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"c74f4490fdd5484d0203ac4473368a54fb23e54018260549dd2bc74ef23537f1"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw::skills::discovery::extract_zip (cognitive 19): zeroclaw::skills::discovery::extract_zip 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":"src/skills/discovery.rs"},"region":{"startLine":574}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1d89d24cbff3bec18d13beb4f708845dd2b904ae022d8ad3a617b495f94098d"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_desktop::daemon::find_zeroclaw_binary (cognitive 18): zeroclaw_desktop::daemon::find_zeroclaw_binary has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (5 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/tauri/src/daemon.rs"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"9866cac3fe2b2167175b6cafe2c38a46b37a132d6592600cc8ca0c603088c585"}},{"ruleId":"D2","level":"warning","message":{"text":"TranscriptLayoutCache::rebuild_screen_ranges (cognitive 18): TranscriptLayoutCache::rebuild_screen_ranges has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 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":"apps/zerocode/src/chat/transcript_layout.rs"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"6718b1851371ee3971b3c3f684fef818cc007057a058b01b7ef33b7e2d9360b7"}},{"ruleId":"D2","level":"warning","message":{"text":"Chat::handle_queue_mouse (cognitive 18): Chat::handle_queue_mouse has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 1 (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":"apps/zerocode/src/chat.rs"},"region":{"startLine":5348}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a3360004588e288f7a73cdd27a4d785798609c194019f3a15d843fa3d2f130a"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatState::open_transcript_context_menu (cognitive 18): ChatState::open_transcript_context_menu has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 pts), match/switch 2 (3 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":"apps/zerocode/src/chat.rs"},"region":{"startLine":10756}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ea22fda4bad43d1a2ec1daf062d43b5a82a1c0714050cf2448e5c6d87650a3a"}},{"ruleId":"D2","level":"warning","message":{"text":"App::activate_mouse (cognitive 18): App::activate_mouse has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (17 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":1994}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba2b9570ec34ba7f8ba3adbf13fc96b5e7d7fdf23cc06e64b7facc4db3d411fe"}},{"ruleId":"D2","level":"warning","message":{"text":"Dashboard::draw_status_line (cognitive 18): Dashboard::draw_status_line has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 2 (4 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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":526}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fc14e67520ce3c0d81592c7fb4641c1da6d5b2097810981427d88c9aceaaf09"}},{"ruleId":"D2","level":"warning","message":{"text":"Logs::open_copy_menu (cognitive 18): Logs::open_copy_menu has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/logs.rs"},"region":{"startLine":1365}}}],"partialFingerprints":{"codehealthFindingId/v1":"082f53a67976e2c15dc2bfc2f40466130de6bcf9d96917b35e348aba8fd17709"}},{"ruleId":"D2","level":"warning","message":{"text":"StatusReporter::sync_to (cognitive 18): StatusReporter::sync_to has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (18 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":"apps/zerocode/src/osc_status.rs"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"70eef4e7a0a7e5687cdc2b480521823291e4226d5ecfb431d287c0d278d6233c"}},{"ruleId":"D2","level":"warning","message":{"text":"QuickstartPane::handle_key (cognitive 18): QuickstartPane::handle_key has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/quickstart_pane.rs"},"region":{"startLine":1216}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c288b35534ea3f52590edb344e8dce4d9014efacdf043730062d60029e413b6"}},{"ruleId":"D2","level":"warning","message":{"text":"zerocode::chat::render_entry_into (cognitive 18): zerocode::chat::render_entry_into has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (4 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":"apps/zerocode/src/chat.rs"},"region":{"startLine":7581}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbe93fc68a40de14c9103c1f04de774bfae4fa87701c8cc0b21b0e33c9b2c71a"}},{"ruleId":"D2","level":"warning","message":{"text":"zerocode::login::renew_expired (cognitive 18): zerocode::login::renew_expired has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 4 (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":"apps/zerocode/src/login.rs"},"region":{"startLine":491}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bf7786d5e5c2b14b8fa19ef46f964b65d644b773b8b7422f28e4fc2b4d4caf2"}},{"ruleId":"D2","level":"warning","message":{"text":"zerorelay::frontdoor::serve_session (cognitive 18): zerorelay::frontdoor::serve_session has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 2 (4 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":"apps/zerorelay/src/frontdoor.rs"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e492e6085e07dc67210539c277126c85b48af87e98f728473d925b6cc86d98c"}},{"ruleId":"D2","level":"warning","message":{"text":"FilesystemChannel::dispatch_loop (cognitive 18): FilesystemChannel::dispatch_loop has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), match/switch 3 (7 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/zeroclaw-channels/src/filesystem.rs"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5f7fbfffa2843666132f95295907a6cc3b79b34e371fd5d2029333eba66be44"}},{"ruleId":"D2","level":"warning","message":{"text":"TelegramChannel::handle_approval_callback (cognitive 18): TelegramChannel::handle_approval_callback has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 4 (6 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":7176}}}],"partialFingerprints":{"codehealthFindingId/v1":"82a7b988ef27c0e9f8229f403c663871115cd6f8ab4ba0565a7796bff59ad9c4"}},{"ruleId":"D2","level":"warning","message":{"text":"WeChatChannel::load_persisted_state (cognitive 18): WeChatChannel::load_persisted_state has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 2 (6 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/zeroclaw-channels/src/wechat.rs"},"region":{"startLine":1150}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6db8b63fe0bf637857f15d7d8b37aaae8750711fe6ffa24870de027fdebc55f"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::matrix::client::build_attempt (cognitive 18): zeroclaw_channels::matrix::client::build_attempt has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 5, 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, 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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":1428}}}],"partialFingerprints":{"codehealthFindingId/v1":"0da661915189469508a510c3416a1d31795e385d7bc4a11a1d5a704607f37ed2"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::matrix::markers::parse (cognitive 18): zeroclaw_channels::matrix::markers::parse has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"46ea96061c70dd10bd125faa9a33e3584171c9001c12d85286ab9dc5f355a0e6"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::orchestrator::parse_runtime_command (cognitive 18): zeroclaw_channels::orchestrator::parse_runtime_command has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 4 (8 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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":2790}}}],"partialFingerprints":{"codehealthFindingId/v1":"57a51390c6f955726241174ef049afcbce216fceb91425233437a82d776cf67d"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::wecom_ws::cleanup_inbox_files (cognitive 18): zeroclaw_channels::wecom_ws::cleanup_inbox_files 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/zeroclaw-channels/src/wecom_ws.rs"},"region":{"startLine":2656}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f7dcbb4d6ecdd5932c7b51c6530dbc9e4eb352b9a08715a6a86dcbdcd1ba2a3"}},{"ruleId":"D2","level":"warning","message":{"text":"Config::reachable_delegate_target_configs (cognitive 18): Config::reachable_delegate_target_configs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 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/zeroclaw-config/src/schema.rs"},"region":{"startLine":4566}}}],"partialFingerprints":{"codehealthFindingId/v1":"749b977d50b7fca1d2707819f1f7c36fea0fa6d19b13f0788b86c7d6e593938e"}},{"ruleId":"D2","level":"warning","message":{"text":"Config::mcp_servers_for_bundles (cognitive 18): Config::mcp_servers_for_bundles has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (8 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/zeroclaw-config/src/schema.rs"},"region":{"startLine":5260}}}],"partialFingerprints":{"codehealthFindingId/v1":"475ddc14efb5a695b102fa3ab2e83bfb10a78a7f2cdbaad8b5d9dceff556ba57"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::policy::resolve_symlinked_path (cognitive 18): zeroclaw_config::policy::resolve_symlinked_path has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (4 pts), match/switch 1 (2 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/zeroclaw-config/src/policy.rs"},"region":{"startLine":829}}}],"partialFingerprints":{"codehealthFindingId/v1":"c035d9cc87295c1f74da826c34970758f3d8f80809eb790d1bca48fc28fd7fc0"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::schema::apply_dirty_natural_key_path (cognitive 18): zeroclaw_config::schema::apply_dirty_natural_key_path has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), match/switch 5 (7 pts), loops 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/zeroclaw-config/src/schema.rs"},"region":{"startLine":27757}}}],"partialFingerprints":{"codehealthFindingId/v1":"856526d300deb97b1297ec8ba5029e37c5955976d11a2f708bcadddfff1754c4"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::schema::v2::migrate_qdrant_collection_to_v3 (cognitive 18): zeroclaw_config::schema::v2::migrate_qdrant_collection_to_v3 has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":3890}}}],"partialFingerprints":{"codehealthFindingId/v1":"77eff7ed195e888c4be4b34213c3263148de927425467f6e5c14f48fc61e8bb5"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_gateway::handle_admin_paircode_new (cognitive 18): zeroclaw_gateway::handle_admin_paircode_new has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 5 (8 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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":5615}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8a8dfd9a261b92a822f33b33663e99fa21b963bda137db9adb33b89d0a03ad3"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_gateway::ws::handle_ws_chat (cognitive 18): zeroclaw_gateway::ws::handle_ws_chat has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 2, 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, 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/zeroclaw-gateway/src/ws.rs"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"99b424dee6aa20245bab6fc258fa614fccbe723a438be0354c6b2df018ad6dcf"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenAiCompatibleModelProvider::apply_cache_breakpoints (cognitive 18): OpenAiCompatibleModelProvider::apply_cache_breakpoints has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, 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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":1196}}}],"partialFingerprints":{"codehealthFindingId/v1":"d45076fd4cbd342725160c3a3134ead1b30e3f370a851b264458cf95fa824109"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_providers::compatible::openai_assistant_content_plaintext (cognitive 18): zeroclaw_providers::compatible::openai_assistant_content_plaintext has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 1 (2 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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":2090}}}],"partialFingerprints":{"codehealthFindingId/v1":"be69d621db90bd910858e1f0532fc5c9a442a81cdb8773629bb9b3f6470257aa"}},{"ruleId":"D2","level":"warning","message":{"text":"DelegateTool::execute_parallel (cognitive 18): DelegateTool::execute_parallel has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 2 (4 pts), loops 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":4082}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b4838239e1261f33407519e5d5b6d4bb5c79580d0a8f3fc844c5954d91e823f"}},{"ruleId":"D2","level":"warning","message":{"text":"SopAdvanceTool::execute (cognitive 18): SopAdvanceTool::execute has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (8 pts), match/switch 5 (7 pts), boolean chains 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/zeroclaw-runtime/src/tools/sop_advance.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"12087cedf8f973c0bba1eb30dfbd06dcc0277651a0b506a1ea84aee09d58d813"}},{"ruleId":"D2","level":"warning","message":{"text":"SpawnSubagentTool::execute (cognitive 18): SpawnSubagentTool::execute has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), match/switch 6 (7 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/zeroclaw-runtime/src/tools/spawn_subagent.rs"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3fe9bbd4785d479e3b3518a578fa961ac5a572513ec9185ad7c88bf9609d08e"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::daemon::spawn_component_supervisor (cognitive 18): zeroclaw_runtime::daemon::spawn_component_supervisor has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (13 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/zeroclaw-runtime/src/daemon/mod.rs"},"region":{"startLine":1852}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc0855cda8aaa426bfd4249d50a70698ae7dd736d7814f19d290fea865b94dca"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::doctor::run_configured_models (cognitive 18): zeroclaw_runtime::doctor::run_configured_models has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 2 (5 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/zeroclaw-runtime/src/doctor/mod.rs"},"region":{"startLine":964}}}],"partialFingerprints":{"codehealthFindingId/v1":"887ccdfaa8741a9cbb49f8adf6775a50e2d316fc31069abedfb148577c7b3d3b"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::skills::load_skills_from_directory_uncached (cognitive 18): zeroclaw_runtime::skills::load_skills_from_directory_uncached has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 2 (5 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. This shape REPEATS in the file: one other method here (zeroclaw_runtime::skills::load_open_skills_from_directory_uncached) 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/zeroclaw-runtime/src/skills/mod.rs"},"region":{"startLine":794}}}],"partialFingerprints":{"codehealthFindingId/v1":"e947aefb06ca3770ff6a3592f8f5336d2d24afea8075dfd1ee9c7487c2abe149"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::skills::load_open_skills_from_directory_uncached (cognitive 18): zeroclaw_runtime::skills::load_open_skills_from_directory_uncached has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 2 (5 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. This shape REPEATS in the file: one other method here (zeroclaw_runtime::skills::load_skills_from_directory_uncached) 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/zeroclaw-runtime/src/skills/mod.rs"},"region":{"startLine":923}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccc61f1ed5ea9c606b9ac9dc48b0a8015b7e96b5348747d1e317f279fa192093"}},{"ruleId":"D2","level":"warning","message":{"text":"NativeBrowserState::execute_action (cognitive 18): NativeBrowserState::execute_action has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 4 (7 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/zeroclaw-tools/src/browser.rs"},"region":{"startLine":1623}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9a66a3f8d775762591b23a7c3a02109deb5ae30826bd5069054706826cc5aa6"}},{"ruleId":"D2","level":"warning","message":{"text":"ContentSearchTool::execute (cognitive 18): ContentSearchTool::execute has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), match/switch 4 (6 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/zeroclaw-tools/src/content_search.rs"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"702f5b1a31be05f627d6409efc90ab7e8920e3d18fb1662393cc67f3a99d6957"}},{"ruleId":"D2","level":"warning","message":{"text":"HttpRequestTool::validate_url_policy (cognitive 18): HttpRequestTool::validate_url_policy 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/zeroclaw-tools/src/http_request.rs"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"e903624313b4e312282ba7d9fdcdaed08cdb1f3d0eea0a16819a4160fc97742d"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_tools::jira_tool::shape_projects (cognitive 18): zeroclaw_tools::jira_tool::shape_projects has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (12 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/zeroclaw-tools/src/jira_tool.rs"},"region":{"startLine":1457}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ce9473db0823a750e717a85d7d2dd1ac43e0105e1b3b4244da5e11f448425a2"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw::handle_estop_command (cognitive 18): zeroclaw::handle_estop_command has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main.rs"},"region":{"startLine":14224}}}],"partialFingerprints":{"codehealthFindingId/v1":"6aa6b93610775d3253d386e1fca931b70eaf3f1a3cea31e37e8de4c6749c7d7f"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw::handle_oidc_command (cognitive 18): zeroclaw::handle_oidc_command has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 3 (5 pts), loops 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":"src/main.rs"},"region":{"startLine":15409}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a95ea8178bcb72f0e3181c1f4cdb9b6aa00aa399928e82a512ba27ef381fb9a"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw::quickstart_plugins::keep_installed (cognitive 18): zeroclaw::quickstart_plugins::keep_installed has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 3 (4 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/quickstart_plugins/mod.rs"},"region":{"startLine":1623}}}],"partialFingerprints":{"codehealthFindingId/v1":"b285ecd488655ea66784aaf9ed41db9d5ad017234a6a01ab8979e1067718da82"}},{"ruleId":"D2","level":"warning","message":{"text":"xtask::cmd::mdbook::check::parse_po_entries (cognitive 18): xtask::cmd::mdbook::check::parse_po_entries has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (17 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":"xtask/src/cmd/mdbook/check.rs"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"7aa93caf5be7a9aed6062046802f16d850f36f482d30b544939458418bb0db59"}},{"ruleId":"D2","level":"warning","message":{"text":"AgentSidebar::handle_mouse (cognitive 17): AgentSidebar::handle_mouse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (4 pts), boolean chains 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/agent_sidebar.rs"},"region":{"startLine":617}}}],"partialFingerprints":{"codehealthFindingId/v1":"54e1216a00e7774518f5362cb6c3627751519247f05236588358d674e5a1e3b4"}},{"ruleId":"D2","level":"warning","message":{"text":"Chat::init_with_cancel (cognitive 17): Chat::init_with_cancel has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/chat.rs"},"region":{"startLine":1649}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a8052e1916700b91e27a644781c15093210d2be1e5bc2223946e0cf08969729"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatState::load_history (cognitive 17): ChatState::load_history has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 2 (4 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":"apps/zerocode/src/chat.rs"},"region":{"startLine":12863}}}],"partialFingerprints":{"codehealthFindingId/v1":"27bc8127a03db1e5ad1d868519a0a62a7374b17a1a0cfafcaadb083d563d06d5"}},{"ruleId":"D2","level":"warning","message":{"text":"ApplicationFeedback::detail_lines (cognitive 17): ApplicationFeedback::detail_lines has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 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":"apps/zerocode/src/config_application.rs"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"0520ede4e8a3cd5a98d13eb15952a036da08f00493d7eba63f4c4fcc4cf0f7e9"}},{"ruleId":"D2","level":"warning","message":{"text":"App::mouse_replaces_draft (cognitive 17): App::mouse_replaces_draft has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 2 (4 pts), boolean chains 3 (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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":1667}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9bbf827e5300acd7b8b6142d8a27bbdccea2185b27240a506274d42efaabfc3"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_alias_create (cognitive 17): App::handle_alias_create has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 2 (4 pts), boolean chains 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":3226}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1823bcb05a9c941aca72bd14123d2f352f594835e3c46b7ad81b0c404e071f7"}},{"ruleId":"D2","level":"warning","message":{"text":"App::handle_select_edit (cognitive 17): App::handle_select_edit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 3 (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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":4675}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bc277d0c1be6ea8b70485d34f7fb223fe02316ecf45c00af6f2fd0636481a7d"}},{"ruleId":"D2","level":"warning","message":{"text":"FileExplorerState::load_entries (cognitive 17): FileExplorerState::load_entries has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (4 pts), match/switch 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":"apps/zerocode/src/file_explorer.rs"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"912baeaa6d10134d5c84660666e53e113e43b4e936ee6e51bbd4b44029794659"}},{"ruleId":"D2","level":"warning","message":{"text":"InputBarState::build_input_lines (cognitive 17): InputBarState::build_input_lines has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (16 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":"apps/zerocode/src/input_bar.rs"},"region":{"startLine":2187}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b0fd76ac93db6d1e6d504f051c07c6010db184dc8fcaab418f7ed1cfe902b1f"}},{"ruleId":"D2","level":"warning","message":{"text":"Chord::display (cognitive 17): Chord::display 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":"apps/zerocode/src/keymap/chord.rs"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"aee3e8b76ef9888761379eb8351d930c6ee3927856b8a3230fffb8cb8e91d522"}},{"ruleId":"D2","level":"warning","message":{"text":"ZerocodePane::handle_mouse (cognitive 17): ZerocodePane::handle_mouse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (15 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":"apps/zerocode/src/zerocode_pane.rs"},"region":{"startLine":1838}}}],"partialFingerprints":{"codehealthFindingId/v1":"35625cd54be5aa112ca04aeb20660bc7f2cd5050532e98c85af47de74c9f849f"}},{"ruleId":"D2","level":"warning","message":{"text":"zerocode::app::draw_help_modal (cognitive 17): zerocode::app::draw_help_modal has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 1, 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":"apps/zerocode/src/app.rs"},"region":{"startLine":3478}}}],"partialFingerprints":{"codehealthFindingId/v1":"87acd296803caad0158c2e518b7fd57a0c3273eb3c5f167c4ed037f89fa707da"}},{"ruleId":"D2","level":"warning","message":{"text":"zerocode::diff::highlight_all_no_bg (cognitive 17): zerocode::diff::highlight_all_no_bg has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 2 (4 pts), match/switch 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/diff.rs"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2e9ebcf01acc6ffea2ea3dd88ae5424805b6bdab304fc326e2fe34bb4709cbc"}},{"ruleId":"D2","level":"warning","message":{"text":"zerorelay::dashboard::splice (cognitive 17): zerorelay::dashboard::splice has cognitive complexity 17 (threshold 15). Drivers by points: if/else 2 (8 pts), match/switch 3 (8 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":"apps/zerorelay/src/dashboard.rs"},"region":{"startLine":325}}}],"partialFingerprints":{"codehealthFindingId/v1":"2585164c3dfd27efeb3aa46b9a88f8d598b443a805d8831fec9c38264f3369f3"}},{"ruleId":"D2","level":"warning","message":{"text":"IMessageChannel::listen (cognitive 17): IMessageChannel::listen has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (4 pts), 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/zeroclaw-channels/src/imessage.rs"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b3f2f7690f0bf610beb19a2cf916ef51329dc46a2391c05b7251dfb30549ad8"}},{"ruleId":"D2","level":"warning","message":{"text":"MattermostChannel::try_resolve_approval_reply (cognitive 17): MattermostChannel::try_resolve_approval_reply has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15 (16 pts), 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/zeroclaw-channels/src/mattermost.rs"},"region":{"startLine":1956}}}],"partialFingerprints":{"codehealthFindingId/v1":"419245e5ac9618937b2f27b805e97b4ec1b0e32cc5bcb61cf93ab7f373ee1c0a"}},{"ruleId":"D2","level":"warning","message":{"text":"AcpServer::handle_session_resume (cognitive 17): AcpServer::handle_session_resume has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), match/switch 4, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":1498}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dce053b0c768a833c81c4cd352680e7517aecf6153a4ed14c6775b78928ab52"}},{"ruleId":"D2","level":"warning","message":{"text":"ChannelNotifyObserver::record_event (cognitive 17): ChannelNotifyObserver::record_event has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"6944976504b0c11e1e62f919a48ef619d76db26f94a7f3f65051c61e6d7ca225"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::filesystem::build_payload (cognitive 17): zeroclaw_channels::filesystem::build_payload has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (15 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/zeroclaw-channels/src/filesystem.rs"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdb44b38d963993e5967e8509e0c3ae3164ce92f3ced47807d1cbba752672c40"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::matrix::streaming::normalize_matrix_progress (cognitive 17): zeroclaw_channels::matrix::streaming::normalize_matrix_progress has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":829}}}],"partialFingerprints":{"codehealthFindingId/v1":"c99bae7d30d71670497cea2d6ca6ef313c95daa65d1ce7d3afc296103b0e8f57"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::orchestrator::append_bound_exchange (cognitive 17): zeroclaw_channels::orchestrator::append_bound_exchange has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 3 (7 pts), boolean chains 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":4171}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dbc49a56f9b25bd6165cba5aaaa138635e39238f98c2a5f6eb4c943f77224b6"}},{"ruleId":"D2","level":"warning","message":{"text":"Config::collect_context_compression_ignored_warnings (cognitive 17): Config::collect_context_compression_ignored_warnings has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (14 pts), loops 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-config/src/schema.rs"},"region":{"startLine":24274}}}],"partialFingerprints":{"codehealthFindingId/v1":"fef67dfc510c81d09bb1752e1b388ac7cb154189edc4a7ea2a4c2304f5f14a9c"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::helpers::route_vec_path (cognitive 17): zeroclaw_config::helpers::route_vec_path has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), match/switch 1 (3 pts), boolean chains 1, 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/zeroclaw-config/src/helpers.rs"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"a251983b06234d092142a3e0c0d03cbf3edb70f8807be039196b2677392ea72c"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::policy::git_delegates_to_external_command (cognitive 17): zeroclaw_config::policy::git_delegates_to_external_command has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 8, match/switch 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":"crates/zeroclaw-config/src/policy.rs"},"region":{"startLine":2668}}}],"partialFingerprints":{"codehealthFindingId/v1":"90369aef3a478ceb259c70fbadad2ef20720aae095ec4e7e37650ce3b23dd3bd"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::schema::resolve_runtime_config_dirs (cognitive 17): zeroclaw_config::schema::resolve_runtime_config_dirs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 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/zeroclaw-config/src/schema.rs"},"region":{"startLine":22293}}}],"partialFingerprints":{"codehealthFindingId/v1":"081c7a708955039fdb33696b61a3d29a0c2ba7982e769bd2dbe17e44013d4584"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::schema::v2::apply_v2_to_v3_channel_folds (cognitive 17): zeroclaw_config::schema::v2::apply_v2_to_v3_channel_folds has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (15 pts), boolean chains 1, match/switch 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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":1893}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfd459c2ce03785cb7941fbed299a5f4a42259c561f03ce88a1cfa319974dc26"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::typed_value::coerce_for_set_prop (cognitive 17): zeroclaw_config::typed_value::coerce_for_set_prop has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, loops 1 (2 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/zeroclaw-config/src/typed_value.rs"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"23f01d98120f109c899c25978810f546f642771661193d8bc041205b5fac583b"}},{"ruleId":"D2","level":"warning","message":{"text":"TurnRelay::relay (cognitive 17): TurnRelay::relay has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-gateway/src/chat_core.rs"},"region":{"startLine":891}}}],"partialFingerprints":{"codehealthFindingId/v1":"d980d2fd8887a20bfc9a437577a72891d6f875018c40f4825ec070f4d042015e"}},{"ruleId":"D2","level":"warning","message":{"text":"DashboardAuth::admit_key (cognitive 17): DashboardAuth::admit_key has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 5 (9 pts), if/else 6 (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/zeroclaw-gateway/src/dashboard_session.rs"},"region":{"startLine":864}}}],"partialFingerprints":{"codehealthFindingId/v1":"23dd8e32dbaa17b779672fdd8181ae08c021d905c676fe411c865cb1c375857e"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_gateway::forwarded_client_ip (cognitive 17): zeroclaw_gateway::forwarded_client_ip has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 1 (2 pts) (nesting depth added 11). 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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":631}}}],"partialFingerprints":{"codehealthFindingId/v1":"01cf629dd682c846a1f756a64a5194df15a3e0e70f5c12709794001f4c44e39b"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_gateway::dashboard_session::layer (cognitive 17): zeroclaw_gateway::dashboard_session::layer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), match/switch 5 (8 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-gateway/src/dashboard_session.rs"},"region":{"startLine":1707}}}],"partialFingerprints":{"codehealthFindingId/v1":"0081376fc0bc1363e4acf2142637d2928868855c98797029ab92297e95988e2a"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_hardware::wizard::run_setup (cognitive 17): zeroclaw_hardware::wizard::run_setup has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), match/switch 2 (4 pts), loops 1 (2 pts), boolean chains 1 (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/zeroclaw-hardware/src/wizard.rs"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"343e3c1766aae21b5ceb9e6dee0e894bccfa7c18b566844b18d863100c230cd2"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_log::reader::load_page (cognitive 17): zeroclaw_log::reader::load_page has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 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/zeroclaw-log/src/reader.rs"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"eceb2f21a81eea2becd90aaf4c4d5a69f3bbcb2251843fe8a7ff469de795cda9"}},{"ruleId":"D2","level":"warning","message":{"text":"PluginHost::retry_claims (cognitive 17): PluginHost::retry_claims has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 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/zeroclaw-plugins/src/host.rs"},"region":{"startLine":1050}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c61940e39f9ea96537ec8d799b991c0a8187979cc7bee4e1d1e58d738c5a13b"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_plugins::egress::connect_staggered (cognitive 17): zeroclaw_plugins::egress::connect_staggered has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 3 (8 pts), if/else 3 (5 pts), boolean chains 3, loops 1 (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/zeroclaw-plugins/src/egress.rs"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"1712553effa2cc82400035850933574573df45fbc02f604d51a8f9a69d0e77d8"}},{"ruleId":"D2","level":"warning","message":{"text":"GrokCliModelProvider::normalize_and_validate_extra_args (cognitive 17): GrokCliModelProvider::normalize_and_validate_extra_args 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/zeroclaw-providers/src/grok_cli.rs"},"region":{"startLine":667}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6f48a9448f8906c34cba9122c1f4972f0e1ce622c1378e98f2c11a8b30514b5"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_providers::factory::apply_compat_options (cognitive 17): zeroclaw_providers::factory::apply_compat_options has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 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/zeroclaw-providers/src/factory.rs"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"03b6a3cb2afe558dfb4fad80bcf7e969ae32da43732bfce7ebdcd6456cdc18ba"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_providers::multimodal::marker_span_class (cognitive 17): zeroclaw_providers::multimodal::marker_span_class has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 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/zeroclaw-providers/src/multimodal.rs"},"region":{"startLine":503}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac346617a5d06a93406cfc8f8f946291d9520ec37275b58965f55ac36b60a8d2"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_providers::multimodal::trim_images_by_age (cognitive 17): zeroclaw_providers::multimodal::trim_images_by_age has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 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/zeroclaw-providers/src/multimodal.rs"},"region":{"startLine":2237}}}],"partialFingerprints":{"codehealthFindingId/v1":"17bd9a42d3f27c30b7dc8ca744a98f72651f63d38f6d6d0eb1f86c235a06c033"}},{"ruleId":"D2","level":"warning","message":{"text":"ConfigApplicationLedger::published (cognitive 17): ConfigApplicationLedger::published has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4 (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":"crates/zeroclaw-runtime/src/config_application.rs"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"36a64ae6303a4dc09e06b2950565b1d7bdac81d45374f3cdf120ce0110c87177"}},{"ruleId":"D2","level":"warning","message":{"text":"LiveSessionRefreshScope::resolve_provider_ref (cognitive 17): LiveSessionRefreshScope::resolve_provider_ref has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 3, loops 1 (2 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":504}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0b10a961a008df6478914d1209e6acb03d432a698cf6a175400ff48784d0127"}},{"ruleId":"D2","level":"warning","message":{"text":"RpcDispatcher::run (cognitive 17): RpcDispatcher::run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), match/switch 3 (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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":3215}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a465fd4a8565f0bf5bc2ce335bbe7a595c5cc979a1a3b8b95b798dcded29bee"}},{"ruleId":"D2","level":"warning","message":{"text":"RpcDispatcher::handle_session_close_bound (cognitive 17): RpcDispatcher::handle_session_close_bound has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (15 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":5579}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a6999108f7733e7caa06eaa858c6e89b9911a98ec35b29b7f535a0825e9a6d7"}},{"ruleId":"D2","level":"warning","message":{"text":"RpcDispatcher::handle_session_delete (cognitive 17): RpcDispatcher::handle_session_delete has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":9250}}}],"partialFingerprints":{"codehealthFindingId/v1":"24d2aca7a1c004fe8cc129ecb426e5b9305b565816b9e76797b1c64afe24e831"}},{"ruleId":"D2","level":"warning","message":{"text":"PinggyTunnel::start (cognitive 17): PinggyTunnel::start has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), match/switch 5 (7 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/zeroclaw-runtime/src/tunnel/pinggy.rs"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"60521572c46015898d665ef7242110bd363c74f36b6b5893ed922870cd143bb5"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::migration::backup_target_memory (cognitive 17): zeroclaw_runtime::migration::backup_target_memory 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/zeroclaw-runtime/src/migration.rs"},"region":{"startLine":403}}}],"partialFingerprints":{"codehealthFindingId/v1":"339719531463528291ded4f144834789f2c5080f9457a646939bc756a910ca63"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::plugin_runtime::finalize_plugin_webhooks (cognitive 17): zeroclaw_runtime::plugin_runtime::finalize_plugin_webhooks has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2, 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/zeroclaw-runtime/src/plugin_runtime.rs"},"region":{"startLine":951}}}],"partialFingerprints":{"codehealthFindingId/v1":"34fb183f133abc34b3e3d731ec693927f00161cf91f8d2cff6bbbaf7152c57ef"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::tools::param_options::peer_targets (cognitive 17): zeroclaw_runtime::tools::param_options::peer_targets has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (6 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/zeroclaw-runtime/src/tools/param_options.rs"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7f9687b1fb906da7eea7854937386329e884f81f8b6598eb68ada24f845ea47"}},{"ruleId":"D2","level":"warning","message":{"text":"CanvasTool::execute (cognitive 17): CanvasTool::execute has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 7 (12 pts), if/else 3 (5 pts) (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/zeroclaw-tools/src/canvas.rs"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ddd95372ea52c4b099460c5cfc812199ae114c97bb0e36a4ab872aaf169255b"}},{"ruleId":"D2","level":"warning","message":{"text":"McpServer::dispatch_rpc (cognitive 17): McpServer::dispatch_rpc has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), match/switch 2 (6 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/zeroclaw-tools/src/mcp_client.rs"},"region":{"startLine":619}}}],"partialFingerprints":{"codehealthFindingId/v1":"8908c314820bee8e6f2f95f15dc50def2b0577f8c9d14f5e548d621208dca768"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelRoutingConfigTool::handle_set_default (cognitive 17): ModelRoutingConfigTool::handle_set_default has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 4 (6 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/zeroclaw-tools/src/model_routing_config.rs"},"region":{"startLine":671}}}],"partialFingerprints":{"codehealthFindingId/v1":"40530f5ba22c3d320ca01060ba232163a6c7c47d5f3f1e2126789a923b5d0279"}},{"ruleId":"D2","level":"warning","message":{"text":"PollTool::execute (cognitive 17): PollTool::execute has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), match/switch 4 (7 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/zeroclaw-tools/src/poll.rs"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb9f681d84c6c5e0c1ad67fe80f688824b934dddeaca4e11469e6998d66f715c"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_tools::backup_tool::walk_and_hash (cognitive 17): zeroclaw_tools::backup_tool::walk_and_hash 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/zeroclaw-tools/src/backup_tool.rs"},"region":{"startLine":1282}}}],"partialFingerprints":{"codehealthFindingId/v1":"97b8c9a62ab661ec1c574d647d6842c23a4c5e36780d8abbba6b6a56983cd235"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw::existing_egress_grant_lines (cognitive 17): zeroclaw::existing_egress_grant_lines has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 2 (6 pts), boolean chains 1, match/switch 1 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main.rs"},"region":{"startLine":4228}}}],"partialFingerprints":{"codehealthFindingId/v1":"d35b636530e4338c728ad1209fe87261f1caa109d9472a882a60b0bfad58d362"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw::find_linux_desktop_app (cognitive 17): zeroclaw::find_linux_desktop_app has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), boolean chains 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main.rs"},"region":{"startLine":9565}}}],"partialFingerprints":{"codehealthFindingId/v1":"911eab4460f10542794b0202103a9f3f5756b6076c62f12a902427114a3db35d"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw::plugins::channel_instance::reaches_secret_marker (cognitive 17): zeroclaw::plugins::channel_instance::reaches_secret_marker has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (14 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/plugins/channel_instance.rs"},"region":{"startLine":706}}}],"partialFingerprints":{"codehealthFindingId/v1":"c310465396e69b1c60021da33504586dffcb862950a585cad0fb9799580e5520"}},{"ruleId":"D2","level":"warning","message":{"text":"xtask::generate::run (cognitive 17): xtask::generate::run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), loops 2 (3 pts), boolean chains 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":"xtask/src/generate/mod.rs"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ead34b032e71ca2acc8ca3bd73cafb37643f96c4ab2c4b24edc0641ac512d4e"}},{"ruleId":"D2","level":"warning","message":{"text":"Dashboard::apply_agent_rename (cognitive 16): Dashboard::apply_agent_rename has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":2167}}}],"partialFingerprints":{"codehealthFindingId/v1":"04efefc7de7fe51f8f7aedd4fe4f11f4645f33b44131946ac894d2d3054b4da5"}},{"ruleId":"D2","level":"warning","message":{"text":"LogDetail::clipboard_text (cognitive 16): LogDetail::clipboard_text has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 2, loops 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":"apps/zerocode/src/logs.rs"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"12eabf4a6266740080bb28ad7cc1cd5f54c1271a4ff09dc89c5572c1e06eea65"}},{"ruleId":"D2","level":"warning","message":{"text":"SopPane::editor_backspace (cognitive 16): SopPane::editor_backspace has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 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":"apps/zerocode/src/sop_pane.rs"},"region":{"startLine":1488}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0b30cade5842d0007c555501cb469a08e2b0f9a9ef9c0bb61921fb56f2fd575"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_api::model_provider::projected_entry_count (cognitive 16): zeroclaw_api::model_provider::projected_entry_count has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (7 pts), match/switch 2 (6 pts), if/else 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/zeroclaw-api/src/model_provider.rs"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"93010370b40781092f5c17100075b6b2ee25fb86cc4b79bbcbab4952b30414a4"}},{"ruleId":"D2","level":"warning","message":{"text":"DiscordEmbed::to_api (cognitive 16): DiscordEmbed::to_api 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/discord/embed.rs"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea39bb3125ef0b63cac8e3ed02c8709c7f1fb12059f5651100f2f37e52633656"}},{"ruleId":"D2","level":"warning","message":{"text":"LinqChannel::parse_webhook_payload (cognitive 16): LinqChannel::parse_webhook_payload has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14 (15 pts), 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/zeroclaw-channels/src/linq.rs"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"5341d60fd923b3a9107d534e83351135e1a685a145d8452c3d52cb3772b97dc7"}},{"ruleId":"D2","level":"warning","message":{"text":"MatrixChannel::multi_update (cognitive 16): MatrixChannel::multi_update has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (15 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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":4729}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f37e9a31d3d7f29a3ec1e70fe2ecb27b34f22506035919ea6d0df2da9803779"}},{"ruleId":"D2","level":"warning","message":{"text":"RedditChannel::listen (cognitive 16): RedditChannel::listen has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (3 pts), 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/zeroclaw-channels/src/reddit.rs"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe636571074b38e0d5716dbd8a4cf1d6799274e26256221ac616f84c3250d343"}},{"ruleId":"D2","level":"warning","message":{"text":"SignalChannel::attach_inbound_media (cognitive 16): SignalChannel::attach_inbound_media has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/signal.rs"},"region":{"startLine":658}}}],"partialFingerprints":{"codehealthFindingId/v1":"8aefdf25e9479cfdc3e392b7325eb1f1c86692eda5f8faa3aae0f7a3d4e4f1ba"}},{"ruleId":"D2","level":"warning","message":{"text":"SlackChannel::fetch_slack_private_file (cognitive 16): SlackChannel::fetch_slack_private_file has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":2928}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1636ca18463b8033ab8bf4948e627ac50e70cb3fcddf79b8f42a7df12795dfb"}},{"ruleId":"D2","level":"warning","message":{"text":"TelegramChannel::try_parse_media_group_with_unsupported (cognitive 16): TelegramChannel::try_parse_media_group_with_unsupported has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), match/switch 1 (2 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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":5471}}}],"partialFingerprints":{"codehealthFindingId/v1":"979ff2bd8645bbf66c3f7d8454d2674bc503a13e168bbb0693a75c4f442246e9"}},{"ruleId":"D2","level":"warning","message":{"text":"TelegramChannel::send_text_chunks (cognitive 16): TelegramChannel::send_text_chunks has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 2 (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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":6356}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cbd8c81237fc751cf078df81b7c1a3f63fcb891106b90e971976973a9cfa582"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::discord::chunk::split_message_for_discord_multi (cognitive 16): zeroclaw_channels::discord::chunk::split_message_for_discord_multi has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2, 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":"crates/zeroclaw-channels/src/discord/chunk.rs"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"91517fde60194045648cd24b64515eef02320a994e82e745829ec73efa28bf3b"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::matrix::inbound::attach_media (cognitive 16): zeroclaw_channels::matrix::inbound::attach_media has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 6). 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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":2645}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b62779be2327e9293484d889595461bdfa933a6ba488b713548cd645246bdf9"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_channels::orchestrator::channel_map_for_agent (cognitive 16): zeroclaw_channels::orchestrator::channel_map_for_agent has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (5 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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":14375}}}],"partialFingerprints":{"codehealthFindingId/v1":"14c1cc536167e3890e851e7b9f24b4f1c4e2e3ff9dec3253a2cf48abdafa6513"}},{"ruleId":"D2","level":"warning","message":{"text":"SecurityPolicy::is_simple_powershell_command_allowed (cognitive 16): SecurityPolicy::is_simple_powershell_command_allowed has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-config/src/policy.rs"},"region":{"startLine":4447}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f0b83a7ed5eb3c84a8f6692b3f2ea00a23eccd77c0f6a15d5344b401098ee99"}},{"ruleId":"D2","level":"warning","message":{"text":"Config::resolve_alias_source (cognitive 16): Config::resolve_alias_source has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 1 (2 pts) (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/zeroclaw-config/src/schema.rs"},"region":{"startLine":4494}}}],"partialFingerprints":{"codehealthFindingId/v1":"df44cee4638a3e86f96639c884766110987b451af430de5424e8e966ff9fcb96"}},{"ruleId":"D2","level":"warning","message":{"text":"Config::channel_agent_scope_admins (cognitive 16): Config::channel_agent_scope_admins has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (3 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-config/src/schema.rs"},"region":{"startLine":23223}}}],"partialFingerprints":{"codehealthFindingId/v1":"14414aef7940a49c0510c385b9b4464ee21f023646e86e3dd025c10d6c7c97c0"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::migration::lower_capped_keys_in_doc (cognitive 16): zeroclaw_config::migration::lower_capped_keys_in_doc has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (10 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/zeroclaw-config/src/migration.rs"},"region":{"startLine":2732}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4ba166e768d18677d95a1babd252c72eae5ae1897be247e150401e8c462595c"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::platform::executable::resolve_executable_with_path (cognitive 16): zeroclaw_config::platform::executable::resolve_executable_with_path has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 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/zeroclaw-config/src/platform/executable.rs"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"9820db076b01bb16713c7a8482fa23987b50a142cb17b5ddaf29b9ebc3162558"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_config::schema_markdown::channel_streaming_matrix (cognitive 16): zeroclaw_config::schema_markdown::channel_streaming_matrix has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2, 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":"crates/zeroclaw-config/src/schema_markdown.rs"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"209bf2640fe759c1797519567748c68f11e97091b2d869b3644360edec3f72d9"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_eval::grader::grade_payload (cognitive 16): zeroclaw_eval::grader::grade_payload has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 4 (5 pts) (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/zeroclaw-eval/src/grader.rs"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"220f44506c444d9b712a0d44fd43688e929098e23ee7e64199da5edc90b97100"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_gateway::ws_sop_runs::handle_socket (cognitive 16): zeroclaw_gateway::ws_sop_runs::handle_socket has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), match/switch 5 (7 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/zeroclaw-gateway/src/ws_sop_runs.rs"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf3e38ef78c0c7c6230ce5ed9345ec5ad1a828c23986edaec2c2a77ee0a9e490"}},{"ruleId":"D2","level":"warning","message":{"text":"DatasheetTool::execute (cognitive 16): DatasheetTool::execute has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 9 (13 pts), if/else 2 (3 pts) (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/zeroclaw-hardware/src/datasheet.rs"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b0de62afd5ba10a07a946ebd2134ea35a260a2988613a5a03502a57dd40b9d4"}},{"ruleId":"D2","level":"warning","message":{"text":"DeviceRegistry::discover (cognitive 16): DeviceRegistry::discover has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 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/zeroclaw-hardware/src/device.rs"},"region":{"startLine":391}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6fe833319e22d01faac40fdfb48f1ea6aeafefab38852ac946f7fbc8facbdd1"}},{"ruleId":"D2","level":"warning","message":{"text":"ResolvedDestination::new (cognitive 16): ResolvedDestination::new has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, loops 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/zeroclaw-infra/src/net_guard.rs"},"region":{"startLine":1230}}}],"partialFingerprints":{"codehealthFindingId/v1":"c965bd6eae29702600e9671edd6e7ce2af10e815a3bad49d70b44eaab7a444ae"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_plugins::host::beyond_install_footprint (cognitive 16): zeroclaw_plugins::host::beyond_install_footprint has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, loops 1, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-plugins/src/host.rs"},"region":{"startLine":2881}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2800247d82d1ad830594c9ace11b07c67bf4c8b5f0e2e7ff4355fcc595aa017"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenAiCompatibleModelProvider::flatten_system_messages (cognitive 16): OpenAiCompatibleModelProvider::flatten_system_messages has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":974}}}],"partialFingerprints":{"codehealthFindingId/v1":"52433a500b173d3be3c5004c4e5a595378df1db85171c5616c9b2c08dc23b006"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenAiCompatibleModelProvider::strip_native_tool_messages (cognitive 16): OpenAiCompatibleModelProvider::strip_native_tool_messages has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, 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":"crates/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":3853}}}],"partialFingerprints":{"codehealthFindingId/v1":"32b1b38b90d30dc693293aee1121d01bac905c09fc21ac37b462585e79161e0c"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_providers::auth::is_non_retryable_oauth_refresh_error (cognitive 16): zeroclaw_providers::auth::is_non_retryable_oauth_refresh_error has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4 (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/zeroclaw-providers/src/auth/mod.rs"},"region":{"startLine":808}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f8d269fcfef3a26d8e300f96cda6ba5d20aa04c555db597db39dcdb7ef4c4cd"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_providers::pricing::refresh_once (cognitive 16): zeroclaw_providers::pricing::refresh_once has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 2 (4 pts), match/switch 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/zeroclaw-providers/src/pricing.rs"},"region":{"startLine":469}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c7d7cc4621b58e04e304d76fd68d485610956a685da6c15f2a61b7735682786"}},{"ruleId":"D2","level":"warning","message":{"text":"StreamTextGuard::finish (cognitive 16): StreamTextGuard::finish has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 3, 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/zeroclaw-runtime/src/agent/turn/stream_guard.rs"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"be7ebb6ffd218eb3cc9af8ca6fc9113a07f91b87642bb5f48746d8d2cd7044bb"}},{"ruleId":"D2","level":"warning","message":{"text":"StreamTextGuard::release_through (cognitive 16): StreamTextGuard::release_through has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (13 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/zeroclaw-runtime/src/agent/turn/stream_guard.rs"},"region":{"startLine":481}}}],"partialFingerprints":{"codehealthFindingId/v1":"c81a0b462046afbfb65fac0a99fc79448d31405e925b1a30857f12684cc2da60"}},{"ruleId":"D2","level":"warning","message":{"text":"SecretInput::interact_with_events (cognitive 16): SecretInput::interact_with_events has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (8 pts), match/switch 3 (6 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/zeroclaw-runtime/src/cli_input.rs"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"f25c7eddd80fe3da4ed6b7a77b32489afc02bf5a4c965dca2d2a7cfb966b2a39"}},{"ruleId":"D2","level":"warning","message":{"text":"PrometheusObserver::record_event (cognitive 16): PrometheusObserver::record_event has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 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/zeroclaw-runtime/src/observability/prometheus.rs"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"a12679d00be1769f274a970244ff54638e0a8e3379945b81bb15dd2e80c1daf8"}},{"ruleId":"D2","level":"warning","message":{"text":"RpcDispatcher::handle_config_map_key_delete (cognitive 16): RpcDispatcher::handle_config_map_key_delete has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 1 (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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":10885}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf8b18d7658615353b6cdc9b38aad883ea8681af210c50c5f449487288304d0d"}},{"ruleId":"D2","level":"warning","message":{"text":"RpcDispatcher::handle_config_map_key_rename (cognitive 16): RpcDispatcher::handle_config_map_key_rename has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 2, loops 1, 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":11028}}}],"partialFingerprints":{"codehealthFindingId/v1":"0959e1fe92658d603cfe708e6fa53a7823432b19f610c0582539dbef0ab73686"}},{"ruleId":"D2","level":"warning","message":{"text":"SopEngine::retry_capacity_blocked_gated_pends (cognitive 16): SopEngine::retry_capacity_blocked_gated_pends 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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":1450}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5e1dacbc85525cb5d56f536ba3c9aebdb10179ef493efeacde272ec794c8bfd"}},{"ruleId":"D2","level":"warning","message":{"text":"SopEngine::deny_checkpoint (cognitive 16): SopEngine::deny_checkpoint has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 1, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":4747}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c03d10e3b78eea9ca722b14f344190edc77b053d2927f9d28b902a60f34534a"}},{"ruleId":"D2","level":"warning","message":{"text":"DelegateTool::execute_sync_with_admission_inner (cognitive 16): DelegateTool::execute_sync_with_admission_inner has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), 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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":3190}}}],"partialFingerprints":{"codehealthFindingId/v1":"f38062e917c3a6cc287cdec415c694cacc277a91b5e51499fd3a0261acc21863"}},{"ruleId":"D2","level":"warning","message":{"text":"DelegateTool::handle_cancel_task (cognitive 16): DelegateTool::handle_cancel_task has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), match/switch 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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":4847}}}],"partialFingerprints":{"codehealthFindingId/v1":"19b26fc4dcc11870aff404f375bcef5f15996e91ccdddfe155706a56088178b5"}},{"ruleId":"D2","level":"warning","message":{"text":"SendMessageToPeerTool::execute (cognitive 16): SendMessageToPeerTool::execute has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 5 (10 pts), if/else 4 (5 pts), boolean chains 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/zeroclaw-runtime/src/tools/send_message_to_peer.rs"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a523a8415270a75613e9e43c8a55ab06bf2b6d637a0b5ffdb3ea47f5adc28d8"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::agent::loop_::preactivate_always_filter_groups (cognitive 16): zeroclaw_runtime::agent::loop_::preactivate_always_filter_groups has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":536}}}],"partialFingerprints":{"codehealthFindingId/v1":"a99d1d4c8ec67ef96fdfe1cbe7ffe41a03e4b198f9a19a19d6f3c2dff61d299f"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::enroll::read_request (cognitive 16): zeroclaw_runtime::enroll::read_request has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/enroll/mod.rs"},"region":{"startLine":639}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5e7f147efdb8edd2a0fe7a9f19f550ec4243de561ab6a8d488aed516bc329e5"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::migration::migrate_openclaw_memory (cognitive 16): zeroclaw_runtime::migration::migrate_openclaw_memory has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 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/zeroclaw-runtime/src/migration.rs"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c7bd4f998a534c691e6d02d238b2e65fde3adfc62725710210597cdc88bea8b"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::quickstart::apply_memory (cognitive 16): zeroclaw_runtime::quickstart::apply_memory has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 2 (3 pts) (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/zeroclaw-runtime/src/quickstart/mod.rs"},"region":{"startLine":1555}}}],"partialFingerprints":{"codehealthFindingId/v1":"7747c4e293dea4c39899e535cb83bcc11dec1c9354c6a07a5f9a9c28d3debef8"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::security::seatbelt::resolve_policy_root (cognitive 16): zeroclaw_runtime::security::seatbelt::resolve_policy_root has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), loops 2 (5 pts), match/switch 2 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/security/seatbelt.rs"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"224f4b9435298bb5fca331e47405ce858fe6c54e07c8a943dd1ea97294f67bcb"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::security::vulnerability::generate_summary (cognitive 16): zeroclaw_runtime::security::vulnerability::generate_summary has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, 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/zeroclaw-runtime/src/security/vulnerability.rs"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"86b821fdbf2c33df9598b7e655d932bc7f749b8dc600f0a6c3ac26d24ce73705"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::skills::load_skills_for_agent_audited (cognitive 16): zeroclaw_runtime::skills::load_skills_for_agent_audited has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 2 (4 pts), loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/skills/mod.rs"},"region":{"startLine":639}}}],"partialFingerprints":{"codehealthFindingId/v1":"28407617ad843de0d5e0245b538d7531c6c52b09200c2fa23cbb818e755a9bb6"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_runtime::tools::shell::drain_capped_into (cognitive 16): zeroclaw_runtime::tools::shell::drain_capped_into 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/zeroclaw-runtime/src/tools/shell.rs"},"region":{"startLine":501}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bafc0ed10b2119b55a6566d805d406b04de763f8290d72b08baff3ea37c1d79"}},{"ruleId":"D2","level":"warning","message":{"text":"A2aHttpClient::send_message (cognitive 16): A2aHttpClient::send_message has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 3, 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":"crates/zeroclaw-tools/src/a2a_client.rs"},"region":{"startLine":967}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ef4bee8d8bf4d99f31f7cb63d3e1cc63ad6df2b4e94b3859aafe5b232ae07b3"}},{"ruleId":"D2","level":"warning","message":{"text":"BrowserDelegateTool::execute (cognitive 16): BrowserDelegateTool::execute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), match/switch 2, 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/zeroclaw-tools/src/browser_delegate.rs"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"4145838b66869ebfa9841e4a96b60f503b7cf77a5b50521276c2da4315e6a813"}},{"ruleId":"D2","level":"warning","message":{"text":"GitOperationsTool::validate_object_alternates_at (cognitive 16): GitOperationsTool::validate_object_alternates_at has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 1, 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/zeroclaw-tools/src/git_operations.rs"},"region":{"startLine":521}}}],"partialFingerprints":{"codehealthFindingId/v1":"c54dbc800007ead9a461bc3926c1c17550f29c7149f7992f3070afbd539f4fe8"}},{"ruleId":"D2","level":"warning","message":{"text":"GitOperationsTool::configure_git_environment (cognitive 16): GitOperationsTool::configure_git_environment has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (16 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/zeroclaw-tools/src/git_operations.rs"},"region":{"startLine":1074}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a1afe1eecef29931ff02d2972746082f0bedd5afbd010e40af3e39292286790"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_tools::llm_task::validate_json_response (cognitive 16): zeroclaw_tools::llm_task::validate_json_response has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/llm_task.rs"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd1af462e3a56021306d95bc9818e91b1686c653759fea6e3d834588c0083274"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw_tools::pipeline::interpolate_string (cognitive 16): zeroclaw_tools::pipeline::interpolate_string has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (9 pts), loops 2 (6 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/zeroclaw-tools/src/pipeline.rs"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"318daa7d6c14ad2c6302fc08450cedf6e657048a0602e7b2ed3302323c59dc8e"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw::alias_cli::export::open_anchored_root (cognitive 16): zeroclaw::alias_cli::export::open_anchored_root has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), 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":"src/alias_cli/export.rs"},"region":{"startLine":780}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4d4af96ad9e335ba90353425a5a5116cbb12ba9c863bdf3493cee721f0ed61c"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw::commands::update::detect_arch_from_header (cognitive 16): zeroclaw::commands::update::detect_arch_from_header has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 3 (7 pts), if/else 4 (5 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":"src/commands/update.rs"},"region":{"startLine":893}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed851c9fa25306a1f8ad81ea13144c11398febf83c06408c1b9f0cb18c8069d5"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw::fetch_locales (cognitive 16): zeroclaw::fetch_locales has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 3 (6 pts), if/else 3 (5 pts), loops 3 (5 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/main.rs"},"region":{"startLine":8970}}}],"partialFingerprints":{"codehealthFindingId/v1":"48a9b0081dc09730b6cc1d6b91a3a2ecc63f2a311644dfa3a9f413e80540695a"}},{"ruleId":"D2","level":"warning","message":{"text":"zeroclaw::quickstart_plugins::activation_consent (cognitive 16): zeroclaw::quickstart_plugins::activation_consent has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (6 pts), loops 4 (6 pts), match/switch 3, boolean chains 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/quickstart_plugins/mod.rs"},"region":{"startLine":2369}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dadc210542169898f78e1bdf5194284e22f0a53900ab9211ddd937e4b9dfb44"}},{"ruleId":"D2","level":"warning","message":{"text":"esp32::main (cognitive 16): esp32::main has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 2 (4 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":"firmware/esp32/src/main.rs"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"0eb1a8cafba03d326e863cf78c9e6b6d240555394942722922ff02fdb470bb19"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw::async_main_inner: FunctionTooLong \u2014 zeroclaw::async_main_inner runs 3235 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 3135 over it, 32.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":"src/main.rs"},"region":{"startLine":9633}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e96f58c99f38bea88c55779a8e363e4a331cd50af9f5d6ff9ec9cc107c0a8de"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/schema.rs: FileTooLong \u2014 15722 significant 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 482 free functions. The bar is 500 significant lines; this is 15222 over it, 31.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/zeroclaw-config/src/schema.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"049303b9fa63e6c192ca00fb93eb24eff5cc28b04c9fee117394cf1f1a316178"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: orchestrator/mod.rs: FileTooLong \u2014 11689 significant 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 304 free functions. The bar is 500 significant lines; this is 11189 over it, 23.38\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0f10de905d986d322d14a7240b5e5a0ac56014759982daf159f878a970055b0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/main.rs: FileTooLong \u2014 10697 significant 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 180 free functions. The bar is 500 significant lines; this is 10197 over it, 21.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":"src/main.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8051fac64e936f7c1865babf7d506a8673f918fe3a29b7d5daf1e9c85ef2e6ab"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: RpcDispatcher: ClassTooLong \u2014 8235 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 241 methods, 4 blocks, lines 903-13823. The bar is 400 significant lines; this is 7835 over it, 20.59\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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":903}}}],"partialFingerprints":{"codehealthFindingId/v1":"d72b39d985c38026038b5b4c794b0929dff05e1ec7736fce8c0955ba233b7cd9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: rpc/dispatch.rs: FileTooLong \u2014 9479 significant 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 87% of them inside a single declaration: RpcDispatcher (4 blocks, 903-13823), declaring 58 free functions. The bar is 500 significant lines; this is 8979 over it, 18.96\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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb7693c65a0d7dc8b6aaa6bee7ec218db48797ebcc31d19e043371d1dd909e91"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/chat.rs: FileTooLong \u2014 8294 significant 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 101 free functions. The bar is 500 significant lines; this is 7794 over it, 16.59\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":"apps/zerocode/src/chat.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c4da01d9618cf0d24bedbd790537bcd2525c5f87c93f5832161da5693329c12"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::agent::turn::run_tool_call_loop_impl: FunctionTooLong \u2014 zeroclaw_runtime::agent::turn::run_tool_call_loop_impl runs 1476 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 1376 over it, 14.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/zeroclaw-runtime/src/agent/turn/mod.rs"},"region":{"startLine":1657}}}],"partialFingerprints":{"codehealthFindingId/v1":"261bbcd264245085eff3c5ae322b624397f1b8211eef4fff0b6f7c5677a9ce0b"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_macros::derive_configurable: FunctionTooLong \u2014 zeroclaw_macros::derive_configurable runs 1465 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 1365 over it, 14.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/zeroclaw-macros/src/lib.rs"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1472ca58b55dac3c3470955cdd8895cbbb5e29a37f591be90a077250847dc62"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::agent::loop_::run_inner: FunctionTooLong \u2014 zeroclaw_runtime::agent::loop_::run_inner runs 1384 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 1284 over it, 13.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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":1620}}}],"partialFingerprints":{"codehealthFindingId/v1":"607a96c7c551e2817484bb9357c96b783ce3e41d69660f46818f3dd9abe00017"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Config.validate: MethodTooLong \u2014 validate runs 1220 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 1120 over it, 12.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/zeroclaw-config/src/schema.rs"},"region":{"startLine":24639}}}],"partialFingerprints":{"codehealthFindingId/v1":"79f36b8c7ffec6880e6ea0224b171c94cceebe28e8d5b4cadb35b94a5e031ffe"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/telegram.rs: FileTooLong \u2014 5789 significant 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 5289 over it, 11.58\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab26e9ca6bb376d448dec55dacfd656646c409dd1c33c048e83363cd01ffbbdb"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: SopEngine: ClassTooLong \u2014 4150 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 203 methods, 2 blocks, lines 31-6930. The bar is 400 significant lines; this is 3750 over it, 10.38\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3c05b4bf107260fdda4352c9f859f9321a718db404cd09646d08028f1cf8d06"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: App: ClassTooLong \u2014 4143 significant 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, 5 blocks, lines 456-6430. The bar is 400 significant lines; this is 3743 over it, 10.36\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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":456}}}],"partialFingerprints":{"codehealthFindingId/v1":"30fb6e5a25918c1a9563da370c04d2cc7ab53c5b9f43aa1f60e8a5a24ed5e011"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DiscordChannel.listen: MethodTooLong \u2014 listen runs 976 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 876 over it, 9.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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":1999}}}],"partialFingerprints":{"codehealthFindingId/v1":"372c66525b10890c1c1135a3d0e900be03e36a0baa6b125814cc790e1f1248d9"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw::run_quickstart_cli: FunctionTooLong \u2014 zeroclaw::run_quickstart_cli runs 955 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 855 over it, 9.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":"src/main.rs"},"region":{"startLine":1847}}}],"partialFingerprints":{"codehealthFindingId/v1":"7201f1f2c20b75a4dc642a4af9b2883c2c131e7d2bd23c07707659d1cf8a469e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: sop/engine.rs: FileTooLong \u2014 4684 significant 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: SopEngine (2 blocks, 31-6930), declaring 37 free functions. The bar is 500 significant lines; this is 4184 over it, 9.37\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5068e3f630f64cb129ad4ef008b50a8b8b13e906ba912efef3339b5981f09813"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/config_manager.rs: FileTooLong \u2014 4562 significant 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 91% of them inside a single declaration: App (5 blocks, 456-6430), declaring 37 free functions. The bar is 500 significant lines; this is 4062 over it, 9.12\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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"75fb3cf8fc210a99fd8a8b76c928e6755e0ac694f1e0849994d76faf09ffdfd6"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: Config: ClassTooLong \u2014 3492 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 101 methods, 5 blocks, lines 150-27171. The bar is 400 significant lines; this is 3092 over it, 8.73\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/zeroclaw-config/src/schema.rs"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d38a6d1d559f6840766dfb65ca6a726c23005de516b187c7df63607e0e88220"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: DelegateTool: ClassTooLong \u2014 3480 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 115 methods, 5 blocks, lines 425-5883. The bar is 400 significant lines; this is 3080 over it, 8.70\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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"431be2f3debb35c4b49afe81f0dd5b0d590ed5ca8b4000a78019d42dc4bce605"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/slack.rs: FileTooLong \u2014 4258 significant 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 3758 over it, 8.52\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"77af5bce3f3ccb203d0459e12c1abcdf82f5d760fe6f74fc4527670b9c3c4c1e"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zerocode::app::run: FunctionTooLong \u2014 zerocode::app::run runs 813 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 713 over it, 8.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":"apps/zerocode/src/app.rs"},"region":{"startLine":1673}}}],"partialFingerprints":{"codehealthFindingId/v1":"13000961bebe4213b9d6c0886da0b7d2c85b5791a0393ff75c3b31cbf6c76767"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: RpcDispatcher: TooManyMethods \u2014 241 methods. The bar is 30 methods; this is 211 over it, 8.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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":903}}}],"partialFingerprints":{"codehealthFindingId/v1":"b137420666461baecedce257c09a7ccfabe0f8e9293bcdf594c5ce640d3a40b2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tools/delegate.rs: FileTooLong \u2014 3781 significant 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 92% of them inside a single declaration: DelegateTool (5 blocks, 425-5883). The bar is 500 significant lines; this is 3281 over it, 7.56\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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec434a09b62da0192e73fedbccef125df9432c3e6139d53bc11ff72005c74a0f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: agent/agent.rs: FileTooLong \u2014 3745 significant 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 3245 over it, 7.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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"99744990a4f267b6e4405d46d4d531e2e82a9af89ebb3a7b786e1a19a06ab1ae"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 3703 significant 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 100 free functions. The bar is 500 significant lines; this is 3203 over it, 7.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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"28f1882512cedfb9e001eedd624eae935907e4307fae7d5f04fd0499c14eb6a3"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RpcDispatcher.run_session_prompt: MethodTooLong \u2014 run_session_prompt runs 736 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 636 over it, 7.36\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":6590}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6f27450ad3ef363839af410cd291d43a2ccbb8e4ef63fdf8199fdd3ea7d9131"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/matrix.rs: FileTooLong \u2014 3611 significant 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 3111 over it, 7.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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"659d4e938db99008bf264f0d5f6d28f9c807643dab3b1e79a2e1b1682e858523"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RpcDispatcher.session_new_with_mode: MethodTooLong \u2014 session_new_with_mode runs 681 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 581 over it, 6.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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":4484}}}],"partialFingerprints":{"codehealthFindingId/v1":"a94ed4f95b537ce7652d9f4adacf7385b3ed7b4678c74f005d8c7b50223b21e8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/policy.rs: FileTooLong \u2014 3396 significant 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 101 free functions. The bar is 500 significant lines; this is 2896 over it, 6.79\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/zeroclaw-config/src/policy.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcb5df1af5429fa4822028734f081364d0effd0a7be64313a048b49a5b90a5f3"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: SopEngine: TooManyMethods \u2014 203 methods. The bar is 30 methods; this is 173 over it, 6.77\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"dca1632f0067889d1c3552e2a766fbb346766c474c2e6b74cca96a1a67e71c04"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/compatible.rs: FileTooLong \u2014 3314 significant 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: OpenAiCompatibleModelProvider (5 blocks, 48-5384), declaring 33 free functions. The bar is 500 significant lines; this is 2814 over it, 6.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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d19092eeedc84056adb48df2c5cfde440267a1e4f051057c4664eb78fafa11b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: turn/mod.rs: FileTooLong \u2014 3235 significant 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 2735 over it, 6.47\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/zeroclaw-runtime/src/agent/turn/mod.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f925bcd6640f7f51e855f93be5b8f31b412563751e3350613134edf944bd748e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: agent/loop_.rs: FileTooLong \u2014 3165 significant 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 70 free functions. The bar is 500 significant lines; this is 2665 over it, 6.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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3127c109df249cfe20e1b228bc16d7775fc5d3f5cd67e1adbf4d568d4c74eac4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/whatsapp_web.rs: FileTooLong \u2014 2990 significant 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 2490 over it, 5.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":"crates/zeroclaw-channels/src/whatsapp_web.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6d797add47b732cd8a0b855a4cc29cb67107f9d03472a0b81668cab57755bf7"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lark.rs: FileTooLong \u2014 2963 significant 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 40 free functions. The bar is 500 significant lines; this is 2463 over it, 5.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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4520d25068aae43fd171dd633b43daba213a6075d92615c077a76e76c8dcd50e"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: TelegramChannel: TooManyMethods \u2014 177 methods. The bar is 30 methods; this is 147 over it, 5.90\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":1101}}}],"partialFingerprints":{"codehealthFindingId/v1":"fece845704e03db608d605353af50992b9002534afa1c681d60017d9bd136424"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/client.rs: FileTooLong \u2014 2906 significant 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 2406 over it, 5.81\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":"apps/zerocode/src/client.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d0ef97c8945358273514b4eac47fb9ae47f49c9ecf9f72eb0b1e54603ed7a12"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tools/mod.rs: FileTooLong \u2014 2786 significant 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 2286 over it, 5.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/zeroclaw-runtime/src/tools/mod.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffa65e08ec13cd2ba3a43753b55d738826b70e8556a4a680d7793a2b157d4b96"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: discord/mod.rs: FileTooLong \u2014 2763 significant 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: DiscordChannel (4 blocks, 69-4229). The bar is 500 significant lines; this is 2263 over it, 5.53\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2190669bd7a7243d83206ddfdcc0135a504f734957665ae9d201ceba9057c67d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ScopedToolRegistry.assemble_prepared: MethodTooLong \u2014 assemble_prepared runs 543 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 443 over it, 5.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/zeroclaw-runtime/src/tools/scoped.rs"},"region":{"startLine":699}}}],"partialFingerprints":{"codehealthFindingId/v1":"48c30e5b83d596b342186ea5a275ef8c9d0d3d9098d3ea0fbba128c574e76da8"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: DiscordChannel: ClassTooLong \u2014 2163 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 36 methods, 4 blocks, lines 69-4229. The bar is 400 significant lines; this is 1763 over it, 5.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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"da1a149b617a3acd7d9922282f006cd053ba147af930bb93aba373cbb93c27a2"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AcpSessionStore: ClassTooLong \u2014 2139 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 82 methods, 2 blocks, lines 70-3224. The bar is 400 significant lines; this is 1739 over it, 5.35\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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"19cf7ceb6043e008f4e7d40ef19f6cff02ea1f5bfd6fd7d83a2346d2be9ed221"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: OpenAiCompatibleModelProvider: ClassTooLong \u2014 2106 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 54 methods, 5 blocks, lines 48-5384. The bar is 400 significant lines; this is 1706 over it, 5.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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"6007e621c89bddd25464898fb8305b76774b0e51bea8424d1ce5ae24bd850bac"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: SlackChannel: TooManyMethods \u2014 157 methods. The bar is 30 methods; this is 127 over it, 5.23\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"d257c0f194fe2bca504782427dbe23acb9c4b69e22165d36cffb4088bb904489"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/app.rs: FileTooLong \u2014 2613 significant 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 52 free functions. The bar is 500 significant lines; this is 2113 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":"apps/zerocode/src/app.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e04a31366c05210924a46d10691e17a433dfef36557d7ba17273825ae234a45c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/dashboard.rs: FileTooLong \u2014 2586 significant 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: Dashboard (3 blocks, 95-2743), declaring 38 free functions. The bar is 500 significant lines; this is 2086 over it, 5.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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f249d8c74430c64dedbf238d66018b8d1504264743e08161b1dc64feaecb93da"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: SqliteMemory: ClassTooLong \u2014 2045 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 43 methods, 5 blocks, lines 35-2801. The bar is 400 significant lines; this is 1645 over it, 5.11\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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"695d06ead39a4243e6a6ebdf2eb64eccc38781be86ceb82d7fa66584a2767137"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::agent::loop_::process_message_inner: FunctionTooLong \u2014 zeroclaw_runtime::agent::loop_::process_message_inner runs 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) in one body. The bar is 100 significant lines; this is 410 over it, 5.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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":3753}}}],"partialFingerprints":{"codehealthFindingId/v1":"be87c9dad7df5a05c4341c22b2e808ece9d3ef07cb4ff5a9de98083c34cae997"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::daemon::run_with_authority: FunctionTooLong \u2014 zeroclaw_runtime::daemon::run_with_authority runs 504 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 404 over it, 5.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/zeroclaw-runtime/src/daemon/mod.rs"},"region":{"startLine":715}}}],"partialFingerprints":{"codehealthFindingId/v1":"1977d461ad01c5fb99381c322da1235aa366f711f15b0c696cbf433723677426"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/acp_session_store.rs: FileTooLong \u2014 2517 significant 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: AcpSessionStore (2 blocks, 70-3224). The bar is 500 significant lines; this is 2017 over it, 5.03\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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"26eda729db5fce1bc82811ebff82d3636a5248ff43f4b745bb6b754914eafcd8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: schema/v2.rs: FileTooLong \u2014 2477 significant 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 1977 over it, 4.95\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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca03a7682513604c517b5e99980ddf8db7e83c9870f43080050277f239034261"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: orchestrator/acp_server.rs: FileTooLong \u2014 2454 significant 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: AcpServer (2 blocks, 128-3263). The bar is 500 significant lines; this is 1954 over it, 4.91\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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c9ce8d6ba52741920f68a314a2a706c22756eb3d1eae5e1b7819a42ec233385"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AcpServer: ClassTooLong \u2014 1956 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 59 methods, 2 blocks, lines 128-3263. The bar is 400 significant lines; this is 1556 over it, 4.89\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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"502dcedd7d73ec5fe5f82669811965f426c880bcc63bfa59771f595f3db3c614"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_gateway::ws::process_chat_message: FunctionTooLong \u2014 zeroclaw_gateway::ws::process_chat_message runs 489 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 389 over it, 4.89\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-gateway/src/ws.rs"},"region":{"startLine":2038}}}],"partialFingerprints":{"codehealthFindingId/v1":"803e7445a3ffd8323ff49e1a616e882c82e395e70ea679db21238565fd378c5e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: service/mod.rs: FileTooLong \u2014 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), declaring 96 free functions. The bar is 500 significant lines; this is 1930 over it, 4.86\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/zeroclaw-runtime/src/service/mod.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f096bec2c2f19d668f0efca74ed61d5b8f389793315a520eaf39eb46d736051c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/quickstart_pane.rs: FileTooLong \u2014 2424 significant 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 57 free functions. The bar is 500 significant lines; this is 1924 over it, 4.85\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":"apps/zerocode/src/quickstart_pane.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b73befa034acea0343b7696c11f786ee16bfd3a5f4cfd97842cfda2150f6a117"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: Dashboard: ClassTooLong \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), 64 methods, 3 blocks, lines 95-2743. The bar is 400 significant lines; this is 1473 over it, 4.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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"e02ba437419384291996d1cc7cfe7d06116f098957bc4e851ca133885137e848"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ChatState: TooManyMethods \u2014 140 methods. The bar is 30 methods; this is 110 over it, 4.67\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":"apps/zerocode/src/chat.rs"},"region":{"startLine":10054}}}],"partialFingerprints":{"codehealthFindingId/v1":"78e0dcf3cbc6a634c5505dc66d5b60e083d494769d8b99e32c057a4a0cd1c195"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: App: TooManyMethods \u2014 140 methods. The bar is 30 methods; this is 110 over it, 4.67\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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":456}}}],"partialFingerprints":{"codehealthFindingId/v1":"02b5170aa95df5e269f026e39947a9c23137aceee762ede2a2ef84baee87b405"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_gateway::ws::handle_socket: FunctionTooLong \u2014 zeroclaw_gateway::ws::handle_socket runs 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) in one body. The bar is 100 significant lines; this is 366 over it, 4.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/zeroclaw-gateway/src/ws.rs"},"region":{"startLine":592}}}],"partialFingerprints":{"codehealthFindingId/v1":"daf84b76b020ef4f059f8324973006577fa09ac6441436bd84ee30733bbc2ed2"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: OtelObserver.record_event: MethodTooLong \u2014 record_event runs 461 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 361 over it, 4.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/zeroclaw-runtime/src/observability/otel.rs"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe553dc8a646202da2bf92850b59ab6b4e2bbaf7f78096012ab430064bb1882f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/wechat.rs: FileTooLong \u2014 2275 significant 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 75% of them inside a single declaration: WeChatChannel (4 blocks, 714-3527). The bar is 500 significant lines; this is 1775 over it, 4.55\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/zeroclaw-channels/src/wechat.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7aa2bd1d891b443cb888d79f341d4e508628db4d05ce7b437212d8becc849c4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/multimodal.rs: FileTooLong \u2014 2235 significant 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 90 free functions. The bar is 500 significant lines; this is 1735 over it, 4.47\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/zeroclaw-providers/src/multimodal.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d3fc877e7b7ff4beaff4a796a4603fa3e5d3309858cbcca401124655a1c1034"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw::cron::handle_command: FunctionTooLong \u2014 zeroclaw::cron::handle_command 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":"src/cron/mod.rs"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"c074aceeba64d4272c435a9b5f8aa24607e015c2d342cdc71c64178f1a5a0ba4"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zerocode::quickstart_pane::draw_modal: FunctionTooLong \u2014 zerocode::quickstart_pane::draw_modal runs 433 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 333 over it, 4.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":"apps/zerocode/src/quickstart_pane.rs"},"region":{"startLine":2913}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d85183c154e17a7657d900d345db2001ccc4b135b3ea6b775d7186a19bf012b"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::sop::dispatch::dispatch_sop_event_filtered: FunctionTooLong \u2014 zeroclaw_runtime::sop::dispatch::dispatch_sop_event_filtered runs 431 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 331 over it, 4.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/zeroclaw-runtime/src/sop/dispatch.rs"},"region":{"startLine":688}}}],"partialFingerprints":{"codehealthFindingId/v1":"26b1595565022c1446d301792e487aa897d4e9eec6e0454fa06f1920989b3816"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: skills/mod.rs: FileTooLong \u2014 2134 significant 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 106 free functions. The bar is 500 significant lines; this is 1634 over it, 4.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/zeroclaw-runtime/src/skills/mod.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cb8cb71971b6abdc2aca6aea4ff1736eb30f992cf1ee35789cf721cabe4d43d"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: WeChatChannel: ClassTooLong \u2014 1698 significant 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, 4 blocks, lines 714-3527. The bar is 400 significant lines; this is 1298 over it, 4.25\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/zeroclaw-channels/src/wechat.rs"},"region":{"startLine":714}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ce0f74b40dce4fdacc5f3189b7e3cb2410b4c8338bb2eaf50b04a781d6acbbc"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/api_config.rs: FileTooLong \u2014 2101 significant 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 57 free functions. The bar is 500 significant lines; this is 1601 over it, 4.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/zeroclaw-gateway/src/api_config.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b2c3de32c36c7863d4cf5c42e3e0568cf0841fb81146063794f94fdb8d1ca96"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AnthropicModelProvider: ClassTooLong \u2014 1667 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 51 methods, 4 blocks, lines 87-3607. The bar is 400 significant lines; this is 1267 over it, 4.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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"5de8d3df91bfb6f992741899badd067464205bb3658d4d46ec9de806c6a7301c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/sqlite.rs: FileTooLong \u2014 2074 significant 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: SqliteMemory (5 blocks, 35-2801). The bar is 500 significant lines; this is 1574 over it, 4.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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7dcaff96b115b43c91c3db520a77cbc0c7832232ba7a694ed682e6b516b02207"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Chat: TooManyMethods \u2014 123 methods. The bar is 30 methods; this is 93 over it, 4.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":"apps/zerocode/src/chat.rs"},"region":{"startLine":519}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6dbf86492052fbf489d26ad31085a4fb88f24a2c7b963530ab844dff11740cb"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DelegateTool.execute_agentic_with_approval_registry: MethodTooLong \u2014 execute_agentic_with_approval_registry runs 410 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 310 over it, 4.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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":5225}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8662d58a9f6caa3315b9a8b28cdfe71d5fe39347427c89de29d769a521cf533"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/anthropic.rs: FileTooLong \u2014 2020 significant 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: AnthropicModelProvider (4 blocks, 87-3607). The bar is 500 significant lines; this is 1520 over it, 4.04\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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d51f064ac15cced8f7d9a8d27d9a7653cb6d38a4719dbe85d6cd5b68bbfffff"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw::skills::handle_command: FunctionTooLong \u2014 zeroclaw::skills::handle_command runs 389 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 289 over it, 3.89\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values 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/skills/mod.rs"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcddc7d22cfeb0a1868ef68e0520e603c90d3d1703b45dc3f1d7272b0ff42946"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 1920 significant 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 1420 over it, 3.84\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/zeroclaw-macros/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7b67315dc3632c876508704c7e93fc3ed693e44d39879bffd2642c604277871"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DelegateTool: TooManyMethods \u2014 115 methods. The bar is 30 methods; this is 85 over it, 3.83\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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a932f40ea27afb9d2556fb57da1f35120814797627011bf1ac48efb9461bbcf"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/wecom_ws.rs: FileTooLong \u2014 1895 significant 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 43 free functions. The bar is 500 significant lines; this is 1395 over it, 3.79\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/zeroclaw-channels/src/wecom_ws.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf90117be736bec21cef7c550dc4fbcb73e7db7ec1d1588cc14e722dd8434a76"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: GitOperationsTool: ClassTooLong \u2014 1512 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 49 methods, 3 blocks, lines 51-2180. The bar is 400 significant lines; this is 1112 over it, 3.78\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/zeroclaw-tools/src/git_operations.rs"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"afe49f0376684adac0b67287daa524bebed27f0db4a339a2ea8e5cd078f9bf0e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: daemon/mod.rs: FileTooLong \u2014 1880 significant 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 1380 over it, 3.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/zeroclaw-runtime/src/daemon/mod.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"863b021072e2d70f101c0297bc21318756436e24b53bacd916d8872e08aa8189"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cron/store.rs: FileTooLong \u2014 1838 significant 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 83 free functions. The bar is 500 significant lines; this is 1338 over it, 3.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/zeroclaw-runtime/src/cron/store.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"485d1dec79b9216102b5bd486c38c05d4cbd45b60233c3616de5ae67831a0050"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/host.rs: FileTooLong \u2014 1834 significant 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 1334 over it, 3.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/zeroclaw-plugins/src/host.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fad842ec745a92b87bd601e1c2d6b70c6b26aff98a900c7f678ca857052b5f6d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/browser.rs: FileTooLong \u2014 1831 significant 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 1331 over it, 3.66\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/zeroclaw-tools/src/browser.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c1fd724937c9169e03ed43a63baa7142d2673b7bafeac63f59b397249a558d4"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DelegateTool.execute_background: MethodTooLong \u2014 execute_background runs 366 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 266 over it, 3.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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":3525}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c356663a545743449af5501195dc981705fa909d92b72b5c42a3f60dbc3f2cd"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/sop_pane.rs: FileTooLong \u2014 1824 significant 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 68% of them inside a single declaration: SopPane (3 blocks, 22-2232), declaring 42 free functions. The bar is 500 significant lines; this is 1324 over it, 3.65\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":"apps/zerocode/src/sop_pane.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bfd5348cfd77cf8838f3cb94bf08b6a11f71cf08c9841048cae021a653faa50"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/ws.rs: FileTooLong \u2014 1792 significant 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 1292 over it, 3.58\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/zeroclaw-gateway/src/ws.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f07ae84926303ec1c83635854e0fd2495e4f0e849349c2ec067e6a977c1768c3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/migration.rs: FileTooLong \u2014 1771 significant 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 75 free functions. The bar is 500 significant lines; this is 1271 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":"crates/zeroclaw-config/src/migration.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"99969380972e5add944b25ef80d5d0b2236d83d1d075d047a807e12811ed1cd0"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Agent: TooManyMethods \u2014 106 methods. The bar is 30 methods; this is 76 over it, 3.53\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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":541}}}],"partialFingerprints":{"codehealthFindingId/v1":"04f137b5b2f6668495860606e263a059e0167048f9006301a7d7da06de3f3a07"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::agent::turn::max_iter::finish_after_max_iterations: FunctionTooLong \u2014 zeroclaw_runtime::agent::turn::max_iter::finish_after_max_iterations runs 352 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 252 over it, 3.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/zeroclaw-runtime/src/agent/turn/max_iter.rs"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"550733983e96c48fb5d5e4ea900433a01a3f5751deb2f033feb64686818c4e18"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: SessionStore: TooManyMethods \u2014 105 methods. The bar is 30 methods; this is 75 over it, 3.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":"crates/zeroclaw-runtime/src/rpc/session.rs"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cce86635df20019f73a50060146b7b8c5c714531da3aaef9140640b00e7c278"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 1709 significant 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 1209 over it, 3.42\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/zeroclaw-providers/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3a93cb18d38c96ec8a9fd481548a45de50f47590418d2e526114a9a829ef1c6"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: QuickstartPane.handle_modal_key: MethodTooLong \u2014 handle_modal_key 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":"apps/zerocode/src/quickstart_pane.rs"},"region":{"startLine":1610}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7176aa55319f9e564f87969091af69e5a54759d2b4684dadaba968ef505b9c4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/input_bar.rs: FileTooLong \u2014 1688 significant 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: InputBarState (3 blocks, 721-2634). The bar is 500 significant lines; this is 1188 over it, 3.38\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":"apps/zerocode/src/input_bar.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"37444cabde1061c69749a9297f4623d86f6f685df57223e57cb673d36bae09ab"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Config: TooManyMethods \u2014 101 methods. The bar is 30 methods; this is 71 over it, 3.37\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/zeroclaw-config/src/schema.rs"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"c10a7b9a3a9993b1238438e3eb2e88c2ff2fe33373e54f0d23a38930bf9c3a7f"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::daemon::run_heartbeat_worker: FunctionTooLong \u2014 zeroclaw_runtime::daemon::run_heartbeat_worker runs 335 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 235 over it, 3.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/zeroclaw-runtime/src/daemon/mod.rs"},"region":{"startLine":2473}}}],"partialFingerprints":{"codehealthFindingId/v1":"a421c3882607966b855087a6b60aef53c1bd7e23f8e63cb9d7f59d2e144c022e"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: SqliteSessionBackend: ClassTooLong \u2014 1323 significant 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, 3 blocks, lines 20-1902. The bar is 400 significant lines; this is 923 over it, 3.31\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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"d82f06acc98673b85af9f0b5b30500a584ab925a7e92e00578034ceee94e1c89"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: Config: TooManyFields \u2014 99 stored fields beside 101 methods. The bar is 30 stored fields; this is 69 over it, 3.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/zeroclaw-config/src/schema.rs"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"418adb9e30acfde578860f970d5010c2ef7ba365d3645fc3ceefa3f894895c06"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: QQChannel.listen: MethodTooLong \u2014 listen runs 324 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 224 over it, 3.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/zeroclaw-channels/src/qq.rs"},"region":{"startLine":1401}}}],"partialFingerprints":{"codehealthFindingId/v1":"eccc26b2a6e06383e3fe7655881bb380811675a20f6c07b7e7d963ea9616581a"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: RpcClient: TooManyMethods \u2014 97 methods. The bar is 30 methods; this is 67 over it, 3.23\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":"apps/zerocode/src/client.rs"},"region":{"startLine":897}}}],"partialFingerprints":{"codehealthFindingId/v1":"c77b56dab0a7c6f371135227a3eaac1663d863d06574157fb56fce487814117d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RpcDispatcher.rehydrate_reaped_session_under_guard: MethodTooLong \u2014 rehydrate_reaped_session_under_guard runs 320 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 220 over it, 3.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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":5989}}}],"partialFingerprints":{"codehealthFindingId/v1":"e783a69348528beec49bdf6a3d5f8f17762045c6e63666e2002d3fee36a1bf1d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.rs: FileTooLong \u2014 1597 significant 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 74 free functions. The bar is 500 significant lines; this is 1097 over it, 3.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/zeroclaw-tool-call-parser/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad137ac7c45dce0aa21bc8890f8d0509213c90e8422f3220f387b4624bd5f8bd"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: WeChatChannel.listen: MethodTooLong \u2014 listen 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/zeroclaw-channels/src/wechat.rs"},"region":{"startLine":2808}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fcf02c261847fad52cdd4145eb962707983bb35e77b50c6eaa2ea225c67245c"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::sop::executor::drive_headless_run: FunctionTooLong \u2014 zeroclaw_runtime::sop::executor::drive_headless_run runs 317 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 217 over it, 3.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/zeroclaw-runtime/src/sop/executor.rs"},"region":{"startLine":932}}}],"partialFingerprints":{"codehealthFindingId/v1":"59e2cdfead917135a2929bd53726a9e3948faf77685a2a0c61a2867dd3a728aa"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AcpServer.handle_session_prompt: MethodTooLong \u2014 handle_session_prompt runs 316 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 216 over it, 3.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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":1881}}}],"partialFingerprints":{"codehealthFindingId/v1":"387717e1b02dfff31fe19b5f53efccae058686f637d1946614c9e1a7e3c71d86"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SqliteMemory.recall_scoped: MethodTooLong \u2014 recall_scoped runs 311 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 211 over it, 3.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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":1050}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd270f255049a9e95f11317fa9f38c9b5ca728e372498fc6abf83444d042419e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/git_operations.rs: FileTooLong \u2014 1553 significant 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: GitOperationsTool (3 blocks, 51-2180). The bar is 500 significant lines; this is 1053 over it, 3.11\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/zeroclaw-tools/src/git_operations.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fd20e7f24f2d49ca1c09753142c8188e1f43382ed8c710de453734a610f8230"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: SopPane: ClassTooLong \u2014 1238 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 64 methods, 3 blocks, lines 22-2232. The bar is 400 significant lines; this is 838 over it, 3.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":"apps/zerocode/src/sop_pane.rs"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b3cd6f069f2910fc1c945c4d491e2b569234f940c45558a5e8220aaa1c04c54"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: MattermostChannel: ClassTooLong \u2014 1237 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 38 methods, 6 blocks, lines 306-2324. The bar is 400 significant lines; this is 837 over it, 3.09\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/zeroclaw-channels/src/mattermost.rs"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"863cf5b736d5d5cfae0f8b726944a9f449606fe8dc8c4fc89c052f82fa8fe254"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zerocode::run: FunctionTooLong \u2014 zerocode::run runs 309 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 209 over it, 3.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":"apps/zerocode/src/main.rs"},"region":{"startLine":891}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ba2ed4e2907b54a733099760c054703afc0fd177630e815d6835bed5b7d4141"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: WebSearchTool: ClassTooLong \u2014 1216 significant 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, 3 blocks, lines 214-2422. The bar is 400 significant lines; this is 816 over it, 3.04\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/zeroclaw-tools/src/web_search_tool.rs"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"830b6dc639151a39742913db0b482779d359076c84ff936e936db6215f5da689"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/web_search_tool.rs: FileTooLong \u2014 1520 significant 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: WebSearchTool (3 blocks, 214-2422). The bar is 500 significant lines; this is 1020 over it, 3.04\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/zeroclaw-tools/src/web_search_tool.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c33045a34d161f3cd09d9c1b90ddfe5e19e01b40a485b983b3ef7f7eb56088ec"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: InputBarState: ClassTooLong \u2014 1212 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 71 methods, 3 blocks, lines 721-2634. The bar is 400 significant lines; this is 812 over it, 3.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":"apps/zerocode/src/input_bar.rs"},"region":{"startLine":721}}}],"partialFingerprints":{"codehealthFindingId/v1":"644d694c32b6c1d309fdb85db4276eda0e8f6f2106ce0a92ad691e81fb02cabe"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_gateway::openapi::build_spec: FunctionTooLong \u2014 zeroclaw_gateway::openapi::build_spec runs 303 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 203 over it, 3.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/zeroclaw-gateway/src/openapi.rs"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"3296d49106b5ddee32e00e22a375d9c6ac07c5922edcb66aa37f27ec14dfb00a"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::agent::turn::provider_call::call_provider: FunctionTooLong \u2014 zeroclaw_runtime::agent::turn::provider_call::call_provider runs 303 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 203 over it, 3.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/zeroclaw-runtime/src/agent/turn/provider_call.rs"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"e777c700f100f8104899b2a7ea1899bd0b578c0271456c47a5d3a418e0fa811b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/api.rs: FileTooLong \u2014 1510 significant 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 52 free functions. The bar is 500 significant lines; this is 1010 over it, 3.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/zeroclaw-gateway/src/api.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7f640adeddecef2febf0a73e10ab3e87a14c140370618a7b4747e2bf469976c"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: RusqliteStore: ClassTooLong \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), 2 methods, 7 blocks, lines 35-1792. The bar is 400 significant lines; this is 775 over it, 2.94\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/zeroclaw-channels/src/whatsapp_storage.rs"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6492c105c874837afe37ed861fb4e1508924a25f269f46b2bdcb68217754ab7"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ModelRoutingConfigTool: ClassTooLong \u2014 1174 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 33 methods, 3 blocks, lines 83-1800. The bar is 400 significant lines; this is 774 over it, 2.94\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/zeroclaw-tools/src/model_routing_config.rs"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"12b410ac696869497c98dd19adc506d2db2c6a5104bf8f6b98fc344752ffeeef"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/mattermost.rs: FileTooLong \u2014 1433 significant 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: MattermostChannel (6 blocks, 306-2324). The bar is 500 significant lines; this is 933 over it, 2.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/zeroclaw-channels/src/mattermost.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a11b5c9857ffc630db3f7530d5da393a5a4e0bae6157197fb15fbe31d598474c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ModelRoutingConfigTool.handle_upsert_agent: MethodTooLong \u2014 handle_upsert_agent runs 286 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 186 over it, 2.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/zeroclaw-tools/src/model_routing_config.rs"},"region":{"startLine":1157}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dd27cc63569cbaa0cfb814016726c2d5fa73ce83e14a7cb65425af39ce7fe05"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/logs.rs: FileTooLong \u2014 1426 significant 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 74% of them inside a single declaration: Logs (3 blocks, 534-2059). The bar is 500 significant lines; this is 926 over it, 2.85\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":"apps/zerocode/src/logs.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d615d4c5d3dbc2fae1e69cc1f3f498e0159e78671f6f06dedc9896f18b08e0f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AnthropicModelProvider.parse_anthropic_sse_from_reader: MethodTooLong \u2014 parse_anthropic_sse_from_reader 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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":2485}}}],"partialFingerprints":{"codehealthFindingId/v1":"287932b8b978bb9aec01d5ff3e28bd9946ce487d19d659b8746f4e883cab4d4b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/factory.rs: FileTooLong \u2014 1395 significant 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 895 over it, 2.79\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/zeroclaw-providers/src/factory.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cff61cb58c1679c95ed030d9c6311d1cdcad743b4fbc44a1558467b486026e8"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: WeComWsChannel: ClassTooLong \u2014 1111 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 25 methods, 4 blocks, lines 286-1860. The bar is 400 significant lines; this is 711 over it, 2.78\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/zeroclaw-channels/src/wecom_ws.rs"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"839c76762139e22563b92b1cce8b25c749616640e9d637c3ef31ee6ef15be769"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SqliteSessionBackend.migrate_from_jsonl_with_handlers: MethodTooLong \u2014 migrate_from_jsonl_with_handlers runs 277 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 177 over it, 2.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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"281411958643ac8eb484bceab9db07283a371d541d1500ced6a2d2f053b54b09"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ZerocodePane: ClassTooLong \u2014 1097 significant 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, 2 blocks, lines 137-1937. The bar is 400 significant lines; this is 697 over it, 2.74\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":"apps/zerocode/src/zerocode_pane.rs"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5d1504b0017214b44a4337a943d213beb5f96f5e0e824ad9d4414936651c8e7"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AcpSessionStore: TooManyMethods \u2014 82 methods. The bar is 30 methods; this is 52 over it, 2.73\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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"15a4fa1feeff9b959ae770878a0c9070a077083d524a97668b8f52a5e9cfad8e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/session_sqlite.rs: FileTooLong \u2014 1360 significant 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: SqliteSessionBackend (3 blocks, 20-1902). The bar is 500 significant lines; this is 860 over it, 2.72\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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"885deec09f1cfdbd26a72559a1425fa67538d30afff609b184d7cf13006c04fe"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: auth/mod.rs: FileTooLong \u2014 1335 significant 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 835 over it, 2.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/zeroclaw-providers/src/auth/mod.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"abb22e85f2e386e73bd6f4fae4d535b40128704d058fa040cb7352d397f2e96d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/mcp_transport.rs: FileTooLong \u2014 1325 significant 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 825 over it, 2.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/zeroclaw-tools/src/mcp_transport.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"12facb14603f77d816a04f4ea322374cf4d44e8bcaf05c0d18b54031ee08effc"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: ModelProviders: TooManyFields \u2014 79 stored fields beside 13 methods. 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/zeroclaw-config/src/providers.rs"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7c8e14f0137ff6df35ea8ec5cd1a9fe1985927e07beaa66833cf2294fdc8b01"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: Logs: ClassTooLong \u2014 1051 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 53 methods, 3 blocks, lines 534-2059. The bar is 400 significant lines; this is 651 over it, 2.63\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":"apps/zerocode/src/logs.rs"},"region":{"startLine":534}}}],"partialFingerprints":{"codehealthFindingId/v1":"11420409ca81356dd50cbbd45f99997ef59b4d4e238a733cfd32c831e95e8429"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: QuickstartPane: ClassTooLong \u2014 1036 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 38 methods, 3 blocks, lines 1090-2565. The bar is 400 significant lines; this is 636 over it, 2.59\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":"apps/zerocode/src/quickstart_pane.rs"},"region":{"startLine":1090}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b25dfc5c94400f872faf1d3ad5ee4ef9519fe41a3de0fc56721ed98e47068c8"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: QQChannel: ClassTooLong \u2014 1036 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 38 methods, 4 blocks, lines 295-1880. The bar is 400 significant lines; this is 636 over it, 2.59\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/zeroclaw-channels/src/qq.rs"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfbc940d8548ab1bce56a5d13706c27eb0f1761d4f3ba0ece4d5c326a6ffc656"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: doctor/mod.rs: FileTooLong \u2014 1291 significant 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 791 over it, 2.58\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/zeroclaw-runtime/src/doctor/mod.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"93c4ed13b266cdbf67839cf499ee24c6f94b5ed901d190d50a3cd82a52d82a9f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/zerocode_pane.rs: FileTooLong \u2014 1282 significant 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: ZerocodePane (2 blocks, 137-1937). The bar is 500 significant lines; this is 782 over it, 2.56\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":"apps/zerocode/src/zerocode_pane.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d153a7738d78784e7b8f03c1c98d4519440e08b017889de06efaf700a41ef7fb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: rpc/session.rs: FileTooLong \u2014 1261 significant 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 761 over it, 2.52\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/zeroclaw-runtime/src/rpc/session.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"82524f5b1094222a077ff55a649fef5103929150ebe65e47c6f2c3a9aaa5048a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: sop/mod.rs: FileTooLong \u2014 1250 significant 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 59 free functions. The bar is 500 significant lines; this is 750 over it, 2.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/zeroclaw-runtime/src/sop/mod.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4adae7e0e86af1133f8fd07c6d09adba33ab626897f341a178f3ebfe383e937d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/whatsapp_storage.rs: FileTooLong \u2014 1246 significant 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: RusqliteStore (7 blocks, 35-1792). The bar is 500 significant lines; this is 746 over it, 2.49\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/zeroclaw-channels/src/whatsapp_storage.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ea53b49ea5792db864156758cad84608b6be1e6fe03904d4e3a08443db8fb5b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/qq.rs: FileTooLong \u2014 1218 significant 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: QQChannel (4 blocks, 295-1880). The bar is 500 significant lines; this is 718 over it, 2.44\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/zeroclaw-channels/src/qq.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"53f7dbf9b8f659a18c1dfd795ee9340a86a011fe57c752d1d5e1cff8a50cccb2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/model_routing_config.rs: FileTooLong \u2014 1215 significant 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: ModelRoutingConfigTool (3 blocks, 83-1800). The bar is 500 significant lines; this is 715 over it, 2.43\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/zeroclaw-tools/src/model_routing_config.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7609059cb960ee2c723352167be801e07f0d029d81780243307bbc3137e4417"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AnthropicModelProvider.stream_chat_with_tool_round_policy: MethodTooLong \u2014 stream_chat_with_tool_round_policy runs 242 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 142 over it, 2.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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":3255}}}],"partialFingerprints":{"codehealthFindingId/v1":"2018dfb50d29d0a63c4dd148da9b4e4676cb53998a23ceb2ab4a3f9290cd30eb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cron/scheduler.rs: FileTooLong \u2014 1204 significant 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 704 over it, 2.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/zeroclaw-runtime/src/cron/scheduler.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a332c4a3cae47f2612b1afc3f4fa97226b9c1cb619ae75fb95321e2ca6dfeee3"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DelegateTool.execute_parallel: MethodTooLong \u2014 execute_parallel runs 239 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 139 over it, 2.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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":4082}}}],"partialFingerprints":{"codehealthFindingId/v1":"87dabf962462beef2772307fc614b47b571a07a14c0299bb0b6bfc48731ae578"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: ChatState: TooManyFields \u2014 71 stored fields beside 140 methods. The bar is 30 stored fields; this is 41 over it, 2.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":"apps/zerocode/src/chat.rs"},"region":{"startLine":10054}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6a4de4bd28d364e58b87751a06ef2a5a80ab9c20c0d6d446d23c82dbf72f4e2"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: InputBarState: TooManyMethods \u2014 71 methods. The bar is 30 methods; this is 41 over it, 2.37\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":"apps/zerocode/src/input_bar.rs"},"region":{"startLine":721}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d743b57f0800067a93ea425a639ac02fd78d6ea0742cd501d363072cb937b6f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/openai_codex.rs: FileTooLong \u2014 1183 significant 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 683 over it, 2.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/zeroclaw-providers/src/openai_codex.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b674eb33d57cf664b5cc55e6d9fc73fcee7eafc49c2566705c848e6e557b469"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/jira_tool.rs: FileTooLong \u2014 1182 significant 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: JiraTool (3 blocks, 22-1297). The bar is 500 significant lines; this is 682 over it, 2.36\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/zeroclaw-tools/src/jira_tool.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcb7f72d062a7deb0b9afb78787a470e6cf70a47685fa5817656c52c193711ce"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: JiraTool: ClassTooLong \u2014 942 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 17 methods, 3 blocks, lines 22-1297. The bar is 400 significant lines; this is 542 over it, 2.36\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/zeroclaw-tools/src/jira_tool.rs"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d7768e2a5e0175e6544d20be5c8825d4b9c99e204290d5ca51bd6f3f4bad393"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: config/mod.rs: FileTooLong \u2014 1166 significant 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 57 free functions. The bar is 500 significant lines; this is 666 over it, 2.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":"apps/zerocode/src/config/mod.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"28e3c7ac8f59b794f71f7a144165551a13374995859bdcb56d8047bff62712a2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/bedrock.rs: FileTooLong \u2014 1161 significant 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 661 over it, 2.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/zeroclaw-providers/src/bedrock.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea57cd3678ea919cc0847c82ea03e00b7c9d1a87f4b76cdc87fdc2f8ff548418"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw::handle_auth_command: FunctionTooLong \u2014 zeroclaw::handle_auth_command runs 232 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 132 over it, 2.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":"src/main.rs"},"region":{"startLine":15571}}}],"partialFingerprints":{"codehealthFindingId/v1":"260886026fcfef9ddd6e6f8dc51828a2b7eab6b69872d65c33a925ca8276ffa9"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RusqliteStore.init_schema: MethodTooLong \u2014 init_schema 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/zeroclaw-channels/src/whatsapp_storage.rs"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7089166cd62e366a4c02860385981e6d982751216cc0324a82dd455f884403d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/main.rs: FileTooLong \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), declaring 35 free functions. The bar is 500 significant lines; this is 647 over it, 2.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":"apps/zerocode/src/main.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"34dda9be5489f0c451e0f981847a6200da720b46375dd824f69d172389353ef6"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::agent::turn::call_prep::prepare_tool_calls: FunctionTooLong \u2014 zeroclaw_runtime::agent::turn::call_prep::prepare_tool_calls runs 229 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 129 over it, 2.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/zeroclaw-runtime/src/agent/turn/call_prep.rs"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"103d35f4e81acdf2c574aba782ac99c21a70a3706242a64326329e1ae33d8f68"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.zeroclaw_help_context: MethodTooLong \u2014 zeroclaw_help_context runs 228 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 128 over it, 2.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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":6073}}}],"partialFingerprints":{"codehealthFindingId/v1":"becdc6cb69c551498651959fe86453109bb6b6f917fb7441570e6947d8b55cd7"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: RpcClient: 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), 97 methods, 2 blocks, lines 897-3261. 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":"apps/zerocode/src/client.rs"},"region":{"startLine":897}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b07f5ffaf6f620ef965dda3e58b69d1835bb8bf541dbcdaf72a4fe3cf0a568e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/openai.rs: FileTooLong \u2014 1120 significant 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 620 over it, 2.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/zeroclaw-providers/src/openai.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0bcc7c71c18a67fbf177eeb066cc318088d5c25f6d07796b1aefa12a4d9535b"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::agent::tool_execution::execute_one_tool_with_provenance: FunctionTooLong \u2014 zeroclaw_runtime::agent::tool_execution::execute_one_tool_with_provenance runs 224 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 124 over it, 2.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/zeroclaw-runtime/src/agent/tool_execution.rs"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b15f32104517eddb1f7ad0021db51be7923713951e485eefe0306c3eaaaef07"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/types.rs: FileTooLong \u2014 1117 significant 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 617 over it, 2.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/zeroclaw-rpc-proto/src/types.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f23ab0da62f670fcf634310d10845805a8b087d1d66114ded8dfb1e4339c6232"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: FileUploadBundleTool.execute: MethodTooLong \u2014 execute 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/zeroclaw-tools/src/file_upload_bundle.rs"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d80e03845b325d1e2f6fdb9d7e71b52327bd8fbb3d72cc2d97e4d00af64338e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: sop/dispatch.rs: FileTooLong \u2014 1113 significant 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 613 over it, 2.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/zeroclaw-runtime/src/sop/dispatch.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"45d51ad495f65ae7f88ad62b3d0d151457b37c564b6b058ca13e2006af5deec8"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ChannelsConfig.channels: MethodTooLong \u2014 channels 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/zeroclaw-config/src/schema.rs"},"region":{"startLine":16515}}}],"partialFingerprints":{"codehealthFindingId/v1":"353dc1dbe4732958b43051e2778089bc4eff2ba3f6d5d509f10f2f52b6fbe615"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/a2a_client.rs: FileTooLong \u2014 1087 significant 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 587 over it, 2.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/zeroclaw-tools/src/a2a_client.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b87a768d67987d4c3426631e24bedf5647623ffabddd0d4cccc72e2f085d460a"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_config::agent_bundle::plan_export: FunctionTooLong \u2014 zeroclaw_config::agent_bundle::plan_export runs 217 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 117 over it, 2.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/zeroclaw-config/src/agent_bundle.rs"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a64ad87d2445fbd7eab62bcf9c4ca1f75fa84beab83f16d3fc08e24591637e2"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_gateway::api_config::handle_patch: FunctionTooLong \u2014 zeroclaw_gateway::api_config::handle_patch runs 217 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 117 over it, 2.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/zeroclaw-gateway/src/api_config.rs"},"region":{"startLine":2575}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fe06211fc033af26f027d9b72492021cd3b32164c73967a45f8f6376a4039fa"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: PluginHost: ClassTooLong \u2014 860 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 49 methods, 3 blocks, lines 21-1755. The bar is 400 significant lines; this is 460 over it, 2.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/zeroclaw-plugins/src/host.rs"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"458c46eb6e42065505f45022b96345b144516abd52a01a3eb50aedf87e789108"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AcpServer.handle_session_load: MethodTooLong \u2014 handle_session_load runs 215 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 115 over it, 2.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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":1153}}}],"partialFingerprints":{"codehealthFindingId/v1":"62aedd180524764d51f9804341b80c85ee53ec8b7eabe5f8a91e08eb6ff61259"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Dashboard: TooManyMethods \u2014 64 methods. The bar is 30 methods; this is 34 over it, 2.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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"81b082832776d5b541bb22b7333806f6f3769df8ef696382036f55628e5dbeb9"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: SopPane: TooManyMethods \u2014 64 methods. The bar is 30 methods; this is 34 over it, 2.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":"apps/zerocode/src/sop_pane.rs"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"e552ad97028b088ee1d67d4a2c041d521edc5529c961e60647520cdc0f881628"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/gemini.rs: FileTooLong \u2014 1066 significant 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 62% of them inside a single declaration: GeminiModelProvider (5 blocks, 22-1607). The bar is 500 significant lines; this is 566 over it, 2.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/zeroclaw-providers/src/gemini.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"01084bf1cbb45028d6f16f2abd9c0eda5724c4b7e656d2427207d28354e4fe4c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/api_oidc.rs: FileTooLong \u2014 1063 significant 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 563 over it, 2.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/zeroclaw-gateway/src/api_oidc.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f2f93ae6bc9096f08b94721601ffbdef91fd087693681124de30cc866fb6fd6"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::agent::system_prompt::build_system_prompt_with_mode_and_effective_tools: FunctionTooLong \u2014 zeroclaw_runtime::agent::system_prompt::build_system_prompt_with_mode_and_effective_tools 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/zeroclaw-runtime/src/agent/system_prompt.rs"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7807cd983ea6b91ae9b175cd71d2cff909eefeb945485d2a717b81769cb8776"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: GeminiModelProvider.send_generate_content: MethodTooLong \u2014 send_generate_content 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/zeroclaw-providers/src/gemini.rs"},"region":{"startLine":1173}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0e74aeccdef17bf9f8ae51af9cef049a7a22e7b0efe448bf5fceb32cbd689c3"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: FileDownloadTool.execute: MethodTooLong \u2014 execute 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/zeroclaw-tools/src/file_download.rs"},"region":{"startLine":451}}}],"partialFingerprints":{"codehealthFindingId/v1":"87e4f60e5938e446fb7d85205686d63f291a5679aea6b26e923d2c512715d36a"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: App: TooManyFields \u2014 63 stored fields beside 140 methods. The bar is 30 stored fields; this is 33 over it, 2.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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":456}}}],"partialFingerprints":{"codehealthFindingId/v1":"067821712855cb92f2f4422c386cd01af9eaa5ab806e0a13d710a4b261c97c62"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ZerocodePane: 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":"apps/zerocode/src/zerocode_pane.rs"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"79ea16f195011a707cb8a132d571c6932d8b1c6c3495964a8076665ccf3fa965"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/wasm_channel.rs: FileTooLong \u2014 1047 significant 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 547 over it, 2.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/zeroclaw-plugins/src/wasm_channel.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b44b3e334b1d310780c6cbed3c4981e9e179f3f2bb57268ed8b04d2beed837f0"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: V2Config.migrate: MethodTooLong \u2014 migrate 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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"675545ea71e3c1d39fc398a2aaf6428cb28209588a5c91abe1ebf3d49a8a7366"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::cron::store::sync_declarative_jobs: FunctionTooLong \u2014 zeroclaw_runtime::cron::store::sync_declarative_jobs 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/zeroclaw-runtime/src/cron/store.rs"},"region":{"startLine":1769}}}],"partialFingerprints":{"codehealthFindingId/v1":"249e5525143113b479cc873876fd8f3220da782bab974db63059c8db005fa4f8"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw::sop::handle_command: FunctionTooLong \u2014 zeroclaw::sop::handle_command 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":"src/sop/mod.rs"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"096cc3f065bccf714b7bfc13726b848af5429fb6772430add543699c921244a9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/dashboard_core.rs: FileTooLong \u2014 1038 significant 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 538 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/zeroclaw-gateway/src/dashboard_core.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f21b4ec255bf0e3a3f3bdad4befc6303eb371e67d586742dba60cf93cdf02a3"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: MatrixChannel: ClassTooLong \u2014 829 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 22 methods, 4 blocks, lines 4297-5536. The bar is 400 significant lines; this is 429 over it, 2.07\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":4297}}}],"partialFingerprints":{"codehealthFindingId/v1":"30cf2e1b4357e739c890469a679cf7628989f895d27ba79d8f420f9218c4c153"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_gateway::api_sections::select_section: FunctionTooLong \u2014 zeroclaw_gateway::api_sections::select_section 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/zeroclaw-gateway/src/api_sections.rs"},"region":{"startLine":900}}}],"partialFingerprints":{"codehealthFindingId/v1":"e928582b0660db49fb2b983fe13feea516f8c1c55a7b7cb2684f186cbdb7d86c"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::rpc::wss::serve_wss_listener: FunctionTooLong \u2014 zeroclaw_runtime::rpc::wss::serve_wss_listener runs 206 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 106 over it, 2.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/zeroclaw-runtime/src/rpc/wss.rs"},"region":{"startLine":931}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba48b8850719bb225fdd8d7e2754d418da812db1ccd66c99034b9d06e7fc7765"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SendMessageToPeerTool.execute: MethodTooLong \u2014 execute 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/zeroclaw-runtime/src/tools/send_message_to_peer.rs"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9ae84587e7336143ba918d4e87ea662d1a8ded8bc5eeb4ceb30857650198832"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zerorelay::handle_daemon: FunctionTooLong \u2014 zerorelay::handle_daemon runs 203 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 103 over it, 2.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":"apps/zerorelay/src/lib.rs"},"region":{"startLine":1175}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8c472a955a1bce11651cf628dfb1333b8b1adbc69a5d4695572201c0d01cd57"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: HailoOllamaModelProvider: ClassTooLong \u2014 808 significant 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, 5 blocks, lines 202-1371. The bar is 400 significant lines; this is 408 over it, 2.02\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/zeroclaw-providers/src/hailo_ollama.rs"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d0da4b645693024c90fc0cc6a203740e276aecc776f73439dccd0e84b587e39"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: QdrantMemory: ClassTooLong \u2014 806 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 19 methods, 4 blocks, lines 17-1239. The bar is 400 significant lines; this is 406 over it, 2.02\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/zeroclaw-memory/src/qdrant.rs"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"46752acd4a43a598448beff4dd680b68762e4deb854dedfd2c3265fdeb113b1c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: VoiceWakeChannel.listen: MethodTooLong \u2014 listen 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/zeroclaw-channels/src/voice_wake.rs"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"b455a17eac8b383b23b2d90b31ca9a1e2b145172120f3b1bfec149ee4d80e0d8"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: WhatsAppWebChannel: TooManyMethods \u2014 60 methods. The bar is 30 methods; this is 30 over it, 2.00\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/zeroclaw-channels/src/whatsapp_web.rs"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"b79bfbfc546e9f95d5691331d608a6c28f6390c15c156d4c1a5de9d47b945b96"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/backup_tool.rs: FileTooLong \u2014 995 significant 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 495 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/zeroclaw-tools/src/backup_tool.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"140315070d47b6ae6067d4a3ea3a2c48803328a2b42f067fbd2eb532ab8867b1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/signal.rs: FileTooLong \u2014 992 significant 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: SignalChannel (4 blocks, 63-1582). The bar is 500 significant lines; this is 492 over it, 1.98\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/zeroclaw-channels/src/signal.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f9c432e72a72aef25f7f57df813053956d3f68439224f805b086e5d525d44a4"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: SignalChannel: ClassTooLong \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), 27 methods, 4 blocks, lines 63-1582. The bar is 400 significant lines; this is 393 over it, 1.98\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/zeroclaw-channels/src/signal.rs"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"460364963d351b9b10111a59536d61d48d7d518e298c325e0459cbc077f60260"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/dashboard_session.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). 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/zeroclaw-gateway/src/dashboard_session.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"97f9e250d06537830f575a8d5c9373c3d458310944ae553fabda4f3959a337b1"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: LinkedInTool.execute: MethodTooLong \u2014 execute runs 197 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 97 over it, 1.97\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/linkedin.rs"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c4fe16ce836da09f29872c0f551b9300d5c20be553b03cc49922827e3c694da"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/agent_bundle.rs: FileTooLong \u2014 984 significant 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 484 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/zeroclaw-config/src/agent_bundle.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"47dd42b749fd3c91043221b02a4c19749ce56ec479557e1392947198d2c286bc"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AcpServer: TooManyMethods \u2014 59 methods. The bar is 30 methods; this is 29 over it, 1.97\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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd7ef5b08ff0b194d14cf7fe93b30f6eaf6248b2aa9ac06ef89569cdca2a4685"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::doctor::check_config_semantics: FunctionTooLong \u2014 zeroclaw_runtime::doctor::check_config_semantics 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/zeroclaw-runtime/src/doctor/mod.rs"},"region":{"startLine":1163}}}],"partialFingerprints":{"codehealthFindingId/v1":"d74951f0baf70d0f386e9e0f50237943fa132aba876d3eb8678890e62239e60d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: GoogleWorkspaceTool.execute: MethodTooLong \u2014 execute 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/zeroclaw-tools/src/google_workspace.rs"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"63b0674b2e2455c74dbf9e81493e9d7b409227fa59bbee638abafc5cf6c3c706"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/hailo_ollama.rs: FileTooLong \u2014 973 significant 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: HailoOllamaModelProvider (5 blocks, 202-1371). The bar is 500 significant lines; this is 473 over it, 1.95\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/zeroclaw-providers/src/hailo_ollama.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a15372ec32c4dfb8b368af1375b5c37fe79fe59ac782cbbd145789eec8d0f82"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: ChannelRuntimeContext: TooManyFields \u2014 58 stored fields. The bar is 30 stored fields; this is 28 over it, 1.93\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":682}}}],"partialFingerprints":{"codehealthFindingId/v1":"0785df6c6b96185c6a5ed0fd3c038105525c7e84dbf0653b25b840594b365fdc"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Config.load_or_init: MethodTooLong \u2014 load_or_init 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/zeroclaw-config/src/schema.rs"},"region":{"startLine":23448}}}],"partialFingerprints":{"codehealthFindingId/v1":"caccdaebb2542525380f38f6a0abd06d33fefa8ef7d98ff5254234f469b66efa"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_channels::matrix::inbound::handle_message: FunctionTooLong \u2014 zeroclaw_channels::matrix::inbound::handle_message 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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":2279}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1da2ae05eb2c16049d65c27c51095d12e73da0c327b9f23461b106703f5e31a"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: LarkChannel: TooManyMethods \u2014 57 methods. The bar is 30 methods; this is 27 over it, 1.90\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":725}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf4fbdb786a1b318d198fd3841b35b47634a2c8b970575b61a68f0422c4f4875"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: OpenAiCompatibleModelProvider.stream_chat: MethodTooLong \u2014 stream_chat 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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":4779}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0430d4980a39c0cdfbe28f25bd3ad251ba2f9726eaa387527a9ace02238aa5f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.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). The bar is 500 significant lines; this is 449 over it, 1.90\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":"apps/zerorelay/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cab8c03a855bbad4839bf7f7cc8d17d288a33761837fc4f4c505b219572b017"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw::issue_wss_client_cert: FunctionTooLong \u2014 zeroclaw::issue_wss_client_cert runs 189 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 89 over it, 1.89\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values 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/main.rs"},"region":{"startLine":8225}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0b141ca3426a68b2ba4a7b9ceccc27f779c8a499061a36c6e4ecbb36b4fa94e"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AcpServer.handle_session_resume: MethodTooLong \u2014 handle_session_resume 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":"crates/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":1498}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dfcb96000ef4ffe9f629d69bffb89bb9aa64ff581ce0fb19aa2a4c72f407129"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: WeChatChannel.qr_login: MethodTooLong \u2014 qr_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":"crates/zeroclaw-channels/src/wechat.rs"},"region":{"startLine":2100}}}],"partialFingerprints":{"codehealthFindingId/v1":"86738c781e0932ad6bf9808d7ef566c8fcf61879571892b049ebed4c1aef1612"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: JiraTool.execute: MethodTooLong \u2014 execute 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/zeroclaw-tools/src/jira_tool.rs"},"region":{"startLine":1038}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d493c3c40e773c698f08bf5a40dfa6705a38a8627479f6f655bd21538f0915e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/transcription.rs: FileTooLong \u2014 928 significant 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 428 over it, 1.86\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/zeroclaw-channels/src/transcription.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bad5ad8a8b88fa396871bf73045b3b44ca975522140a3d018345c1adebdbe832"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/linkedin_client.rs: FileTooLong \u2014 927 significant 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 61% of them inside a single declaration: LinkedInClient (2 blocks, 13-815). The bar is 500 significant lines; this is 427 over it, 1.85\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/zeroclaw-tools/src/linkedin_client.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dea8af5c064e7199dc38e67f96180b8c28e123ba988743a2afa0f6b7585fb6aa"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MatrixChannel.finalize_draft: MethodTooLong \u2014 finalize_draft 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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":5084}}}],"partialFingerprints":{"codehealthFindingId/v1":"63125ee30376df88b6fa086ac34ff41bd4e47914431e9e6e7cf139136bc6a472"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AcpServer.handle_session_new: MethodTooLong \u2014 handle_session_new 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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":870}}}],"partialFingerprints":{"codehealthFindingId/v1":"00864aedb68e783630ca764dbbe5bc382bb13f03ee7978087a2fbdb815e1815a"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: Agent: TooManyFields \u2014 55 stored fields beside 106 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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":541}}}],"partialFingerprints":{"codehealthFindingId/v1":"203f55bc7292b394e81dfbd6ec98d6fe6964bfe28c5d41ed6df6c7e407e35e22"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/relay.rs: FileTooLong \u2014 915 significant 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 415 over it, 1.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/zeroclaw-runtime/src/relay.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6cabf4b8f95b102853bd67b90f16350ad70ff2b7e2d764fb3d577d5ba0bd8ac"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: skills/mod.rs: FileTooLong \u2014 912 significant 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 412 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":"src/skills/mod.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd1234d17374e5a48e7746c7ca4704a95c19a7f1849596c0ce54b06ed7b60bb5"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/composio.rs: FileTooLong \u2014 907 significant 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: ComposioTool (3 blocks, 27-855). The bar is 500 significant lines; this is 407 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/zeroclaw-tools/src/composio.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"01a84c772324a84955a2b746150a7e04db5c4419aeb01edf14adfd86e1e1c9a6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/live_config_authority.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). The bar is 500 significant lines; this is 405 over it, 1.81\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/zeroclaw-runtime/src/live_config_authority.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3e4d24fdb09ebf67f69b86b6781666f535ecdf07ffd1dc9586ec74b7def8ff0"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RpcDispatcher.handle_session_messages_record: MethodTooLong \u2014 handle_session_messages_record runs 181 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 81 over it, 1.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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":8941}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd2fc1c1ce4f9fd30eb70e9ba07fe9ce99a44f6c60bb5ca8c54a8113e40a7e4e"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: OpenAiCompatibleModelProvider: TooManyMethods \u2014 54 methods. The bar is 30 methods; this is 24 over it, 1.80\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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"a924c72c9dd7a8adb168d02e674efa1c8d96660c900aedc18039bbef7ba8e909"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: sop/executor.rs: FileTooLong \u2014 900 significant 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 400 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/zeroclaw-runtime/src/sop/executor.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6194b8b0c54648c3f2a4147d887c6da45c5e3566d310fe524b6f5c5e6c0c0de9"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: EscalateToHumanTool.execute: MethodTooLong \u2014 execute runs 178 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 78 over it, 1.78\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/escalate.rs"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddba212e53438cef505a4dd1941bbfb62e6502eae23da367ff1f3c760161aaad"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tools/scoped.rs: FileTooLong \u2014 887 significant 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: ScopedToolRegistry (3 blocks, 396-1614). The bar is 500 significant lines; this is 387 over it, 1.77\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/zeroclaw-runtime/src/tools/scoped.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1df6a86242cfe7c780fb19c5a6fdf2c626dcc3ba7e1847f0697f881af83d6d79"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: observability/otel.rs: FileTooLong \u2014 884 significant 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: OtelObserver (3 blocks, 25-926). The bar is 500 significant lines; this is 384 over it, 1.77\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/zeroclaw-runtime/src/observability/otel.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c926730e32bcffe17d85440c31114e0befa609c40eb1ea66e0735d7102052b5a"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: Dashboard: TooManyFields \u2014 53 stored fields beside 64 methods. The bar is 30 stored fields; this is 23 over it, 1.77\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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"40c565c94b8757f9ebad3be00fcd58ffc44b5b3ee86184723e12fc99bc032f70"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Logs: TooManyMethods \u2014 53 methods. The bar is 30 methods; this is 23 over it, 1.77\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":"apps/zerocode/src/logs.rs"},"region":{"startLine":534}}}],"partialFingerprints":{"codehealthFindingId/v1":"01d26d5ff63f5e139bec4f8793e7a4a2b2fe34bbf8b5b96b6fc3d19c5df51b61"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: MemoryConfig: TooManyFields \u2014 53 stored fields. The bar is 30 stored fields; this is 23 over it, 1.77\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/zeroclaw-config/src/schema.rs"},"region":{"startLine":12906}}}],"partialFingerprints":{"codehealthFindingId/v1":"d68395b5d358aecae2a446531f8ab219e008f3206e4b9d9f37247725b1e004a9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: alias_cli/export.rs: FileTooLong \u2014 881 significant 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 381 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/alias_cli/export.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"38966f9eda0db214c85d0423a5e91f86f7676dd88ef52db8e9df337943a6ae02"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/dispatch.rs: FileTooLong \u2014 875 significant 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 375 over it, 1.75\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/zeroclaw-providers/src/dispatch.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2094ac7e449900a7d2473b9baa8840edb837bc4f2832467623ce69233af7b1ef"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.handle_mouse_inner: MethodTooLong \u2014 handle_mouse_inner runs 175 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 75 over it, 1.75\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":1385}}}],"partialFingerprints":{"codehealthFindingId/v1":"169b0cd07867a76db71fc40d6599427bd9dfcac15ed0a7bc4f160c7c6ff3a74f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ComposioTool.execute: MethodTooLong \u2014 execute runs 175 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 75 over it, 1.75\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/composio.rs"},"region":{"startLine":614}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e1ccbf5fd5873968f0a796e961394aeda36be0982793525629953f3fcca9d56"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/update.rs: FileTooLong \u2014 872 significant 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 57 free functions. The bar is 500 significant lines; this is 372 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/commands/update.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbef473e3348895810654fd5e27e2cd1de9abe553119a3aeb795a10f929704e5"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: InputBarState.handle_key: MethodTooLong \u2014 handle_key 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":"apps/zerocode/src/input_bar.rs"},"region":{"startLine":1555}}}],"partialFingerprints":{"codehealthFindingId/v1":"382bb1eb58e59e0e2835e1f46cd5740c0dc9715e41201d2275072d8b66c02028"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_providers::multimodal::validate_image_content_with_projection: FunctionTooLong \u2014 zeroclaw_providers::multimodal::validate_image_content_with_projection 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/zeroclaw-providers/src/multimodal.rs"},"region":{"startLine":4164}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a67340e8573e7357fcbfe686248769918c6320c1ffabe75810d961e73ca2b68"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SopEngine.decide_checkpoint_with_principal: MethodTooLong \u2014 decide_checkpoint_with_principal 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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":4505}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4fd3a2af022c1240026d90b256860d88f998d56e01aaefb46903db50202d899"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: FileWriteTool.execute: MethodTooLong \u2014 execute 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/zeroclaw-tools/src/file_write.rs"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd02af7e07ff9cff64549f332c349a5093830620ee8ab540a14247497efeb336"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: HailoOllamaModelProvider.normalize_messages: MethodTooLong \u2014 normalize_messages 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/zeroclaw-providers/src/hailo_ollama.rs"},"region":{"startLine":692}}}],"partialFingerprints":{"codehealthFindingId/v1":"c80fbe44d1bdf2e143ac5c8359c8ed3e2906df6a64492a3269458b30bb395429"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::agent::turn::approval_gate::gate_tool_approval: FunctionTooLong \u2014 zeroclaw_runtime::agent::turn::approval_gate::gate_tool_approval 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/zeroclaw-runtime/src/agent/turn/approval_gate.rs"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"d01fb22f8298fc798ff7b0dd99f39387b69dce864b468fcda545abfe7e3196bd"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: EmailChannel: ClassTooLong \u2014 690 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 27 methods, 4 blocks, lines 43-1110. The bar is 400 significant lines; this is 290 over it, 1.73\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/zeroclaw-channels/src/email_channel.rs"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"43ad9008a2e93e3d0ebcff265af473ae7d48b8dee18e1fa6ece5ff88a234b5b9"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: OtelObserver: ClassTooLong \u2014 687 significant 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 25-926. The bar is 400 significant lines; this is 287 over it, 1.72\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/zeroclaw-runtime/src/observability/otel.rs"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9410a71c3eb484c40c7ec980845d6241eb06f42577e3b54d7d7831ce3eac309"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cost/tracker.rs: FileTooLong \u2014 858 significant 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 358 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/zeroclaw-config/src/cost/tracker.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"31e09f4b53a25e3e708d986096f64bcf6222ed5371bebf3b50ed93dda1e917ce"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: IrcChannel.listen: MethodTooLong \u2014 listen 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/zeroclaw-channels/src/irc.rs"},"region":{"startLine":419}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3d106cfa462d2c3eba955e4174c831188a75fc345befc413a0c5a3b60a45118"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AnthropicModelProvider: TooManyMethods \u2014 51 methods. The bar is 30 methods; this is 21 over it, 1.70\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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a6bf7119d21bc991c7ffdcf5113641797c94ab9dd54bbef653bcb9cf17d0a5d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/qdrant.rs: FileTooLong \u2014 849 significant 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: QdrantMemory (4 blocks, 17-1239). The bar is 500 significant lines; this is 349 over it, 1.70\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/zeroclaw-memory/src/qdrant.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc68c45c14c1eeb61f1719e9caf430feaac81042b8c7daf913f5daafedf2b387"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_gateway::api_sop_author::handle_sop_decide: FunctionTooLong \u2014 zeroclaw_gateway::api_sop_author::handle_sop_decide runs 169 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 69 over it, 1.69\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-gateway/src/api_sop_author.rs"},"region":{"startLine":460}}}],"partialFingerprints":{"codehealthFindingId/v1":"54c607c83091a7f6c59dc750e37445f951dac85dd890cb612fbf819ef7313216"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MattermostChannel.listen_websocket: MethodTooLong \u2014 listen_websocket 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/zeroclaw-channels/src/mattermost.rs"},"region":{"startLine":1466}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ca82ceea8d47d7cf6020fd686b6705a136eab1ad45896aecb9504f5c8df3b90"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CronAddTool.execute: MethodTooLong \u2014 execute 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/zeroclaw-runtime/src/tools/cron_add.rs"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"e53b15fd61e97abde60ca0d4c1b1134f31505f8b830921af11aa9a2e82bd824d"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: WeChatChannel: TooManyMethods \u2014 50 methods. The bar is 30 methods; this is 20 over it, 1.67\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/zeroclaw-channels/src/wechat.rs"},"region":{"startLine":714}}}],"partialFingerprints":{"codehealthFindingId/v1":"751f68d2d22311f609ee12c14b3b28739b306f94db9ed2a37f48d3744c4136fe"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_log::observer_bridge::project: FunctionTooLong \u2014 zeroclaw_log::observer_bridge::project 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/zeroclaw-log/src/observer_bridge.rs"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0461ce0fe871beeb97d2b5ab8d8b05b473b009b70a2d670c33bb23539d1392b"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: GeminiModelProvider: ClassTooLong \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), 24 methods, 5 blocks, lines 22-1607. The bar is 400 significant lines; this is 263 over it, 1.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/zeroclaw-providers/src/gemini.rs"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"5aa0cd5b22e90f5d9e958779b0138c0216d01b06078e3efe1816e525988e6ed4"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zerorelay::handle_client: FunctionTooLong \u2014 zerorelay::handle_client 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":"apps/zerorelay/src/lib.rs"},"region":{"startLine":1607}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef54a49224fd93f65fa2149427a632c1652bae259cecb0039e8353eb3a45bc8c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: LogObserver.record_event: MethodTooLong \u2014 record_event 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/zeroclaw-runtime/src/observability/log.rs"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"2260547d816ef7c40cadd32d37d0ba6a24c8a2703ea8a9ee47590cec3c0ce95c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/mcp_client.rs: FileTooLong \u2014 818 significant 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 318 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/zeroclaw-tools/src/mcp_client.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"baf8794b220a22261114d47f34bd66cab566085ef115fd2aca4d5825467dc9b5"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: SecurityPolicy: TooManyMethods \u2014 49 methods. The bar is 30 methods; this is 19 over it, 1.63\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/zeroclaw-config/src/policy.rs"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"87230347bce76bb7d4d6685fce55b7470f2bbf3fe6a49e5722bb0ce39d62ee7e"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: PluginHost: TooManyMethods \u2014 49 methods. The bar is 30 methods; this is 19 over it, 1.63\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/zeroclaw-plugins/src/host.rs"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"899ed43078509f6e4d3db581f135aba43b584659bf1dd210212e2239bdece6bf"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: GitOperationsTool: TooManyMethods \u2014 49 methods. The bar is 30 methods; this is 19 over it, 1.63\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/zeroclaw-tools/src/git_operations.rs"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"345ff17c31d5291164a7c9cde21968e9950b22267cc4b78d4196d124cc70d62e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/api_sections.rs: FileTooLong \u2014 816 significant 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 316 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/zeroclaw-gateway/src/api_sections.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ea6e54fbb9ab099f3ffe60b7499a4ff8a6624b342c6583df18d469dc0ebc78e"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ProjectedGroup.entries_to_messages: MethodTooLong \u2014 entries_to_messages 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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":3263}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0188f62e66c166b0fa071ef20f2369549b1ccdb68f336072909f4a720299505"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SpawnSubagentTool.execute: MethodTooLong \u2014 execute 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/zeroclaw-runtime/src/tools/spawn_subagent.rs"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"b51395a2d5a6afadc12b9379c32cd29401d50de641c77ac04dbdf68e5d623365"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: WeComWsChannel.handle_msg_callback: MethodTooLong \u2014 handle_msg_callback 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/zeroclaw-channels/src/wecom_ws.rs"},"region":{"startLine":653}}}],"partialFingerprints":{"codehealthFindingId/v1":"668d2c7fec7e64090483556853bd78bb88ee6bcb62772471ab387f0bd444b22c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: BroadcastObserver.record_event: MethodTooLong \u2014 record_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/zeroclaw-runtime/src/observability/broadcast.rs"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7e77fab5826316ee38e2080734bc8a938300e19cc49703c32ab0e88e528e329"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RpcDispatcher.dispatch_method: MethodTooLong \u2014 dispatch_method 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":3391}}}],"partialFingerprints":{"codehealthFindingId/v1":"67dcb16a6d62fdded1c23f4e4a8828bdbab160d8e51f68760ada898adf32f84f"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_config::schema::v2::synthesize_agent_brains: FunctionTooLong \u2014 zeroclaw_config::schema::v2::synthesize_agent_brains 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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":1982}}}],"partialFingerprints":{"codehealthFindingId/v1":"5669c667bc673306b69e4ef6410d87650da41c86862f66de36233693980a0628"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: rpc/local.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/zeroclaw-runtime/src/rpc/local.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3dd7b1112b734cde39bef7f31a2f661543bf7043a7dfa0fd1dd5a6cd587d1a3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/alias_refs.rs: FileTooLong \u2014 802 significant 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 302 over it, 1.60\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/zeroclaw-config/src/alias_refs.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5b0430daef95f30434b6bf9bb812fdd46bc1fc39c83de125bf0449d3a6af1c9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/chat_core.rs: FileTooLong \u2014 800 significant 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 300 over it, 1.60\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/zeroclaw-gateway/src/chat_core.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcfb6f9716b09c57bf6cad0864108e30a4de0655329f955a0ae717585028c998"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw::sop_admin_request: FunctionTooLong \u2014 zeroclaw::sop_admin_request 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":"src/main.rs"},"region":{"startLine":14580}}}],"partialFingerprints":{"codehealthFindingId/v1":"c13861d91803d5fc471bf2997c3f75d8f47dd19646729dc65884ebcf0194c88e"}},{"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). The bar is 500 significant lines; this is 299 over it, 1.60\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/zeroclaw-memory/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d708a5b2bfbde165db6e412db722cd9eb04b614649fb49c62255c1d278330466"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: control_plane/task_store_sqlite.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). The bar is 500 significant lines; this is 299 over it, 1.60\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/zeroclaw-runtime/src/control_plane/task_store_sqlite.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"53083670b53a1b93ca6fb28793873388c4d80b87f95479009b8acff72c8978f1"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RpcDispatcher.handle_session_kill: MethodTooLong \u2014 handle_session_kill 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":5760}}}],"partialFingerprints":{"codehealthFindingId/v1":"88e48f3149c909c6497db4a1baf5252c76c1e9044d603d595dfd21d7e339af40"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: PollTool.execute: MethodTooLong \u2014 execute 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/zeroclaw-tools/src/poll.rs"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"572423675f04147aa686a60aa7cf27b9f8187d982e7d14b0fef53bf25919a47a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SopEngine.advance_current_step: MethodTooLong \u2014 advance_current_step 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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":2573}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed67a11cc1068924cc9c1d7af9b97370423d97821d821cbf11edcd1c96d200c0"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFunctions: zerocode::theme: TooManyFunctions \u2014 47 free functions. The bar is 30 free functions; this is 17 over it, 1.57\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":"apps/zerocode/src/theme.rs"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4cbfe986f8738f96434b5f9b9da72125fb3b2e6115b866f2d0dba1f8c737d52"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AgentBuilder: TooManyMethods \u2014 47 methods. The bar is 30 methods; this is 17 over it, 1.57\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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":852}}}],"partialFingerprints":{"codehealthFindingId/v1":"431b78f7797277355788c05e1b98fd2bf668e6781a7f01e740061c7c9becc443"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ScopedToolRegistry: ClassTooLong \u2014 625 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 10 methods, 3 blocks, lines 396-1614. The bar is 400 significant lines; this is 225 over it, 1.56\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/zeroclaw-runtime/src/tools/scoped.rs"},"region":{"startLine":385}}}],"partialFingerprints":{"codehealthFindingId/v1":"11e6482d22faa0e7b1d9eab290dd23a7aa234d40a2771d97ea263bb8ded66afa"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/openrouter.rs: FileTooLong \u2014 775 significant 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 275 over it, 1.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":"crates/zeroclaw-providers/src/openrouter.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e1b779f76555360ef6a924cbdbe9320f193aafb45e06eba096486c2a6e53b0e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/email_channel.rs: FileTooLong \u2014 774 significant 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: EmailChannel (4 blocks, 43-1110). The bar is 500 significant lines; this is 274 over it, 1.55\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/zeroclaw-channels/src/email_channel.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"22018be053a7f14ad2337b021f5f22881d053c7ffb3fee3b84dd21128b8c038b"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: BedrockModelProvider: ClassTooLong \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), 25 methods, 4 blocks, lines 726-1844. The bar is 400 significant lines; this is 218 over it, 1.55\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/zeroclaw-providers/src/bedrock.rs"},"region":{"startLine":726}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae49d2ea4ef67274c0418c837b8c8b6b685ada8e3ed00a8703397a4a161ad3a7"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: AgentBuilder: TooManyFields \u2014 46 stored fields beside 47 methods. The bar is 30 stored fields; this is 16 over it, 1.53\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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":852}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d634f04480884df4a5fe331bd1dcc54b6047b67ec874e31a0d0822c1068effb"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: ChannelsConfig: TooManyFields \u2014 46 stored fields beside 6 methods. The bar is 30 stored fields; this is 16 over it, 1.53\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/zeroclaw-config/src/schema.rs"},"region":{"startLine":16310}}}],"partialFingerprints":{"codehealthFindingId/v1":"f38d98edcb82da4690318668b571329ebd4ea6d22d07fc36f075080e6ae0e4a5"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ScheduleTool.handle_create_like: MethodTooLong \u2014 handle_create_like 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/zeroclaw-runtime/src/tools/schedule.rs"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2ce629d419f8d40a52d7cf752bc7eed777ebef121854d2027517a24c54f05f3"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_config::schema::v2::fold_providers_globals_into_models: FunctionTooLong \u2014 zeroclaw_config::schema::v2::fold_providers_globals_into_models 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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":1285}}}],"partialFingerprints":{"codehealthFindingId/v1":"3533a035077b420c409227f6beb4166386de52b39fb00591042423b9f60b3a8a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: OtelObserver.new: MethodTooLong \u2014 new 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/zeroclaw-runtime/src/observability/otel.rs"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e205a1eca16b13878460566bf4b4c3f4b2a80f91b49b98509f55c7d6e58926e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/content_search.rs: FileTooLong \u2014 756 significant 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 256 over it, 1.51\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/zeroclaw-tools/src/content_search.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0def96e7d06b4ed143ae4ba95868768674e32e3a23211bb195380bf6701f6696"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Chat.relay_turn: MethodTooLong \u2014 relay_turn 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/zeroclaw-gateway/src/chat_core.rs"},"region":{"startLine":564}}}],"partialFingerprints":{"codehealthFindingId/v1":"be8d0c0e412b4d7d2fc81f1cca087a205758b4aa195ebc67d86461b0b7090130"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SopAdvanceTool.execute: MethodTooLong \u2014 execute 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/zeroclaw-runtime/src/tools/sop_advance.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c89eab03aa6cf1957a742b42622289e78638366d2c92a463763c2f5170faece"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: JiraTool.list_projects: MethodTooLong \u2014 list_projects 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/zeroclaw-tools/src/jira_tool.rs"},"region":{"startLine":402}}}],"partialFingerprints":{"codehealthFindingId/v1":"37cbd1e2f7761b8e3fb0131bdb599168b26c6174efbb5a76df5da48c9987e00a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/tts.rs: FileTooLong \u2014 754 significant 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 254 over it, 1.51\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/zeroclaw-channels/src/tts.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c7aea3fcbdcf6e8d0b60bfac67ade74c1601e1b72bb3a87e1063abc3f649bf0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/grok_cli.rs: FileTooLong \u2014 752 significant 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 252 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/zeroclaw-providers/src/grok_cli.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cbe0b72076bb31a899c8e39b689ddc63d0d3ac291d979d4152e5ea404272a19"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Acp: TooManyMethods \u2014 45 methods. The bar is 30 methods; this is 15 over it, 1.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":"apps/zerocode/src/acp.rs"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"e167d01afccc2d966c8c4f3672eb302e741953f393643c86f5c646f3b753baaf"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/line.rs: FileTooLong \u2014 750 significant 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 250 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/zeroclaw-channels/src/line.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b04a18993971b938886270b2aee9f89928ba16f57fce798123ede15cc8ad0f50"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RpcDispatcher.handle_session_delete: MethodTooLong \u2014 handle_session_delete 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":9250}}}],"partialFingerprints":{"codehealthFindingId/v1":"34f6aca68c7b60ed6cea001b80676a402bd2137b614b0e251f04c804ff73cf8d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/reader.rs: FileTooLong \u2014 747 significant 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 247 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/zeroclaw-log/src/reader.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a227a9425a39398e0108157c83a58fe503e4f7a64b481c22e95156561cbd5bf"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::skills::review::maybe_run_skill_review: FunctionTooLong \u2014 zeroclaw_runtime::skills::review::maybe_run_skill_review 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/zeroclaw-runtime/src/skills/review.rs"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb44be1900318c322465cfa15100036cd083076b807b54e4fe269934cf9c1d42"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: alias_cli/mod.rs: FileTooLong \u2014 737 significant 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 237 over it, 1.47\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/alias_cli/mod.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"81399f709139d1514b425683cc8430f734c3f45c21b5412f0046604ec01236f5"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: WasmChannel: 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), 15 methods, 4 blocks, lines 45-1636. 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/zeroclaw-plugins/src/wasm_channel.rs"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"4524d02bf2c4ef9947c34a06c325e34378dc49e98eee1951e315ec91c38a877c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AnthropicModelProvider.convert_messages: MethodTooLong \u2014 convert_messages 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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":1407}}}],"partialFingerprints":{"codehealthFindingId/v1":"91c6dbdaa273c539d3e77aacfe1482103d4de1e52d372b3ad517887d33eae877"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ClaudeCodeTool.execute: MethodTooLong \u2014 execute 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/zeroclaw-tools/src/claude_code.rs"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fa447e463dab10aa9e1932e8d9bf994d123f26b4ca02f4b5523d51d828c697a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ClaudeCodeRunnerTool.execute: MethodTooLong \u2014 execute 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/zeroclaw-tools/src/claude_code_runner.rs"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cdc61bf8cc8c93703865ea23e27ec30b4f2e6149421a1ef11af2ec2012f2784"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: WebSearchTool: TooManyMethods \u2014 44 methods. The bar is 30 methods; 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/zeroclaw-tools/src/web_search_tool.rs"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"28304162a8a1acb5bdb220760c7fba5587ad11eee0e241c8acc807450a917c54"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: AppState: TooManyFields \u2014 44 stored fields beside 2 methods. 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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":716}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c828ba2e2a5aa2bce912a80b7b22d29853fc73d5e2e27242106cb61d2e834d4"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ComposioTool: ClassTooLong \u2014 586 significant 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, 3 blocks, lines 27-855. The bar is 400 significant lines; this is 186 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/zeroclaw-tools/src/composio.rs"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef140b6628321def399e09f467686276d7cabf8ea2872d856cfda93021cb877f"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_gateway::api_config::handle_migrate: FunctionTooLong \u2014 zeroclaw_gateway::api_config::handle_migrate 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/zeroclaw-gateway/src/api_config.rs"},"region":{"startLine":2985}}}],"partialFingerprints":{"codehealthFindingId/v1":"15fad320998e37b659b923fc8397c6a4a13fd894d28b74ace05edf11ad12520b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SubprocessTool.execute: MethodTooLong \u2014 execute 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/zeroclaw-hardware/src/subprocess.rs"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"85e5e0ec4a3fe043155029f23d4fa3fe8cb65fe5aaa3b4bc21cb2f0d294fa36c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SqliteMemory.init_schema: MethodTooLong \u2014 init_schema 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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1c7e724220d56dd72dc54a6fa3b7e77401e5c8ae898b6f24ee7772afcac3596"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_providers::multimodal::prepare_messages_inner: FunctionTooLong \u2014 zeroclaw_providers::multimodal::prepare_messages_inner 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/zeroclaw-providers/src/multimodal.rs"},"region":{"startLine":1893}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd286529a48818ff757b67ef212e52d79661fb2938ff601148978fb745c5b444"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RpcDispatcher.prepare_live_sessions_refresh: MethodTooLong \u2014 prepare_live_sessions_refresh 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":10373}}}],"partialFingerprints":{"codehealthFindingId/v1":"72c8aeb5bf0ea3236116caeaecb30b23072020ccbaaf5d3d315a15aa99d61d1d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/git_forge.rs: FileTooLong \u2014 729 significant 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 229 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/zeroclaw-tools/src/git_forge.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a845b75bf1ad91181e6b9ce7395b2bbaa3a7d693ed01a3813a95d02f733a84e5"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SendViaTool.execute: MethodTooLong \u2014 execute 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/zeroclaw-tools/src/send_via.rs"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"640b2baaebe098adf422f08afcfeb43e826e4de8a914b8b2b6efd7d4e9d9fcb4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/api_sop_author.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). 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/zeroclaw-gateway/src/api_sop_author.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"973b362b046b572ffa0c5ceb017c57dd6c68288c782c927fc551e1408746575a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: mdbook/peer_groups.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 35 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":"xtask/src/cmd/mdbook/peer_groups.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f3004e208a93c6301cafc3e5eff25188fc0f08393464147179936ac23dc47bc"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: XaiFlow.login: MethodTooLong \u2014 login 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/zeroclaw-providers/src/auth/mod.rs"},"region":{"startLine":1609}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b686f14557046f3e12f22b65b4a6296938c2c6a966e31ab972a84c8e2b14665"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: OpenAiCompatibleModelProvider.convert_messages_for_native: MethodTooLong \u2014 convert_messages_for_native 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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":3489}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a513e4de30613d3adb6f288d5ad438fba7c0f54ed9a269cb13aaf312fa99da0"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: SqliteMemory: TooManyMethods \u2014 43 methods. The bar is 30 methods; this is 13 over it, 1.43\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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b598801e6eb09905315d4bade3579d1e667c846968aa457f4ba49a636ccb6ff"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: KnowledgeTool: ClassTooLong \u2014 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), 13 methods, 4 blocks, lines 30-792. The bar is 400 significant lines; this is 172 over it, 1.43\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/zeroclaw-tools/src/knowledge_tool.rs"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"694e4145206e7b11bb8b19b4c7ea9a318a59f5e533ddae90fb915c15bf7e5608"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zerocode::dashboard::overview_status_lines: FunctionTooLong \u2014 zerocode::dashboard::overview_status_lines 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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":3091}}}],"partialFingerprints":{"codehealthFindingId/v1":"5814fe1f4bdb7b88030c843c99ae016ac7e2eaaba19f4c1920c574240bbb3bfd"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::agent_lifecycle::cascade_owned_state: FunctionTooLong \u2014 zeroclaw_runtime::agent_lifecycle::cascade_owned_state 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/zeroclaw-runtime/src/agent_lifecycle.rs"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"43c4873e5c27860520314555d2abd59289316d4076429ca0f6936b8dc6d36e0a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: FileReadTool.read_path: MethodTooLong \u2014 read_path 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/zeroclaw-runtime/src/tools/file_read.rs"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8a1708e2a320094df4f893ddeefd6c65349caa8314a8af81e167c1e4be3271f"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: OllamaModelProvider: ClassTooLong \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), 20 methods, 4 blocks, lines 73-1011. The bar is 400 significant lines; this is 171 over it, 1.43\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/zeroclaw-providers/src/ollama.rs"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cb101f8a517c1aab9414ee15652024fa1f2bec50cbf6e4676add70164a3fe08"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::agent::turn::assemble_owned_execution_with_capabilities: FunctionTooLong \u2014 zeroclaw_runtime::agent::turn::assemble_owned_execution_with_capabilities 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/zeroclaw-runtime/src/agent/turn/mod.rs"},"region":{"startLine":4089}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e9bc92ada34578466d476e04c0fc0258ba663a33f3663a084e4afd0d153565b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: FileUploadTool.execute: MethodTooLong \u2014 execute 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/zeroclaw-tools/src/file_upload.rs"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"eedfb13aa53f4338cb574a57344e0eaf6af4630eb27536169f4723ff14ee835d"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw::channel_instance_readiness_lines_with_admission: FunctionTooLong \u2014 zeroclaw::channel_instance_readiness_lines_with_admission 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":"src/main.rs"},"region":{"startLine":4769}}}],"partialFingerprints":{"codehealthFindingId/v1":"23d04221d4bc0171d677ac0fb4343acf9bcc172c3903e6dc30d93724f5bc21b2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/egress.rs: FileTooLong \u2014 709 significant 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 209 over it, 1.42\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/zeroclaw-plugins/src/egress.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a62b2ec0c60f015de1169ec40c35ae3990b2728ce19c5f3ced6c9237b93bee9"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DingTalkChannel.listen: MethodTooLong \u2014 listen 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/zeroclaw-channels/src/dingtalk.rs"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"97f4b4eb51f4dde65ffb4e8a71c481dfd043e464fdb86ca0402ac7cb29b5eb8e"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_hardware::wizard::run_setup: FunctionTooLong \u2014 zeroclaw_hardware::wizard::run_setup 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/zeroclaw-hardware/src/wizard.rs"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"fae707a5cf7846f2c70ae877163067949fbc0cf37d54fa7c4df09a897c91daf5"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_memory::consolidation::consolidate_turn: FunctionTooLong \u2014 zeroclaw_memory::consolidation::consolidate_turn 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/zeroclaw-memory/src/consolidation.rs"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a78e21257501f3c0c4689018377224450da55aa45369edb9ff23817aa873957"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: LinkedInClient: ClassTooLong \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), 17 methods, 2 blocks, lines 13-815. The bar is 400 significant lines; this is 162 over it, 1.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/zeroclaw-tools/src/linkedin_client.rs"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf203b3bd74dc390b03ced3dbd283da3e53a15ae5c0d356127aabb474568a777"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::agent::turn::vision_route::resolve_vision_provider_with_allowed_refs: FunctionTooLong \u2014 zeroclaw_runtime::agent::turn::vision_route::resolve_vision_provider_with_allowed_refs 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/zeroclaw-runtime/src/agent/turn/vision_route.rs"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3bff0437d27f65ae0496c498f4732dc135c7c6cb18d410b015383eb1dedde09"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: PrometheusObserver.new: MethodTooLong \u2014 new 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/zeroclaw-runtime/src/observability/prometheus.rs"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e089b241323a465e45d244ccccc9b08c1bf272e99a4194b3ab1b8857723e8d1"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ShellTool.execute: MethodTooLong \u2014 execute 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/zeroclaw-runtime/src/tools/shell.rs"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bc7b23b8b9d782dbd296afb4a6a46b52f73fe027e65f95e61926c084a6a594e"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: PostgresMemory: ClassTooLong \u2014 556 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 9 methods, 4 blocks, lines 55-853. The bar is 400 significant lines; this is 156 over it, 1.39\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/zeroclaw-memory/src/postgres.rs"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba359d3ece87b2244834b4c4857b7cbea121b2bc1401207b07a10fa5ea738334"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/sessions.rs: FileTooLong \u2014 695 significant 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 195 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/zeroclaw-tools/src/sessions.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"498cdf8068c0b0bd492ea848b50ee1ed6438f05a24d43c88f1f0b42276cdcc3e"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SignalChannel.listen: MethodTooLong \u2014 listen 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/zeroclaw-channels/src/signal.rs"},"region":{"startLine":1248}}}],"partialFingerprints":{"codehealthFindingId/v1":"13348bbf6408147cd0718774b7329e132f6b5941682300cd92a2b228a108bf96"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: WeComWsChannel.listen: MethodTooLong \u2014 listen 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/zeroclaw-channels/src/wecom_ws.rs"},"region":{"startLine":1548}}}],"partialFingerprints":{"codehealthFindingId/v1":"238536c7deb68b613a912eeeec1850fa7aaba20014397bb33aeb4743608b17ab"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::identity::aieos_to_system_prompt: FunctionTooLong \u2014 zeroclaw_runtime::identity::aieos_to_system_prompt 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/zeroclaw-runtime/src/identity.rs"},"region":{"startLine":719}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0361bba4265653376f19158c980d17ade53ebfeef4b6fde1d897dc40ffe5c9b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SopEngine.execute_forge_comment_step: MethodTooLong \u2014 execute_forge_comment_step 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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":5396}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5aa6401d047975e19414a559e20a9e7ae244f1b2841253e2f4701c7520ed688"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw::alias_cli::export::report: FunctionTooLong \u2014 zeroclaw::alias_cli::export::report 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":"src/alias_cli/export.rs"},"region":{"startLine":1394}}}],"partialFingerprints":{"codehealthFindingId/v1":"28cf1904bc1cd6551ff60026a33204e11464eef1e1764f970b332618cf8edae1"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: TwitterChannel.listen: MethodTooLong \u2014 listen 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/zeroclaw-channels/src/twitter.rs"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6ca4db26df2a868999c27d2a24cff8e44a8f3709df49b08994f6477bfecef3d"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_gateway::api_oidc_enroll::handle_certificate: FunctionTooLong \u2014 zeroclaw_gateway::api_oidc_enroll::handle_certificate 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/zeroclaw-gateway/src/api_oidc_enroll.rs"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8bad919860bfb87abe59161074a34f877d50006823022134073b39e1a22eb4e"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AcpSessionStore.load_message_page: MethodTooLong \u2014 load_message_page 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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":911}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5a081e2847b721f868e9875765d089a084769491381519564935af21a24aa97"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: SqliteRunStore: ClassTooLong \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), 4 methods, 3 blocks, lines 118-829. The bar is 400 significant lines; this is 150 over it, 1.38\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/zeroclaw-runtime/src/sop/store/sqlite.rs"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f53655668c86c96a2d986ba5ed067967ca82e7a7af3cd29f034e4bd1d9f6df6"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_channels::orchestrator::acp_server::notification_for_turn_event_titled: FunctionTooLong \u2014 zeroclaw_channels::orchestrator::acp_server::notification_for_turn_event_titled 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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":3534}}}],"partialFingerprints":{"codehealthFindingId/v1":"e65bf370e71836365bbad56806a905ada885f6fc9217b8f71e6fea06c0afa100"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: V1Config.migrate: MethodTooLong \u2014 migrate 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/zeroclaw-config/src/schema/v1.rs"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbe2322b35bcc32e3e091c96803a20853e12aa76868752d400f8b1069441f391"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: CostTracker: TooManyMethods \u2014 41 methods. The bar is 30 methods; this is 11 over it, 1.37\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/zeroclaw-config/src/cost/tracker.rs"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"427715ec9a9ce8d41b3ad5673199ab5f0de88a58947ad0f8bbcdc11b488497a1"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: WeComWsChannel.download_and_store_attachment: MethodTooLong \u2014 download_and_store_attachment runs 136 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 36 over it, 1.36\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/wecom_ws.rs"},"region":{"startLine":1277}}}],"partialFingerprints":{"codehealthFindingId/v1":"0757c2cbd354c45ccadf4f518ff294bb84afd0c581247edfed6a70ec87898bc4"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AgentSidebar.draw_session_rows: MethodTooLong \u2014 draw_session_rows 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":"apps/zerocode/src/agent_sidebar.rs"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"f637e60c9461239c109a2998b82859b2f956c5ad5d80f3761f905efa2ae6c694"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SopPane.render_canvas: MethodTooLong \u2014 render_canvas 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":"apps/zerocode/src/sop_pane.rs"},"region":{"startLine":1796}}}],"partialFingerprints":{"codehealthFindingId/v1":"235d2e85b8463c9d444cd290a506ca199b7b8c905d7a1d98623740eddb98e8ba"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RpcDispatcher.handle_config_alias_rename: MethodTooLong \u2014 handle_config_alias_rename 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":11161}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc7eef7d3bc57cdc252953686292513616680dfc9ce96c1c2fc588be4535c41b"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::rpc::local::run_local_listener_with_factory_and_limits: FunctionTooLong \u2014 zeroclaw_runtime::rpc::local::run_local_listener_with_factory_and_limits 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/zeroclaw-runtime/src/rpc/local.rs"},"region":{"startLine":636}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6aa743fbdb19ba8368e067cc9133111219e4be8b4b4f80588479e9323f0df1a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/component_websocket.rs: FileTooLong \u2014 674 significant 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 174 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":"crates/zeroclaw-plugins/src/component_websocket.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ebcbc776783d73c5dc404b66f360f864582f2b9cfc908c237a451b279de4b12"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.bottom_hint: MethodTooLong \u2014 bottom_hint 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":980}}}],"partialFingerprints":{"codehealthFindingId/v1":"5647039e53ab3a9f4627c647c456dea54ccd902fa56e4868c71362006742eadd"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Dashboard.draw_cron_detail: MethodTooLong \u2014 draw_cron_detail 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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":1694}}}],"partialFingerprints":{"codehealthFindingId/v1":"94defc8a43ed33648b4706e988624693ef2413b6de10e0e58fef64b75e4c4aa4"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: NostrChannel.listen: MethodTooLong \u2014 listen 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/zeroclaw-channels/src/nostr.rs"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"60fcef5a3965b75cd218f86523f8271479b6caf3f0a639bb09e0e22576f609df"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SopGraph.from_sop_with_specs: MethodTooLong \u2014 from_sop_with_specs 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/zeroclaw-runtime/src/sop/graph.rs"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d7a5cb5c5dede3d2e12741cc54d84084ef6040ce5ced3f248698b5fc7d2adb6"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw::run_plugin_update: FunctionTooLong \u2014 zeroclaw::run_plugin_update 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":"src/main.rs"},"region":{"startLine":6481}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5177ee0ca85bfc9855dad1f5a7cbe9c52fe6f214c59458242883c765c8a41b8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/model_provider.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). The bar is 500 significant lines; this is 167 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/zeroclaw-api/src/model_provider.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0442673e8952a1c4635a8c5a2aff54f526d165390662f3b13ae7d812e256f754"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFunctions: zeroclaw_channels::matrix::streaming: 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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbfc034b092f5d0ebb0da8710192694761e770f535583d90bbc284de67e7ee6e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/whatsapp.rs: FileTooLong \u2014 666 significant 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 79% of them inside a single declaration: WhatsAppChannel (5 blocks, 249-1143). The bar is 500 significant lines; this is 166 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/zeroclaw-channels/src/whatsapp.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"09ffc81cc73d1dd8bc694b42919690b7cd7290f8cd477856a0cae52ce9ebec69"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/copilot.rs: FileTooLong \u2014 666 significant 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 166 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/zeroclaw-providers/src/copilot.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"11b8683c2d111c3e5cddaf3b8d2ee5ba4d4725e2fe609a50b6da7caa324eecde"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DiscordChannel.send: MethodTooLong \u2014 send 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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":1816}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d40f1ca4abe3083de3284200ecc3b6dec44dbfbf8bfdb7109eda13129936734"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/plugin_runtime.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/zeroclaw-runtime/src/plugin_runtime.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad83e77d40598580b2e5bf7adc2f5f298d5e8f0387716049079758c591683576"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/lib.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). The bar is 500 significant lines; this is 162 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":"src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"07a1dad5908b747bfb241f824bad89a171d16266749f9b9389507378dc4db8a7"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: WeComWsChannel.normalize_message: MethodTooLong \u2014 normalize_message 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/zeroclaw-channels/src/wecom_ws.rs"},"region":{"startLine":1099}}}],"partialFingerprints":{"codehealthFindingId/v1":"92adf118531b8fdfff985602c499528b2a4e98dd111035af86abaa0d8aebf7c8"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_gateway::api_oidc::finish_pkce_callback: FunctionTooLong \u2014 zeroclaw_gateway::api_oidc::finish_pkce_callback 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/zeroclaw-gateway/src/api_oidc.rs"},"region":{"startLine":1458}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9f361e6e0326de095e3859496983319359a9aa531691ec8da048bdda418fd43"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RpcDispatcher.handle_session_close_bound: MethodTooLong \u2014 handle_session_close_bound 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":5579}}}],"partialFingerprints":{"codehealthFindingId/v1":"aff24503bcb7b0584f5a8e1d7b6f2c2e1906e1038be948683874a6ef4b63459b"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: A2aHttpClient: ClassTooLong \u2014 527 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 17 methods, 3 blocks, lines 64-1677. The bar is 400 significant lines; this is 127 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/zeroclaw-tools/src/a2a_client.rs"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"f739b57bab0557d0f5cb57858fb84206b598aa009b77eb1d9dab1f0a91c93b5e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: sop/types.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/zeroclaw-runtime/src/sop/types.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"df165fe4eaa85f9add2ce888005b2e2ae8e87daf48730bf5946b6318759ee855"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: Microsoft365Tool: ClassTooLong \u2014 526 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 14 methods, 3 blocks, lines 21-696. The bar is 400 significant lines; this is 126 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/zeroclaw-tools/src/microsoft365/mod.rs"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ecb2ab559466a6bee200cfb097155b186f10ce556b5f80b07cefd616f57fc9a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: discord/markers.rs: FileTooLong \u2014 656 significant 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 156 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/zeroclaw-channels/src/discord/markers.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8e4fe28bc2136cde180f2c3eaa98452488a4a036a4b72ffe8c942a720d64787"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: WhatsAppChannel: ClassTooLong \u2014 524 significant 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 249-1143. The bar is 400 significant lines; this is 124 over it, 1.31\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/zeroclaw-channels/src/whatsapp.rs"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1fa309f9f3ab31a8c76d9d79965de74efd7a8976ebfe060787fbbf64e432849"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DatasheetTool.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/zeroclaw-hardware/src/datasheet.rs"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e87469bee89494097c7ca1de9e9fe05275a3ffc311ce1fd55b19a3cd98bdd0e"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::cron::scheduler::run_agent_job_inner: FunctionTooLong \u2014 zeroclaw_runtime::cron::scheduler::run_agent_job_inner 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/zeroclaw-runtime/src/cron/scheduler.rs"},"region":{"startLine":1177}}}],"partialFingerprints":{"codehealthFindingId/v1":"478c565f9251b1dd1f709e863d2e9edf8f1a84e8623aa46e4fc6db87834499fe"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AskUserTool.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/zeroclaw-tools/src/ask_user.rs"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"65339cbb925254146ff26fb0d34fcc27fa721a89b1bcf2019fd571a5c0a6d7f8"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: BackupTool: ClassTooLong \u2014 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), 12 methods, 3 blocks, lines 20-703. The bar is 400 significant lines; this is 123 over it, 1.31\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/zeroclaw-tools/src/backup_tool.rs"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"33661800c8be4bd5f12dcfd9276ce63f684ea11520f047fea7e9ce5deaf311d9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/enroll.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), declaring 43 free functions. 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":"apps/zerocode/src/enroll.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4aff535ef758cc2feee24ae37c2bc800c047e2afa195f65a0f95e43e51d9a677"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zerorelay::main: FunctionTooLong \u2014 zerorelay::main 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":"apps/zerorelay/src/main.rs"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"75797152879d3ed13952b6976db84ad8162d1c67a5350c3e246c2f943bd429f6"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: WeComWsChannel.materialize_quote_attachments: MethodTooLong \u2014 materialize_quote_attachments 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/zeroclaw-channels/src/wecom_ws.rs"},"region":{"startLine":933}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cfab8b82b9f77d89e6e3d76966bef00b57048472d0677f611f4af1b8881ae3d"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_config::schema::v2::normalize_provider_type: FunctionTooLong \u2014 zeroclaw_config::schema::v2::normalize_provider_type 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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":619}}}],"partialFingerprints":{"codehealthFindingId/v1":"685bab3364b81dff907d865726956351781eb100adff9d0ef4f258682abd5877"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::agent::loop_::agent_turn_with_sop_reassembly: FunctionTooLong \u2014 zeroclaw_runtime::agent::loop_::agent_turn_with_sop_reassembly 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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":1134}}}],"partialFingerprints":{"codehealthFindingId/v1":"7eddf2437a9eb8d854b74b8c2b7481c5ef3d0e9e76aa709fd9e404314b6a99c9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/ollama.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), about 89% of them inside a single declaration: OllamaModelProvider (4 blocks, 73-1011). The bar is 500 significant lines; this is 141 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/zeroclaw-providers/src/ollama.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"372ad364493e31666a437027406c78bcda40489792fc4fd61866a77a592b710d"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::integrations::show_integration_info: FunctionTooLong \u2014 zeroclaw_runtime::integrations::show_integration_info 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/zeroclaw-runtime/src/integrations/mod.rs"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"df6d7e0e082554402dfaf542680e7e029d21de52557b177016e5c630c9308cb4"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RpcDispatcher.handle_session_configure: MethodTooLong \u2014 handle_session_configure 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":7718}}}],"partialFingerprints":{"codehealthFindingId/v1":"961f797eda9108b66c7825976ab9b36943c796025f4d9d54ae8c9259a669244a"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: NextcloudTalkChannel: ClassTooLong \u2014 509 significant 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, 4 blocks, lines 23-814. The bar is 400 significant lines; this is 109 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/zeroclaw-channels/src/nextcloud_talk.rs"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"64870e3c0da5b8bda58fa119b446065af9dbd999b1b185d11057db10ee71a7ce"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_gateway::api_sop_author::handle_sop_run: FunctionTooLong \u2014 zeroclaw_gateway::api_sop_author::handle_sop_run 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/zeroclaw-gateway/src/api_sop_author.rs"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"961009b1466814c607d38ba0143481a8325633fb460943c4933752daba8df235"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: QuickstartPane: TooManyMethods \u2014 38 methods. The bar is 30 methods; 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":"apps/zerocode/src/quickstart_pane.rs"},"region":{"startLine":1090}}}],"partialFingerprints":{"codehealthFindingId/v1":"676f17d2bc88d011ba035b58d7a6566d9569fc1e3923262c7f5e7bd5e52e3d72"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: MattermostChannel: TooManyMethods \u2014 38 methods. The bar is 30 methods; 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/zeroclaw-channels/src/mattermost.rs"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"f51bd5c5bc9965c3cb44fc7feffd585ee0adee361cf8472eb69f37335fd68c95"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: QQChannel: TooManyMethods \u2014 38 methods. The bar is 30 methods; 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/zeroclaw-channels/src/qq.rs"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9a208d435aed8ead372fe9fcf3f49b10c8ef4458d389a5965dd6c6855dfa08b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: rpc/wss.rs: FileTooLong \u2014 633 significant 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 133 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/zeroclaw-runtime/src/rpc/wss.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f371dca0644d9522f727f3c7511253e86bbe145ab382b333a1196e0721b50218"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/postgres.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), about 88% of them inside a single declaration: PostgresMemory (4 blocks, 55-853). The bar is 500 significant lines; this is 131 over it, 1.26\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/zeroclaw-memory/src/postgres.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"68f3246a70e3e7aeae9bdc0db0a94c13e722a842cb01ffbf3b3705e8397dd9b7"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: HttpRequestTool.execute: MethodTooLong \u2014 execute 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/zeroclaw-tools/src/http_request.rs"},"region":{"startLine":564}}}],"partialFingerprints":{"codehealthFindingId/v1":"65b2c3e3fb01c72218e9288b26351e55cf1b80b8b8108eecfd3948ae4dc3af62"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: store/sqlite.rs: FileTooLong \u2014 629 significant 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 87% of them inside a single declaration: SqliteRunStore (3 blocks, 118-829). The bar is 500 significant lines; this is 129 over it, 1.26\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/zeroclaw-runtime/src/sop/store/sqlite.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b44661dc9acbfde7d677ad5b6d6a106f00648248eec3f14359684949feda1ef6"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DiscordChannel.finalize_draft: MethodTooLong \u2014 finalize_draft 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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":3740}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d875e862cfb155d6fbe492887fea4b68827b4cf89bea39446bc0e9866f1ec5d"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_gateway::a2a::handle_alias_task: FunctionTooLong \u2014 zeroclaw_gateway::a2a::handle_alias_task 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/zeroclaw-gateway/src/a2a.rs"},"region":{"startLine":451}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c67d430e83be31ff4ab8a649edce90dcf2ee6425d2ba0a34e10a660f73cab5c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: PicoFlashTool.execute: MethodTooLong \u2014 execute 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/zeroclaw-hardware/src/pico_flash.rs"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee8b83a1c018053c1ab5de9a25073f284b79f6d919ee5a3097ec080ca409636d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: security/cert_ledger.rs: FileTooLong \u2014 621 significant 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 121 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/zeroclaw-runtime/src/security/cert_ledger.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"00dad6a8266b1811e45aa3632e998612fc824337f7ac145d1c7e7d429e759309"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/channel.rs: FileTooLong \u2014 620 significant 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 120 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/zeroclaw-api/src/channel.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a611cac7befe12af6c4e4b89f914e5c7edd8a3405f0228827fd95383f0e2a565"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/knowledge_tool.rs: FileTooLong \u2014 620 significant 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 92% of them inside a single declaration: KnowledgeTool (4 blocks, 30-792). The bar is 500 significant lines; this is 120 over it, 1.24\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/zeroclaw-tools/src/knowledge_tool.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8aa1e2e8bf18272d0b8067a9bd209b41fdea5ca4ab272c49659c24b5f2c8f750"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: OpenAiCompatibleModelProvider.chat: MethodTooLong \u2014 chat 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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":4607}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2ca7d64a1c7f53080944170d0f45dddca1a3a4a5d249a5d2a8df4d8557b96cd"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::control_plane::task_store_sqlite::goal::migrate_schema: FunctionTooLong \u2014 zeroclaw_runtime::control_plane::task_store_sqlite::goal::migrate_schema 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/zeroclaw-runtime/src/control_plane/task_store_sqlite/goal.rs"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f8271dc322573496f51c22cd046714ea03ba83f1b3e9f3ff0f2a235e65c1193"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: PluginActivationPlan.build: MethodTooLong \u2014 build 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/zeroclaw-runtime/src/plugin_runtime.rs"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"974b1e65ad8df5604740072a6334a9b87e0ac1123286de62cdde239a6adbbab4"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: BackupTool.cmd_restore: MethodTooLong \u2014 cmd_restore 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/zeroclaw-tools/src/backup_tool.rs"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"66facf67c51072c835f5ada10ef0e69fc4e1e99eac345605a6a3379f9ca41b65"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/identity.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/zeroclaw-runtime/src/identity.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a94419fd97493b356dc246bbc83310d5b1d286fc3d2585fd981bafdc28ddceda"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: Logs: TooManyFields \u2014 37 stored fields beside 53 methods. The bar is 30 stored fields; this is 7 over it, 1.23\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":"apps/zerocode/src/logs.rs"},"region":{"startLine":534}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab61456966948c54e9a2908077faec173989448a034f2b0af62eba5d49cdb8f1"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.draw_field_edit: MethodTooLong \u2014 draw_field_edit 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":5711}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8902580b316af46c38d144f5118cdd5ecc2a7d781e941ea3b870c4ae424a6d0"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: WhatsAppChannel.parse_webhook_payload: MethodTooLong \u2014 parse_webhook_payload 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/zeroclaw-channels/src/whatsapp.rs"},"region":{"startLine":464}}}],"partialFingerprints":{"codehealthFindingId/v1":"55c03fc7f6a8b54d29c4d8a07537cd6cafb1e8e2fc410410c50066264ec3052d"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::doctor::update_context_windows: FunctionTooLong \u2014 zeroclaw_runtime::doctor::update_context_windows 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/zeroclaw-runtime/src/doctor/mod.rs"},"region":{"startLine":744}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0e4c7326eed5a9187b4cf599bda4ed92db558ec154566d9ade9217b6b2bbe21"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_tools::embedded_resource::format_mcp_tool_result_for_model: FunctionTooLong \u2014 zeroclaw_tools::embedded_resource::format_mcp_tool_result_for_model 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/zeroclaw-tools/src/embedded_resource.rs"},"region":{"startLine":538}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7cbd1bda799dde1b23bc0dbc70d9d6ddef53f55e7855511938eeb5808b3dcac"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: WasmMemory: ClassTooLong \u2014 488 significant 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, 4 blocks, lines 38-730. The bar is 400 significant lines; this is 88 over it, 1.22\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/zeroclaw-plugins/src/wasm_memory.rs"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5d36e6d51e0f7e4420dc8f0a3b917f1848ce906e700c67ec8bf0677ef374eca"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.draw_field_list: MethodTooLong \u2014 draw_field_list 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":5355}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fae427644a6e3b770621d8707cca3ad18231744582dd0b98eb08c7962a2534d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Dashboard.draw_cost: MethodTooLong \u2014 draw_cost 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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":1452}}}],"partialFingerprints":{"codehealthFindingId/v1":"faa08541be5129378d6d32e3b3ec360de527e6394df977079228621c9db4d567"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ChannelsConfig: ClassTooLong \u2014 487 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 6 methods, 3 blocks, lines 16310-16959. The bar is 400 significant lines; this is 87 over it, 1.22\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/zeroclaw-config/src/schema.rs"},"region":{"startLine":16310}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f298afce4c8e8b20a1f8ef193279796b6a27220002ef24bbade9b312fbf9591"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_providers::compatible::sse_bytes_to_events_for_contract: FunctionTooLong \u2014 zeroclaw_providers::compatible::sse_bytes_to_events_for_contract 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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":2833}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d9b092b36429b40e6ae966608fd5f4365231405b2db904e8274fb9147936fc9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/providers.rs: FileTooLong \u2014 603 significant 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 103 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/zeroclaw-config/src/providers.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b545be1000c46250017fbc332d39841bc9946d6d2e7ebd0d70e12fff33f708a4"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: generate/install_sh.rs: FileTooLong \u2014 602 significant 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 102 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":"xtask/src/generate/install_sh.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8db341d82175f5f10817ef8c865d7f50a911d9f8c4676732fe91f2091dd4921"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DiscordChannel: TooManyMethods \u2014 36 methods. The bar is 30 methods; 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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"306eb452d5c4e8418f1184d5bd7a145e91f4b82f7a68dfe132831c440cd3e913"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: WasmChannel.listen: MethodTooLong \u2014 listen 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/zeroclaw-plugins/src/wasm_channel.rs"},"region":{"startLine":1067}}}],"partialFingerprints":{"codehealthFindingId/v1":"d190af4ec01f1d7e7b472eefb807d6e824cc7d7d3c363432086694c13c305ddf"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/web_fetch.rs: FileTooLong \u2014 597 significant 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: WebFetchTool (3 blocks, 25-590). The bar is 500 significant lines; this is 97 over it, 1.19\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/zeroclaw-tools/src/web_fetch.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bc99ca740dd1015a827f79f4811641fec39e68b2a7377ff3d2a2496d738ddb3"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RpcDispatcher.handle_initialize: MethodTooLong \u2014 handle_initialize 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":3625}}}],"partialFingerprints":{"codehealthFindingId/v1":"825c3cb57095d93d77070d1ee0254460d5b2a2eb9a483f3f67b02a95eb4f50c2"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw::commands::update::run_from: FunctionTooLong \u2014 zeroclaw::commands::update::run_from 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":"src/commands/update.rs"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"59aa4117e3279781670fc70f53889b13fdb9c398b49d5ec4c4a41af941fda554"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RpcClient.spawn_ws_session: MethodTooLong \u2014 spawn_ws_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":"apps/zerocode/src/client.rs"},"region":{"startLine":2010}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bea2ff095ba1874d724bff55dd9752f0e4809e68d7fed0dbec57f30a8377236"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Dashboard.draw_health: MethodTooLong \u2014 draw_health 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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":1287}}}],"partialFingerprints":{"codehealthFindingId/v1":"238a7c51d6c85277e18132620c11f3098282e126c23f33f531e2b76e9a8ac1e7"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::cron::store::update_job_authorized: FunctionTooLong \u2014 zeroclaw_runtime::cron::store::update_job_authorized 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/zeroclaw-runtime/src/cron/store.rs"},"region":{"startLine":786}}}],"partialFingerprints":{"codehealthFindingId/v1":"c052493f3ab9f23623313da8b3b8fba23241545b7c4663fc648e6edb8fb81b4c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/traits.rs: FileTooLong \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). The bar is 500 significant lines; this is 89 over it, 1.18\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/zeroclaw-config/src/traits.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6806db674f3ddb835c62a65ee958db5ee51018e8c2395e6a8ea6a0caddabf15"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/scattered_types.rs: FileTooLong \u2014 586 significant 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 86 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/zeroclaw-config/src/scattered_types.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"42cf67c12323e845125fea4c649422edcc48a609c0da8a4cabb9075d7ae1ef59"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ConversationDock.layout: MethodTooLong \u2014 layout 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":"apps/zerocode/src/app.rs"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bcfdc4df56628048a46242e97014730001fc165b7ecd30b6789b3802f18e842"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: PluginHost.remove_with_report: MethodTooLong \u2014 remove_with_report 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/zeroclaw-plugins/src/host.rs"},"region":{"startLine":774}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fe4e1d25973b81d98d39661f4dfef75d91fba9e888e8f91516d37b194b73c21"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::plugin_runtime::finalize_plugin_webhooks: FunctionTooLong \u2014 zeroclaw_runtime::plugin_runtime::finalize_plugin_webhooks 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/zeroclaw-runtime/src/plugin_runtime.rs"},"region":{"startLine":951}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8c6c56f6db7efe78f51dd2248ab75f9a27ee9578a522049d62b3c59fdbbc5fc"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SopApproveTool.execute: MethodTooLong \u2014 execute 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/zeroclaw-runtime/src/tools/sop_approve.rs"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"b305385dc32edb0151e58a365af93a7686933c8f35a348767cbbba23d2c76246"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: FileEditTool.edit_file: MethodTooLong \u2014 edit_file 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/zeroclaw-tools/src/file_edit.rs"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ce7c30e041a812bfb23aae2411b791dcbcb60bd2da97728f3a6c89137bb6fa6"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: TelegramChannel: TooManyFields \u2014 35 stored fields beside 177 methods. 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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":1101}}}],"partialFingerprints":{"codehealthFindingId/v1":"249b380f5f307eda150dc10d40905a08754588e7d10c543e1d77a64cb36246c8"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: Chat: TooManyFields \u2014 35 stored fields beside 123 methods. 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":"apps/zerocode/src/chat.rs"},"region":{"startLine":519}}}],"partialFingerprints":{"codehealthFindingId/v1":"f694dddf5d243fe4b6c43c66b57f7b143c1f44cc8ffa29be6ab05cae78d704db"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: SopPane: TooManyFields \u2014 35 stored fields beside 64 methods. 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":"apps/zerocode/src/sop_pane.rs"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdebd13eea560cfb2cbd3abc7709c4505d224cf4e1549654049293ac483cca92"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/sockets.rs: FileTooLong \u2014 581 significant 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 81 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/zeroclaw-plugins/src/sockets.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ba2158f8f2f4bb3026e2ed0e8caf7ab2cd6d8ec97c45dfbf269b62d233c5336"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tools/send_message_to_peer.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/zeroclaw-runtime/src/tools/send_message_to_peer.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4580065769489c39cdf9aa04c54446a1349ae248559c74e6d6565042309d7f9"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AcpSessionStore.insert_messages: MethodTooLong \u2014 insert_messages 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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":1665}}}],"partialFingerprints":{"codehealthFindingId/v1":"3056ea963da4d9fc2cd50a33b4595c9b6c891f6d47be0cfb13de43cfbacd9556"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: OpenAiCompatibleModelProvider.stream_chat_with_system: MethodTooLong \u2014 stream_chat_with_system 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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":5035}}}],"partialFingerprints":{"codehealthFindingId/v1":"88b9212b18896988990d7cc7681fff3afe2830b9e17050ac1dcd84d16ffe5236"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/pairing.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/zeroclaw-config/src/pairing.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4edb753f07e9bd42366071177c0668c85e4b1076569954b87bcab48c6677eada"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_config::schema::ws_connect_via_proxy: FunctionTooLong \u2014 zeroclaw_config::schema::ws_connect_via_proxy 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/zeroclaw-config/src/schema.rs"},"region":{"startLine":12549}}}],"partialFingerprints":{"codehealthFindingId/v1":"89e33ba3ed046c2ea018c327e4827494d0ad4b26ac206ac1a6765d953d2ab16a"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_hardware::uf2::flash_uf2: FunctionTooLong \u2014 zeroclaw_hardware::uf2::flash_uf2 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/zeroclaw-hardware/src/uf2.rs"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"be8251682ec261dcba00a0c1916c5ae381d2136074524d971f2d65b5c4f53048"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_providers::list_model_providers: FunctionTooLong \u2014 zeroclaw_providers::list_model_providers 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/zeroclaw-providers/src/lib.rs"},"region":{"startLine":2361}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fe810eed1ff34581bca62537d181b8cb1982108ba22b7d972a161fd1f5471da"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: CronRunTool.execute: MethodTooLong \u2014 execute 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/zeroclaw-runtime/src/tools/cron_run.rs"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c1c129556f3b082a9d9594df0e7f157db4b321733116142b149add89f9aa482"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ModelRoutingConfigTool.parameters_schema: MethodTooLong \u2014 parameters_schema 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/zeroclaw-tools/src/model_routing_config.rs"},"region":{"startLine":1600}}}],"partialFingerprints":{"codehealthFindingId/v1":"e92cddccb131528f5f26f807e59ba5bd269dab6e99067e6afc7fbf81f5a536ab"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw::update_one_plugin: FunctionTooLong \u2014 zeroclaw::update_one_plugin 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":"src/main.rs"},"region":{"startLine":6880}}}],"partialFingerprints":{"codehealthFindingId/v1":"574c4090472e57368789506c690e072dd86791e4456471cbdbd74a649c9c177c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/writer.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), declaring 39 free functions. 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/zeroclaw-log/src/writer.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3092b0d57a4fcbf49fe4db13ed8f8a243d990bcf5a540ce9c75be540a3bf5980"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/wasm_memory.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), about 85% of them inside a single declaration: WasmMemory (4 blocks, 38-730). The bar is 500 significant lines; this is 74 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/zeroclaw-plugins/src/wasm_memory.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d86a8c16c4a2eb293a7fab775727b1b001f2cd3ac86fa5d4d2265bf79bfe51f2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: auth_provider/enrollment.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/zeroclaw-runtime/src/security/auth_provider/enrollment.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"93f91f0e6068b2d0c7702de696cd81205247b0d1684722760c974e82710af7b2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/http_request.rs: FileTooLong \u2014 573 significant 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: HttpRequestTool (3 blocks, 21-754). The bar is 500 significant lines; this is 73 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/zeroclaw-tools/src/http_request.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9d97dd7e92a31913c32686c76c63e39bc2e03557d31ff861ea197f1872eed84"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AgentSidebar: ClassTooLong \u2014 458 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 19 methods, 2 blocks, lines 86-744. The bar is 400 significant lines; this is 58 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":"apps/zerocode/src/agent_sidebar.rs"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"bacaef73177d3d6b890d4611cb93162c885f620d5477b8014182f9c2f6e96958"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: HttpRequestTool: ClassTooLong \u2014 456 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 14 methods, 3 blocks, lines 21-754. The bar is 400 significant lines; this is 56 over it, 1.14\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/zeroclaw-tools/src/http_request.rs"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"7917ce7440ad53d1c792aecfb4304391881c01b28fe37461d59862c667e683ff"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: auth_provider/oidc.rs: FileTooLong \u2014 570 significant 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 70 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/zeroclaw-runtime/src/security/auth_provider/oidc.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3fbf2bc7ec552537181844fcd8930f5a1153714451231c19a7b513ff9dd03f3"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SopPane.editor_lines: MethodTooLong \u2014 editor_lines runs 114 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 14 over it, 1.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":"apps/zerocode/src/sop_pane.rs"},"region":{"startLine":2045}}}],"partialFingerprints":{"codehealthFindingId/v1":"7051b6a4364662983ae945f0f315a37c04092ae16e17d276267ae3991dbafc8e"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ArduinoUploadTool.execute: MethodTooLong \u2014 execute runs 114 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 14 over it, 1.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/zeroclaw-hardware/src/peripherals/arduino_upload.rs"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"6149b4b10df9cefbecbb85285a75875ae2f95be4dc3c5ce8617e1f1ecd888840"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: GitOperationsTool.validate_metadata_closure: MethodTooLong \u2014 validate_metadata_closure runs 114 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 14 over it, 1.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/zeroclaw-tools/src/git_operations.rs"},"region":{"startLine":305}}}],"partialFingerprints":{"codehealthFindingId/v1":"aea2ca38a8ef46fd856f60d083c77af30262994538b494405e8663bbd9266f45"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ImageGenTool.generate: MethodTooLong \u2014 generate runs 114 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 14 over it, 1.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/zeroclaw-tools/src/image_gen.rs"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5714f7bd2ca1e78fd5b57a54bfeb605a2c72d70ae80e6ebcf5c7e8a47ae2167"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw::handle_oidc_command: FunctionTooLong \u2014 zeroclaw::handle_oidc_command runs 114 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 14 over it, 1.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":"src/main.rs"},"region":{"startLine":15409}}}],"partialFingerprints":{"codehealthFindingId/v1":"685e65e46d7add281e8ecacafcd59dd28f46e3289e24421830eb42fed326f051"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw::security_status::print_report: FunctionTooLong \u2014 zeroclaw::security_status::print_report runs 114 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 14 over it, 1.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":"src/security_status.rs"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb086b40a1e81d06bfa3e6ed83a25922cb9f009b0bfe93d883f984eb7b13b799"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: SlackChannel: TooManyFields \u2014 34 stored fields beside 157 methods. The bar is 30 stored fields; this is 4 over it, 1.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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"023056be280d370820edbd859b7cb55971f752b366f4cc536cd6eda2a2c4be7e"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: PairingGuard: TooManyMethods \u2014 34 methods. The bar is 30 methods; 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/zeroclaw-config/src/pairing.rs"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"02e6195f0e63b4e117904bfaa0e5db06d4b2b5925ee07b613c16b72487e08bbc"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zerocode::app::draw_help_modal: FunctionTooLong \u2014 zerocode::app::draw_help_modal 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":"apps/zerocode/src/app.rs"},"region":{"startLine":3478}}}],"partialFingerprints":{"codehealthFindingId/v1":"865731742dd4d5322710e4e17e738399dadc817ec35c7dd9f3c1af7cfd1223c8"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RpcClient.connect: MethodTooLong \u2014 connect 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":"apps/zerocode/src/client.rs"},"region":{"startLine":1732}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1f20c14995b5648aa70603f2d2e2f924dab98979d7e17126645ceb3b6945dd7"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_memory::build_memory_with_storage: FunctionTooLong \u2014 zeroclaw_memory::build_memory_with_storage 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/zeroclaw-memory/src/lib.rs"},"region":{"startLine":651}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e438092bfbeec80f1ee504645d84fe940214b3140188249a436e7930b0c0c3b"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::relay::serve_established: FunctionTooLong \u2014 zeroclaw_runtime::relay::serve_established 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/zeroclaw-runtime/src/relay.rs"},"region":{"startLine":773}}}],"partialFingerprints":{"codehealthFindingId/v1":"89fc14cdfd957173ab803e8a89de189d78990cc8266700b30d0d8490c33630ce"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RpcDispatcher.handle_sops_decide: MethodTooLong \u2014 handle_sops_decide 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":13196}}}],"partialFingerprints":{"codehealthFindingId/v1":"e95b989a59de02f6e94dc80e7f89840c95f3ed5515306aa2fe7eb3fa17029f48"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AgentScopedMemory: ClassTooLong \u2014 448 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 7 methods, 4 blocks, lines 28-676. The bar is 400 significant lines; this is 48 over it, 1.12\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/zeroclaw-memory/src/agent_scoped.rs"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"733c0f71e8e47e2fb6fb0e876ed9553f538724aacdf236caa3bb63e1ec5eea4d"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::daemon::load_heartbeat_session_context: FunctionTooLong \u2014 zeroclaw_runtime::daemon::load_heartbeat_session_context 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/zeroclaw-runtime/src/daemon/mod.rs"},"region":{"startLine":2984}}}],"partialFingerprints":{"codehealthFindingId/v1":"d392520e0cf6b0e35cc58f13c36fd9503a36a1386d307c826b5d3242a2aee26c"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::service::enforce_windows_private_acl: FunctionTooLong \u2014 zeroclaw_runtime::service::enforce_windows_private_acl 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/zeroclaw-runtime/src/service/mod.rs"},"region":{"startLine":475}}}],"partialFingerprints":{"codehealthFindingId/v1":"09879da93a98861d3d53ce825812ff1f7a6d21497f5872a4a4f3a40c81e7a0be"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SopEngine.restore_runs: MethodTooLong \u2014 restore_runs 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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":687}}}],"partialFingerprints":{"codehealthFindingId/v1":"69964dfd34ea71a9e3ab1bf95b2331e6d9f1e06d0d1dcc537be36ecf54aacc7c"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::sop::parse_steps: FunctionTooLong \u2014 zeroclaw_runtime::sop::parse_steps 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/zeroclaw-runtime/src/sop/mod.rs"},"region":{"startLine":1309}}}],"partialFingerprints":{"codehealthFindingId/v1":"c77da948076fcbe0d32eb9fc6b5a49b387aa8c61bc0fd1c66993910892bf9588"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/net_guard.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/zeroclaw-infra/src/net_guard.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd9dff7976beb023d8d27fe7329fe2665189a1a687d04cb18c2e1dd35b71eea8"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zerocode::client::dial_through_relay_unbounded: FunctionTooLong \u2014 zerocode::client::dial_through_relay_unbounded 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":"apps/zerocode/src/client.rs"},"region":{"startLine":1442}}}],"partialFingerprints":{"codehealthFindingId/v1":"745461bd687ca51faf132487300c98c2f00eea1d1db9ae8a6004d86a489eacf4"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::agent::turn::context_recovery::try_recover_context_overflow: FunctionTooLong \u2014 zeroclaw_runtime::agent::turn::context_recovery::try_recover_context_overflow 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/zeroclaw-runtime/src/agent/turn/context_recovery.rs"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fdc23ebdc39cf39ea77097819d9b7b531a4af8f3aac0f1dcd935b8ab59315c3"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::cron::scheduler::run_manual_job_inner: FunctionTooLong \u2014 zeroclaw_runtime::cron::scheduler::run_manual_job_inner 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/zeroclaw-runtime/src/cron/scheduler.rs"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9a996918c67371a8e06d4e33ad93962e9db9c76fe72211d4a722850aff4ec40"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/nextcloud_talk.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), about 92% of them inside a single declaration: NextcloudTalkChannel (4 blocks, 23-814). The bar is 500 significant lines; this is 53 over it, 1.11\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/zeroclaw-channels/src/nextcloud_talk.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f279c4bf717c81b71a676fe91f49896d88702176c9651565a7de8ec3405d924f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/util.rs: FileTooLong \u2014 552 significant 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 52 over it, 1.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/zeroclaw-channels/src/util.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1631a5973e96d4e3461753133c278d9157f7a547107338620b85861d20222c8d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: mdbook/protected.rs: FileTooLong \u2014 552 significant 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 44 free functions. The bar is 500 significant lines; this is 52 over it, 1.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":"xtask/src/cmd/mdbook/protected.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"93b38af99dcb60dffa103079a02ab7f24b97c8f4403d4a5ff845d24656718c68"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ScannedMemory: ClassTooLong \u2014 441 significant 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, 4 blocks, lines 62-669. The bar is 400 significant lines; this is 41 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/zeroclaw-memory/src/scanned.rs"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cd378ff81caa6b6521b8c2863eeccbc932024bb9841fccf3e90c20e129ff5ce"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AuditedMemory: ClassTooLong \u2014 441 significant 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, 4 blocks, lines 42-631. The bar is 400 significant lines; this is 41 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/zeroclaw-memory/src/audit.rs"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cb25abf13ef07ef79fb5ef804b178a8fcd8ed82a873b2b53a9438b4b2b44605"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: ZerocodePane: TooManyFields \u2014 33 stored fields beside 63 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":"apps/zerocode/src/zerocode_pane.rs"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"9626208352907e165e2a1ce8fd7659096c2de28d0091414c3c956c12b73bc783"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ModelRoutingConfigTool: TooManyMethods \u2014 33 methods. The bar is 30 methods; this is 3 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/zeroclaw-tools/src/model_routing_config.rs"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"78e21037c21d994bb62bbf58382c80ae73ee53edac30e8d5fe11c0b1129559ef"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/schema_markdown.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). The bar is 500 significant lines; this is 50 over it, 1.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/zeroclaw-config/src/schema_markdown.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"79d7aad25276f8a4764adb5e156d2568e052fd1472158bbaf052fe46d5d96884"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_gateway::api_config::delete_agent_cascade: FunctionTooLong \u2014 zeroclaw_gateway::api_config::delete_agent_cascade 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/zeroclaw-gateway/src/api_config.rs"},"region":{"startLine":1516}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b82e0699bc3691d87e4704374621702118eb3df53db17796b6947ae1d3ac899"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::agent::turn::results_collect::collect_tool_results: FunctionTooLong \u2014 zeroclaw_runtime::agent::turn::results_collect::collect_tool_results 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/zeroclaw-runtime/src/agent/turn/results_collect.rs"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"2977c12bef7eabed12ba73b36704c4d0664b67737247fbdb0ba836089e4aafb0"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DelegateTool.execute_sync_with_admission_inner: MethodTooLong \u2014 execute_sync_with_admission_inner 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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":3190}}}],"partialFingerprints":{"codehealthFindingId/v1":"b54b62ec3cea52e3aa37ffd02471a5d15a0f700767121f973b0b1250edf44da8"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SopStatusTool.execute: MethodTooLong \u2014 execute 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/zeroclaw-runtime/src/tools/sop_status.rs"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"94b493e81381ff7e86feb889973eb52cbb6a4424e64ddd11e32a50783551836f"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw::security_status::build_report: FunctionTooLong \u2014 zeroclaw::security_status::build_report 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":"src/security_status.rs"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cabc70689203aae50f5f054f8c6630f947e09132a011a6c670f0579f8b69dcb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/api_pairing.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/zeroclaw-gateway/src/api_pairing.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5729196db219da111728e230d55f36e2ebeb9654e3c174f8d9d73565ccd83b29"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.draw_alias_list: MethodTooLong \u2014 draw_alias_list 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":5046}}}],"partialFingerprints":{"codehealthFindingId/v1":"428b2d215a35cc029b28e298fefa248c6cd309053ec50c2af78c3d9fcf517f78"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: InputBarState.render: MethodTooLong \u2014 render 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":"apps/zerocode/src/input_bar.rs"},"region":{"startLine":2240}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8a5f50b1e58c4a9111e487a93dd73b196efd08f9dfd4abae406e232ffb93d14"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: DiscordChannel.update_draft: MethodTooLong \u2014 update_draft 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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":3562}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0e861e8cbe4e5c63d02c0649235166da629ba04fc2088196389cc79578f0368"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_channels::matrix::client::build_attempt: FunctionTooLong \u2014 zeroclaw_channels::matrix::client::build_attempt 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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":1428}}}],"partialFingerprints":{"codehealthFindingId/v1":"38374f564cc569647ed5cc0353289204e38197d97c6d22885ff580670d11c524"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RpcDispatcher.handle_config_set_many: MethodTooLong \u2014 handle_config_set_many 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":10103}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c9d1f10f679ab60aa8497900e60fbcd154c6229f8a05c00e070a85dca5b3921"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::service::install_linux_openrc: FunctionTooLong \u2014 zeroclaw_runtime::service::install_linux_openrc 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/zeroclaw-runtime/src/service/mod.rs"},"region":{"startLine":3122}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3f59184d296f660298165e79e9066c76c937f4a95305e57d6a96f0524a6b51f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: grok_cli/acp.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). 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/zeroclaw-providers/src/grok_cli/acp.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e9f1e154b3cf11b1549bb0c29714d7abc3cdde95fa74971fc46b3319fa9be36"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/main.rs: FileTooLong \u2014 542 significant 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 42 over it, 1.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":"apps/zerorelay/src/main.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e40ec3398ce0c315e35c99dad0be0d3501f7db9b6d03a07e31edfa969a9730c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: agent/tool_execution.rs: FileTooLong \u2014 542 significant 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 42 over it, 1.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/zeroclaw-runtime/src/agent/tool_execution.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b017fbb171d09290ea678a1127f878a19086adab5a1a39a8190f8f9bece70ba"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zerocode::config::load_persisted: FunctionTooLong \u2014 zerocode::config::load_persisted 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":"apps/zerocode/src/config/mod.rs"},"region":{"startLine":919}}}],"partialFingerprints":{"codehealthFindingId/v1":"f39f7f0271e05e61f27a1c4f4d6a78ccc101ae7fda62d7872b87e6737dfdddf7"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MochatChannel.listen: MethodTooLong \u2014 listen 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/zeroclaw-channels/src/mochat.rs"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9643cf9ab24289aea9bbd63f23ccd2b5506d93faac82a0e523cc0c1a6745cf1"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: NextcloudTalkChannel.parse_as2_payload: MethodTooLong \u2014 parse_as2_payload 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/zeroclaw-channels/src/nextcloud_talk.rs"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"edd2b47632cb2a23d53e74ee86860bf88eb6ae33cca7c2e7b94f80994a6360b7"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_gateway::api::handle_api_cron_add: FunctionTooLong \u2014 zeroclaw_gateway::api::handle_api_cron_add 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/zeroclaw-gateway/src/api.rs"},"region":{"startLine":487}}}],"partialFingerprints":{"codehealthFindingId/v1":"60b011bf77dae9694d8ce5551cf0a1127d1cb0f41a70f07f343e1f48eb9259d0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: microsoft365/mod.rs: FileTooLong \u2014 538 significant 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: Microsoft365Tool (3 blocks, 21-696). The bar is 500 significant lines; this is 38 over it, 1.08\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/zeroclaw-tools/src/microsoft365/mod.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1d23c8e3a943afb9466247048a1b827a7fec57001ae611ff4e1cbb51d0b985c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: IMessageChannel.listen: MethodTooLong \u2014 listen runs 107 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 7 over it, 1.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/zeroclaw-channels/src/imessage.rs"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba538042b37a80d11ef208f671cd8583a1a77d117f61096ff032152d9e97d607"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RpcDispatcher.handle_agent_delete: MethodTooLong \u2014 handle_agent_delete runs 107 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 7 over it, 1.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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":11474}}}],"partialFingerprints":{"codehealthFindingId/v1":"76b25b7ea08ed858a9b05e65df6ced2ae442d28ac6e7f989dfec181de519ade4"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SopEngine.deny_checkpoint: MethodTooLong \u2014 deny_checkpoint runs 107 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 7 over it, 1.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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":4747}}}],"partialFingerprints":{"codehealthFindingId/v1":"adb9e603da7f7314ab67e3264a2385fd39ffe096a6244f4082a69a9a75c164b8"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: FileExplorerState: ClassTooLong \u2014 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), 14 methods, 4 blocks, lines 23-666. The bar is 400 significant lines; this is 27 over it, 1.07\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":"apps/zerocode/src/file_explorer.rs"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"72384a26ebdc0f641e8210346ed256e9a9eb968e85ddcf5ed749ef506711c93b"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: DelegateTool: TooManyFields \u2014 32 stored fields beside 115 methods. 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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"327dc2cfabea55e2d3a6150bf14270b5c9ba9b84c9e2c1f410e10e6b1966a36d"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: WhatsAppWebChannel: TooManyFields \u2014 32 stored fields beside 60 methods. 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/zeroclaw-channels/src/whatsapp_web.rs"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e7282d22f4608fffc5fd29e60aa717f7face78768ea6d87eecf839279a4a817"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: OpenAiCompatibleModelProvider: TooManyFields \u2014 32 stored fields beside 54 methods. 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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"50ae57534ce0f30d2949bbe3994f2111bd32854e9299b76d220528704560ebbe"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFunctions: zeroclaw_channels::matrix::outbound: TooManyFunctions \u2014 32 free functions. The bar is 30 free functions; this is 2 over it, 1.07\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":3096}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c94ad34df2ed29ce4999218bbb9e3b56ae973cdeed069d8939ddee68df6a1a5"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: OpenAiCompatibleBuilder: TooManyFields \u2014 32 stored fields beside 31 methods. 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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":517}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0db49dac177ff517be461357c68dd5e4e0d75b6c412c8570d80c530d72ab969"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: RuntimeProfileConfig: 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/zeroclaw-config/src/schema.rs"},"region":{"startLine":15122}}}],"partialFingerprints":{"codehealthFindingId/v1":"826b98673c2bd4ae26afb448bf7548923e57e65cf719e4f1049620e698f2414d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/azure_openai.rs: FileTooLong \u2014 533 significant 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: AzureOpenAiModelProvider (4 blocks, 12-764). The bar is 500 significant lines; this is 33 over it, 1.07\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/zeroclaw-providers/src/azure_openai.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"41f450122b4eb2b405302db7352cd606efabf04da9877baf75b16d797ba0272b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AcpSessionStore.recover_turn_checkpoint_for_owner_authorized: MethodTooLong \u2014 recover_turn_checkpoint_for_owner_authorized 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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":2509}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d1d2617f1d27c898010f6595f2ed54a072dd47e5592db043ef551d1193d1738"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: xtask::cmd::mdbook::sync::run: FunctionTooLong \u2014 xtask::cmd::mdbook::sync::run 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":"xtask/src/cmd/mdbook/sync.rs"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"4163b545e90418ec6bfef2857beaf2156bbd68f88ddf8a5c15f47396ddc07947"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: CostTracker: ClassTooLong \u2014 423 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 41 methods, 3 blocks, lines 167-985. The bar is 400 significant lines; this is 23 over it, 1.06\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/zeroclaw-config/src/cost/tracker.rs"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfdf655bc177de14bef6a244c8671e6fe0e61b3c7d5569e9f7dd0405dfc48f36"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/gmail_push.rs: FileTooLong \u2014 527 significant 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: GmailPushChannel (4 blocks, 149-692). The bar is 500 significant lines; this is 27 over it, 1.05\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/zeroclaw-channels/src/gmail_push.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"db35f2a83ddb68f1b0ae8a7d23138284798acbf02d601c1362b3d01f0891f385"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Config.default: MethodTooLong \u2014 default 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/zeroclaw-config/src/schema.rs"},"region":{"startLine":21724}}}],"partialFingerprints":{"codehealthFindingId/v1":"73044dedbcd5f24dec356caf431881e386e2b31dcf5bbd7f17dfd38c96618909"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: TurnRelay.relay: MethodTooLong \u2014 relay 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/zeroclaw-gateway/src/chat_core.rs"},"region":{"startLine":891}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa68e14364775da8276adce52476ef76e6f8e582f0e01f0cb0705afff70334a1"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AnthropicModelProvider.chat_with_tool_round_policy: MethodTooLong \u2014 chat_with_tool_round_policy 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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":3004}}}],"partialFingerprints":{"codehealthFindingId/v1":"085e511ea9ac30b73dbf189d8606f33ce58ecf42d721bb978545101fb8a67651"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::doctor::run_models: FunctionTooLong \u2014 zeroclaw_runtime::doctor::run_models 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/zeroclaw-runtime/src/doctor/mod.rs"},"region":{"startLine":575}}}],"partialFingerprints":{"codehealthFindingId/v1":"5326a3ad1068f56acf2a51cff202c5735f872ce9570828421d614c0c92be118d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RpcDispatcher.handle_sops_run: MethodTooLong \u2014 handle_sops_run 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":12965}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb87df52aae58d62b0b7b8589cb85965e987809c02896e69172774d65369c77d"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::security::seatbelt::generate_policy: FunctionTooLong \u2014 zeroclaw_runtime::security::seatbelt::generate_policy 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/zeroclaw-runtime/src/security/seatbelt.rs"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d0e27b32d2725696b30dbd3c455b0b55a5afbc67f3e3e1897ab560558ea81b2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/component.rs: FileTooLong \u2014 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). The bar is 500 significant lines; this is 23 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/zeroclaw-plugins/src/component.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fec430cbef3d742b1ba3540992a45808ee19c4dff617dcb7752253f0eaebf88c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/knowledge_graph.rs: FileTooLong \u2014 520 significant 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 79% of them inside a single declaration: KnowledgeGraph (2 blocks, 126-683). The bar is 500 significant lines; this is 20 over it, 1.04\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/zeroclaw-memory/src/knowledge_graph.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"aad9a1ec5b26b10176fcb83f81324031ca8717696add18f6b766bc08fa8c432a"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: LinqChannel.parse_webhook_payload: MethodTooLong \u2014 parse_webhook_payload 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/zeroclaw-channels/src/linq.rs"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dc221d7586f9395cdb64eb2640e911e78ce77421b2229f809951038a808e420"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: NextcloudTalkChannel.parse_message_payload: MethodTooLong \u2014 parse_message_payload 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/zeroclaw-channels/src/nextcloud_talk.rs"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"b900b0eb74f654c021d1922b13f6cd4dd908cec17c559a5cfac841f733da6557"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: OidcAuthProvider.claims_to_identity: MethodTooLong \u2014 claims_to_identity 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/zeroclaw-runtime/src/security/auth_provider/oidc.rs"},"region":{"startLine":809}}}],"partialFingerprints":{"codehealthFindingId/v1":"13b152cc98f863947d0048e634599d23eaf70f1e68f5ebe0ee36dfe6a25f3faa"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/agent_sidebar.rs: FileTooLong \u2014 519 significant 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: AgentSidebar (2 blocks, 86-744). The bar is 500 significant lines; this is 19 over it, 1.04\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":"apps/zerocode/src/agent_sidebar.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"81ed3a4b1e84395cbd6e08e992103c9e96d43d0e49399730d14b715ae400b1ca"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: security/detect.rs: FileTooLong \u2014 518 significant 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 18 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/zeroclaw-runtime/src/security/detect.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"55211ec62d888df692ac602b3d451d5d2decb782e66fee116b04be034e6d5cf1"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: DiscordChannel: TooManyFields \u2014 31 stored fields beside 36 methods. 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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"2455482ddd3edf7500efde4852f74dbc0e903d88750481767265055553d7bbe0"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: MessageQueue: 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":"apps/zerocode/src/chat/message_queue.rs"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"254813e38742c5302f8e5daf67e9e2f2e2daa94b753c31f33904ee46f7a00f05"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: OpenAiCompatibleBuilder: 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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":517}}}],"partialFingerprints":{"codehealthFindingId/v1":"39d941174ebe39588dccb5fe5a1628271c8638046791f26d747577efa2637528"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tools/skill_manage.rs: FileTooLong \u2014 516 significant 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 16 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/zeroclaw-runtime/src/tools/skill_manage.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e95b26b569df044fcc7e0c3e8527fc3f3a97e701e9deb78d11b8e809b6d549b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.draw_into: MethodTooLong \u2014 draw_into 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":662}}}],"partialFingerprints":{"codehealthFindingId/v1":"93fa6de5908d8ea6a70e34601e1c0cd5d6742d9f11210cdc2d12866f20ebf3fb"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zerocode::input_bar::push_wrapped_physical_line: FunctionTooLong \u2014 zerocode::input_bar::push_wrapped_physical_line 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":"apps/zerocode/src/input_bar.rs"},"region":{"startLine":379}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1a7fe87879b715d333a6c1557b9367702a9a6d66aae43d454945738ecf0af28"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_config::schema::write_config_atomically_with_sync: FunctionTooLong \u2014 zeroclaw_config::schema::write_config_atomically_with_sync 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/zeroclaw-config/src/schema.rs"},"region":{"startLine":27416}}}],"partialFingerprints":{"codehealthFindingId/v1":"95099de24ade1b3ccf38cf7df53f833b61b28294228334cdd75f9676dd8f2892"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::cron::scheduler::run_with_capability: FunctionTooLong \u2014 zeroclaw_runtime::cron::scheduler::run_with_capability 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/zeroclaw-runtime/src/cron/scheduler.rs"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a5132b3caf6457c6bf328c5def020be794fb141885313b26d533526f870790c"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::cron::store::apply_schema_and_migrations: FunctionTooLong \u2014 zeroclaw_runtime::cron::store::apply_schema_and_migrations 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/zeroclaw-runtime/src/cron/store.rs"},"region":{"startLine":2326}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a058faab570400a0b2a6cf292d2dddae858b88a81eac58c507fba709bab9979"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: PrometheusObserver.record_event: MethodTooLong \u2014 record_event 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/zeroclaw-runtime/src/observability/prometheus.rs"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"39eb21ddb194d6364114db1f7eddc177077179a5ed7275ad50007b5a9df16bc4"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: LandlockSandbox.build_ruleset: MethodTooLong \u2014 build_ruleset 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/zeroclaw-runtime/src/security/landlock.rs"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e2de1af44cb20699b27560c77676ce41b1821361610c8e31f6f3606035ecdaf"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: cron/mod.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":"src/cron/mod.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"de57b3c2b1304efeb13c8e62e6cbd051705d7cf49d3ce2ec17bc475c9f429b0d"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: KnowledgeGraph: ClassTooLong \u2014 409 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 15 methods, 2 blocks, lines 126-683. The bar is 400 significant lines; this is 9 over it, 1.02\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/zeroclaw-memory/src/knowledge_graph.rs"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"14f106cd39b567d1bcb0b1a8bc4d90f12f32ce2f2f29738ff2163cb435e0999f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: sop/graph.rs: FileTooLong \u2014 511 significant 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 11 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/zeroclaw-runtime/src/sop/graph.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0205bf6e1fc093c3d230f0289b6f34f8b67d91b7e39531e8059b39f96fc88200"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/file_download.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), about 61% of them inside a single declaration: FileDownloadTool (3 blocks, 39-769). The bar is 500 significant lines; this is 10 over it, 1.02\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/zeroclaw-tools/src/file_download.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"460eb709d7de0893a8375d47bdf833bc0b1a19d3faa2b6c5da5d77d7d456a99c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: QQChannel.compose_qq_message: MethodTooLong \u2014 compose_qq_message 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/zeroclaw-channels/src/qq.rs"},"region":{"startLine":1067}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d52004143217e3741bf9cd71d5786b039df18e0cd8da14a3f37ef46960a113b"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_gateway::api::handle_api_cron_patch: FunctionTooLong \u2014 zeroclaw_gateway::api::handle_api_cron_patch 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/zeroclaw-gateway/src/api.rs"},"region":{"startLine":747}}}],"partialFingerprints":{"codehealthFindingId/v1":"675e06b11a48cd3a3dc09fbb617cbe3c9ab3218e8bd1ff67557bb0ead0d143b3"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: RpcDispatcher.handle_config_map_key_delete: MethodTooLong \u2014 handle_config_map_key_delete 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":10885}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d45006b5a98a3875528ee3ffd4dde4123363488855f9c65e1ad15172c5d4a2c"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ModelRoutingConfigTool.handle_set_default: MethodTooLong \u2014 handle_set_default 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/zeroclaw-tools/src/model_routing_config.rs"},"region":{"startLine":671}}}],"partialFingerprints":{"codehealthFindingId/v1":"4547bb491d0e61d53f823b36e85bc029a7280c175925328ace43a512ba092f0f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: agent/system_prompt.rs: FileTooLong \u2014 509 significant 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 9 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/zeroclaw-runtime/src/agent/system_prompt.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c0503d00a86b04fa125a1b9a00caf36ad3c8e053321007024192c367563e450"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: security/leak_detector.rs: FileTooLong \u2014 506 significant 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 6 over it, 1.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/zeroclaw-runtime/src/security/leak_detector.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbe8bef743719fbba57cd10b04aa4b9cff3ffd1b39e8163edd61f710a9aa7fdd"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ScheduleTool: ClassTooLong \u2014 404 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 7 methods, 4 blocks, lines 13-587. The bar is 400 significant lines; this is 4 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/zeroclaw-runtime/src/tools/schedule.rs"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"c03aa188d07bd814305b52b52746d1af02ef0a11c3036ed42044a07af3a537b6"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: App.handle_alias_rename: MethodTooLong \u2014 handle_alias_rename 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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":3347}}}],"partialFingerprints":{"codehealthFindingId/v1":"832d6090fd171d0bd7f6045c3a7998b7a20c6e30fcee43e71f02b93364e39a3b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Logs.draw: MethodTooLong \u2014 draw 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":"apps/zerocode/src/logs.rs"},"region":{"startLine":896}}}],"partialFingerprints":{"codehealthFindingId/v1":"217db78ca73eafe47c2c6d6bb0842cc833ee23bc9a5b4a3b03f165d03dfa7671"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_macros::derive_trigger_fields: FunctionTooLong \u2014 zeroclaw_macros::derive_trigger_fields 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/zeroclaw-macros/src/lib.rs"},"region":{"startLine":2425}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5960a320a0fe967b499c30e252ed44f49b6ee50c043e92396ec5147b0542d06"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: OpenAiCompatibleModelProvider.stream_chat_with_history: MethodTooLong \u2014 stream_chat_with_history 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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":5214}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3c9af9fb984ef8293a401bc40555e74297b5cd5c6d2ebfc99842c1c239625f8"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::rpc::locales::handle_locales_fetch: FunctionTooLong \u2014 zeroclaw_runtime::rpc::locales::handle_locales_fetch 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/zeroclaw-runtime/src/rpc/locales.rs"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"865b200f994412e9f98ef040c65e8cc028db224f47b6e1febf1c1281d0a21eab"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: zeroclaw_runtime::security::playbook::builtin_playbooks: FunctionTooLong \u2014 zeroclaw_runtime::security::playbook::builtin_playbooks 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/zeroclaw-runtime/src/security/playbook.rs"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"fab581efa07849ba4e42c59e9223d34023c07a2ad1677ecf5e5272aa025e9081"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: SopEngine.resume_deterministic_run: MethodTooLong \u2014 resume_deterministic_run 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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":5770}}}],"partialFingerprints":{"codehealthFindingId/v1":"fee6f5f6ce1365ade7db16a8b51c94d1bbdd3fc6fa7f6ecd5418229042257956"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/secrets.rs: FileTooLong \u2014 503 significant 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 3 over it, 1.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/zeroclaw-config/src/secrets.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"49193871d8d30ab1c35e56e87371ae6c91e3cda69c586e32c98ba8dc4529b2fb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: discord/slash.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/zeroclaw-channels/src/discord/slash.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b45ef6f8647ebb2821b13d6d20cf8a768cbd536967f04a92d2f5b6bca60b230"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (8 members, 20 shared lines): crates/zeroclaw-tools/src/jira_tool.rs:79-158 | crates/zeroclaw-tools/src/jira_tool.rs:186-257 | crates/zeroclaw-tools/src/jira_tool.rs:261-327 | crates/zeroclaw-tools/src/jira_tool.rs:333-400 | crates/zeroclaw-tools/src/jira_tool.rs:402-598 | crates/zeroclaw-tools/src/jira_tool.rs:600-653 | crates/zeroclaw-tools/src/jira_tool.rs:687-731 | crates/zeroclaw-tools/src/jira_tool.rs:845-943 \u2014 These 8 members are variants of one another: a block of 20 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":"crates/zeroclaw-tools/src/jira_tool.rs"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb5cc87c2a6c021043e601d189ae46a2acb7d99790a0662be9299eab7acbb66d"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (7 members, 22 shared lines): crates/zeroclaw-tools/src/jira_tool.rs:79-158 | crates/zeroclaw-tools/src/jira_tool.rs:186-257 | crates/zeroclaw-tools/src/jira_tool.rs:261-327 | crates/zeroclaw-tools/src/jira_tool.rs:333-400 | crates/zeroclaw-tools/src/jira_tool.rs:600-653 | crates/zeroclaw-tools/src/jira_tool.rs:687-731 | crates/zeroclaw-tools/src/jira_tool.rs:845-943 \u2014 These 7 members are variants of one another: a block of 22 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":"crates/zeroclaw-tools/src/jira_tool.rs"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cdab4b6dea3fea5c147b63e95ee6cfdfc698eaa3990f0d85ddb927ba493f5d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (7 members, 21 shared lines): crates/zeroclaw-channels/src/telegram.rs:6726-6766 | crates/zeroclaw-channels/src/telegram.rs:6776-6810 | crates/zeroclaw-channels/src/telegram.rs:6819-6859 | crates/zeroclaw-channels/src/telegram.rs:6869-6903 | crates/zeroclaw-channels/src/telegram.rs:6912-6952 | crates/zeroclaw-channels/src/telegram.rs:6961-7001 | crates/zeroclaw-channels/src/telegram.rs:7010-7050 \u2014 These 7 members are variants of one another: a block of 21 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":"crates/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":6726}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b64ef2588af3381fd7f40a37bcbed65b853f7c35f7ffbe82523ec2702cd17d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (6 members, 15 shared lines): crates/zeroclaw-providers/src/dispatch.rs:707-752 | crates/zeroclaw-providers/src/dispatch.rs:763-787 | crates/zeroclaw-providers/src/dispatch.rs:795-819 | crates/zeroclaw-providers/src/dispatch.rs:1091-1132 | crates/zeroclaw-providers/src/dispatch.rs:1141-1165 | crates/zeroclaw-providers/src/dispatch.rs:1173-1197 \u2014 These 6 members are variants of one another: a block of 15 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":"crates/zeroclaw-providers/src/dispatch.rs"},"region":{"startLine":707}}}],"partialFingerprints":{"codehealthFindingId/v1":"393c4dd9b78e0b230baef71fc34558347ecc3f2d2d5888608b0f550e2aea0fe2"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (5 members, 21 shared lines): crates/zeroclaw-tools/src/jira_tool.rs:186-257 | crates/zeroclaw-tools/src/jira_tool.rs:261-327 | crates/zeroclaw-tools/src/jira_tool.rs:333-400 | crates/zeroclaw-tools/src/jira_tool.rs:750-833 | crates/zeroclaw-tools/src/jira_tool.rs:845-943 \u2014 These 5 members are variants of one another: a block of 21 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":"crates/zeroclaw-tools/src/jira_tool.rs"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"765a1534909310af2fa8a8e4233641e3d81e5f414b3164ec48c982c3f5879bba"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (5 members, 12 shared lines): crates/zeroclaw-tools/src/web_search_tool.rs:387-452 | crates/zeroclaw-tools/src/web_search_tool.rs:609-673 | crates/zeroclaw-tools/src/web_search_tool.rs:785-849 | crates/zeroclaw-tools/src/web_search_tool.rs:924-991 | crates/zeroclaw-tools/src/web_search_tool.rs:1312-1370 \u2014 These 5 members are variants of one another: a block of 12 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":"crates/zeroclaw-tools/src/web_search_tool.rs"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"bad0c9841a0a19c38c2556bdb54b2920ea61a8022f1da2f7135d30d04586f49e"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 174 shared lines): crates/zeroclaw-providers/src/reliable.rs:2526-2818 | crates/zeroclaw-providers/src/reliable.rs:2825-3128 | crates/zeroclaw-providers/src/reliable.rs:3257-3577 | crates/zeroclaw-providers/src/reliable.rs:3600-3958 \u2014 These 4 members are variants of one another: a block of 174 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/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":2526}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0258844f4395f91efd6745e1223c22952e9755214af9e04dc8dbf6f9c0bc526"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (4 members, 36 shared lines): crates/zeroclaw-providers/src/auth/mod.rs:204-286 | crates/zeroclaw-providers/src/auth/mod.rs:293-383 | crates/zeroclaw-providers/src/auth/mod.rs:390-471 | crates/zeroclaw-providers/src/auth/mod.rs:504-593 \u2014 These 4 members are variants of one another: a block of 36 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/zeroclaw-providers/src/auth/mod.rs"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e17dfe458c07a273495574e15c8d6076904d894fc6c763032244557d692ec5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (3 members, 45 shared lines): crates/zeroclaw-tools/src/ask_user.rs:87-288 | crates/zeroclaw-tools/src/escalate.rs:173-435 | crates/zeroclaw-tools/src/poll.rs:183-410 \u2014 These 3 members are variants of one another: a block of 45 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/zeroclaw-tools/src/ask_user.rs"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"13d8700fbf49c7232c9b54ad933eb033a0bbe24e8be3c343f8cd3c7ae8addecb"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (107 shared lines): crates/zeroclaw-tools/src/file_upload.rs:164-379 | crates/zeroclaw-tools/src/file_upload_bundle.rs:216-542 \u2014 These two members are variants of one another: 107 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/zeroclaw-tools/src/file_upload.rs"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e51fb3966c3bb9b175d114ea134f91b03c1d60fbf0db94dfcd1813bbe56854d"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (78 shared lines): crates/zeroclaw-providers/src/gemini_cli.rs:124-243 | crates/zeroclaw-providers/src/kilocli.rs:115-240 \u2014 These two members are variants of one another: 78 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/zeroclaw-providers/src/gemini_cli.rs"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"19f78eb2c82de136de4e0a027920a0e87705dcafe93d0254425b343f70a8a9d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (76 shared lines): crates/zeroclaw-runtime/src/skills/mod.rs:797-900 | crates/zeroclaw-runtime/src/skills/mod.rs:926-1028 \u2014 These two members are variants of one another: 76 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/zeroclaw-runtime/src/skills/mod.rs"},"region":{"startLine":797}}}],"partialFingerprints":{"codehealthFindingId/v1":"e092f1c74cb81d9fdccd479085ea1622b04e029c73bcba0b8eb870d769e63b76"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (56 shared lines): firmware/nucleo/src/main.rs:19-95 | firmware/pico/src/main.rs:23-97 \u2014 These two members are variants of one another: 56 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\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":"firmware/nucleo/src/main.rs"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"3881c83fa8de65aeb98e216ce1d5eebe5ba2dbf45457b19836155ee028f4657f"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (53 shared lines): crates/zeroclaw-providers/src/multimodal.rs:1343-1419 | crates/zeroclaw-providers/src/multimodal.rs:1492-1579 \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/zeroclaw-providers/src/multimodal.rs"},"region":{"startLine":1343}}}],"partialFingerprints":{"codehealthFindingId/v1":"fae85f2335f75f7e4efe3efc2d4de36ef30dc780bc29e93e8fb3368e3f654eaf"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (52 shared lines): crates/zeroclaw-hardware/src/pico_code.rs:268-405 | crates/zeroclaw-hardware/src/pico_code.rs:451-565 \u2014 These two members are variants of one another: 52 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/zeroclaw-hardware/src/pico_code.rs"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"230df60acdf5a5d93e9be550dca0eb252f54bd7bb9d355d740fdfc29ae480914"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (52 shared lines): crates/zeroclaw-tools/src/discord_search.rs:57-145 | crates/zeroclaw-tools/src/memory_recall.rs:58-136 \u2014 These two members are variants of one another: 52 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/zeroclaw-tools/src/discord_search.rs"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"890339212d59e62d4df5599b37d3194ee1346be4feec9a2769e079a791d27fff"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (50 shared lines): crates/zeroclaw-runtime/src/tools/sop_advance.rs:94-311 | crates/zeroclaw-runtime/src/tools/sop_execute.rs:95-226 \u2014 These two members are variants of one another: 50 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/zeroclaw-runtime/src/tools/sop_advance.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e09f6f44a96597675b239030b64a479043f53294c83d1c1b7ef7a7090580ecf"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (50 shared lines): crates/zeroclaw-providers/src/compatible.rs:4493-4605 | crates/zeroclaw-providers/src/compatible.rs:4612-4757 \u2014 These two members are variants of one another: 50 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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":4493}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ed17fae01e0240c03517859daff21a837a400ccaca70e3a867f186ea5202722"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (49 shared lines): crates/zeroclaw-channels/src/lark.rs:1855-1986 | crates/zeroclaw-channels/src/lark.rs:1995-2126 \u2014 These two members are variants of one another: 49 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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":1855}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3e17eac72d2ac1f44eb444b31bae94b2bb0b24332e010bb186b465cff11fe12"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (48 shared lines): apps/zerocode/src/client.rs:1736-1892 | apps/zerocode/src/client.rs:2020-2186 \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":"apps/zerocode/src/client.rs"},"region":{"startLine":1736}}}],"partialFingerprints":{"codehealthFindingId/v1":"45a106f53dc5c1daa4451b5b7e7345990ab10561bbfb71e62c6266dd8f0f6096"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (45 shared lines): crates/zeroclaw-channels/src/mochat.rs:134-283 | crates/zeroclaw-channels/src/twitter.rs:221-420 \u2014 These two members are variants of one another: 45 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/zeroclaw-channels/src/mochat.rs"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"d853b7fd13d388cc96863c863f6bb7fc0249b3de6a9b48b98bf2ccf51db404a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (42 shared lines): crates/zeroclaw-hardware/src/gpio.rs:60-136 | crates/zeroclaw-hardware/src/gpio.rs:181-241 \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/zeroclaw-hardware/src/gpio.rs"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc9ba7d4ee07e310b19ad8836d7428034321b9b8706561ce534ff06eae45f1a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (39 shared lines): crates/zeroclaw-tools/src/mcp_prompts_tool.rs:69-143 | crates/zeroclaw-tools/src/mcp_resources_tool.rs:68-141 \u2014 These two members are variants of one another: 39 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/zeroclaw-tools/src/mcp_prompts_tool.rs"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"628ad5f384d38aed05996a26cc5434082dcb2a50a23025df89782a846ac34d64"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (39 shared lines): crates/zeroclaw-providers/src/compatible.rs:1527-1607 | crates/zeroclaw-providers/src/compatible.rs:4355-4473 \u2014 These two members are variants of one another: 39 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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":1527}}}],"partialFingerprints":{"codehealthFindingId/v1":"66166802e2cb29b577ed8d025c198f7e941f233cfb7be2773713526459b77eda"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (37 shared lines): crates/zeroclaw-tools/src/jira_tool.rs:1038-1296 | crates/zeroclaw-tools/src/notion_tool.rs:224-345 \u2014 These two members are variants of one another: 37 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/zeroclaw-tools/src/jira_tool.rs"},"region":{"startLine":1038}}}],"partialFingerprints":{"codehealthFindingId/v1":"94b168bec42bd1903dc86c0c5fec31ab14ac0bfe9e8e4ed4da984104a2c1596a"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (34 shared lines): apps/zerocode/src/diff.rs:121-175 | apps/zerocode/src/diff.rs:198-244 \u2014 These two members are variants of one another: 34 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":"apps/zerocode/src/diff.rs"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"c80a23e449483692bf683cb47ea54691d2a4d4db0498c80ce14421eb0d773a48"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (33 shared lines): crates/zeroclaw-channels/src/discord/mod.rs:538-673 | crates/zeroclaw-channels/src/discord/mod.rs:675-769 \u2014 These two members are variants of one another: 33 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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":538}}}],"partialFingerprints":{"codehealthFindingId/v1":"6db71cebe8c7905ddd7e60355cae4dc44ad9fee0bf1db7a5204181a2ba84e9bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (30 shared lines): crates/zeroclaw-tools/src/knowledge_tool.rs:159-247 | crates/zeroclaw-tools/src/knowledge_tool.rs:330-403 \u2014 These two members are variants of one another: 30 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/zeroclaw-tools/src/knowledge_tool.rs"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"e65825c0500aa574a3f118736ce31a275955f1f912440ef28219092fac4846b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (29 shared lines): crates/zeroclaw-tools/src/model_routing_config.rs:93-134 | crates/zeroclaw-tools/src/proxy_config.rs:22-62 \u2014 These two members are variants of one another: 29 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/zeroclaw-tools/src/model_routing_config.rs"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"07a9291d55c4107b406283ef1b27a82625b46d1c26de2a6a22f139e46bea376a"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (26 shared lines): crates/zeroclaw-channels/src/bluesky.rs:514-636 | crates/zeroclaw-channels/src/mattermost.rs:895-1011 \u2014 These two members are variants of one another: 26 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/zeroclaw-channels/src/bluesky.rs"},"region":{"startLine":514}}}],"partialFingerprints":{"codehealthFindingId/v1":"4da959406c093243c47a30ab46e406867739c143fbc3dddcb866dfc10fd59b42"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (23 shared lines): crates/zeroclaw-tools/src/linkedin_client.rs:76-157 | crates/zeroclaw-tools/src/pushover.rs:44-103 \u2014 These two members are variants of one another: 23 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/zeroclaw-tools/src/linkedin_client.rs"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"1eaa6c257975961a3c29497b5ff7ca0f799e0d2be2d525100f2c538a5b9cf06d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (38 corresponding lines): crates/zeroclaw-memory/src/lucid.rs:415-503 | crates/zeroclaw-memory/src/markdown.rs:204-289 \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/zeroclaw-memory/src/lucid.rs"},"region":{"startLine":415}}}],"partialFingerprints":{"codehealthFindingId/v1":"105389a9e6c5f9173dca8ce7a45225d50c18ba3cd2121254bf8857f0bbb04c55"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): crates/zeroclaw-gateway/src/api_pairing.rs:43-113 | crates/zeroclaw-gateway/src/api_pairing.rs:199-232 \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/zeroclaw-gateway/src/api_pairing.rs"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf7868491a5d9ae41b42f002e0d9dac38bf5e530b735655252720dbca80c50f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (34 members, 50\u002B identical tokens): crates/zeroclaw-channels/src/slack.rs:3429-3463 | crates/zeroclaw-channels/src/transcription.rs:71-91 | crates/zeroclaw-config/src/env_overrides.rs:156-226 | crates/zeroclaw-config/src/schema.rs:12456-12545 | crates/zeroclaw-config/src/schema.rs:12555-12702 | crates/zeroclaw-hardware/src/device.rs:467-524 | crates/zeroclaw-providers/src/auth/profiles.rs:238-259 | crates/zeroclaw-providers/src/models_dev.rs:77-94 | crates/zeroclaw-providers/src/openrouter.rs:528-551 | crates/zeroclaw-runtime/src/sop/engine.rs:2403-2448 | crates/zeroclaw-runtime/src/sop/engine.rs:2577-2790 | crates/zeroclaw-runtime/src/sop/engine.rs:2889-2902 | crates/zeroclaw-runtime/src/sop/engine.rs:4079-4178 | crates/zeroclaw-runtime/src/sop/engine.rs:4747-4919 | crates/zeroclaw-runtime/src/sop/engine.rs:5077-5109 | crates/zeroclaw-runtime/src/sop/engine.rs:5655-5716 | crates/zeroclaw-runtime/src/sop/engine.rs:6061-6102 | crates/zeroclaw-runtime/src/tools/security_ops.rs:101-185 | crates/zeroclaw-tools/src/browser_open.rs:274-325 | crates/zeroclaw-tools/src/mcp_client.rs:1258-1272 | crates/zeroclaw-tools/src/model_routing_config.rs:191-223 | crates/zeroclaw-tools/src/model_routing_config.rs:297-318 | crates/zeroclaw-tools/src/model_routing_config.rs:334-364 | crates/zeroclaw-tools/src/model_routing_config.rs:366-386 | crates/zeroclaw-tools/src/model_routing_config.rs:388-418 | crates/zeroclaw-tools/src/model_routing_config.rs:420-450 | crates/zeroclaw-tools/src/model_routing_config.rs:452-482 | crates/zeroclaw-tools/src/model_routing_config.rs:484-500 | crates/zeroclaw-tools/src/proxy_config.rs:93-125 | crates/zeroclaw-tools/src/proxy_config.rs:127-157 | crates/zeroclaw-tools/src/proxy_config.rs:247-368 | src/main.rs:9633-14221 | src/skills/mod.rs:1180-1238 | src/sop/mod.rs:7-295 \u2014 These 34 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 34 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 34 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/slack.rs"},"region":{"startLine":3429}}}],"partialFingerprints":{"codehealthFindingId/v1":"d75a8d87a01a460a99492dec0fddb869d989273b9807128e065e379224303c8e"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (12 members, 50\u002B identical tokens): crates/zeroclaw-providers/src/anthropic.rs:2902-2987 | crates/zeroclaw-providers/src/anthropic.rs:3010-3140 | crates/zeroclaw-providers/src/azure_openai.rs:542-606 | crates/zeroclaw-providers/src/azure_openai.rs:613-670 | crates/zeroclaw-providers/src/azure_openai.rs:678-744 | crates/zeroclaw-providers/src/openai.rs:494-559 | crates/zeroclaw-providers/src/openai.rs:582-666 | crates/zeroclaw-providers/src/openai.rs:678-754 | crates/zeroclaw-providers/src/openrouter.rs:651-710 | crates/zeroclaw-providers/src/openrouter.rs:717-783 | crates/zeroclaw-providers/src/openrouter.rs:790-866 | crates/zeroclaw-providers/src/openrouter.rs:995-1103 \u2014 These 12 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 12 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 12 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":2902}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c19c3a683dc29275c82bcf542c7fe665f481c84adf07dc0da6ee61247ac0eea"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (11 members, 50\u002B identical tokens): crates/zeroclaw-runtime/src/live_config_authority.rs:1510-1531 | crates/zeroclaw-tools/src/microsoft365/mod.rs:78-105 | crates/zeroclaw-tools/src/microsoft365/mod.rs:110-155 | crates/zeroclaw-tools/src/microsoft365/mod.rs:160-211 | crates/zeroclaw-tools/src/microsoft365/mod.rs:213-238 | crates/zeroclaw-tools/src/microsoft365/mod.rs:243-295 | crates/zeroclaw-tools/src/microsoft365/mod.rs:300-334 | crates/zeroclaw-tools/src/microsoft365/mod.rs:338-406 | crates/zeroclaw-tools/src/microsoft365/mod.rs:411-462 | crates/zeroclaw-tools/src/microsoft365/mod.rs:467-536 | crates/zeroclaw-tools/src/microsoft365/mod.rs:541-574 \u2014 These 11 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 11 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 11 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/live_config_authority.rs"},"region":{"startLine":1510}}}],"partialFingerprints":{"codehealthFindingId/v1":"8985801b1bde3b0cd8399dbf414b590271e147df5ac4378c19f2849ec651facd"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (8 members, 50\u002B identical tokens): crates/zeroclaw-channels/src/gmail_push.rs:697-719 | crates/zeroclaw-channels/src/notion.rs:64-92 | crates/zeroclaw-channels/src/wechat.rs:479-569 | crates/zeroclaw-providers/src/azure_openai.rs:118-138 | crates/zeroclaw-providers/src/openai.rs:149-169 | crates/zeroclaw-runtime/src/security/vulnerability.rs:71-94 | crates/zeroclaw-tools/src/notion_tool.rs:33-51 | crates/zeroclaw-tools/src/pipeline.rs:352-401 \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":"crates/zeroclaw-channels/src/gmail_push.rs"},"region":{"startLine":697}}}],"partialFingerprints":{"codehealthFindingId/v1":"91e27df90fff543fd2b833a94bce9368da8c875460363baafd32ffc5132465f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (8 members, 50\u002B identical tokens): crates/zeroclaw-providers/src/anthropic.rs:3262-3593 | crates/zeroclaw-providers/src/compatible.rs:2838-3020 | crates/zeroclaw-providers/src/compatible.rs:4785-5033 | crates/zeroclaw-providers/src/compatible.rs:5042-5212 | crates/zeroclaw-providers/src/compatible.rs:5220-5356 | crates/zeroclaw-providers/src/openai.rs:1498-1590 | crates/zeroclaw-providers/src/openai_codex.rs:1577-1683 | crates/zeroclaw-providers/src/openrouter.rs:886-987 \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":"crates/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":3262}}}],"partialFingerprints":{"codehealthFindingId/v1":"24e3332f13fab61b899a18d6c7721664f2e8db90f37b44bfb6f5d6a4b697580c"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (8 members, 50\u002B identical tokens): crates/zeroclaw-providers/src/auth/mod.rs:1337-1399 | crates/zeroclaw-providers/src/bedrock.rs:355-372 | crates/zeroclaw-providers/src/gemini.rs:356-441 | crates/zeroclaw-tools/src/web_search_tool.rs:387-452 | crates/zeroclaw-tools/src/web_search_tool.rs:609-673 | crates/zeroclaw-tools/src/web_search_tool.rs:785-849 | crates/zeroclaw-tools/src/web_search_tool.rs:924-991 | crates/zeroclaw-tools/src/web_search_tool.rs:1757-1815 \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":"crates/zeroclaw-providers/src/auth/mod.rs"},"region":{"startLine":1337}}}],"partialFingerprints":{"codehealthFindingId/v1":"aede6211ca70f9e5a15925bafcb1d0513a97d7a6132f95d0b3525b7c5007c329"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (7 members, 50\u002B identical tokens): crates/zeroclaw-channels/src/matrix.rs:1935-2031 | crates/zeroclaw-channels/src/wechat.rs:1199-1238 | crates/zeroclaw-channels/src/wechat.rs:1241-1277 | crates/zeroclaw-gateway/src/lib.rs:1402-3177 | crates/zeroclaw-hardware/src/rpi.rs:270-304 | crates/zeroclaw-runtime/src/cron/scheduler.rs:660-714 | crates/zeroclaw-runtime/src/cron/scheduler.rs:716-780 \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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":1935}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f95918b86f96a6361e5f2f10082b5b61e18666414977a9667d5555b42da692c"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (7 members, 50\u002B identical tokens): crates/zeroclaw-gateway/src/api_skills.rs:80-103 | crates/zeroclaw-gateway/src/api_skills.rs:110-133 | crates/zeroclaw-gateway/src/api_skills.rs:139-156 | crates/zeroclaw-gateway/src/api_skills.rs:216-247 | crates/zeroclaw-gateway/src/api_skills.rs:254-276 | crates/zeroclaw-gateway/src/api_skills.rs:284-304 | crates/zeroclaw-gateway/src/api_skills.rs:312-333 \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/zeroclaw-gateway/src/api_skills.rs"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"473dc11c774d2c365541b1220150dc3e04371399cbeca2ac9e42998176080453"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (7 members, 50\u002B identical tokens): crates/zeroclaw-hardware/src/peripherals/rpi.rs:154-194 | crates/zeroclaw-hardware/src/peripherals/serial.rs:312-336 | crates/zeroclaw-hardware/src/peripherals/uno_q_bridge.rs:159-202 | crates/zeroclaw-hardware/src/rpi.rs:387-451 | crates/zeroclaw-hardware/src/rpi.rs:483-534 | crates/zeroclaw-hardware/src/rpi.rs:578-653 | crates/zeroclaw-runtime/src/tools/security_ops.rs:101-185 \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/zeroclaw-hardware/src/peripherals/rpi.rs"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"d36342ad4b399863c57fcbd6516565f1d1dd31a3ded43b72ef1309bc90f47da0"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (7 members, 50\u002B identical tokens): crates/zeroclaw-providers/src/azure_openai.rs:395-465 | crates/zeroclaw-providers/src/compatible.rs:3493-3694 | crates/zeroclaw-providers/src/copilot.rs:372-439 | crates/zeroclaw-providers/src/hailo_ollama.rs:552-640 | crates/zeroclaw-providers/src/ollama.rs:406-495 | crates/zeroclaw-providers/src/openai.rs:373-443 | crates/zeroclaw-providers/src/openrouter.rs:311-383 \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/zeroclaw-providers/src/azure_openai.rs"},"region":{"startLine":395}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0596396c82b57b6c0e8b9f7ea1e833ebbd6f19c77aebc8b11080b72e6808bf7"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (7 members, 50\u002B identical tokens): crates/zeroclaw-runtime/src/tools/delegate.rs:2952-3072 | crates/zeroclaw-runtime/src/tools/delegate.rs:4086-4415 | crates/zeroclaw-tools/src/claude_code.rs:87-307 | crates/zeroclaw-tools/src/claude_code_runner.rs:109-336 | crates/zeroclaw-tools/src/codex_cli.rs:90-233 | crates/zeroclaw-tools/src/gemini_cli.rs:70-213 | crates/zeroclaw-tools/src/opencode_cli.rs:70-213 \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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":2952}}}],"partialFingerprints":{"codehealthFindingId/v1":"34f045a9b66b8951d00acb8286b8274b1ac65a4b99f7281261fdc93f3dc12aa5"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (7 members, 50\u002B identical tokens): crates/zeroclaw-tools/src/web_search_tool.rs:731-770 | crates/zeroclaw-tools/src/web_search_tool.rs:881-922 | crates/zeroclaw-tools/src/web_search_tool.rs:1035-1118 | crates/zeroclaw-tools/src/web_search_tool.rs:1433-1473 | crates/zeroclaw-tools/src/web_search_tool.rs:1666-1710 | crates/zeroclaw-tools/src/web_search_tool.rs:1712-1753 | crates/zeroclaw-tools/src/web_search_tool.rs:1853-1890 \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/zeroclaw-tools/src/web_search_tool.rs"},"region":{"startLine":731}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5dd576cd6a7b2848154a5ada2c745e1d99dbd334fb6374cd98a68707c203f09"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): crates/zeroclaw-channels/src/bluesky.rs:514-636 | crates/zeroclaw-channels/src/reddit.rs:375-436 | crates/zeroclaw-channels/src/slack.rs:4234-4647 | crates/zeroclaw-gateway/src/lib.rs:4067-4258 | crates/zeroclaw-hardware/src/loader.rs:20-144 | crates/zeroclaw-runtime/src/cron/scheduler.rs:485-619 \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/zeroclaw-channels/src/bluesky.rs"},"region":{"startLine":514}}}],"partialFingerprints":{"codehealthFindingId/v1":"13342c3ec71a413bb988ff69f24225b239d68a63945a53993ea2833f5a61b85c"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): crates/zeroclaw-channels/src/dingtalk.rs:192-393 | crates/zeroclaw-channels/src/lark.rs:2336-2446 | crates/zeroclaw-channels/src/lark.rs:2623-2868 | crates/zeroclaw-channels/src/mattermost.rs:2235-2323 | crates/zeroclaw-channels/src/nextcloud_talk.rs:169-320 | crates/zeroclaw-channels/src/nextcloud_talk.rs:323-466 \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/zeroclaw-channels/src/dingtalk.rs"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"1117598ff007b8c76a48fe07349ade7e2527721dce5c1fb1b86dc3ea358583dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): crates/zeroclaw-channels/src/discord/markers.rs:787-899 | crates/zeroclaw-channels/src/matrix.rs:3280-3405 | crates/zeroclaw-channels/src/whatsapp_web.rs:3069-3152 | crates/zeroclaw-providers/src/auth/mod.rs:1257-1308 | crates/zeroclaw-providers/src/auth/mod.rs:1511-1571 | crates/zeroclaw-providers/src/auth/openai_oauth.rs:239-291 \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/zeroclaw-channels/src/discord/markers.rs"},"region":{"startLine":787}}}],"partialFingerprints":{"codehealthFindingId/v1":"86c2314e72ca7295a26bcf3fc3558f71208b9b20eb4431acaefb349732357226"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): crates/zeroclaw-channels/src/gmail_push.rs:186-245 | crates/zeroclaw-channels/src/gmail_push.rs:260-328 | crates/zeroclaw-channels/src/gmail_push.rs:331-361 | crates/zeroclaw-channels/src/gmail_push.rs:560-623 | crates/zeroclaw-channels/src/linq.rs:296-370 | crates/zeroclaw-channels/src/whatsapp.rs:801-817 \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/zeroclaw-channels/src/gmail_push.rs"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"91604c8a5867c8e8f1845268263fa70181fc18416f39dcb2da409b49fb80ff65"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): crates/zeroclaw-channels/src/matrix.rs:3507-3633 | crates/zeroclaw-channels/src/slack.rs:2150-2231 | crates/zeroclaw-channels/src/slack.rs:2856-2912 | crates/zeroclaw-channels/src/slack.rs:2928-3003 | crates/zeroclaw-channels/src/slack.rs:3280-3424 | crates/zeroclaw-runtime/src/sop/dispatch.rs:1673-1740 \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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":3507}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdd04096009b0011f636b05fe68241ca575e631ef8ab7fb26708583db2dd7774"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): crates/zeroclaw-channels/src/orchestrator/mod.rs:9288-11551 | crates/zeroclaw-channels/src/signal.rs:1248-1453 | crates/zeroclaw-channels/src/wechat.rs:2100-2353 | crates/zeroclaw-memory/src/consolidation.rs:68-266 | crates/zeroclaw-memory/src/consolidation.rs:277-399 | crates/zeroclaw-runtime/src/routines/engine.rs:188-216 \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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":9288}}}],"partialFingerprints":{"codehealthFindingId/v1":"a71131043ddc20c8a12e44c8f991ef9746d793431c423eefb2e308828eb250de"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): crates/zeroclaw-gateway/src/api_webauthn.rs:68-101 | crates/zeroclaw-gateway/src/api_webauthn.rs:108-155 | crates/zeroclaw-gateway/src/api_webauthn.rs:162-192 | crates/zeroclaw-gateway/src/api_webauthn.rs:199-241 | crates/zeroclaw-gateway/src/api_webauthn.rs:248-285 | crates/zeroclaw-gateway/src/api_webauthn.rs:293-320 \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/zeroclaw-gateway/src/api_webauthn.rs"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"286ac7125c49e509efa0f918d7ed08b3c48eb6608fdaf42c9622ce0c53df3cd1"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): crates/zeroclaw-providers/src/openai_codex.rs:170-206 | crates/zeroclaw-tools/src/browser.rs:311-363 | crates/zeroclaw-tools/src/git_operations.rs:1719-1801 | crates/zeroclaw-tools/src/model_routing_config.rs:388-418 | crates/zeroclaw-tools/src/model_routing_config.rs:420-450 | crates/zeroclaw-tools/src/model_routing_config.rs:452-482 \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/zeroclaw-providers/src/openai_codex.rs"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2f74f53b78ae37c5828f72a26f183c88313b439aab2340214b7a269c6614d1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): crates/zeroclaw-runtime/src/hooks/runner.rs:298-325 | crates/zeroclaw-runtime/src/hooks/runner.rs:327-351 | crates/zeroclaw-runtime/src/hooks/runner.rs:357-386 | crates/zeroclaw-runtime/src/hooks/runner.rs:403-434 | crates/zeroclaw-runtime/src/hooks/runner.rs:439-463 | crates/zeroclaw-runtime/src/hooks/runner.rs:470-502 \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/zeroclaw-runtime/src/hooks/runner.rs"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7746ce62286e73fb4556af2d38c0c33c8eb745c48cd829242d0cdd06f70d02e"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): crates/zeroclaw-runtime/src/tools/schedule.rs:111-233 | crates/zeroclaw-runtime/src/tools/security_ops.rs:468-497 | crates/zeroclaw-tools/src/composio.rs:614-854 | crates/zeroclaw-tools/src/knowledge_tool.rs:126-155 | crates/zeroclaw-tools/src/linkedin.rs:161-460 | crates/zeroclaw-tools/src/project_intel.rs:542-568 \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/zeroclaw-runtime/src/tools/schedule.rs"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4ed334471140380154cffc20ec3b8422d253d11bea60581c7acac63f2429f2a"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): crates/zeroclaw-tools/src/image_gen.rs:306-476 | crates/zeroclaw-tools/src/linkedin_client.rs:598-677 | crates/zeroclaw-tools/src/linkedin_client.rs:937-991 | crates/zeroclaw-tools/src/linkedin_client.rs:1000-1054 | crates/zeroclaw-tools/src/linkedin_client.rs:1063-1112 | crates/zeroclaw-tools/src/linkedin_client.rs:1121-1173 \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/zeroclaw-tools/src/image_gen.rs"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fa9e5a47959879ca96b9a88c80a9d16d8d3faa21f1d6a1cb72a3918542e46ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): apps/zerocode/src/dashboard.rs:782-801 | apps/zerocode/src/dashboard.rs:954-974 | apps/zerocode/src/dashboard.rs:1127-1163 | apps/zerocode/src/dashboard.rs:1631-1650 | apps/zerocode/src/logs.rs:896-1039 \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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":782}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bbd8b8700ba43ab414cf93b87b3b4950a264f50c9bcbb537d08ec9a83f4044a"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): crates/zeroclaw-api/src/model_provider.rs:870-921 | crates/zeroclaw-providers/src/compatible.rs:3900-3922 | crates/zeroclaw-providers/src/hailo_ollama.rs:939-962 | crates/zeroclaw-providers/src/ollama.rs:501-523 | crates/zeroclaw-runtime/src/agent/history.rs:301-317 \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/zeroclaw-api/src/model_provider.rs"},"region":{"startLine":870}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa05a96c74a552ddf60cc8c1b1f696003181db737799af9a62b92688a9b2e1a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): crates/zeroclaw-channels/src/matrix.rs:3801-3845 | crates/zeroclaw-channels/src/matrix.rs:3852-3867 | crates/zeroclaw-channels/src/matrix.rs:3913-3929 | crates/zeroclaw-config/src/policy.rs:5742-5810 | crates/zeroclaw-tls/src/lib.rs:568-585 \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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":3801}}}],"partialFingerprints":{"codehealthFindingId/v1":"93686f579aba1b4881c01a0acdec3980dca4e6d8a00904a1a98622c45ed68173"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): crates/zeroclaw-channels/src/orchestrator/acp_server.rs:646-698 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:870-1151 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1153-1496 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1498-1777 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:2424-2446 \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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":646}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2d030b8fe120e8b821ffc132402a201fdb79b6b0340de2d316deab7be2c2926"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): crates/zeroclaw-channels/src/slack.rs:1559-1614 | crates/zeroclaw-channels/src/slack.rs:2150-2231 | crates/zeroclaw-channels/src/slack.rs:2644-2698 | crates/zeroclaw-channels/src/slack.rs:4746-4846 | crates/zeroclaw-channels/src/slack.rs:4925-5099 \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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":1559}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ebc4ea65764c0c4166b87aeffc7b9e4b03a914a6e3a54396ce7e63914935b03"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): crates/zeroclaw-channels/src/transcription.rs:176-201 | crates/zeroclaw-channels/src/transcription.rs:283-308 | crates/zeroclaw-channels/src/transcription.rs:387-411 | crates/zeroclaw-channels/src/transcription.rs:505-522 | crates/zeroclaw-channels/src/transcription.rs:680-703 \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/zeroclaw-channels/src/transcription.rs"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2d04c850c77e0f653567ebf87d95e7b9b11e08d2da238e6eb5de2e957e89c43"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): crates/zeroclaw-gateway/src/api_oidc.rs:540-560 | crates/zeroclaw-gateway/src/api_oidc.rs:623-686 | crates/zeroclaw-gateway/src/api_oidc.rs:843-918 | crates/zeroclaw-gateway/src/api_oidc.rs:1008-1116 | crates/zeroclaw-gateway/src/api_oidc.rs:1127-1156 \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/zeroclaw-gateway/src/api_oidc.rs"},"region":{"startLine":540}}}],"partialFingerprints":{"codehealthFindingId/v1":"efac559486c06869f8b63a55e539201703c2269a1eeba5865c642bfabf865092"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): crates/zeroclaw-gateway/src/api_pairing.rs:671-716 | crates/zeroclaw-tools/src/claude_code.rs:87-307 | crates/zeroclaw-tools/src/knowledge_tool.rs:159-247 | crates/zeroclaw-tools/src/knowledge_tool.rs:249-328 | crates/zeroclaw-tools/src/knowledge_tool.rs:448-487 \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/zeroclaw-gateway/src/api_pairing.rs"},"region":{"startLine":671}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6e8dad2635fbe2456b9ffa15db269e87c8f743c9f064bb5988061bf9fba054c"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): crates/zeroclaw-infra/src/acp_session_store.rs:1295-1353 | crates/zeroclaw-infra/src/acp_session_store.rs:1359-1420 | crates/zeroclaw-infra/src/acp_session_store.rs:1422-1545 | crates/zeroclaw-infra/src/acp_session_store.rs:2998-3056 | crates/zeroclaw-memory/src/sqlite.rs:1058-1450 \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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":1295}}}],"partialFingerprints":{"codehealthFindingId/v1":"74279d7304aff580a6a886f28746bbbf153f1b76031c21716c980de446639362"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): crates/zeroclaw-infra/src/session_sqlite.rs:1228-1276 | crates/zeroclaw-infra/src/session_sqlite.rs:1542-1583 | crates/zeroclaw-infra/src/session_sqlite.rs:1635-1681 | crates/zeroclaw-infra/src/session_sqlite.rs:1683-1733 | crates/zeroclaw-infra/src/session_sqlite.rs:1735-1805 \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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":1228}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d13f3bb282814c66ae98f6477495673fc1dc349ebbdaa057bb66bb6e1a85a0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): crates/zeroclaw-memory/src/sqlite.rs:979-1048 | crates/zeroclaw-memory/src/sqlite.rs:1593-1615 | crates/zeroclaw-memory/src/sqlite.rs:1671-1710 | crates/zeroclaw-memory/src/sqlite.rs:1762-1831 | crates/zeroclaw-memory/src/sqlite.rs:2463-2537 \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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":979}}}],"partialFingerprints":{"codehealthFindingId/v1":"08c6d6c6b8b5bdfb145069d89d66c41eb2f44d9c506ad436d753996e7ba21668"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): crates/zeroclaw-runtime/src/agent/turn/approval_gate.rs:28-292 | crates/zeroclaw-runtime/src/agent/turn/max_iter.rs:99-553 | crates/zeroclaw-runtime/src/agent/turn/parse_response.rs:201-333 | crates/zeroclaw-runtime/src/agent/turn/results_collect.rs:60-196 | crates/zeroclaw-runtime/src/agent/turn/results_collect.rs:211-256 \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/zeroclaw-runtime/src/agent/turn/approval_gate.rs"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9fce1941c3522c90c8916e541fc30e32a3759f5854bcc9a3e34c1238255e3f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): crates/zeroclaw-runtime/src/sop/store/sqlite.rs:174-204 | crates/zeroclaw-runtime/src/sop/store/sqlite.rs:210-262 | crates/zeroclaw-runtime/src/sop/store/sqlite.rs:268-306 | crates/zeroclaw-runtime/src/sop/store/sqlite.rs:308-344 | crates/zeroclaw-runtime/src/sop/store/sqlite.rs:351-395 \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/zeroclaw-runtime/src/sop/store/sqlite.rs"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0343b66c0d87d331ca7d5694181aa64a2c2e5cd04e92a141555e891e91204e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): crates/zeroclaw-runtime/src/tunnel/cloudflare.rs:52-123 | crates/zeroclaw-runtime/src/tunnel/ngrok.rs:31-116 | crates/zeroclaw-runtime/src/tunnel/openvpn.rs:55-151 | crates/zeroclaw-runtime/src/tunnel/pinggy.rs:28-165 | crates/zeroclaw-tools/src/mcp_transport.rs:618-682 \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/zeroclaw-runtime/src/tunnel/cloudflare.rs"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"453f928504837c4e97f5da286f6c1586e60fbab808a0a1ee42f743875bb67b97"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): crates/zeroclaw-tools/src/microsoft365/graph_client.rs:56-102 | crates/zeroclaw-tools/src/microsoft365/graph_client.rs:136-171 | crates/zeroclaw-tools/src/microsoft365/graph_client.rs:263-291 | crates/zeroclaw-tools/src/microsoft365/graph_client.rs:326-365 | crates/zeroclaw-tools/src/microsoft365/graph_client.rs:416-433 \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/zeroclaw-tools/src/microsoft365/graph_client.rs"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dc5630301c354d603a90a32132ec6df6f41cd260676e92660132785b8d5820d"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): crates/zeroclaw-tools/src/notion_tool.rs:58-80 | crates/zeroclaw-tools/src/notion_tool.rs:83-100 | crates/zeroclaw-tools/src/notion_tool.rs:107-129 | crates/zeroclaw-tools/src/notion_tool.rs:136-155 | crates/zeroclaw-tools/src/notion_tool.rs:158-177 \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/zeroclaw-tools/src/notion_tool.rs"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"64078b542a1afdc351dac6b0774eb719d6ed5bad364865d53d9de16c7f756ac7"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): xtask/src/generate/container.rs:31-49 | xtask/src/generate/docs.rs:221-246 | xtask/src/generate/install_sh.rs:699-724 | xtask/src/generate/packaging.rs:15-33 | xtask/src/generate/setup_bat.rs:222-241 \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":"xtask/src/generate/container.rs"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d076af4ca777b82d6e5682a16803ff4e2649da561a11b11d90484bc070a9369"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): apps/zerocode/src/app.rs:3483-3627 | apps/zerocode/src/app.rs:3629-3713 | apps/zerocode/src/app.rs:3715-3769 | apps/zerocode/src/quickstart_pane.rs:2919-3502 \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":"apps/zerocode/src/app.rs"},"region":{"startLine":3483}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cd06d882d50a86a3c99d5b89315891285e1dac783e4c15d4737e58cc2967ab2"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): apps/zerocode/src/config_manager.rs:1885-1897 | apps/zerocode/src/config_manager.rs:1967-1977 | apps/zerocode/src/config_manager.rs:3491-3627 | apps/zerocode/src/config_manager.rs:5361-5524 \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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":1885}}}],"partialFingerprints":{"codehealthFindingId/v1":"030a212b6cdeb495a07896616d5195eda743b37fbaa0665875b350a8113e2290"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): apps/zerocode/src/config_manager.rs:2753-2795 | apps/zerocode/src/config_manager.rs:2833-2957 | apps/zerocode/src/config_manager.rs:3491-3627 | apps/zerocode/src/config_manager.rs:4675-4742 \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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":2753}}}],"partialFingerprints":{"codehealthFindingId/v1":"036ffb7d6a21faea8a614b7392fc7454a3a6c49356e913d5998c11d2a8b7b4fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/zeroclaw-channels/src/discord/mod.rs:3567-3738 | crates/zeroclaw-channels/src/signal.rs:1248-1453 | crates/zeroclaw-runtime/src/security/landlock.rs:297-327 | crates/zeroclaw-tools/src/microsoft365/auth.rs:101-134 \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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":3567}}}],"partialFingerprints":{"codehealthFindingId/v1":"033d0ab1b9cc688386c1e07759051a630488007283f3839a3c2a2542b98ccfa1"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/zeroclaw-channels/src/lark.rs:3269-3319 | crates/zeroclaw-channels/src/telegram.rs:2314-2359 | crates/zeroclaw-channels/src/telegram.rs:2376-2423 | crates/zeroclaw-channels/src/telegram.rs:2451-2503 \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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":3269}}}],"partialFingerprints":{"codehealthFindingId/v1":"494771110f2b8c7d14c1e467990dd2c2ead1f079be6cdeae40065e8c95fc20ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/zeroclaw-channels/src/orchestrator/acp_server.rs:596-644 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1881-2418 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:2798-2828 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:2858-2887 \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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":596}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1e6f00cb8d486ac5abd3f8f18d47bf413489d601d752c8b19d1789d0b2d4fc9"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/zeroclaw-channels/src/orchestrator/mod.rs:1936-2092 | crates/zeroclaw-channels/src/orchestrator/mod.rs:7558-7623 | crates/zeroclaw-channels/src/util.rs:188-360 | crates/zeroclaw-tool-call-parser/src/lib.rs:1069-1089 \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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":1936}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f27ed66443924328ac14730fea5e35e91eb8c196b32ceff92aee32bc1435103"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/zeroclaw-channels/src/orchestrator/mod.rs:9288-11551 | crates/zeroclaw-hardware/src/discover.rs:66-97 | crates/zeroclaw-tools/src/weather_tool.rs:145-189 | src/main.rs:14871-14968 \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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":9288}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1b43fa3e949ad03eb7ea8136c151e637a5d44fa179c0e92fce94187c55f8799"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/zeroclaw-channels/src/signal.rs:662-710 | crates/zeroclaw-channels/src/telegram.rs:2314-2359 | crates/zeroclaw-channels/src/telegram.rs:2376-2423 | crates/zeroclaw-channels/src/telegram.rs:2451-2503 \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/zeroclaw-channels/src/signal.rs"},"region":{"startLine":662}}}],"partialFingerprints":{"codehealthFindingId/v1":"bda9e5799c96db411e02c678207b6261a35045700291ab849c375621368a1b36"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/zeroclaw-channels/src/telegram.rs:5208-5338 | crates/zeroclaw-gateway/src/api_upload.rs:91-184 | crates/zeroclaw-runtime/src/agent/agent.rs:3297-3703 | crates/zeroclaw-runtime/src/agent_lifecycle.rs:122-167 \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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":5208}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3aa8465d712d2b74fdd58b413cc4b4b60ac7f4bf76e8f31c66494c29018ff2f"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/zeroclaw-channels/src/telegram.rs:8448-8496 | crates/zeroclaw-tools/src/microsoft365/auth.rs:139-187 | crates/zeroclaw-tools/src/microsoft365/auth.rs:189-289 | crates/zeroclaw-tools/src/microsoft365/auth.rs:295-344 \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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":8448}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4d312c7cd3963ac8c2c5e3a18f7a969b45cb5be12698544b57771d73a384a83"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/zeroclaw-config/src/pairing.rs:259-295 | crates/zeroclaw-providers/src/gemini.rs:925-995 | crates/zeroclaw-tools/src/http_request.rs:564-753 | crates/zeroclaw-tools/src/web_fetch.rs:447-589 \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/zeroclaw-config/src/pairing.rs"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"c19c5c4bccfe4022e502d68f560407d817439e13642e1883ab0772095ee2348d"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/zeroclaw-config/src/schema.rs:12116-12138 | crates/zeroclaw-config/src/schema.rs:12144-12170 | crates/zeroclaw-config/src/schema.rs:12176-12206 | crates/zeroclaw-config/src/schema.rs:12261-12292 \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/zeroclaw-config/src/schema.rs"},"region":{"startLine":12116}}}],"partialFingerprints":{"codehealthFindingId/v1":"4182f7448010a3853e1e6da3457225ef713718c2164bcbf81db3466f155daf56"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/zeroclaw-gateway/src/acp.rs:62-186 | crates/zeroclaw-runtime/src/sop/mod.rs:175-233 | crates/zeroclaw-tools/src/file_download.rs:273-292 | src/main.rs:9633-14221 \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/zeroclaw-gateway/src/acp.rs"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8ce294e4e0845f4ba8baab6953ad99569f1fbbd9841fe92efc1c5892cc7002a"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/zeroclaw-infra/src/acp_session_store.rs:345-375 | crates/zeroclaw-infra/src/acp_session_store.rs:381-411 | crates/zeroclaw-infra/src/acp_session_store.rs:416-449 | crates/zeroclaw-infra/src/acp_session_store.rs:529-567 \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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"025ca93c04af466098eae05a9e9cf7869eb2556fae41a5b5ca5d8b3d09d7df46"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/zeroclaw-infra/src/acp_session_store.rs:2094-2116 | crates/zeroclaw-infra/src/acp_session_store.rs:2271-2292 | crates/zeroclaw-infra/src/acp_session_store.rs:2298-2312 | crates/zeroclaw-infra/src/acp_session_store.rs:2451-2480 \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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":2094}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fac701b95d87dd63bb3ccccbecbe216127bcb04c82814ccacc0020de0a20729"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/zeroclaw-providers/src/azure_openai.rs:542-606 | crates/zeroclaw-providers/src/glm.rs:161-215 | crates/zeroclaw-providers/src/openai.rs:494-559 | crates/zeroclaw-providers/src/telnyx.rs:159-225 \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/zeroclaw-providers/src/azure_openai.rs"},"region":{"startLine":542}}}],"partialFingerprints":{"codehealthFindingId/v1":"c927ac1e3434aa2dca15d9f8e74ab01c8b7b0040339de2f260991f1035cb006d"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/zeroclaw-providers/src/compatible.rs:3340-3368 | crates/zeroclaw-providers/src/compatible.rs:3370-3392 | crates/zeroclaw-providers/src/compatible.rs:3403-3442 | crates/zeroclaw-providers/src/openrouter.rs:414-448 \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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":3340}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5d46bcb976a1ec21ca950e09f67c72d782e6e1eb633940e96de05324bbe2e87"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/zeroclaw-providers/src/gemini.rs:356-441 | crates/zeroclaw-providers/src/gemini.rs:492-518 | crates/zeroclaw-providers/src/lib.rs:401-519 | crates/zeroclaw-providers/src/lib.rs:545-615 \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/zeroclaw-providers/src/gemini.rs"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"63b4e6bbaff984bc4a4c6a1d49ff711109f7191b6504839481d7c030ff6ec3a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/zeroclaw-runtime/src/agent/loop_.rs:1516-1533 | crates/zeroclaw-runtime/src/agent/loop_.rs:1635-3477 | crates/zeroclaw-runtime/src/agent/turn/context_recovery.rs:92-243 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:6600-7662 \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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":1516}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0b888aca3bbbaf93e26ea679f72066256fc4b1fc1aedeeb5a6d87e4da7cdea1"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/zeroclaw-runtime/src/agent/system_prompt.rs:704-739 | crates/zeroclaw-runtime/src/agent/turn/mod.rs:1662-3814 | crates/zeroclaw-runtime/src/live_config_authority.rs:241-269 | crates/zeroclaw-runtime/src/live_config_authority.rs:275-304 \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/zeroclaw-runtime/src/agent/system_prompt.rs"},"region":{"startLine":704}}}],"partialFingerprints":{"codehealthFindingId/v1":"727f92656b5dab3466f9d3e64b44d2d7c2bf63678f25b1618511a93999c0cf8f"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/zeroclaw-runtime/src/browse.rs:67-110 | crates/zeroclaw-runtime/src/browse.rs:133-156 | crates/zeroclaw-runtime/src/browse.rs:255-282 | crates/zeroclaw-runtime/src/browse.rs:291-321 \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/zeroclaw-runtime/src/browse.rs"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fc4d15f7395c339c95410a3d3137386140f3698c6f363d6647a96a72772474e"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/zeroclaw-runtime/src/rpc/dispatch.rs:4488-5569 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:5994-6453 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:6485-6578 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:8557-8666 \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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":4488}}}],"partialFingerprints":{"codehealthFindingId/v1":"513e3fe9d909af4b7df9b03b58ec6955e540c9e9881f24f72c89581bc3aa9673"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/zeroclaw-runtime/src/sop/metrics.rs:116-151 | crates/zeroclaw-runtime/src/sop/metrics.rs:156-179 | crates/zeroclaw-runtime/src/sop/metrics.rs:182-199 | crates/zeroclaw-runtime/src/sop/metrics.rs:204-227 \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/zeroclaw-runtime/src/sop/metrics.rs"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a20e257fbbb597116d6dd0a6d63edc53a4084f1a73ec04e7d46636aca406ea9"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/zeroclaw-runtime/src/tools/file_read.rs:101-323 | crates/zeroclaw-tools/src/file_edit.rs:76-257 | crates/zeroclaw-tools/src/file_write.rs:73-334 | crates/zeroclaw-tools/src/image_info.rs:151-254 \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/zeroclaw-runtime/src/tools/file_read.rs"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf4f05bc1ab3a4e36157197fc47c9a5334928e441066f34aa8b117b3ade99c57"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/zeroclaw-tool-call-parser/src/lib.rs:1206-1262 | src/main.rs:9169-9189 | tools/fill-translations/src/main.rs:84-111 | xtask/src/cmd/mdbook/check.rs:215-242 \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/zeroclaw-tool-call-parser/src/lib.rs"},"region":{"startLine":1206}}}],"partialFingerprints":{"codehealthFindingId/v1":"1901ef34587b258f880c4208acf07a0706452de8ecaaa43a0a4f6a389ee2db8d"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/zeroclaw-tools/src/browser_open.rs:108-159 | crates/zeroclaw-tools/src/http_request.rs:564-753 | crates/zeroclaw-tools/src/text_browser.rs:296-409 | crates/zeroclaw-tools/src/web_fetch.rs:447-589 \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/zeroclaw-tools/src/browser_open.rs"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"f015a4b2e0bbfbe3e0e188c85091738550be13a808ef52f55e33cacbb87d0f52"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/zeroclaw-tools/src/sessions.rs:434-521 | crates/zeroclaw-tools/src/sessions.rs:637-742 | crates/zeroclaw-tools/src/sessions.rs:895-958 | crates/zeroclaw-tools/src/sessions.rs:1021-1096 \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/zeroclaw-tools/src/sessions.rs"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"e54f322ff7fc81dda79cac4cd9b1ad2972afa9a6df5b737af0dc9d72bfec3570"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (107 corresponding lines): apps/zerocode/src/config_manager.rs:3747-3868 | apps/zerocode/src/config_manager.rs:3944-4050 \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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":3747}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dc653a8df1c9389d95a9acd268a034af2dc21e14d13f1a90116547870207b73"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (103 corresponding lines): crates/zeroclaw-providers/src/compatible.rs:4138-4241 | crates/zeroclaw-providers/src/compatible.rs:4245-4347 \u2014 These two members are one piece of code written twice and then edited apart: 103 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":4138}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0d415450ac1a6a049ffc54bbc4f06632f130666f49335d2a4ec1df07afefb3d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (100 corresponding lines): crates/zeroclaw-memory/src/qdrant.rs:740-839 | crates/zeroclaw-memory/src/qdrant.rs:1125-1229 \u2014 These two members are one piece of code written twice and then edited apart: 100 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-memory/src/qdrant.rs"},"region":{"startLine":740}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4c72526bd824f4e4b13e7e3e2c34c735dd5f73f8b56d0f87219515bbe2c8578"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (88 corresponding lines): apps/zerocode/src/config_manager.rs:5528-5620 | apps/zerocode/src/config_manager.rs:5622-5709 \u2014 These two members are one piece of code written twice and then edited apart: 88 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":5528}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9c4c16d8ee77c0c3e8618c649667f13553867d412a7854b26c13f87a2194f58"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (91 corresponding lines): crates/zeroclaw-gateway/src/canvas.rs:233-323 | crates/zeroclaw-gateway/src/ws_sop_runs.rs:94-187 \u2014 These two members are one piece of code written twice and then edited apart: 91 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-gateway/src/canvas.rs"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"6394fd4a75960665119b8b85a8b5fee032a8eee32ecddde4607c269a0cb5c5ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (92 corresponding lines): crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1778-1870 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:3029-3120 \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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":1778}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a26714b7404aefa424d2ff4a428b5c5a82f7b908f8430b722944b5c93eae852"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (93 corresponding lines): crates/zeroclaw-providers/src/auth/mod.rs:1158-1250 | crates/zeroclaw-providers/src/auth/mod.rs:1410-1504 \u2014 These two members are one piece of code written twice and then edited apart: 93 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-providers/src/auth/mod.rs"},"region":{"startLine":1158}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc47149578b3b83c9a513de5463debcef7d1dea413f15416e8abe44a132ba5a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (55 corresponding lines): crates/zeroclaw-memory/src/sqlite.rs:1955-2018 | crates/zeroclaw-memory/src/sqlite.rs:2152-2206 \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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":1955}}}],"partialFingerprints":{"codehealthFindingId/v1":"96293fecdc6073e973dd93f4ff5284320c4697dbd3c87b02e85351985614f6c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (71 corresponding lines): crates/zeroclaw-providers/src/compatible.rs:1016-1086 | crates/zeroclaw-providers/src/compatible.rs:1095-1171 \u2014 These two members are one piece of code written twice and then edited apart: 71 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":1016}}}],"partialFingerprints":{"codehealthFindingId/v1":"52fff82a39db0e99873a4249ad21cf81b944642becf8280c026a47ca805db43b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (60 corresponding lines): crates/zeroclaw-providers/src/anthropic.rs:943-1002 | crates/zeroclaw-providers/src/bedrock.rs:1335-1396 \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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":943}}}],"partialFingerprints":{"codehealthFindingId/v1":"58132d4a961ac86afe42b1819eecd1df021a57a12acbb177a03722be04fefcab"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (78 corresponding lines): crates/zeroclaw-providers/src/reliable.rs:4111-4192 | crates/zeroclaw-providers/src/reliable.rs:4200-4277 \u2014 These two members are one piece of code written twice and then edited apart: 78 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":4111}}}],"partialFingerprints":{"codehealthFindingId/v1":"a64ec625be360c6815f47e6604017bd0e9e00452b5e5024a75f0a6cb1a92216c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (56 corresponding lines): crates/zeroclaw-tools/src/web_search_tool.rs:1120-1175 | crates/zeroclaw-tools/src/web_search_tool.rs:1488-1555 \u2014 These two members are one piece of code written twice and then edited apart: 56 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/web_search_tool.rs"},"region":{"startLine":1120}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c9a7ac8ce1975718706a8d032bde4e0228adc84c3d4ed4fc2bcaebc6aaf2051"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (52 corresponding lines): crates/zeroclaw-runtime/src/rpc/dispatch.rs:10000-10074 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:10738-10789 \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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":10000}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f12f93d54734fec75c4ef64b1ae5d251b40bf19b1f3cd088c92ef70870c6bd4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (52 corresponding lines): crates/zeroclaw-memory/src/postgres.rs:400-451 | crates/zeroclaw-memory/src/postgres.rs:755-817 \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/zeroclaw-memory/src/postgres.rs"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f708ee214dc208f70249cb80ac2672cfa486c6221b9d7ea714e64c3daae7942"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 66\u002B corresponding lines): crates/zeroclaw-infra/src/acp_session_store.rs:841-906 | crates/zeroclaw-infra/src/acp_session_store.rs:1093-1160 | crates/zeroclaw-infra/src/acp_session_store.rs:1217-1287 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 66 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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":841}}}],"partialFingerprints":{"codehealthFindingId/v1":"038cc9aefa86c69b0eece1535898a2e4a101f7fd1f3ec035bb12fac51ab56acd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (58 corresponding lines): crates/zeroclaw-gateway/src/canvas.rs:164-226 | crates/zeroclaw-gateway/src/ws_sop_runs.rs:31-88 \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/zeroclaw-gateway/src/canvas.rs"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"69a503957914683982f311b9f29e11ad2d7ff001d12f413fb5df3d32ed5d2ad5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (64 corresponding lines): crates/zeroclaw-memory/src/qdrant.rs:153-216 | crates/zeroclaw-memory/src/qdrant.rs:854-919 \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/zeroclaw-memory/src/qdrant.rs"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec913e479f8c2f308595dc288ee46d96ec649f4a6b17f1fa370ed9ffb6cd4efb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (52 corresponding lines): src/skills/discovery.rs:512-572 | src/skills/discovery.rs:574-625 \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":"src/skills/discovery.rs"},"region":{"startLine":512}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e929267a74d870f50351c676e6bc1487d174e4572bb9fc68a3b188495380524"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (67 corresponding lines): crates/zeroclaw-channels/src/discord/mod.rs:4019-4085 | crates/zeroclaw-channels/src/slack.rs:6245-6322 \u2014 These two members are one piece of code written twice and then edited apart: 67 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":4019}}}],"partialFingerprints":{"codehealthFindingId/v1":"9116eb4b2343a49de6809716f070830bc8574cb4b70e36ea899f741ad91b31a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (44 corresponding lines): crates/zeroclaw-runtime/src/sop/engine.rs:6461-6512 | crates/zeroclaw-runtime/src/sop/engine.rs:6520-6563 \u2014 These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":6461}}}],"partialFingerprints":{"codehealthFindingId/v1":"6df10d06c3666d3eacc76bfa94ff76d6c933dfb0bade155fe89a12a3d44267f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (41 corresponding lines): crates/zeroclaw-memory/src/sqlite.rs:1716-1756 | crates/zeroclaw-memory/src/sqlite.rs:2539-2579 \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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":1716}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf9ad46cecef0a1aac7b5f32c7e8760c0046d0e6faddd20bafd44b7c1af98fbe"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (48 corresponding lines): crates/zeroclaw-tool-call-parser/src/lib.rs:1439-1486 | crates/zeroclaw-tool-call-parser/src/lib.rs:1488-1559 \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/zeroclaw-tool-call-parser/src/lib.rs"},"region":{"startLine":1439}}}],"partialFingerprints":{"codehealthFindingId/v1":"5eac1e3af608f3a2067b36120cd8ef009392b4a15109e0286ccd25ae7a7b4731"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (39 corresponding lines): crates/zeroclaw-channels/src/whatsapp_web.rs:4419-4457 | crates/zeroclaw-channels/src/whatsapp_web.rs:4459-4497 \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/zeroclaw-channels/src/whatsapp_web.rs"},"region":{"startLine":4419}}}],"partialFingerprints":{"codehealthFindingId/v1":"166bb57a2d7a34c6fb6ee39c36d2eaa3d655edb8ee3435094b5b56dcf3a4caf1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (58 corresponding lines): crates/zeroclaw-log/src/reader.rs:989-1047 | crates/zeroclaw-log/src/reader.rs:1055-1112 \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/zeroclaw-log/src/reader.rs"},"region":{"startLine":989}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c44d233819587f2ca72474c0843904c8a12533c2dd26c570281ff2c31e4e4bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (53 corresponding lines): crates/zeroclaw-channels/src/matrix.rs:5472-5535 | crates/zeroclaw-channels/src/signal.rs:1529-1581 \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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":5472}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0b0ae21ac71715fcdd8b92e47920a296d548183a4fa5aa1e698fb0b522dd7de"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (57 corresponding lines): crates/zeroclaw-gateway/src/ws.rs:1876-1947 | crates/zeroclaw-runtime/src/rpc/turn.rs:476-532 \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/zeroclaw-gateway/src/ws.rs"},"region":{"startLine":1876}}}],"partialFingerprints":{"codehealthFindingId/v1":"021325feda7bcae866af94003945af18f94ccd6f8d56eac75f5bab1550176eb9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (51 corresponding lines): crates/zeroclaw-channels/src/slack.rs:1264-1314 | crates/zeroclaw-channels/src/slack.rs:4173-4227 \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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":1264}}}],"partialFingerprints":{"codehealthFindingId/v1":"977a3897152682aa714c959528bbaf37a4e3b6afe7715097ea1b804a4f5bb2a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (50 corresponding lines): crates/zeroclaw-runtime/src/cron/store.rs:622-692 | crates/zeroclaw-runtime/src/cron/store.rs:707-756 \u2014 These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/cron/store.rs"},"region":{"startLine":622}}}],"partialFingerprints":{"codehealthFindingId/v1":"33fc00027c7cfc2f89b69f61f6b741e4f9c802df11d8eb3146dfc44eb78fb7ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (67 corresponding lines): crates/zeroclaw-tools/src/hardware_board_info.rs:88-154 | crates/zeroclaw-tools/src/hardware_memory_map.rs:71-139 \u2014 These two members are one piece of code written twice and then edited apart: 67 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/hardware_board_info.rs"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8e67113ffd97ff73110cd6df3f424594096088cfbf3251c9121bd7e0102a7d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 47\u002B corresponding lines): crates/zeroclaw-hardware/src/introspect.rs:86-132 | crates/zeroclaw-tools/src/hardware_board_info.rs:158-207 | crates/zeroclaw-tools/src/hardware_memory_map.rs:143-193 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 47 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/zeroclaw-hardware/src/introspect.rs"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3f947e54cf78f0514d8aeb9b14860cae2c0a84b92de940cc21d9a2188a0aff3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (41 corresponding lines): crates/zeroclaw-channels/src/matrix.rs:4615-4655 | crates/zeroclaw-channels/src/matrix.rs:4680-4723 \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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":4615}}}],"partialFingerprints":{"codehealthFindingId/v1":"93036ecd1d46ba1df73c8c2eca7f6ed347c9e88f10ca53e13d099748d7ab0e56"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (52 corresponding lines): crates/zeroclaw-runtime/src/verifiable_intent/issuance.rs:36-87 | crates/zeroclaw-runtime/src/verifiable_intent/issuance.rs:112-201 \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/zeroclaw-runtime/src/verifiable_intent/issuance.rs"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"22ec9a3d4146ae914e8ad54f00a0109dbc24928d155c5ca820012d08b28a8d71"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (41 corresponding lines): apps/zerocode/src/jsonrpc.rs:221-261 | crates/zeroclaw-api/src/jsonrpc.rs:370-417 \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":"apps/zerocode/src/jsonrpc.rs"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"c48174dd32d82e2f69b450220b4ad9947049c21f10d8ddb0b96e2ed106bdf1b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (51 corresponding lines): crates/zeroclaw-runtime/src/tools/delegate.rs:2631-2684 | crates/zeroclaw-runtime/src/tools/delegate.rs:2690-2740 \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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":2631}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbc3b0af204beb444e630cd41b27717f1a7a883fcd4f2b33573febc53c8a423b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (40 corresponding lines): crates/zeroclaw-gateway/src/api_sop_author.rs:113-152 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:13512-13557 \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/zeroclaw-gateway/src/api_sop_author.rs"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bce62fa44ca5cc1cf4f5b2b5a6b31d20578f648dcf17cfddfff961f4d3536d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (32 corresponding lines): crates/zeroclaw-runtime/src/i18n.rs:209-240 | crates/zeroclaw-tools/src/i18n.rs:78-109 \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/zeroclaw-runtime/src/i18n.rs"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"45d57d1b275a2ff73f8c1a78690a54b11453869092b9e4f9387f9a8c5fae8137"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (41 corresponding lines): apps/zerocode/src/dashboard.rs:976-1023 | apps/zerocode/src/dashboard.rs:1652-1692 \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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":976}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee1abd771b7ff838b1683167c53329125abd3887ad349c5f1a8242557ba6367b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (44 corresponding lines): crates/zeroclaw-tools/src/http_request.rs:761-807 | crates/zeroclaw-tools/src/web_fetch.rs:780-823 \u2014 These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/http_request.rs"},"region":{"startLine":761}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7f52aa2cb2a94904bc4e324623f110f6b7491336d12f59fdcaf7a473e0e6fee"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (33 corresponding lines): crates/zeroclaw-channels/src/lark.rs:2886-2918 | crates/zeroclaw-channels/src/lark.rs:3368-3409 \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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":2886}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6c42365d5a1acc50d37c87f410e15260021592414d05bb95a9899ae6df90766"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (36 corresponding lines): crates/zeroclaw-runtime/src/tools/delegate.rs:658-693 | crates/zeroclaw-runtime/src/tools/delegate.rs:719-754 \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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":658}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b5485605bbc300ebfebba8b201079dd0f67ac7e52c41fb314b8d3f6307d31a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (33 corresponding lines): crates/zeroclaw-runtime/src/tools/verifiable_intent.rs:122-160 | crates/zeroclaw-runtime/src/tools/verifiable_intent.rs:223-255 \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/zeroclaw-runtime/src/tools/verifiable_intent.rs"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"b09530e4cde532581dc1c690092294243e71c59a763bbb25f1de326579db8e1e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (48 corresponding lines): crates/zeroclaw-memory/src/hygiene.rs:212-262 | crates/zeroclaw-memory/src/hygiene.rs:308-355 \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/zeroclaw-memory/src/hygiene.rs"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8347d89b4bff425e7406bf3e7418b61684a97b251876281a2bc1fc0d47061c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 50\u002B corresponding lines): crates/zeroclaw-providers/src/auth/email_oauth2.rs:124-173 | crates/zeroclaw-providers/src/auth/openai_oauth.rs:169-226 | crates/zeroclaw-providers/src/auth/xai_oauth.rs:269-319 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 50 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/zeroclaw-providers/src/auth/email_oauth2.rs"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"681e97a8f4b25dbf6f664f5027d8de403392e18c08bb3f96b7eaf5ff01d791d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (35 corresponding lines): crates/zeroclaw-gateway/src/api_config.rs:1693-1738 | crates/zeroclaw-gateway/src/api_config.rs:2164-2198 \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/zeroclaw-gateway/src/api_config.rs"},"region":{"startLine":1693}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc18e6a210505ed0ff2408ce1e328b3ecdd64d22ecfae6560e605e1a955af4d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (6 members, 41\u002B corresponding lines): crates/zeroclaw-channels/src/discord/markers.rs:48-91 | crates/zeroclaw-channels/src/qq.rs:155-199 | crates/zeroclaw-channels/src/slack.rs:346-389 | crates/zeroclaw-channels/src/telegram.rs:1048-1092 | crates/zeroclaw-channels/src/util.rs:376-416 | crates/zeroclaw-channels/src/wechat.rs:346-390 \u2014 These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 41 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/zeroclaw-channels/src/discord/markers.rs"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"c65b48a810bad80b4caf20e197f3dd1ac61bfff0a8011a79cbe070dec4e0fc30"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (34 corresponding lines): crates/zeroclaw-channels/src/line.rs:1104-1138 | crates/zeroclaw-channels/src/line.rs:1141-1174 \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/zeroclaw-channels/src/line.rs"},"region":{"startLine":1104}}}],"partialFingerprints":{"codehealthFindingId/v1":"58995c5d1e5d41beee71570fa4cc8d98c6b288ab767b70f3284847b32c565d07"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 40\u002B corresponding lines): crates/zeroclaw-config/src/alias_refs.rs:315-359 | crates/zeroclaw-config/src/alias_refs.rs:390-429 | crates/zeroclaw-config/src/alias_refs.rs:462-517 \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":"crates/zeroclaw-config/src/alias_refs.rs"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbd06d6d3554688a2e561fd9c25291e6a40155579bc3b03f68b849f8ce747138"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (45 corresponding lines): crates/zeroclaw-tools/src/linkedin_client.rs:309-365 | crates/zeroclaw-tools/src/linkedin_client.rs:490-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/zeroclaw-tools/src/linkedin_client.rs"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"b50a0c66936f07204d8b896f4d28291992fdcb122cfa602baf08a96c6b3d06ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (35 corresponding lines): crates/zeroclaw-config/src/migration.rs:2616-2650 | crates/zeroclaw-config/src/migration.rs:2803-2838 \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/zeroclaw-config/src/migration.rs"},"region":{"startLine":2616}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b079f38d2354690220cb711bd5a77e26ff085c221c5e545074d95fb01d453b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): apps/zerocode/src/mouse.rs:161-185 | crates/zeroclaw-channels/src/irc.rs:117-149 \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":"apps/zerocode/src/mouse.rs"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"218dbcf5de15ca06ae1d742204a38a74f6223364b82f1c92052011e914514c62"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (38 corresponding lines): crates/zeroclaw-tools/src/git_operations.rs:1628-1665 | crates/zeroclaw-tools/src/git_operations.rs:1671-1713 \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/zeroclaw-tools/src/git_operations.rs"},"region":{"startLine":1628}}}],"partialFingerprints":{"codehealthFindingId/v1":"15f7858b87ada4f36c3e8d0c97efd6d3d1381b01bd392d7e733f4bb9ae8dafa1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): crates/zeroclaw-runtime/src/rpc/session.rs:1852-1875 | crates/zeroclaw-runtime/src/rpc/session.rs:2635-2658 \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/zeroclaw-runtime/src/rpc/session.rs"},"region":{"startLine":1852}}}],"partialFingerprints":{"codehealthFindingId/v1":"c556b77b03c6ba4c794d106152f9133588d0a9bd36a5d32a8287a3b2b7fe39b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (36 corresponding lines): crates/zeroclaw-runtime/src/skills/mod.rs:1296-1332 | crates/zeroclaw-runtime/src/skills/mod.rs:3045-3080 \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/zeroclaw-runtime/src/skills/mod.rs"},"region":{"startLine":1296}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bb93bc411c3ee3b0d7540335acef4fdaa081f3cf72e29f07a1e6f0789f5edf8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (53 corresponding lines): src/alias_cli/mod.rs:756-808 | src/alias_cli/mod.rs:827-884 \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":"src/alias_cli/mod.rs"},"region":{"startLine":756}}}],"partialFingerprints":{"codehealthFindingId/v1":"67dd8d0684d203d9373a8bf04a3c292e66bfb441e6390a73abfb56f69a4b3278"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 30\u002B corresponding lines): crates/zeroclaw-channels/src/acp_channel.rs:133-165 | crates/zeroclaw-channels/src/acp_channel.rs:367-408 | crates/zeroclaw-runtime/src/rpc/approval_channel.rs:225-254 | crates/zeroclaw-runtime/src/rpc/approval_channel.rs:265-294 \u2014 These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/acp_channel.rs"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"9df49b57f29c71144fe8bbc7c84585839515dfbfe787f8b868beb915859efb3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (34 corresponding lines): crates/zeroclaw-runtime/src/sop/engine.rs:3787-3820 | crates/zeroclaw-runtime/src/sop/engine.rs:3836-3877 \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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":3787}}}],"partialFingerprints":{"codehealthFindingId/v1":"823d5dbf0d295ab9e09add21fa59fa25935b59e58337ef46d64956b737ae8550"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (39 corresponding lines): crates/zeroclaw-tools/src/model_routing_config.rs:1759-1799 | crates/zeroclaw-tools/src/proxy_config.rs:512-550 \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/zeroclaw-tools/src/model_routing_config.rs"},"region":{"startLine":1759}}}],"partialFingerprints":{"codehealthFindingId/v1":"68f6633c70df20a259c40a20eb6daeb351d9f88bef3791d6a72c989db0a53bb2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): crates/zeroclaw-channels/src/lark.rs:2521-2549 | crates/zeroclaw-channels/src/lark.rs:2556-2584 \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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":2521}}}],"partialFingerprints":{"codehealthFindingId/v1":"b93f7649f145c685ef0e7f76cffb9577f96e35d3dfad5fe4f88d2147658151f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (31 corresponding lines): crates/zeroclaw-channels/src/transcription.rs:210-241 | crates/zeroclaw-channels/src/transcription.rs:317-347 \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":"crates/zeroclaw-channels/src/transcription.rs"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1fbea1cdef25c5c84bc422a92a12aa1dbb2b2edd648ef70fce9717c6bbd15b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): crates/zeroclaw-runtime/src/i18n.rs:247-273 | crates/zeroclaw-tools/src/i18n.rs:116-142 \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/zeroclaw-runtime/src/i18n.rs"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d1355245ae487f92a954fd820beb831dae8bbf0dc3ee1cc9c1ff1d778037571"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (32 corresponding lines): apps/zerocode/src/enroll.rs:716-747 | crates/zeroclaw-runtime/src/sop/mod.rs:383-418 \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":"apps/zerocode/src/enroll.rs"},"region":{"startLine":716}}}],"partialFingerprints":{"codehealthFindingId/v1":"de5eb469d888262a1b0f368279583391efe4e443070ae3677ab3965e9519cbb6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): crates/zeroclaw-config/src/providers.rs:499-524 | crates/zeroclaw-config/src/providers.rs:529-558 \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/zeroclaw-config/src/providers.rs"},"region":{"startLine":499}}}],"partialFingerprints":{"codehealthFindingId/v1":"01178826a709dad5697ef8b815bc5825346ecab5bd5f35341743d8965f9e7bee"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 34\u002B corresponding lines): crates/zeroclaw-channels/src/telegram.rs:6591-6625 | crates/zeroclaw-channels/src/telegram.rs:7059-7092 | crates/zeroclaw-channels/src/telegram.rs:7101-7134 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 34 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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":6591}}}],"partialFingerprints":{"codehealthFindingId/v1":"233619acfb99834068b71a6b4edb7af8c08e7caae6433c53df35be1afc8e9dc7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (30 corresponding lines): crates/zeroclaw-channels/src/orchestrator/mod.rs:7303-7332 | crates/zeroclaw-runtime/src/agent/turn/stream_guard.rs:603-632 \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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":7303}}}],"partialFingerprints":{"codehealthFindingId/v1":"71849834dae499ccc928bf0ea3d98f37378266d7b33e107a6166bcb8f994281d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): crates/zeroclaw-gateway/src/nodes/mdns.rs:308-335 | crates/zeroclaw-gateway/src/nodes/mdns.rs:337-362 \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/zeroclaw-gateway/src/nodes/mdns.rs"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5a2a65be537c6a90e07808502bbfe6c9dfd30fb19899073864ea3ff1dbd6607"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (53 corresponding lines): src/alias_cli/mod.rs:145-197 | src/alias_cli/mod.rs:471-524 \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":"src/alias_cli/mod.rs"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c5b81db744f746c166abd15daa426719a4552e29d60c57c3abecf9a5526d477"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (44 corresponding lines): crates/zeroclaw-runtime/src/cron/store.rs:173-221 | crates/zeroclaw-runtime/src/cron/store.rs:236-279 \u2014 These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/cron/store.rs"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8b60228102247cb18050a51c0c70adcfe2041ace0ccf6f4f8530b2ac47152f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 37\u002B corresponding lines): crates/zeroclaw-channels/src/slack.rs:1319-1355 | crates/zeroclaw-channels/src/slack.rs:5723-5761 | crates/zeroclaw-channels/src/slack.rs:5768-5806 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 37 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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":1319}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a67ef38dbc693278a2565b796a9dca5315f702e061fbe3352204e404dd699d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): crates/zeroclaw-channels/src/line.rs:115-143 | crates/zeroclaw-channels/src/line.rs:152-187 \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/zeroclaw-channels/src/line.rs"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0a2101a0d26ca16a3cc9325fdfef0ac057202d5eeabcf23c050a667fc1987ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (42 corresponding lines): crates/zeroclaw-infra/src/acp_session_store.rs:302-343 | crates/zeroclaw-infra/src/acp_session_store.rs:468-521 \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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc316145c8c54536df4d84ed0a5e7f4bacc33b2934f80b9f754d7cbcadb67bbf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (31 corresponding lines): crates/zeroclaw-runtime/src/rpc/session.rs:948-978 | crates/zeroclaw-runtime/src/rpc/session.rs:1140-1173 \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":"crates/zeroclaw-runtime/src/rpc/session.rs"},"region":{"startLine":948}}}],"partialFingerprints":{"codehealthFindingId/v1":"57654d994a8b2c6fab2d886ee6daace8b2e6b449d4b24c14d242074e9bc2005f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): crates/zeroclaw-runtime/src/rpc/dispatch.rs:9545-9572 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:9574-9606 \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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":9545}}}],"partialFingerprints":{"codehealthFindingId/v1":"a063c481104b51e44b4db8f0bcb014fe645b05f38933f09ec6ae1dba5db1b3cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (37 corresponding lines): crates/zeroclaw-providers/src/compatible.rs:1460-1496 | crates/zeroclaw-providers/src/compatible.rs:4040-4076 \u2014 These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":1460}}}],"partialFingerprints":{"codehealthFindingId/v1":"34f9fb4d111a11166fce6c0e92ff69618a706b88d4be74cd47842c3a14a2cf96"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (32 corresponding lines): crates/zeroclaw-config/src/platform/native.rs:125-160 | crates/zeroclaw-runtime/src/live_config_authority.rs:755-786 \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/zeroclaw-config/src/platform/native.rs"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"db1da78cdfec2126db32d8ed8fe9f34b5a82a8b8cb4af51dfc689ce78fd6aedd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (74 corresponding lines): crates/zeroclaw-config/src/policy.rs:5131-5215 | crates/zeroclaw-config/src/policy.rs:5313-5386 \u2014 These two members are one piece of code written twice and then edited apart: 74 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-config/src/policy.rs"},"region":{"startLine":5131}}}],"partialFingerprints":{"codehealthFindingId/v1":"99bc3a4a191fdb28baaa47a0fa66386391e8d0dc6c781c3001fe4341123643ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): crates/zeroclaw-tools/src/data_management.rs:337-376 | crates/zeroclaw-tools/src/data_management.rs:382-410 \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/zeroclaw-tools/src/data_management.rs"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd28b50fe95b120bc951751d7587b46302e1d2bdd5d44357f37e39615f40b105"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (38 corresponding lines): crates/zeroclaw-config/src/schema/v2.rs:3288-3325 | crates/zeroclaw-config/src/schema/v2.rs:3333-3372 \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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":3288}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bbc97717443e16bb14510f3c897a1b0f6a3d50f2e76cb233b7690333ed85282"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): crates/zeroclaw-memory/src/agent_scoped_markdown.rs:174-201 | crates/zeroclaw-memory/src/agent_scoped_markdown.rs:211-254 \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/zeroclaw-memory/src/agent_scoped_markdown.rs"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e0ad6135241f7e7dce73211f930fdbc7f5cefe264619288d06a3bb0631c7072"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (36 corresponding lines): crates/zeroclaw-runtime/src/tools/delegate.rs:2177-2213 | crates/zeroclaw-runtime/src/tools/delegate.rs:2220-2255 \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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":2177}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb61ab54b8ce0398ccd74d0b61586fc40e65dcb5df9d157ae936cd1b34cb5652"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (37 corresponding lines): crates/zeroclaw-memory/src/hygiene.rs:168-210 | crates/zeroclaw-memory/src/hygiene.rs:270-306 \u2014 These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-memory/src/hygiene.rs"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe609cafc38ff2918912d42a2ee75b387c725fb6451589acf8033d01d2ba41eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): crates/zeroclaw-providers/src/dispatch.rs:517-541 | crates/zeroclaw-providers/src/dispatch.rs:550-574 \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/zeroclaw-providers/src/dispatch.rs"},"region":{"startLine":517}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe4fa2757528f2748a81a9047cb4955ba560832090996478ead616d1edb4d496"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (50 corresponding lines): crates/zeroclaw-runtime/src/verifiable_intent/verification.rs:352-407 | crates/zeroclaw-runtime/src/verifiable_intent/verification.rs:412-461 \u2014 These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/verifiable_intent/verification.rs"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"4be132fdb8a5851b5ee095f48b8874c4de6375ff95eb977a8b4594c5a7f9b99d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): crates/zeroclaw-channels/src/telegram.rs:977-1000 | crates/zeroclaw-channels/src/wechat.rs:304-327 \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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":977}}}],"partialFingerprints":{"codehealthFindingId/v1":"92bda2ab79236691aae2a72581d7d51401f26a6aab575e3f39de76e8b1a547dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 29\u002B corresponding lines): crates/zeroclaw-providers/src/auth/gemini_oauth.rs:101-150 | crates/zeroclaw-providers/src/auth/gemini_oauth.rs:157-204 | crates/zeroclaw-providers/src/auth/xai_oauth.rs:321-349 \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/zeroclaw-providers/src/auth/gemini_oauth.rs"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"06dab440bc8d6dc226d6d32032257c60a25cf0613058061d9c13744a551b3c55"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (35 corresponding lines): crates/zeroclaw-runtime/src/cron/store.rs:417-451 | crates/zeroclaw-runtime/src/cron/store.rs:453-496 \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/zeroclaw-runtime/src/cron/store.rs"},"region":{"startLine":417}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9fb30032a9380c6c54d417b06a6f81e7a3442005bdb9b0916ea155b0cb43d83"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): crates/zeroclaw-tools/src/web_search_tool.rs:566-594 | crates/zeroclaw-tools/src/web_search_tool.rs:1817-1847 \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/zeroclaw-tools/src/web_search_tool.rs"},"region":{"startLine":566}}}],"partialFingerprints":{"codehealthFindingId/v1":"c964bc124b77d7b9456965810e297069c428a28c767ae270a2c8003702214f77"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (32 corresponding lines): crates/zeroclaw-runtime/src/security/estop.rs:211-248 | crates/zeroclaw-runtime/src/security/otp.rs:131-162 \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/zeroclaw-runtime/src/security/estop.rs"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4e0773ea615284e3063d6a6d1475a6f940fbb923c67eb07443c0a857cf596b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (32 corresponding lines): crates/zeroclaw-tools/src/a2a_client.rs:1146-1178 | crates/zeroclaw-tools/src/a2a_client.rs:1188-1219 \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/zeroclaw-tools/src/a2a_client.rs"},"region":{"startLine":1146}}}],"partialFingerprints":{"codehealthFindingId/v1":"08db09583392d7aca5b6fb6cc086cc5c91c01127880895ddf219725d6e3aeb70"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (38 corresponding lines): xtask/src/bin/web.rs:239-276 | xtask/src/bin/web.rs:283-321 \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":"xtask/src/bin/web.rs"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"47005ea9c23960738e1120415b3e26ad46dd067203cadcb35cb7805ba5f4c90e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (48 corresponding lines): crates/zeroclaw-config/src/policy.rs:2948-2999 | crates/zeroclaw-config/src/policy.rs:3002-3049 \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/zeroclaw-config/src/policy.rs"},"region":{"startLine":2948}}}],"partialFingerprints":{"codehealthFindingId/v1":"9956c1b14b2ae2b478ac5467dddb966153e86dba613da6d3554fb183dd279182"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): crates/zeroclaw-api/src/channel.rs:1017-1043 | crates/zeroclaw-channels/src/signal.rs:1204-1246 \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/zeroclaw-api/src/channel.rs"},"region":{"startLine":1017}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad5e73356a64bc95f8844a989cf0b7f03f791adea48424c72b70eaeaf5f32ec6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): crates/zeroclaw-infra/src/session_sqlite.rs:1023-1049 | crates/zeroclaw-infra/src/session_sqlite.rs:1385-1417 \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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":1023}}}],"partialFingerprints":{"codehealthFindingId/v1":"16ffe159869970dbaaf6e0b948e75e7d6fd2231327e6257089d6f77e81fca094"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/zeroclaw-config/src/providers.rs:256-272 | crates/zeroclaw-config/src/providers.rs:278-294 \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/zeroclaw-config/src/providers.rs"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"a914d1baf4d127b104d571daeb5432df7f4380ed96a39a52e9e3ccaec5e9a09c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): crates/zeroclaw-gateway/src/principal_gate.rs:632-661 | crates/zeroclaw-gateway/src/principal_gate.rs:671-698 \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/zeroclaw-gateway/src/principal_gate.rs"},"region":{"startLine":632}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f65fe60540bd87e2a843057cf9a4c1a26381f846d7ebd52aabae3f0a28e4fb2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): crates/zeroclaw-runtime/src/rpc/dispatch.rs:978-997 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:1005-1028 \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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":978}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cbd3506db3d83f9c507eb883ba41f64769b5475b6b7db4ed24ea96ea7a42b8e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (40 corresponding lines): crates/zeroclaw-tools/src/content_search.rs:749-794 | crates/zeroclaw-tools/src/content_search.rs:804-843 \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/zeroclaw-tools/src/content_search.rs"},"region":{"startLine":749}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8c8a8eae599e0a93abccb1c7f1699293c79f31d349f0076cd9a3b66d4ce515e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (30 corresponding lines): apps/zerocode/src/config_manager.rs:3870-3900 | apps/zerocode/src/config_manager.rs:4052-4081 \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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":3870}}}],"partialFingerprints":{"codehealthFindingId/v1":"4689aead8eacd662aad154e39e3e65cf39d0c6aa10442be8eb495e3233f0ebb8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (33 corresponding lines): crates/zeroclaw-channels/src/tts.rs:117-152 | crates/zeroclaw-channels/src/tts.rs:961-993 \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/zeroclaw-channels/src/tts.rs"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1c70c9793ec9d9de55d16d8f9eef866c6daeb5481d881940bf93348e180858a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): crates/zeroclaw-providers/src/auth/gemini_oauth.rs:71-93 | crates/zeroclaw-providers/src/auth/openai_oauth.rs:71-89 \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/zeroclaw-providers/src/auth/gemini_oauth.rs"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"e18e5f4545d957a09013245b395f8bba5846752f43f1f7a103189109f204c4e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (44 corresponding lines): crates/zeroclaw-channels/src/login_probe.rs:42-85 | crates/zeroclaw-channels/src/login_relink.rs:70-116 \u2014 These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/login_probe.rs"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d676e9ca8e61b21404f59ae35d22963b6f7cb2c57deb8073fb8f7e2d398122a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): crates/zeroclaw-providers/src/grok_cli/acp.rs:586-615 | crates/zeroclaw-providers/src/grok_cli/acp.rs:622-648 \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/zeroclaw-providers/src/grok_cli/acp.rs"},"region":{"startLine":586}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9373305fe843491040b7c0157618ef75b6e18f416e4f5228e452d57279b2ee3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (30 corresponding lines): crates/zeroclaw-channels/src/mochat.rs:101-132 | crates/zeroclaw-channels/src/wecom.rs:76-105 \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/zeroclaw-channels/src/mochat.rs"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"0513ec1edd6abfc13e56293e9e1c7d8ff90cdf8e4ef6a771415fec6fdb60de20"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): apps/zerocode/src/chat.rs:10917-10952 | apps/zerocode/src/chat.rs:10954-10981 \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":"apps/zerocode/src/chat.rs"},"region":{"startLine":10917}}}],"partialFingerprints":{"codehealthFindingId/v1":"d23fa4d32c03595e943af6722adbe6551269b4bfa1eb7b6b207bc648b398dec3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): xtask/src/cmd/mdbook/peer_groups.rs:759-780 | xtask/src/cmd/mdbook/peer_groups.rs:963-989 \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":"xtask/src/cmd/mdbook/peer_groups.rs"},"region":{"startLine":759}}}],"partialFingerprints":{"codehealthFindingId/v1":"21c3f0b30a56efdb97f76b99708ae5754434c35afd2eee4c1c598bbb5a563e34"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): crates/zeroclaw-channels/src/wechat.rs:869-890 | crates/zeroclaw-channels/src/whatsapp_web.rs:1290-1311 \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/zeroclaw-channels/src/wechat.rs"},"region":{"startLine":869}}}],"partialFingerprints":{"codehealthFindingId/v1":"c684eec08ad2ab1d890ac338357769ef6c28967d1f6ecc3c4859df431aad1dac"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 16\u002B corresponding lines): crates/zeroclaw-channels/src/acp_channel.rs:192-219 | crates/zeroclaw-channels/src/acp_channel.rs:225-267 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:3306-3321 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:3323-3338 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\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/zeroclaw-channels/src/acp_channel.rs"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"58a96726679a595726e5dad17e6dd94837be0f08469af5cea27551f37960a044"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (33 corresponding lines): crates/zeroclaw-infra/src/acp_session_store.rs:2177-2212 | crates/zeroclaw-infra/src/acp_session_store.rs:2237-2269 \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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":2177}}}],"partialFingerprints":{"codehealthFindingId/v1":"15e71bb3a2f9bc27351ec7782d36437d48af556df340c6f0129ab9be40336cb0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): apps/zerocode/src/config_manager.rs:3114-3139 | apps/zerocode/src/config_manager.rs:3150-3179 \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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":3114}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a418a8f142f643f0421c60570f866725d1efe9134cb351478735f88ddc5e093"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): crates/zeroclaw-runtime/src/sop/engine.rs:1795-1817 | crates/zeroclaw-runtime/src/sop/engine.rs:1822-1844 \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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":1795}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b737591671dda530835b762e73b69c0b3775a4e6a011fca4e51cc90e68449b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): crates/zeroclaw-runtime/src/sop/executor.rs:1512-1533 | crates/zeroclaw-runtime/src/tools/skill_manage.rs:725-751 \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/zeroclaw-runtime/src/sop/executor.rs"},"region":{"startLine":1512}}}],"partialFingerprints":{"codehealthFindingId/v1":"87c8f0f5c5442c5f4b4e4bb9a858ff926e11f08a1b90c29b6cf939b52ca5a8c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): crates/zeroclaw-infra/src/session_sqlite.rs:1056-1076 | crates/zeroclaw-infra/src/session_sqlite.rs:1426-1446 \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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":1056}}}],"partialFingerprints":{"codehealthFindingId/v1":"acf70df196edd99504c6fc2b5c7d980b29a96a920b2f3e016a62b5271b9248e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 23\u002B corresponding lines): crates/zeroclaw-log/src/writer.rs:826-849 | crates/zeroclaw-log/src/writer.rs:854-876 | crates/zeroclaw-log/src/writer.rs:880-904 \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/zeroclaw-log/src/writer.rs"},"region":{"startLine":826}}}],"partialFingerprints":{"codehealthFindingId/v1":"de9190d07439a69893958e749055db3049007cc2670e6850b929d40d18490991"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): crates/zeroclaw-providers/src/openai.rs:852-882 | crates/zeroclaw-providers/src/openai_codex.rs:575-600 \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/zeroclaw-providers/src/openai.rs"},"region":{"startLine":852}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfb5fc0ad89d6c06dc3b6c2021d5b7eda0a71796514235d4ea46cdb649a99aaf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 32\u002B corresponding lines): crates/zeroclaw-providers/src/auth/email_oauth2.rs:85-116 | crates/zeroclaw-providers/src/auth/openai_oauth.rs:131-164 | crates/zeroclaw-providers/src/auth/xai_oauth.rs:225-263 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 32 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/zeroclaw-providers/src/auth/email_oauth2.rs"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5bdeb61d93b8657b5f94e3ac0895c2531dfe41b43ae33e9c33ae64fd27388b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): crates/zeroclaw-runtime/src/rpc/dispatch.rs:9612-9635 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:9670-9690 \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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":9612}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4cda4f9451ada2ce3387545cfea0fdf9a95c1909ed4f69e4089f59c19c43d2b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): crates/zeroclaw-tools/src/a2a_client.rs:2081-2101 | crates/zeroclaw-tools/src/a2a_client.rs:2128-2148 \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/zeroclaw-tools/src/a2a_client.rs"},"region":{"startLine":2081}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e7172fde4abb513565659d43cc5ef16876498d941e8eb739a4114f8746852ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): apps/zerocode/src/clipboard.rs:121-168 | apps/zerocode/src/clipboard.rs:170-197 \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":"apps/zerocode/src/clipboard.rs"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a9950e978bf3410a203cb94aa213a596d459bbe3094d6bd2f8fcaefed73948f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): crates/zeroclaw-channels/src/discord/rest.rs:192-222 | crates/zeroclaw-channels/src/discord/rest.rs:232-260 \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/zeroclaw-channels/src/discord/rest.rs"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa84ff7bfa0d928a14edec6fb3d82758e1508c3ae43a9fe57d432d16b982fb68"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): crates/zeroclaw-runtime/src/sop/audit.rs:158-183 | crates/zeroclaw-runtime/src/sop/audit.rs:192-217 \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/zeroclaw-runtime/src/sop/audit.rs"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b3e9efadcef688518f2fbd4b1a2ceab1a1cfb2478a24073b8666f647e13c2b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): crates/zeroclaw-channels/src/qq.rs:518-544 | crates/zeroclaw-channels/src/twitter.rs:96-123 \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/zeroclaw-channels/src/qq.rs"},"region":{"startLine":518}}}],"partialFingerprints":{"codehealthFindingId/v1":"daaaf406728df20f12533c16c129823cd5a1898917e82108efdafecc0cfdd033"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/zeroclaw-runtime/src/agent/loop_.rs:368-393 | src/main.rs:69-85 \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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b0c19badfb190dd511380325e76f354567402e3c416e13235b3a678aef4a826"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (30 corresponding lines): crates/zeroclaw-gateway/src/api_config.rs:2254-2296 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:3171-3200 \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/zeroclaw-gateway/src/api_config.rs"},"region":{"startLine":2254}}}],"partialFingerprints":{"codehealthFindingId/v1":"6476a0226e97c46ae4a02a326362c52646c8b472181042954dce7d6a25872461"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): crates/zeroclaw-providers/src/reliable.rs:3141-3165 | crates/zeroclaw-providers/src/reliable.rs:3167-3192 \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/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":3141}}}],"partialFingerprints":{"codehealthFindingId/v1":"14023ce4940f069de05c843b18a0a47fb982b0670ca6eaf3a34aabc36b006020"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): apps/zerorelay/src/lib.rs:1552-1585 | crates/zeroclaw-runtime/src/relay.rs:1447-1474 \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":"apps/zerorelay/src/lib.rs"},"region":{"startLine":1552}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8edbefbb02e358a652f40e7ee85bfb452df9dced02d37ac03870e9e14d698f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): crates/zeroclaw-providers/src/auth/email_oauth2.rs:175-203 | crates/zeroclaw-providers/src/auth/openai_oauth.rs:421-449 \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/zeroclaw-providers/src/auth/email_oauth2.rs"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"f38a7d57173b56904fdcf32d75a9e0f660bf697b923f72ac993875dff9acdb93"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): crates/zeroclaw-providers/src/compatible.rs:3157-3181 | crates/zeroclaw-providers/src/compatible.rs:3245-3297 \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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":3157}}}],"partialFingerprints":{"codehealthFindingId/v1":"be1e1211f33d48cf98b92ab636c4dc46bf0640fe384e8b7ae7c8ac4e9ebf40c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): crates/zeroclaw-tools/src/mcp_client.rs:732-765 | crates/zeroclaw-tools/src/mcp_client.rs:774-795 \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/zeroclaw-tools/src/mcp_client.rs"},"region":{"startLine":732}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ddee5005363321a802e9ca06be61ab524723bd350210fe3054c162a158a0796"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (33 corresponding lines): crates/zeroclaw-runtime/src/verifiable_intent/issuance.rs:226-259 | crates/zeroclaw-runtime/src/verifiable_intent/issuance.rs:279-311 \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/zeroclaw-runtime/src/verifiable_intent/issuance.rs"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed28702a3aa7f9643533d11fbe6c358f0f1d65b60a489bc2794ba578fe92ba02"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): crates/zeroclaw-tools/src/text_browser.rs:419-445 | crates/zeroclaw-tools/src/web_fetch.rs:858-884 \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/zeroclaw-tools/src/text_browser.rs"},"region":{"startLine":419}}}],"partialFingerprints":{"codehealthFindingId/v1":"90a8bc3199d8cd901537048f4b1f0ac43008673887017ced39efa172f03bfdc8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): crates/zeroclaw-channels/src/bluesky.rs:164-192 | crates/zeroclaw-channels/src/reddit.rs:126-154 \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/zeroclaw-channels/src/bluesky.rs"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"51a2f62c9cdad30d62bb6ba329f036ad0bddc5325038dec7649a37584e7becf3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): crates/zeroclaw-channels/src/git/providers/gitea/mapping.rs:27-48 | crates/zeroclaw-channels/src/git/providers/github/mapping.rs:35-56 \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/zeroclaw-channels/src/git/providers/gitea/mapping.rs"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"933e380397da017d6bab0eb397571caa9f8ed62a025475819c6a92443b8881de"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): crates/zeroclaw-memory/src/agent_scoped.rs:137-167 | crates/zeroclaw-memory/src/agent_scoped_markdown.rs:87-110 \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/zeroclaw-memory/src/agent_scoped.rs"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a7b8b39378ea8d11c1bdeef52828183d72a06ff820d3297d64d007a786473d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): src/bin/zeroclaw-acp-bridge.rs:192-212 | src/bin/zeroclaw-acp-bridge.rs:214-234 \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":"src/bin/zeroclaw-acp-bridge.rs"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"0595f3208a8da2fb5f30086b6d9ea3214eb37610f50a8851c1a678ad2b81a3bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 16\u002B corresponding lines): crates/zeroclaw-gateway/src/api_sop_author.rs:924-939 | crates/zeroclaw-gateway/src/api_sop_author.rs:994-1011 | crates/zeroclaw-gateway/src/api_sop_author.rs:1017-1032 \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/zeroclaw-gateway/src/api_sop_author.rs"},"region":{"startLine":924}}}],"partialFingerprints":{"codehealthFindingId/v1":"74c00f2878da7021759139116613c106f56a2f07750e56399ab7cd988716ccdd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): crates/zeroclaw-providers/src/dispatch/accounting.rs:401-424 | crates/zeroclaw-providers/src/dispatch/accounting.rs:428-453 \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/zeroclaw-providers/src/dispatch/accounting.rs"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca87649a8ff4148809f934b4f9a1801bc527275867cd052f212026e174d427ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): crates/zeroclaw-providers/src/reliable.rs:2494-2518 | crates/zeroclaw-providers/src/router.rs:693-714 \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/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":2494}}}],"partialFingerprints":{"codehealthFindingId/v1":"3397cbb4b2f48d9c103613dade03d60ebd4c7aaab6c90ac51ab02b5aa049a0a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): xtask/src/generate/review_docs.rs:109-132 | xtask/src/generate/sop_syntax.rs:31-55 \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":"xtask/src/generate/review_docs.rs"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ce493d329a2d47d3c93b41ab92f91208282bf4aa0eefd248c237369faa6142c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): apps/zerocode/src/chat.rs:7789-7815 | apps/zerocode/src/logs.rs:72-92 \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":"apps/zerocode/src/chat.rs"},"region":{"startLine":7789}}}],"partialFingerprints":{"codehealthFindingId/v1":"d05b2227531420df4289711f17ca0dd199d1c8ed74d34cd76eb3eccbffa1168d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): apps/zerocode/src/logs.rs:1564-1589 | apps/zerocode/src/logs.rs:1613-1640 \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":"apps/zerocode/src/logs.rs"},"region":{"startLine":1564}}}],"partialFingerprints":{"codehealthFindingId/v1":"55810a70786f56319c049e8bcdfc56b8a92b4c4d236da14649532ff32a25fd5e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): crates/zeroclaw-api/src/memory_traits.rs:697-723 | crates/zeroclaw-memory/src/agent_scoped.rs:635-660 \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/zeroclaw-api/src/memory_traits.rs"},"region":{"startLine":697}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6d3827fd5301ece14fc75cd9d5a3ae5b766f22347f683d94b64cceba64eb90b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): crates/zeroclaw-memory/src/qdrant.rs:625-647 | crates/zeroclaw-memory/src/qdrant.rs:974-1004 \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/zeroclaw-memory/src/qdrant.rs"},"region":{"startLine":625}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cb3407811b9c7606e3789fae4921aeb542ca5e69086223eea470a8b3c884204"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): crates/zeroclaw-channels/src/telegram.rs:1002-1024 | crates/zeroclaw-channels/src/wechat.rs:392-414 \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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":1002}}}],"partialFingerprints":{"codehealthFindingId/v1":"2eb8b7ab859b285198f6fd7ed8057d7b44ea9eea1f6c438ef1025d6c80517844"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/zeroclaw-channels/src/telegram.rs:3388-3403 | crates/zeroclaw-channels/src/whatsapp_web.rs:666-681 \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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":3388}}}],"partialFingerprints":{"codehealthFindingId/v1":"e07efa97657728425e9cd093f507d5601c95746de8a8bf667693e61501f8a3ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): crates/zeroclaw-providers/src/dispatch/accounting.rs:458-483 | crates/zeroclaw-providers/src/dispatch/accounting.rs:489-508 \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/zeroclaw-providers/src/dispatch/accounting.rs"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"364967a674bf343029af44edaa39aeb12684ddf0347614adf47ad3804487a606"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): crates/zeroclaw-runtime/src/agent/turn/protocol_detect.rs:18-46 | crates/zeroclaw-runtime/src/agent/turn/protocol_detect.rs:48-79 \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/zeroclaw-runtime/src/agent/turn/protocol_detect.rs"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"9337680967e06ed7efc38cef3ecb74a684e71e75a4cb5ee8738d4339681999bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/zeroclaw-channels/src/git/providers/gitea/provider.rs:41-59 | crates/zeroclaw-channels/src/git/providers/github/provider.rs:102-119 \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/zeroclaw-channels/src/git/providers/gitea/provider.rs"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0a9ae0fcc2b3ff165192c6ad55a54c8aa152efac4781ab6bdbe9c3b383d34a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 17\u002B corresponding lines): crates/zeroclaw-memory/src/sqlite.rs:2108-2127 | crates/zeroclaw-memory/src/sqlite.rs:2129-2146 | crates/zeroclaw-memory/src/sqlite.rs:2212-2228 | crates/zeroclaw-memory/src/sqlite.rs:2234-2250 \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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":2108}}}],"partialFingerprints":{"codehealthFindingId/v1":"207412a42c2689cb27d076db6397861eaebdbfc1d87f140f959589ba0378822c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): crates/zeroclaw-tools/src/calculator.rs:189-214 | crates/zeroclaw-tools/src/poll.rs:97-126 \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/zeroclaw-tools/src/calculator.rs"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"ded208f35821fe2483677c73fac6274b86ae6220342442ef7b68c1d918893acf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): crates/zeroclaw-channels/src/git/channel.rs:693-716 | crates/zeroclaw-channels/src/twitter.rs:437-460 \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/zeroclaw-channels/src/git/channel.rs"},"region":{"startLine":693}}}],"partialFingerprints":{"codehealthFindingId/v1":"966863ef2bda335ae1668334ed64313217c0a94307e5e8322968bbfa8d7783da"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): crates/zeroclaw-tools/src/channel_room.rs:183-209 | crates/zeroclaw-tools/src/channel_room.rs:215-244 \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/zeroclaw-tools/src/channel_room.rs"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"1366c985a0612da03a71be05fbe109cae7c20db05b7be54c83add621d8ac1ee5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): crates/zeroclaw-channels/src/clawdtalk.rs:107-135 | crates/zeroclaw-channels/src/clawdtalk.rs:169-198 \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/zeroclaw-channels/src/clawdtalk.rs"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6f1ae62c1113ac26978d3732ac839f5c47c78292e9883348c49ec8dc2b355ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): crates/zeroclaw-memory/src/knowledge_graph.rs:395-418 | crates/zeroclaw-memory/src/knowledge_graph.rs:425-448 \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/zeroclaw-memory/src/knowledge_graph.rs"},"region":{"startLine":395}}}],"partialFingerprints":{"codehealthFindingId/v1":"5637e9afec26415f1f493546cd967d8772b0eb463c902e141891b494956b42c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): crates/zeroclaw-channels/src/discord/mod.rs:3943-3969 | crates/zeroclaw-channels/src/discord/mod.rs:3976-4000 \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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":3943}}}],"partialFingerprints":{"codehealthFindingId/v1":"da4e6cb7a3cb22529e2c3e12792b67897b13135ed85f335d8b2388122dec236c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): crates/zeroclaw-config/src/schema.rs:27669-27708 | crates/zeroclaw-config/src/schema.rs:27936-27961 \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/zeroclaw-config/src/schema.rs"},"region":{"startLine":27669}}}],"partialFingerprints":{"codehealthFindingId/v1":"caf9d69cd73c4272b9cb7450ac7229daba4acffbe758b35e81e2dc4e026b1480"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): crates/zeroclaw-runtime/src/daemon/mod.rs:315-343 | crates/zeroclaw-runtime/src/daemon/mod.rs:347-375 \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/zeroclaw-runtime/src/daemon/mod.rs"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"bff88ce17297eb3adb01beee9181d833be159541420079bc17d0e3736f9eb9eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): apps/zerocode/src/zerocode_pane.rs:1985-2002 | apps/zerocode/src/zerocode_pane.rs:2031-2047 \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":"apps/zerocode/src/zerocode_pane.rs"},"region":{"startLine":1985}}}],"partialFingerprints":{"codehealthFindingId/v1":"270d50c124e8e428fad6a7cb7463c94ac72b057ad79de5694a92408c56ddc047"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): crates/zeroclaw-channels/src/bluesky.rs:405-425 | crates/zeroclaw-channels/src/reddit.rs:203-228 \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/zeroclaw-channels/src/bluesky.rs"},"region":{"startLine":405}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e18962363c0be62f1b8b7ca75ed8a8bca7c8f988cfa12da618666973f257d76"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): crates/zeroclaw-runtime/src/sop/engine.rs:4031-4054 | crates/zeroclaw-runtime/src/sop/engine.rs:6277-6308 \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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":4031}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b65b7307637f6d553bd80970d98b06f0fc1a6fe05c204ca8925dfac370d8598"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): xtask/src/cmd/mdbook/peer_groups.rs:51-71 | xtask/src/cmd/mdbook/placeholders.rs:13-30 \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":"xtask/src/cmd/mdbook/peer_groups.rs"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"95c4fa65c91f8e2a8663a5eff56f4c498a456c32c35fc39740f1e3ddf5805d96"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): apps/zerorelay/src/frontdoor.rs:318-343 | apps/zerorelay/src/frontdoor.rs:356-377 \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":"apps/zerorelay/src/frontdoor.rs"},"region":{"startLine":318}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e72567a9d668e23c25f78517c3d0fe3a2e173dab43ecb7ecdf02ee2b61895f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (30 corresponding lines): crates/zeroclaw-channels/src/matrix.rs:757-786 | crates/zeroclaw-channels/src/orchestrator/mod.rs:8454-8486 \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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":757}}}],"partialFingerprints":{"codehealthFindingId/v1":"d195741c3b37151d9cd6cc5187b658f76f7330531efb91c67d8565daccf7cee8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): crates/zeroclaw-gateway/src/ws.rs:1333-1353 | crates/zeroclaw-gateway/src/ws.rs:1359-1381 \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/zeroclaw-gateway/src/ws.rs"},"region":{"startLine":1333}}}],"partialFingerprints":{"codehealthFindingId/v1":"c19b31e43d57497027b308b2867933971d021fd829bd013e82b3bf1b711e5e6d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/zeroclaw-runtime/src/rpc/dispatch.rs:11702-11718 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:11720-11737 \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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":11702}}}],"partialFingerprints":{"codehealthFindingId/v1":"bca2ce347f1fc6b11d45e5029e5ffe91ff47e3b335e81c700c1588eedf742e1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): crates/zeroclaw-runtime/src/rpc/tui_identity.rs:102-128 | crates/zeroclaw-runtime/src/rpc/tui_identity.rs:133-155 \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/zeroclaw-runtime/src/rpc/tui_identity.rs"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"9eff0f59d92fa4551a16625c2ca243e1d0e946244fb37a31a6068ed3146e8437"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/zeroclaw-config/src/migration.rs:1033-1050 | crates/zeroclaw-config/src/migration.rs:1140-1158 \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/zeroclaw-config/src/migration.rs"},"region":{"startLine":1033}}}],"partialFingerprints":{"codehealthFindingId/v1":"51e047e5622ab51b3fcfee9bad6910325ed4ec48a0294078945441d39d4ed2e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): crates/zeroclaw-plugins/src/runtime.rs:105-125 | crates/zeroclaw-plugins/src/wasm_channel.rs:611-631 \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/zeroclaw-plugins/src/runtime.rs"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"27b503f215933171f7d46983156046f241473c4a10ddb9f707fb5eeca2264c94"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/zeroclaw-channels/src/nextcloud_talk.rs:533-550 | crates/zeroclaw-channels/src/nextcloud_talk.rs:557-576 \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/zeroclaw-channels/src/nextcloud_talk.rs"},"region":{"startLine":533}}}],"partialFingerprints":{"codehealthFindingId/v1":"104bca57722e7500bd9af0e20cbbab0543a45e614d120b91335829770fdf848a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 14\u002B corresponding lines): crates/zeroclaw-runtime/src/rpc/dispatch.rs:11739-11754 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:11756-11773 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:11775-11788 \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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":11739}}}],"partialFingerprints":{"codehealthFindingId/v1":"892942ca41bcc1f8735d2204f56028db8cd4ceae182d88920fa6b0f4ba7ad963"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): crates/zeroclaw-channels/src/util.rs:138-161 | crates/zeroclaw-providers/src/compatible.rs:396-415 \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/zeroclaw-channels/src/util.rs"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4a574756312e38e8d398968fb1e7adaf35a0a9eaf9d7e3472323578d4bdadbc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/zeroclaw-config/src/migration.rs:1924-1934 | crates/zeroclaw-config/src/migration.rs:1989-1997 \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/zeroclaw-config/src/migration.rs"},"region":{"startLine":1924}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9d73d7626d01342a306e5d2ec53aa57ec93a020cd2643ef90c2936c9889f19d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): crates/zeroclaw-runtime/src/cron/store.rs:1011-1047 | crates/zeroclaw-runtime/src/cron/store.rs:1049-1076 \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/zeroclaw-runtime/src/cron/store.rs"},"region":{"startLine":1011}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea1438607ea7a13ecfa32c6da1a94abd49b1e4aa8210d43232e9707ce05f25ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/zeroclaw-config/src/schema/v2.rs:2232-2246 | crates/zeroclaw-config/src/schema/v2.rs:2834-2848 \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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":2232}}}],"partialFingerprints":{"codehealthFindingId/v1":"b518933ff3f6a8e2fd3f241543b850d9be239603dc0e607136fc5cbd4f61d08f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 19\u002B corresponding lines): crates/zeroclaw-runtime/src/hooks/runner.rs:193-211 | crates/zeroclaw-runtime/src/hooks/runner.rs:220-238 | crates/zeroclaw-runtime/src/hooks/runner.rs:250-270 \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/zeroclaw-runtime/src/hooks/runner.rs"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"169edefbadfbf4c05cf552da2f8667bc74cccdcedacf1af09df4a63587c9ba9f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): crates/zeroclaw-runtime/src/control_plane/task_store_sqlite.rs:674-702 | crates/zeroclaw-runtime/src/control_plane/task_store_sqlite.rs:712-753 \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/zeroclaw-runtime/src/control_plane/task_store_sqlite.rs"},"region":{"startLine":674}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd71140639904b2a8ed18339859ac965755ba580be389ced404c54e183212aa5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (65 corresponding lines): crates/zeroclaw-tools/src/cloud_ops.rs:419-500 | crates/zeroclaw-tools/src/cloud_ops.rs:503-567 \u2014 These two members are one piece of code written twice and then edited apart: 65 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/cloud_ops.rs"},"region":{"startLine":419}}}],"partialFingerprints":{"codehealthFindingId/v1":"8efa0586bd16039dc9776662de31f68c0e9f63ad4df875ddf76e8b5d577a1cc0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 28\u002B corresponding lines): crates/zeroclaw-plugins/src/wasm_memory.rs:224-251 | crates/zeroclaw-plugins/src/wasm_memory.rs:596-629 | crates/zeroclaw-plugins/src/wasm_memory.rs:640-669 | crates/zeroclaw-plugins/src/wasm_memory.rs:679-708 \u2014 These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-plugins/src/wasm_memory.rs"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2a7bab5973c9fbc27dfe65fdce35d8590d1b1feb183add4ca0703b652f55074"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): crates/zeroclaw-providers/src/dispatch/accounting.rs:345-363 | crates/zeroclaw-providers/src/dispatch/accounting.rs:372-391 \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/zeroclaw-providers/src/dispatch/accounting.rs"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"518f18d1bd3a624d5f9fb4334f3b38e1eb818cd3e9802edbdf7652fb1c1a1338"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/zeroclaw-config/src/migration.rs:2597-2612 | crates/zeroclaw-config/src/migration.rs:2780-2798 \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/zeroclaw-config/src/migration.rs"},"region":{"startLine":2597}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e9530de94a95f9bf559c25c17a13e2575bb7a6f14083df4237b6a346eb82b34"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): crates/zeroclaw-runtime/src/rpc/session.rs:1811-1831 | crates/zeroclaw-runtime/src/rpc/session.rs:2594-2614 \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/zeroclaw-runtime/src/rpc/session.rs"},"region":{"startLine":1811}}}],"partialFingerprints":{"codehealthFindingId/v1":"07ebca6e300af5c2c7840fe631e5cde6a8b35808222693b99b3aab9552ebe8e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): crates/zeroclaw-runtime/src/security/bubblewrap.rs:40-65 | crates/zeroclaw-runtime/src/security/firejail.rs:139-161 \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/zeroclaw-runtime/src/security/bubblewrap.rs"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"84bc6e63b6b14580866c21719c7e09213047380cdc49745933256305bce9e2fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): crates/zeroclaw-channels/src/discord/mod.rs:3454-3482 | crates/zeroclaw-channels/src/telegram.rs:8874-8897 \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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":3454}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e8b21938cdfc4cf9ad66e531f5a0defd018fb69de84f0092016422aa4c77884"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): crates/zeroclaw-channels/src/git/providers/gitea/provider.rs:66-86 | crates/zeroclaw-channels/src/git/providers/github/provider.rs:126-146 \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/zeroclaw-channels/src/git/providers/gitea/provider.rs"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d4847f2226b2db00565071fbbcf7b9f067bc12b837ece8b766ac16c0bbd35d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/zeroclaw-rpc-client/src/client.rs:642-660 | crates/zeroclaw-runtime/src/rpc/local.rs:196-212 \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/zeroclaw-rpc-client/src/client.rs"},"region":{"startLine":642}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f289fccb47c3d404fb84438151b7235174edb5ca229b8f9d2e64fa5e94f78c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/zeroclaw-runtime/src/rpc/dispatch.rs:9901-9917 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:9919-9935 \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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":9901}}}],"partialFingerprints":{"codehealthFindingId/v1":"79a641778f2e8b711314b9ce6d214d46f0f958a5ce7c7e884fa0d395693e36e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/zeroclaw-runtime/src/sop/audit.rs:77-91 | crates/zeroclaw-runtime/src/sop/audit.rs:220-234 \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/zeroclaw-runtime/src/sop/audit.rs"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"876b5c210257fc9e29368857c840e9a19cee5d655e7fc494c1677477b962d36a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): crates/zeroclaw-runtime/src/sop/executor.rs:1434-1455 | crates/zeroclaw-runtime/src/sop/executor.rs:1461-1479 \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/zeroclaw-runtime/src/sop/executor.rs"},"region":{"startLine":1434}}}],"partialFingerprints":{"codehealthFindingId/v1":"27a5e83f5a14f550fa07b21cbb60e2c1a149527d6a39ee5dd932af4ba250b924"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/zeroclaw-channels/src/whatsapp_storage.rs:490-503 | crates/zeroclaw-channels/src/whatsapp_storage.rs:538-551 \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/zeroclaw-channels/src/whatsapp_storage.rs"},"region":{"startLine":490}}}],"partialFingerprints":{"codehealthFindingId/v1":"d180c25238390eb76dfa34cdafbe97bb3530164ceb1827a927b75773548bf0b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/zeroclaw-infra/src/session_sqlite.rs:424-449 | crates/zeroclaw-log/src/migrate.rs:210-225 \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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":424}}}],"partialFingerprints":{"codehealthFindingId/v1":"18f231b01ac1140502e849cb6fe60bcb9613fffb5f4559c462143631f0ae4237"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): crates/zeroclaw-providers/src/azure_openai.rs:302-320 | crates/zeroclaw-providers/src/compatible.rs:1320-1351 \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/zeroclaw-providers/src/azure_openai.rs"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"93d4cbc70c0bf02f743632696589bafa45c4d36bce7e00f4a0cea2ac0348927a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/zeroclaw-runtime/src/quickstart/mod.rs:1518-1534 | crates/zeroclaw-runtime/src/quickstart/mod.rs:1536-1551 \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/zeroclaw-runtime/src/quickstart/mod.rs"},"region":{"startLine":1518}}}],"partialFingerprints":{"codehealthFindingId/v1":"27b0a2f357eaf04542d43d59b29661fba7d49193285cbc7c6010a1a8b72bc928"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): apps/zerocode/src/app.rs:3399-3419 | crates/zeroclaw-tools/src/linkedin_client.rs:1250-1274 \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":"apps/zerocode/src/app.rs"},"region":{"startLine":3399}}}],"partialFingerprints":{"codehealthFindingId/v1":"94060a34791346694f37e01b8b70866b181cb05c68230931fe82bc42caf51234"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): crates/zeroclaw-channels/src/qq.rs:955-975 | crates/zeroclaw-channels/src/qq.rs:1304-1324 \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/zeroclaw-channels/src/qq.rs"},"region":{"startLine":955}}}],"partialFingerprints":{"codehealthFindingId/v1":"049e464639538967f95a1c6bf10c2de750ba16c8b0928ce06068e4528b79d2dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/zeroclaw-runtime/src/agent/turn/protocol_detect.rs:181-195 | crates/zeroclaw-tool-call-parser/src/lib.rs:705-719 \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/zeroclaw-runtime/src/agent/turn/protocol_detect.rs"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"fce6e345766f1f31318e15fef9bc811f3e2099caef5a4b2d90a99762c576a4b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (34 corresponding lines): crates/zeroclaw-runtime/src/cron/store.rs:1322-1355 | crates/zeroclaw-runtime/src/cron/store.rs:1370-1404 \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/zeroclaw-runtime/src/cron/store.rs"},"region":{"startLine":1322}}}],"partialFingerprints":{"codehealthFindingId/v1":"58e84e4410df505277370c54ad94a4f8204b90c1806f79f5ed372bef09ba76fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): src/alias_cli/mod.rs:440-468 | src/alias_cli/mod.rs:527-562 \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":"src/alias_cli/mod.rs"},"region":{"startLine":440}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d15715245c7a92885d6bb7d4f1de180d2c697446b92e522615db7838a559732"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): crates/zeroclaw-channels/src/tts.rs:185-210 | crates/zeroclaw-channels/src/tts.rs:312-335 \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/zeroclaw-channels/src/tts.rs"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"37b726eb4790185f1af723eca60b272f4c32adc50d155e9d2cf7bb6ab786ed6c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 18\u002B corresponding lines): crates/zeroclaw-channels/src/whatsapp_storage.rs:702-719 | crates/zeroclaw-channels/src/whatsapp_storage.rs:1066-1088 | crates/zeroclaw-channels/src/whatsapp_storage.rs:1093-1116 | crates/zeroclaw-channels/src/whatsapp_storage.rs:1294-1314 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\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/zeroclaw-channels/src/whatsapp_storage.rs"},"region":{"startLine":702}}}],"partialFingerprints":{"codehealthFindingId/v1":"80024a97268b73912402fa569c22df3e3ed94f845708671c885a9fd955967ab9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 23\u002B corresponding lines): crates/zeroclaw-config/src/presets.rs:231-253 | crates/zeroclaw-config/src/presets.rs:255-279 | crates/zeroclaw-config/src/presets.rs:287-309 \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/zeroclaw-config/src/presets.rs"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"35bfd59d79e2cae11a9f46155a984065250c5b1467c6843033301db516bc1b83"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 26\u002B corresponding lines): crates/zeroclaw-runtime/src/skills/mod.rs:1192-1224 | crates/zeroclaw-runtime/src/skills/mod.rs:3101-3127 | crates/zeroclaw-runtime/src/skills/mod.rs:3317-3342 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 26 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/zeroclaw-runtime/src/skills/mod.rs"},"region":{"startLine":1192}}}],"partialFingerprints":{"codehealthFindingId/v1":"805919402cac76a20db9e6eb8822ff66d54ba1cf8f2cee9938d731945f184ada"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): apps/zerocode/src/config_manager.rs:3079-3104 | apps/zerocode/src/config_manager.rs:3181-3203 \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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":3079}}}],"partialFingerprints":{"codehealthFindingId/v1":"469f1b5a2d815605249daa6d23aab41a546a3eba817ec06357049158da55106b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): crates/zeroclaw-tools/src/web_search_tool.rs:697-725 | crates/zeroclaw-tools/src/web_search_tool.rs:1007-1033 \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/zeroclaw-tools/src/web_search_tool.rs"},"region":{"startLine":697}}}],"partialFingerprints":{"codehealthFindingId/v1":"0daacf310bcaf0f1d70b55c6914bcc7704e0393f2a17a916736f064cb40cff09"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): xtask/src/cmd/mdbook/seo.rs:431-454 | xtask/src/cmd/mdbook/versions.rs:173-188 \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":"xtask/src/cmd/mdbook/seo.rs"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5d33412a59bfc176dd1007c0d4c984b804818cfec33aaf35b64b597de6bfe0a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): crates/zeroclaw-channels/src/slack.rs:3562-3590 | crates/zeroclaw-channels/src/slack.rs:3668-3695 \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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":3562}}}],"partialFingerprints":{"codehealthFindingId/v1":"c21c3ce38d64f1f8adc0d1ee44f9259d8ed97300599429a4565f666a1ba23acc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/zeroclaw-channels/src/whatsapp_storage.rs:616-629 | crates/zeroclaw-channels/src/whatsapp_storage.rs:672-685 \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/zeroclaw-channels/src/whatsapp_storage.rs"},"region":{"startLine":616}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b48028422b1cb08fb4acde8abfa7142e4c36aafb94b15e1b761b43238661fa1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 24\u002B corresponding lines): crates/zeroclaw-plugins/src/wasm_channel.rs:1340-1363 | crates/zeroclaw-plugins/src/wasm_channel.rs:1370-1393 | crates/zeroclaw-plugins/src/wasm_channel.rs:1401-1424 | crates/zeroclaw-plugins/src/wasm_channel.rs:1460-1483 | crates/zeroclaw-plugins/src/wasm_channel.rs:1485-1508 \u2014 These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-plugins/src/wasm_channel.rs"},"region":{"startLine":1340}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3b7647efc3ceffdc1a86034411a80ef5824caea55b8733b20d2420f874e8286"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 15\u002B corresponding lines): crates/zeroclaw-channels/src/whatsapp_storage.rs:787-802 | crates/zeroclaw-channels/src/whatsapp_storage.rs:839-855 | crates/zeroclaw-channels/src/whatsapp_storage.rs:929-943 \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/zeroclaw-channels/src/whatsapp_storage.rs"},"region":{"startLine":787}}}],"partialFingerprints":{"codehealthFindingId/v1":"09f935fd9d17e03eb54eef2c6677447fb59b7db85f8fbd10d82fcdfdb856bc1e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/zeroclaw-gateway/src/api.rs:470-484 | crates/zeroclaw-gateway/src/api.rs:886-900 \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/zeroclaw-gateway/src/api.rs"},"region":{"startLine":470}}}],"partialFingerprints":{"codehealthFindingId/v1":"32e7c259a20e82805258c9412d4d2aae1f90dba2a27eb71ce99b21c65dc70974"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): crates/zeroclaw-config/src/schema.rs:24376-24402 | crates/zeroclaw-config/src/schema.rs:24415-24442 \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/zeroclaw-config/src/schema.rs"},"region":{"startLine":24376}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e6237ebd48799d9ab7fa37f33637b17489c6b83b907a222e8c83ffcdf87d236"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/zeroclaw-providers/src/openai.rs:1246-1260 | crates/zeroclaw-providers/src/openai.rs:1276-1290 \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/zeroclaw-providers/src/openai.rs"},"region":{"startLine":1246}}}],"partialFingerprints":{"codehealthFindingId/v1":"16312e1161b9d611bfbf96086322a0ecd4e90100fdf92e1b581b5667a69e2d7a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/zeroclaw-tools/src/calculator.rs:439-447 | crates/zeroclaw-tools/src/calculator.rs:449-457 \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/zeroclaw-tools/src/calculator.rs"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb0e6afd537d6bc4f65aaec351c879f273643f47c27d6e709a7b72747d347abd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): crates/zeroclaw-tools/src/composio.rs:377-406 | crates/zeroclaw-tools/src/composio.rs:484-507 \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/zeroclaw-tools/src/composio.rs"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"1843ad30168f85aa3f888deaa0c69c796c639825d4718b258a8c8fe573b6177a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/zeroclaw-tools/src/data_management.rs:62-79 | crates/zeroclaw-tools/src/data_management.rs:81-100 \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/zeroclaw-tools/src/data_management.rs"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"5807649ce10f9fc9010bf3f8bfd3bd7f10aceed2b0078fec530a6a6f21878572"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): src/commands/update.rs:804-825 | xtask/src/cmd/mdbook/linkcheck.rs:66-82 \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":"src/commands/update.rs"},"region":{"startLine":804}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cb80f5340f9e4c49adeb8520bfe3022d0e9108b635ba8a18ad76a5d2d20184a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): apps/zerocode/src/client_crypto.rs:36-50 | crates/zeroclaw-tls/src/certgen.rs:419-430 \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":"apps/zerocode/src/client_crypto.rs"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"d74d83407dcb8188eadb69f0cddee9d109eefb6805c922d783f65b84b9825884"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): crates/zeroclaw-api/src/elicitation.rs:132-153 | crates/zeroclaw-api/src/elicitation.rs:171-194 \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/zeroclaw-api/src/elicitation.rs"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"152e0b831c08f85c9512f6b2f6069aede1db81ab6c03405816ee6f53af3070c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 14\u002B corresponding lines): crates/zeroclaw-channels/src/lark.rs:2453-2467 | crates/zeroclaw-channels/src/lark.rs:2502-2515 | crates/zeroclaw-channels/src/lark.rs:3691-3709 \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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":2453}}}],"partialFingerprints":{"codehealthFindingId/v1":"903659470773673c736eef4ceea4532f6621806a4a588d0d3a826d9b8f642829"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/zeroclaw-channels/src/whatsapp_storage.rs:1416-1443 | crates/zeroclaw-channels/src/whatsapp_storage.rs:1504-1521 \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/zeroclaw-channels/src/whatsapp_storage.rs"},"region":{"startLine":1416}}}],"partialFingerprints":{"codehealthFindingId/v1":"69beb1756e8144a1fe262aca141909c2b18240870fb6d47e971b3d61e6f386e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/zeroclaw-infra/src/session_sqlite.rs:937-957 | crates/zeroclaw-infra/src/session_sqlite.rs:1211-1226 \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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":937}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c5b9e1f028645495b42a612e1e57c35d25add258334c2c4ebf92e8076b644ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 28\u002B corresponding lines): crates/zeroclaw-infra/src/session_sqlite.rs:1144-1171 | crates/zeroclaw-infra/src/session_sqlite.rs:1175-1209 | crates/zeroclaw-infra/src/session_sqlite.rs:1329-1360 \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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":1144}}}],"partialFingerprints":{"codehealthFindingId/v1":"db020874ed5005cf9e86441d9b857301849b301a7822a5a0fa519c3e737ce1eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/zeroclaw-providers/src/hailo_ollama.rs:533-550 | crates/zeroclaw-providers/src/ollama.rs:381-404 \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/zeroclaw-providers/src/hailo_ollama.rs"},"region":{"startLine":533}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f866cc489fea431dc8550526e3560a70c3e221b8cbd380c289bb0ca2a59fb71"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/zeroclaw-runtime/src/rpc/dispatch.rs:13402-13415 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:13417-13429 \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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":13402}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9b22b3993b9d36d9f9a692aaa480642ca408ac046ee0ad037c2998e30d2e636"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/zeroclaw-gateway/src/api_sop_author.rs:158-175 | crates/zeroclaw-gateway/src/api_sop_author.rs:905-918 \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/zeroclaw-gateway/src/api_sop_author.rs"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8d544bd0ca654efef0fd015811ebc5bd9310dead27caf9b0f314fd889e88858"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/zeroclaw-memory/src/response_cache.rs:238-258 | crates/zeroclaw-runtime/src/heartbeat/store.rs:113-129 \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/zeroclaw-memory/src/response_cache.rs"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b48deadf0dd943a3607d3d00219aeaa51f72bfbbe15438fcdb2364856f501bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 9\u002B corresponding lines): crates/zeroclaw-providers/src/auth/mod.rs:708-716 | crates/zeroclaw-providers/src/auth/mod.rs:723-733 | crates/zeroclaw-providers/src/auth/mod.rs:741-757 \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/zeroclaw-providers/src/auth/mod.rs"},"region":{"startLine":708}}}],"partialFingerprints":{"codehealthFindingId/v1":"ced5447bd4d5888d096a15a4fa4fce9ba6c4b9a69450339876c44455ee6f36f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): crates/zeroclaw-channels/src/git/providers/gitea/provider.rs:202-221 | crates/zeroclaw-channels/src/git/providers/github/provider.rs:349-368 \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/zeroclaw-channels/src/git/providers/gitea/provider.rs"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f876c9aa72118c490adc8629eae3f5c5995a077a4128b4db282ddbf0a109521"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 23\u002B corresponding lines): crates/zeroclaw-config/src/presets.rs:72-94 | crates/zeroclaw-config/src/presets.rs:96-120 | crates/zeroclaw-config/src/presets.rs:122-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 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/zeroclaw-config/src/presets.rs"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"156578795efde00b27a6fd5522bd061a31fe76cbfd364f41b7a181f9cf39a5b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): crates/zeroclaw-runtime/src/hooks/builtin/webhook_audit.rs:106-126 | crates/zeroclaw-tools/src/http_request.rs:206-228 \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/zeroclaw-runtime/src/hooks/builtin/webhook_audit.rs"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"55b8e88432c756ec6cea789bde7bdc5b8fd77735dafc0b236f88843edada1a61"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/zeroclaw-runtime/src/hooks/builtin/webhook_audit.rs:139-152 | crates/zeroclaw-runtime/src/tools/skill_http.rs:138-151 \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/zeroclaw-runtime/src/hooks/builtin/webhook_audit.rs"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c760a890f9d6e1ab42132ea9a9f564039c413608c46e437fafe6115ed30b9ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 19\u002B corresponding lines): crates/zeroclaw-runtime/src/security/prompt_guard.rs:125-148 | crates/zeroclaw-runtime/src/security/prompt_guard.rs:151-173 | crates/zeroclaw-runtime/src/security/prompt_guard.rs:196-214 | crates/zeroclaw-runtime/src/security/prompt_guard.rs:246-271 \u2014 These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/security/prompt_guard.rs"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"8846dd45c6e8f8f54b1d1506b6184c37b4fb072e8c1074c5a990bc782211511f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): apps/zerocode/src/chat.rs:11037-11053 | apps/zerocode/src/chat.rs:11058-11075 \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":"apps/zerocode/src/chat.rs"},"region":{"startLine":11037}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0efde2c3a89c7b7b4450f2c0788feb249b68f5a956ec18a530f44e6ec2411c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/zeroclaw-channels/src/git/providers/gitea/mapping.rs:50-66 | crates/zeroclaw-channels/src/git/providers/github/mapping.rs:60-76 \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/zeroclaw-channels/src/git/providers/gitea/mapping.rs"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b84b169c9f1f173bda097037c18f73ecc7641b250f65c525d6d28ef017ac32e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/zeroclaw-infra/src/net_guard.rs:577-591 | crates/zeroclaw-infra/src/net_guard.rs:602-619 \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/zeroclaw-infra/src/net_guard.rs"},"region":{"startLine":577}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bfb2b6201dd7d6be39a8b278ac882cff0fb95297e046bb98d3813b1bdf28d69"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 16\u002B corresponding lines): xtask/src/cmd/mdbook/feature_matrix.rs:114-130 | xtask/src/cmd/mdbook/feature_matrix.rs:132-147 | xtask/src/cmd/mdbook/feature_matrix.rs:149-166 \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":"xtask/src/cmd/mdbook/feature_matrix.rs"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3ec7154479f6f9eb0d68a630aa069c3d8470137986c3be440ecbdadfb1bd8fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/zeroclaw-runtime/src/service/mod.rs:1926-1944 | crates/zeroclaw-runtime/src/service/mod.rs:2014-2031 \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/zeroclaw-runtime/src/service/mod.rs"},"region":{"startLine":1926}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c481ac8494a2ff741612adfa6f2176acce7f6656f3c3b4df734624f6546aaf3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): apps/zerocode/src/file_explorer.rs:84-103 | apps/zerocode/src/file_explorer.rs:137-156 \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":"apps/zerocode/src/file_explorer.rs"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc44396af6663eafb020107c337e016e50dd2102e1a74b6f43f4c3d17a588a50"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/zeroclaw-gateway/src/api_browse.rs:38-52 | crates/zeroclaw-gateway/src/api_browse.rs:118-132 \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/zeroclaw-gateway/src/api_browse.rs"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"1de3da6961b18ecfeedf66f6d29f9130aad1c1100a471ae85983ce2d486f5366"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): crates/zeroclaw-runtime/src/rpc/inproc.rs:65-85 | crates/zeroclaw-runtime/src/rpc/local.rs:446-479 \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/zeroclaw-runtime/src/rpc/inproc.rs"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf01636e83e501d5ca4bf1c8c7130fc3fbc8b917a338e24fa864676d931146f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 12\u002B corresponding lines): crates/zeroclaw-plugins/src/component.rs:524-535 | crates/zeroclaw-plugins/src/component.rs:543-554 | crates/zeroclaw-plugins/src/component.rs:561-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 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/zeroclaw-plugins/src/component.rs"},"region":{"startLine":524}}}],"partialFingerprints":{"codehealthFindingId/v1":"022ea88fe8ef3b458278e93a9cf7aecd034d69a596ae961ba4abe56bce82d85a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/zeroclaw-runtime/src/sop/approval/broker.rs:238-254 | crates/zeroclaw-runtime/src/sop/approval/broker.rs:300-316 \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/zeroclaw-runtime/src/sop/approval/broker.rs"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"e171de89ecf6af86dcb5ac2bc88fa80d5bf0d493dd39f85ecf5e225b982f545f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/zeroclaw-tools/src/mcp_client.rs:1412-1427 | crates/zeroclaw-tools/src/mcp_client.rs:1435-1450 \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/zeroclaw-tools/src/mcp_client.rs"},"region":{"startLine":1412}}}],"partialFingerprints":{"codehealthFindingId/v1":"42f525273b630524d2b7088c75f6f53c598d83aea0d6b8c2017c8df11cebb483"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 10\u002B corresponding lines): crates/zeroclaw-gateway/src/lib.rs:4912-4921 | crates/zeroclaw-gateway/src/lib.rs:5030-5046 | crates/zeroclaw-gateway/src/lib.rs:5168-5184 \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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":4912}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4c525efd37e7be06bd81f04c1e95a387b50168a06ea71cb0e486a1c886fa017"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/zeroclaw-memory/src/conflict.rs:64-83 | crates/zeroclaw-memory/src/rerank.rs:265-278 \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/zeroclaw-memory/src/conflict.rs"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fb5e5923e74095ffc88f1adcbadc1f9e661405eaad89c15873700bc7a12e363"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/zeroclaw-rpc-client/src/client.rs:315-328 | crates/zeroclaw-runtime/src/rpc/inproc.rs:114-130 \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/zeroclaw-rpc-client/src/client.rs"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"333c9ef719599965506e18de28ca7c1efeba5a0169fcb6eea2e25ae0f4ab4945"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/zeroclaw-runtime/src/live_config_authority.rs:1154-1171 | crates/zeroclaw-runtime/src/live_config_authority.rs:1198-1217 \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/zeroclaw-runtime/src/live_config_authority.rs"},"region":{"startLine":1154}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f8768db0a4065af9c99c4b81be18685296f3b362a075ecf35aa290f1a40e026"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 15\u002B corresponding lines): apps/zerocode/src/dashboard.rs:1103-1117 | apps/zerocode/src/dashboard.rs:1262-1277 | apps/zerocode/src/dashboard.rs:1883-1899 \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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":1103}}}],"partialFingerprints":{"codehealthFindingId/v1":"de84b869b5cdb24311db036955f1d91389196af7c3ef1ecc29a46946b8addc7d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/zeroclaw-channels/src/git/providers/gitea/mapping.rs:68-82 | crates/zeroclaw-channels/src/git/providers/github/mapping.rs:120-134 \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/zeroclaw-channels/src/git/providers/gitea/mapping.rs"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"9df5c468652ae00e0a30530bb836ba666b7d191dc22c7f598b071a1ba39cbdb4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): crates/zeroclaw-channels/src/linq.rs:401-420 | crates/zeroclaw-channels/src/linq.rs:422-441 \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/zeroclaw-channels/src/linq.rs"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"b346230899770a009f2bbb3058146b716025a139ae66b413ed7196db7b7a0719"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/zeroclaw-gateway/src/api_browse.rs:54-69 | crates/zeroclaw-gateway/src/api_skills.rs:337-354 \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/zeroclaw-gateway/src/api_browse.rs"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"15812936ea6215215553ffbb87f5261ec912f88349ac40792ab7a833efcba0da"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/zeroclaw-gateway/src/ws.rs:1411-1428 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:14660-14681 \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/zeroclaw-gateway/src/ws.rs"},"region":{"startLine":1411}}}],"partialFingerprints":{"codehealthFindingId/v1":"40870173290adc3b047791ede50a6c9c7a35e61171395aeeb06c84241106a7fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/zeroclaw-runtime/src/skills/document.rs:64-74 | crates/zeroclaw-runtime/src/skills/mod.rs:1648-1660 \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/zeroclaw-runtime/src/skills/document.rs"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"a477f2b8fc59b1e7904bf5f87883048371bbdacce392a0a4e3817be551fd65a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): crates/zeroclaw-runtime/src/sop/capability/builtins.rs:51-75 | crates/zeroclaw-runtime/src/sop/capability/builtins.rs:128-153 \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/zeroclaw-runtime/src/sop/capability/builtins.rs"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac7f7bf2cf3b87fc1c3f84422288d32026cd989dc753758da4a5420aec211297"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/zeroclaw-infra/src/net_guard.rs:528-542 | crates/zeroclaw-infra/src/net_guard.rs:544-560 \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/zeroclaw-infra/src/net_guard.rs"},"region":{"startLine":528}}}],"partialFingerprints":{"codehealthFindingId/v1":"2583facc65e8d1c44378a4d87598e59a388bf208b5cc0d3e144ec3032741c5ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 15\u002B corresponding lines): crates/zeroclaw-memory/src/knowledge_graph.rs:455-469 | crates/zeroclaw-memory/src/knowledge_graph.rs:478-502 | crates/zeroclaw-memory/src/knowledge_graph.rs:511-535 \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/zeroclaw-memory/src/knowledge_graph.rs"},"region":{"startLine":455}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbed8464ef3aa083c5ea3216cce21de20906331a6290fcf037390e32ce0b0c1b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/zeroclaw-plugins/src/wasi_http.rs:209-225 | crates/zeroclaw-plugins/src/wasi_http.rs:233-248 \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/zeroclaw-plugins/src/wasi_http.rs"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"0483c81497bbc80e974853f790e2ab245b5c6d7a40ac2d0eab956370431a21a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/zeroclaw-providers/src/factory.rs:1855-1867 | crates/zeroclaw-providers/src/factory.rs:1927-1939 \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/zeroclaw-providers/src/factory.rs"},"region":{"startLine":1855}}}],"partialFingerprints":{"codehealthFindingId/v1":"eeb79fe304b9e98f4f0017bdfb1847f2df0bd3d5087b6c26a8f99a31adc943a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 16\u002B corresponding lines): crates/zeroclaw-channels/src/whatsapp_storage.rs:631-647 | crates/zeroclaw-channels/src/whatsapp_storage.rs:969-987 | crates/zeroclaw-channels/src/whatsapp_storage.rs:1395-1410 \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/zeroclaw-channels/src/whatsapp_storage.rs"},"region":{"startLine":631}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5d3cc0957fbc26243f8d8b7f0e0be9581c75d8248fc21e25bdf8f2925511b19"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 16\u002B corresponding lines): crates/zeroclaw-memory/src/postgres.rs:453-475 | crates/zeroclaw-memory/src/postgres.rs:477-500 | crates/zeroclaw-memory/src/postgres.rs:581-596 | crates/zeroclaw-memory/src/postgres.rs:598-621 | crates/zeroclaw-memory/src/postgres.rs:660-676 \u2014 These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-memory/src/postgres.rs"},"region":{"startLine":453}}}],"partialFingerprints":{"codehealthFindingId/v1":"1692036433543c261da3120ece7d43d01632d3f6740d6c5a64ff840fde1fe35e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 20\u002B corresponding lines): crates/zeroclaw-tool-call-parser/src/lib.rs:642-661 | crates/zeroclaw-tool-call-parser/src/lib.rs:757-783 | crates/zeroclaw-tool-call-parser/src/lib.rs:788-814 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 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/zeroclaw-tool-call-parser/src/lib.rs"},"region":{"startLine":642}}}],"partialFingerprints":{"codehealthFindingId/v1":"f23dc0abafcc52ed67d8bfde78c2a75ff4a213161d1578da9d40aff4c6522a8c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/zeroclaw-memory/src/chunker.rs:129-149 | crates/zeroclaw-memory/src/chunker.rs:152-169 \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/zeroclaw-memory/src/chunker.rs"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"a67729b531b84e61f25b35b74c8945d86018024a2188f8144a3b05220233fe76"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/zeroclaw-providers/src/compatible.rs:3092-3114 | crates/zeroclaw-providers/src/openai.rs:355-371 \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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":3092}}}],"partialFingerprints":{"codehealthFindingId/v1":"e671e6d43a129038c4e5101b196b84b7c8360e9a1769d399be0155dec36a2df1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/zeroclaw-tools/src/mcp_client.rs:798-814 | crates/zeroclaw-tools/src/mcp_client.rs:834-850 \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/zeroclaw-tools/src/mcp_client.rs"},"region":{"startLine":798}}}],"partialFingerprints":{"codehealthFindingId/v1":"73eb9d14297d900d3cc8e83afe7c65661f84c24aaca592001742cf976af25852"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/zeroclaw-tools/src/mcp_client.rs:1454-1467 | crates/zeroclaw-tools/src/mcp_client.rs:1470-1486 \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/zeroclaw-tools/src/mcp_client.rs"},"region":{"startLine":1454}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bc08dbb35550552cc22558cf63db3e81ec724a5f4130897302b6420514cf9ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): xtask/src/cmd/mdbook/protected.rs:401-422 | xtask/src/cmd/mdbook/protected.rs:424-443 \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":"xtask/src/cmd/mdbook/protected.rs"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b1f1fb792104d01458f833451d8c855873b16b8b08b9988a5f530cac9ff05ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): apps/zerocode/src/quickstart_pane.rs:2618-2641 | apps/zerocode/src/quickstart_pane.rs:2647-2664 \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":"apps/zerocode/src/quickstart_pane.rs"},"region":{"startLine":2618}}}],"partialFingerprints":{"codehealthFindingId/v1":"40db38077b392c2eaa7337a944020c89d582b3a33bc64fafa2af04897d84b084"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/zeroclaw-config/src/schema.rs:8784-8795 | crates/zeroclaw-tools/src/microsoft365/types.rs:16-26 \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/zeroclaw-config/src/schema.rs"},"region":{"startLine":8784}}}],"partialFingerprints":{"codehealthFindingId/v1":"3741889bd3c9cf7d542db88a7818f5aa5fe719ffaf47fc8a9b7939967236d645"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): crates/zeroclaw-gateway/src/openapi.rs:610-629 | crates/zeroclaw-gateway/src/openapi.rs:632-651 \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/zeroclaw-gateway/src/openapi.rs"},"region":{"startLine":610}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7e9af264551e7df20fde3518cc83d515ca1b1aa8c55dafaa1def1702bf64876"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/zeroclaw-infra/src/net_guard.rs:319-334 | crates/zeroclaw-infra/src/net_guard.rs:767-790 \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/zeroclaw-infra/src/net_guard.rs"},"region":{"startLine":319}}}],"partialFingerprints":{"codehealthFindingId/v1":"eba8fad9e632f4feb7c97790cc4baf733478f8a6268721ecb2d5156c77275ae3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/zeroclaw-config/src/migration.rs:2658-2673 | crates/zeroclaw-config/src/migration.rs:2843-2854 \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/zeroclaw-config/src/migration.rs"},"region":{"startLine":2658}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a86cc102d738e6d58727c689968d5d7f9741d738268140b67a49351a81e495a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/zeroclaw-memory/src/knowledge_graph.rs:298-314 | crates/zeroclaw-memory/src/knowledge_graph.rs:361-388 \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/zeroclaw-memory/src/knowledge_graph.rs"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"16d1a0ac42706ab1cc0171e53576221854cd5d0a6d461a4e9434a0987d906ed4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 15\u002B corresponding lines): crates/zeroclaw-plugins/src/runtime.rs:35-54 | crates/zeroclaw-plugins/src/wasm_channel.rs:303-322 | crates/zeroclaw-plugins/src/wasm_memory.rs:55-69 \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/zeroclaw-plugins/src/runtime.rs"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"802dab00f9eee41090b2121dceec8aeaf97a0f1df8066359bf5f8f697ce1fcb0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 21\u002B corresponding lines): apps/zerocode/src/input_bar.rs:674-694 | apps/zerocode/src/widgets.rs:412-434 | apps/zerocode/src/zerocode_pane.rs:217-238 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 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":"apps/zerocode/src/input_bar.rs"},"region":{"startLine":674}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3424c7a21cc9a36b8d0eb49215f3cae0f914d481cd6a98b79b9941489eb44f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 13\u002B corresponding lines): crates/zeroclaw-memory/src/postgres.rs:536-548 | crates/zeroclaw-memory/src/postgres.rs:550-563 | crates/zeroclaw-memory/src/postgres.rs:565-579 \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/zeroclaw-memory/src/postgres.rs"},"region":{"startLine":536}}}],"partialFingerprints":{"codehealthFindingId/v1":"789d46401af41c355799cdb66b27029ddc0b140f156a0cfeed78207756f4d53c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 19\u002B corresponding lines): crates/zeroclaw-providers/src/factory.rs:172-191 | crates/zeroclaw-providers/src/factory.rs:1111-1129 | crates/zeroclaw-providers/src/factory.rs:1144-1163 \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/zeroclaw-providers/src/factory.rs"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d7137235445b8fe7640e320f4544f30f74ef602ef222b1be7f7d84bd00ffa74"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/zeroclaw-runtime/src/cron/mod.rs:97-111 | src/cron/mod.rs:22-40 \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/zeroclaw-runtime/src/cron/mod.rs"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a00fb9d2294df221d8ea0ebcc4a5110208e1ab59e6998dbaceaa83a69dd5230"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/zeroclaw-runtime/src/sop/engine.rs:1565-1578 | crates/zeroclaw-runtime/src/sop/engine.rs:1590-1604 \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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":1565}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8a9a671571cf0974b2bfd91081d39912246b0532036415e20c8efddf1314db8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/zeroclaw-runtime/src/tools/mod.rs:1382-1398 | crates/zeroclaw-runtime/src/tools/mod.rs:1400-1422 \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/zeroclaw-runtime/src/tools/mod.rs"},"region":{"startLine":1382}}}],"partialFingerprints":{"codehealthFindingId/v1":"185189cecec4808b5db4046c1ad9eb147b4c12f38c392b8311474130c5166bfe"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 13\u002B corresponding lines): crates/zeroclaw-api/src/media.rs:336-353 | crates/zeroclaw-runtime/src/tools/file_read.rs:326-340 | crates/zeroclaw-tools/src/embedded_resource.rs:226-238 \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/zeroclaw-api/src/media.rs"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"1aca55d110040586ae8284a8760347291a347db72ddfbf0388505c2ee8d58978"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/zeroclaw-api/src/model_provider.rs:849-861 | crates/zeroclaw-api/src/model_provider.rs:990-1001 \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/zeroclaw-api/src/model_provider.rs"},"region":{"startLine":849}}}],"partialFingerprints":{"codehealthFindingId/v1":"099831fa86421d60ea32070c9252a67411c0da347bec41bbf022620fdc9e6c06"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/zeroclaw-channels/src/slack.rs:2732-2757 | crates/zeroclaw-runtime/src/tools/shell.rs:154-171 \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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":2732}}}],"partialFingerprints":{"codehealthFindingId/v1":"416b4246b45c326ba6f40f3ec7c66c4d51d9e96cfbf89fd351adafc15fb90942"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): crates/zeroclaw-config/src/schema.rs:14173-14193 | src/security_status.rs:399-418 \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/zeroclaw-config/src/schema.rs"},"region":{"startLine":14173}}}],"partialFingerprints":{"codehealthFindingId/v1":"24280d208aec6b12dd2b4634c25080878416cba8b9858394cfe7720d0cedc5e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): crates/zeroclaw-memory/src/agent_scoped.rs:374-404 | crates/zeroclaw-memory/src/agent_scoped.rs:525-545 \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/zeroclaw-memory/src/agent_scoped.rs"},"region":{"startLine":374}}}],"partialFingerprints":{"codehealthFindingId/v1":"2756cf1174984cbecd1a6da068fffe08e041e46defa9063bc9bcc2e02397f675"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): crates/zeroclaw-memory/src/audit.rs:57-85 | crates/zeroclaw-memory/src/response_cache.rs:40-76 \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/zeroclaw-memory/src/audit.rs"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c151f760e920d53e51d6e0966b13d62b284543ba8c4312efca096651a3d6bbd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 17\u002B corresponding lines): crates/zeroclaw-plugins/src/wasm_channel.rs:1426-1445 | crates/zeroclaw-plugins/src/wasm_channel.rs:1510-1526 | crates/zeroclaw-plugins/src/wasm_channel.rs:1528-1547 | crates/zeroclaw-plugins/src/wasm_channel.rs:1554-1573 | crates/zeroclaw-plugins/src/wasm_memory.rs:387-407 \u2014 These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-plugins/src/wasm_channel.rs"},"region":{"startLine":1426}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f90104cd3a5b7de6668f1112667f0295bb6492c2a98eeae19e32cd41feee859"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): crates/zeroclaw-runtime/src/control_plane/task_store_sqlite/goal.rs:384-406 | crates/zeroclaw-runtime/src/control_plane/task_store_sqlite/goal.rs:413-440 \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/zeroclaw-runtime/src/control_plane/task_store_sqlite/goal.rs"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"9299ff8844eb33f2e3a34730062d7fff4723d10d97ea9efd4dbc118cdbbdab9c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 22\u002B corresponding lines): crates/zeroclaw-runtime/src/cron/store.rs:281-305 | crates/zeroclaw-runtime/src/cron/store.rs:500-521 | crates/zeroclaw-runtime/src/cron/store.rs:1541-1565 | crates/zeroclaw-runtime/src/cron/store.rs:1578-1606 \u2014 These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/cron/store.rs"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"782fafaac46ededc238f2c8e8853cfd63b1592e8b9d57e7c665d10079aa5b17b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): apps/zerocode/src/secure_file.rs:49-63 | crates/zeroclaw-config/src/migration.rs:2395-2416 \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":"apps/zerocode/src/secure_file.rs"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"9de5dbd83827622c54fa5219f63a1f50988968a6319a61d42f7033564c20b0fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/zeroclaw-channels/src/discord/mod.rs:398-415 | crates/zeroclaw-channels/src/whatsapp_web.rs:1608-1632 \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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":398}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e97468856b9f83102de852478b14735a65de5c198fb67aeb4dc4c3063e67bf1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 10\u002B corresponding lines): crates/zeroclaw-gateway/src/api_browse.rs:81-90 | crates/zeroclaw-gateway/src/api_browse.rs:98-107 | crates/zeroclaw-gateway/src/api_browse.rs:188-197 | crates/zeroclaw-gateway/src/api_browse.rs:211-220 | crates/zeroclaw-gateway/src/api_browse.rs:228-237 \u2014 These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-gateway/src/api_browse.rs"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"4033b86bc4bcf65c2db40091f463f79596e496d80f796cd559026ab5db9f613f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): crates/zeroclaw-providers/src/auth/xai_oauth.rs:86-105 | crates/zeroclaw-providers/src/auth/xai_oauth.rs:107-129 \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/zeroclaw-providers/src/auth/xai_oauth.rs"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe9ec013726f11e4ffd88af5a5ef284ef96017039d2f1d159041f4ebe01b7bd3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/zeroclaw-runtime/src/sop/engine.rs:4458-4473 | crates/zeroclaw-runtime/src/sop/engine.rs:5718-5732 \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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":4458}}}],"partialFingerprints":{"codehealthFindingId/v1":"f11ed258072d89ceab441d28705f838f9ddefe4a35017943e74c6640d78ceb74"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/zeroclaw-runtime/src/sop/store/mod.rs:444-452 | crates/zeroclaw-runtime/src/sop/store/mod.rs:459-467 \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/zeroclaw-runtime/src/sop/store/mod.rs"},"region":{"startLine":444}}}],"partialFingerprints":{"codehealthFindingId/v1":"4eb4f3fbb791630ed9a0b73be9cbb28af73170b93e364906a495380411aaff59"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): apps/zerorelay/src/lib.rs:1953-1965 | crates/zeroclaw-runtime/src/relay.rs:1504-1518 \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":"apps/zerorelay/src/lib.rs"},"region":{"startLine":1953}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f87cc8dbed62c2a5f9f20732e9eed602bbe57293e84651d1c3efae338304486"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/zeroclaw-macros/src/lib.rs:2684-2701 | crates/zeroclaw-macros/src/lib.rs:2776-2793 \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/zeroclaw-macros/src/lib.rs"},"region":{"startLine":2684}}}],"partialFingerprints":{"codehealthFindingId/v1":"690fcc7628614138f5c4ebbea99f4db6d7631cd25d48aba39b694b2341ce1151"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/zeroclaw-runtime/src/service/mod.rs:2824-2839 | crates/zeroclaw-runtime/src/service/mod.rs:2847-2863 \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/zeroclaw-runtime/src/service/mod.rs"},"region":{"startLine":2824}}}],"partialFingerprints":{"codehealthFindingId/v1":"99e062524fec2f992a1fe53d8b31ae133ad86d878e32ba0b7e31dfead77b331f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): xtask/src/cmd/mdbook/peer_groups.rs:719-727 | xtask/src/cmd/mdbook/peer_groups.rs:1008-1016 \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":"xtask/src/cmd/mdbook/peer_groups.rs"},"region":{"startLine":719}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e347d0c94a86d7ff3799e745e54d2581197f22db2a0c87c669653a537b02961"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): crates/zeroclaw-channels/src/matrix.rs:788-807 | crates/zeroclaw-channels/src/orchestrator/mod.rs:8488-8507 \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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":788}}}],"partialFingerprints":{"codehealthFindingId/v1":"2daecf37b3b5dd10c9875e0273dbe09c2475317cb8c856f98b30cb51de283bc8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/zeroclaw-runtime/src/rpc/dispatch.rs:739-750 | crates/zeroclaw-runtime/src/sop/executor.rs:668-689 \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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":739}}}],"partialFingerprints":{"codehealthFindingId/v1":"23c1fa3de83cbe9032ba25d52a5a7a6a620c6a75c97a7bec5dc63fc96beaace6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): apps/tauri/src/daemon.rs:551-561 | apps/tauri/src/daemon.rs:564-576 \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":"apps/tauri/src/daemon.rs"},"region":{"startLine":551}}}],"partialFingerprints":{"codehealthFindingId/v1":"032fae7d68d2bdc7c6109b4409269cfca85db2ecab41dcb7a9a6c3e48619dfcb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): crates/zeroclaw-runtime/src/identity.rs:659-677 | crates/zeroclaw-runtime/src/identity.rs:687-705 \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/zeroclaw-runtime/src/identity.rs"},"region":{"startLine":659}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cf5381eb442de0683d8493c49b8dd9ce131647b0249105cb0b78688615cc8a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (51 corresponding lines): crates/zeroclaw-tools/src/cloud_ops.rs:256-319 | crates/zeroclaw-tools/src/cloud_ops.rs:366-416 \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/zeroclaw-tools/src/cloud_ops.rs"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"78d037e5737f863339972a34472e869026f119607d6a45065aecf1627c935736"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): apps/zerocode/src/chat.rs:5083-5091 | apps/zerocode/src/chat.rs:5096-5104 \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":"apps/zerocode/src/chat.rs"},"region":{"startLine":5083}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a33823e7dce834233dfa6a78941ebf8c300a44c958d03ceecfc5fbed5be311e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/zeroclaw-channels/src/matrix.rs:4835-4844 | crates/zeroclaw-channels/src/matrix.rs:4846-4855 \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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":4835}}}],"partialFingerprints":{"codehealthFindingId/v1":"da5959f08de9af128514f03f6a8bcc5343835dc45add3af614b5f487c92a5c75"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): crates/zeroclaw-channels/src/telegram.rs:8165-8183 | crates/zeroclaw-channels/src/telegram.rs:8190-8217 \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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":8165}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a71e56a780b8e6a34539047b189c0f8cbe3e06c3f17027a310bf1648dbdf5c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/zeroclaw-channels/src/wechat.rs:1136-1147 | crates/zeroclaw-channels/src/whatsapp_web.rs:1419-1433 \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/zeroclaw-channels/src/wechat.rs"},"region":{"startLine":1136}}}],"partialFingerprints":{"codehealthFindingId/v1":"886f37b6a98ddd63442c0f036553ae3df4cec5514a39ad571f511ff16c5d15f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): apps/zerocode/src/oidc_enroll.rs:210-226 | apps/zerocode/src/oidc_enroll.rs:241-256 \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":"apps/zerocode/src/oidc_enroll.rs"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"68072ae8b706bba0edf1b5c010ea1d0548ed1a6db496f27cbc7bc3920c0af479"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 11\u002B corresponding lines): crates/zeroclaw-channels/src/orchestrator/mod.rs:11868-11884 | crates/zeroclaw-runtime/src/agent_lifecycle.rs:180-190 | crates/zeroclaw-runtime/src/tools/skill_manage.rs:709-723 \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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":11868}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4c6aa2d5a18ea0ed71f2542f61f2f8298d32651c92e4e488157218b221c0b63"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/zeroclaw-config/src/alias_refs.rs:873-884 | crates/zeroclaw-config/src/alias_refs.rs:894-905 \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/zeroclaw-config/src/alias_refs.rs"},"region":{"startLine":873}}}],"partialFingerprints":{"codehealthFindingId/v1":"1999d4bb082d530ef1b59709edcc24e2405bb702746c0d418ff0b51e9aeaec2d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/zeroclaw-infra/src/session_sqlite.rs:1078-1084 | crates/zeroclaw-infra/src/session_sqlite.rs:1098-1106 \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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":1078}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9dcc44d7fb6bc37e2a571f43fd8818a0133aea8ab461858b72e400ee8d15af6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 11\u002B corresponding lines): crates/zeroclaw-memory/src/knowledge_graph_pg.rs:201-211 | crates/zeroclaw-memory/src/knowledge_graph_pg.rs:213-228 | crates/zeroclaw-memory/src/knowledge_graph_pg.rs:230-242 | crates/zeroclaw-memory/src/knowledge_graph_pg.rs:244-257 | crates/zeroclaw-memory/src/knowledge_graph_pg.rs:259-270 \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/zeroclaw-memory/src/knowledge_graph_pg.rs"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"489ba01f21f29ce9b719156108712b0442c9f9720e38d6d02dec64cb335464f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 18\u002B corresponding lines): crates/zeroclaw-plugins/src/wasm_channel.rs:1579-1601 | crates/zeroclaw-plugins/src/wasm_memory.rs:343-363 | crates/zeroclaw-plugins/src/wasm_memory.rs:365-385 | crates/zeroclaw-plugins/src/wasm_memory.rs:409-426 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\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/zeroclaw-plugins/src/wasm_channel.rs"},"region":{"startLine":1579}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ecc80f862584b8ad8d648ac2a6d8e56c171bca62110e8bfd642875c7725487d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (21 corresponding lines): crates/zeroclaw-runtime/src/cron/store.rs:526-546 | crates/zeroclaw-runtime/src/cron/store.rs:552-574 \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/zeroclaw-runtime/src/cron/store.rs"},"region":{"startLine":526}}}],"partialFingerprints":{"codehealthFindingId/v1":"12bc424ac314970b17c3041756bf43d885f5e3547e88adf311ab23749c4c604e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): apps/zerocode/src/main.rs:736-755 | apps/zerocode/src/main.rs:782-802 \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":"apps/zerocode/src/main.rs"},"region":{"startLine":736}}}],"partialFingerprints":{"codehealthFindingId/v1":"a398bff160d9a2ed6664d5028fbba381458e57db304660875bbe631ac8c3e86e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/zeroclaw-channels/src/telegram.rs:2361-2374 | crates/zeroclaw-channels/src/telegram.rs:2430-2443 \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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":2361}}}],"partialFingerprints":{"codehealthFindingId/v1":"f663aa2a23afbb04ea56855080cb6dfe345327079f7a77a78df5ddcee7a5bf26"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/zeroclaw-runtime/src/cron/store.rs:1496-1513 | crates/zeroclaw-runtime/src/heartbeat/store.rs:176-193 \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/zeroclaw-runtime/src/cron/store.rs"},"region":{"startLine":1496}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4f2423a173f3293378716fb70b426f0a6a0e579a2b119e750d386e6937328c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 17\u002B corresponding lines): crates/zeroclaw-runtime/src/identity.rs:233-251 | crates/zeroclaw-runtime/src/identity.rs:498-514 | crates/zeroclaw-runtime/src/identity.rs:516-532 \u2014 These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/identity.rs"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"5059ce412489664eb35aaecc37789f3703f7c4aba6dcd43efcfdcf771eafd86f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 13\u002B corresponding lines): apps/zerocode/src/config/mod.rs:1523-1535 | apps/zerocode/src/config/mod.rs:1540-1552 | apps/zerocode/src/config/mod.rs:1554-1566 \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":"apps/zerocode/src/config/mod.rs"},"region":{"startLine":1523}}}],"partialFingerprints":{"codehealthFindingId/v1":"c62656388498710e9d21fc30f236465e3b6f6c83088654d7c3b92c9dcc996639"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): apps/zerocode/src/logs.rs:1493-1506 | apps/zerocode/src/logs.rs:1508-1526 \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":"apps/zerocode/src/logs.rs"},"region":{"startLine":1493}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d924fd279ba6cbc80a6b4d6bc97dd2228faa227ef68443fba75ed4079cb1a68"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/zeroclaw-providers/src/gemini_cli.rs:100-111 | crates/zeroclaw-providers/src/kilocli.rs:100-111 \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/zeroclaw-providers/src/gemini_cli.rs"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"8336e4d7069f79a7217703032dc17c69951ad3d0238e66f6165809b9ece76ee0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/zeroclaw-providers/src/multimodal.rs:1221-1234 | crates/zeroclaw-providers/src/multimodal.rs:1454-1467 \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/zeroclaw-providers/src/multimodal.rs"},"region":{"startLine":1221}}}],"partialFingerprints":{"codehealthFindingId/v1":"71d5d7faf71548090a34b8ec082a1b6334465a426911450f1afa6fde184905b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/zeroclaw-runtime/src/live_config_authority.rs:1311-1328 | crates/zeroclaw-runtime/src/live_config_authority.rs:1333-1349 \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/zeroclaw-runtime/src/live_config_authority.rs"},"region":{"startLine":1311}}}],"partialFingerprints":{"codehealthFindingId/v1":"03145ea335d88bde4deb9e92edc65cf030538b27294f1c8eaa0268dc3f6c023f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/zeroclaw-runtime/src/skills/mod.rs:1334-1347 | crates/zeroclaw-runtime/src/skills/mod.rs:3082-3094 \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/zeroclaw-runtime/src/skills/mod.rs"},"region":{"startLine":1334}}}],"partialFingerprints":{"codehealthFindingId/v1":"1171e28fdcfb0b7881ec1a11383530a74732566ea9d73b2b74b6cd16f48a07b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/zeroclaw-tools/src/text_browser.rs:98-110 | crates/zeroclaw-tools/src/web_fetch.rs:85-104 \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/zeroclaw-tools/src/text_browser.rs"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"6286e89b9d53e2f4aeb0f4eedcbafe8cead191291d24bb6604cdb0229df34079"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/zeroclaw-runtime/src/plugin_state.rs:281-292 | crates/zeroclaw-runtime/src/plugin_state.rs:581-590 \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/zeroclaw-runtime/src/plugin_state.rs"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"d05605408965c0886fbb28736765f6cef47cd75b881c2f977a8e066ca63ee260"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): xtask/src/cmd/mdbook/seo.rs:403-416 | xtask/src/cmd/mdbook/versions.rs:300-317 \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":"xtask/src/cmd/mdbook/seo.rs"},"region":{"startLine":403}}}],"partialFingerprints":{"codehealthFindingId/v1":"39b603d54cb9a1415e3fd927d56b472a2301c7fa23cbeb0b5f39f4575f04650f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): apps/zerocode/src/chat.rs:10412-10433 | apps/zerocode/src/chat.rs:10553-10568 \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":"apps/zerocode/src/chat.rs"},"region":{"startLine":10412}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbb12ef9836c299ca6cf05ea5a2e9d89d94aa91746304a9e1b6fa671bffb12bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): apps/zerocode/src/enroll.rs:463-476 | apps/zerorelay/src/enroll_proxy.rs:354-367 \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":"apps/zerocode/src/enroll.rs"},"region":{"startLine":463}}}],"partialFingerprints":{"codehealthFindingId/v1":"452caa70daf1d88222af3f771dda3c5b2034c69ad8ce0657762f85f9aa83db12"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 12\u002B corresponding lines): apps/zerocode/src/input_bar.rs:1290-1303 | apps/zerocode/src/input_bar.rs:1309-1321 | apps/zerocode/src/input_bar.rs:1323-1336 | apps/zerocode/src/input_bar.rs:1338-1349 \u2014 These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/input_bar.rs"},"region":{"startLine":1290}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8f98cc061678356f97968c0615d44fd6cd4d2963eab70386d3d9ba592ab5f21"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): apps/zerocode/src/quickstart_pane.rs:420-439 | apps/zerocode/src/quickstart_pane.rs:495-513 \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":"apps/zerocode/src/quickstart_pane.rs"},"region":{"startLine":420}}}],"partialFingerprints":{"codehealthFindingId/v1":"376d27bb47f83388c1bb85c4548b22613d4c878788e4f8ffb6ad595cd81330a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 17\u002B corresponding lines): crates/zeroclaw-channels/src/transcription.rs:150-170 | crates/zeroclaw-channels/src/transcription.rs:260-277 | crates/zeroclaw-channels/src/transcription.rs:365-381 \u2014 These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/transcription.rs"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d9a3012ad252bd574e036a92574678ffb6c849c66bf5fdf88cf2f8a58c2cd5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/zeroclaw-macros/src/lib.rs:2744-2755 | crates/zeroclaw-runtime/src/skills/scaffold.rs:103-114 \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/zeroclaw-macros/src/lib.rs"},"region":{"startLine":2744}}}],"partialFingerprints":{"codehealthFindingId/v1":"86493d559a2801d378e3075113ca30c7a25ef3ceec0c4a26bbe75dc77f4cbb6f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/zeroclaw-providers/src/auth/profiles.rs:90-106 | crates/zeroclaw-providers/src/auth/profiles.rs:108-124 \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/zeroclaw-providers/src/auth/profiles.rs"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"66a3994e0b4d634e2a942e6f6faf49f06e54f68d63d5c40db8a9479dfedd02b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 17\u002B corresponding lines): crates/zeroclaw-providers/src/compatible.rs:306-326 | crates/zeroclaw-providers/src/compatible.rs:3022-3041 | crates/zeroclaw-providers/src/lib.rs:1314-1330 | crates/zeroclaw-providers/src/openrouter.rs:482-499 | crates/zeroclaw-providers/src/openrouter.rs:505-524 \u2014 These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"2502fb3ad08cf021409761790f28ce9496df9e032fe2dec77c6abd4ff2c88280"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): crates/zeroclaw-config/src/helpers.rs:364-382 | crates/zeroclaw-config/src/helpers.rs:384-402 \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/zeroclaw-config/src/helpers.rs"},"region":{"startLine":364}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d2e306e26acb46a27bbe728914a4b3dcaea8da14e1e469ea21789b9590e195e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/zeroclaw-runtime/src/agent/agent.rs:2480-2494 | crates/zeroclaw-runtime/src/agent/agent.rs:2509-2529 \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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":2480}}}],"partialFingerprints":{"codehealthFindingId/v1":"68159380e6f678c25da18feab6d6b0be8a22dcefa56bb4c0cf38f96e3f04ad3a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/zeroclaw-runtime/src/sop/store/mod.rs:401-407 | crates/zeroclaw-runtime/src/sop/store/mod.rs:436-442 \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/zeroclaw-runtime/src/sop/store/mod.rs"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"e59be208558a0dacb3dbef03360716680a53f8ba3f0e45438f0a10b08f42130f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/zeroclaw-tools/src/a2a_client.rs:2070-2080 | crates/zeroclaw-tools/src/a2a_client.rs:2117-2127 \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/zeroclaw-tools/src/a2a_client.rs"},"region":{"startLine":2070}}}],"partialFingerprints":{"codehealthFindingId/v1":"44112deff8a6e6cf8f20353420cd34693de4908944a503e798679eb7b8888a8b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 77\u002B corresponding lines): crates/zeroclaw-tools/src/report_templates.rs:92-200 | crates/zeroclaw-tools/src/report_templates.rs:203-311 | crates/zeroclaw-tools/src/report_templates.rs:314-390 | crates/zeroclaw-tools/src/report_templates.rs:393-469 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 77 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/zeroclaw-tools/src/report_templates.rs"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f7fd7060037327bb7fc44e47a9e5de9a83617cb64f020ad05f6ae70155b51ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): apps/zerocode/src/enroll.rs:1070-1076 | src/bin/zeroclaw-acp-bridge.rs:240-246 \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":"apps/zerocode/src/enroll.rs"},"region":{"startLine":1070}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2b89fdab9c8584cd57ce4cb4bbf57c3719d2083c9c7161128a2f11cd0a09dfd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 13\u002B corresponding lines): apps/zerocode/src/sop_pane.rs:806-818 | apps/zerocode/src/sop_pane.rs:824-836 | apps/zerocode/src/sop_pane.rs:1178-1191 \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":"apps/zerocode/src/sop_pane.rs"},"region":{"startLine":806}}}],"partialFingerprints":{"codehealthFindingId/v1":"73fe7ea24b95851f939779669a1c949a269c328c5a1cd1608d325ff7b0839f9b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/zeroclaw-memory/src/sqlite.rs:1833-1846 | crates/zeroclaw-memory/src/sqlite.rs:1848-1862 \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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":1833}}}],"partialFingerprints":{"codehealthFindingId/v1":"a75285ce772f5436898af91dee5665719cf1dffb71a06adb0dc4d918f3cf5a89"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): apps/zerocode/src/doctor.rs:446-456 | apps/zerocode/src/file_explorer.rs:267-277 \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":"apps/zerocode/src/doctor.rs"},"region":{"startLine":446}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d912ceba320567055f81ec5825bcf6107d92f4aba46c2fb433382f44b11aca0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 17\u002B corresponding lines): crates/zeroclaw-channels/src/discord/interaction.rs:31-47 | crates/zeroclaw-channels/src/discord/interaction.rs:58-76 | crates/zeroclaw-channels/src/discord/interaction.rs:130-150 \u2014 These 3 members are one piece of code written 3 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 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/discord/interaction.rs"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"60c21335bb274089e75620a234462a4b96365b9bf9be8b67cfe80c4b1fe01eea"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/zeroclaw-channels/src/matrix.rs:2589-2598 | crates/zeroclaw-channels/src/matrix.rs:2600-2606 \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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":2589}}}],"partialFingerprints":{"codehealthFindingId/v1":"8edd4beb19501556172e2c955779255ba056038c31a63f74810345c5c7d552be"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/zeroclaw-runtime/src/sop/engine.rs:2807-2819 | crates/zeroclaw-runtime/src/sop/engine.rs:2821-2833 \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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":2807}}}],"partialFingerprints":{"codehealthFindingId/v1":"2372c4e70efa5f37cb1f497a450f7d6dbd56fa9bd8797d48110ae22cb025513e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): apps/zerocode/src/config_manager.rs:2409-2420 | apps/zerocode/src/file_explorer.rs:246-257 \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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":2409}}}],"partialFingerprints":{"codehealthFindingId/v1":"05b1569f59a865bb6fd1ea8509594ba090e3606465b054b5a0712294ec3b8940"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/zeroclaw-channels/src/bluesky.rs:232-242 | crates/zeroclaw-channels/src/reddit.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/zeroclaw-channels/src/bluesky.rs"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a9b19479bcbc2571c5f40af0ae15fe43f53aab28b29721f025fd2db2af3ab92"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/zeroclaw-channels/src/lark.rs:682-692 | crates/zeroclaw-channels/src/lark.rs:697-708 \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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":682}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0b623362956337c9a26ab370c5ca093c9afbb63f93228e70b1bf4a86816ba59"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/zeroclaw-config/src/schema.rs:22479-22488 | crates/zeroclaw-config/src/schema.rs:22490-22504 \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/zeroclaw-config/src/schema.rs"},"region":{"startLine":22479}}}],"partialFingerprints":{"codehealthFindingId/v1":"9258c18277c5fd2f1a803da5c67ad0b9a832ffcdfd80123fb852a703d8fc5185"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (6 members, 12\u002B corresponding lines): crates/zeroclaw-memory/src/sqlite.rs:2258-2272 | crates/zeroclaw-memory/src/sqlite.rs:2274-2288 | crates/zeroclaw-memory/src/sqlite.rs:2294-2310 | crates/zeroclaw-memory/src/sqlite.rs:2312-2327 | crates/zeroclaw-memory/src/sqlite.rs:2371-2390 | crates/zeroclaw-memory/src/sqlite.rs:2392-2403 \u2014 These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":2258}}}],"partialFingerprints":{"codehealthFindingId/v1":"e13b57ba244b8e271339e32ce1ebbba5de76ce5e15a4cc0cbffd71015b3dfa5e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 11\u002B corresponding lines): crates/zeroclaw-plugins/src/sockets.rs:186-196 | crates/zeroclaw-plugins/src/sockets.rs:198-211 | crates/zeroclaw-plugins/src/sockets.rs:213-223 \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/zeroclaw-plugins/src/sockets.rs"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b15f970c19c98460b279bba01c1b5eb8a6908d3aad5b12dd5858c4918b5da34"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 12\u002B corresponding lines): crates/zeroclaw-runtime/src/approval/mod.rs:117-128 | crates/zeroclaw-runtime/src/approval/mod.rs:130-141 | crates/zeroclaw-runtime/src/approval/mod.rs:154-165 | crates/zeroclaw-runtime/src/approval/mod.rs:177-188 \u2014 These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/approval/mod.rs"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"558e80cf6b5663c9abf06166c587a31bd199b6b80c6acf2385bfd2fa62843944"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/zeroclaw-runtime/src/sop/dispatch.rs:306-317 | crates/zeroclaw-runtime/src/tools/sop_execute.rs:230-241 \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/zeroclaw-runtime/src/sop/dispatch.rs"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dea1a1cd917d0c921f249d47c71256bee64a285fe959105c42384a618ac7626"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/zeroclaw-runtime/src/tools/skill_http.rs:73-83 | crates/zeroclaw-runtime/src/tools/skill_tool.rs:141-151 \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/zeroclaw-runtime/src/tools/skill_http.rs"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"035cea05bedc84a933f3f4c5298e099ca3fa90f36b402bbafe21cf8f0849e9df"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/zeroclaw-runtime/src/tools/sop_workshop.rs:232-241 | crates/zeroclaw-runtime/src/tools/sop_workshop.rs:300-309 \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/zeroclaw-runtime/src/tools/sop_workshop.rs"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b7839c11e13f5afefe14d13f27d329c9f8106b672c4ab051d3720076b2a51e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/zeroclaw-tls/src/certgen.rs:50-61 | crates/zeroclaw-tls/src/certgen.rs:74-83 \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/zeroclaw-tls/src/certgen.rs"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ba1ab4774a402aa4c9bac200c82e3e9f03d7d02dc2baa0db57f2a5a3380ea93"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/zeroclaw-tools/src/mcp_client.rs:1380-1388 | crates/zeroclaw-tools/src/mcp_client.rs:1395-1403 \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/zeroclaw-tools/src/mcp_client.rs"},"region":{"startLine":1380}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5c2516929a38ecbc5365c678cb0e19afbfe2c0fb0d6699f080506ea0057c142"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 8\u002B corresponding lines): apps/tauri/src/gateway_client.rs:28-35 | apps/tauri/src/gateway_client.rs:49-56 | apps/tauri/src/gateway_client.rs:58-67 | apps/tauri/src/gateway_client.rs:133-143 \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":"apps/tauri/src/gateway_client.rs"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"aad45c3c7c3bb35c748585ece63c9c1218577584cd73d34a72b965a30b85ca2f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): apps/zerocode/src/input_bar.rs:1372-1384 | apps/zerocode/src/input_bar.rs:1387-1400 \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":"apps/zerocode/src/input_bar.rs"},"region":{"startLine":1372}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e3bba9a3eaf7094c8a81808bc1a1a7b9d17d1866f60f5b648eec528b6ffc436"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/zeroclaw-config/src/schema.rs:11587-11604 | crates/zeroclaw-config/src/schema.rs:18255-18268 \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/zeroclaw-config/src/schema.rs"},"region":{"startLine":11587}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfc522fa1f76ad28e18227e523f310b069b8d226d82e20c87e3dbadba8c29c2d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/zeroclaw-infra/src/session_sqlite.rs:1843-1854 | crates/zeroclaw-infra/src/session_sqlite.rs:1862-1874 \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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":1843}}}],"partialFingerprints":{"codehealthFindingId/v1":"22d41d6769a2a88239e6ec49a67f0559080bd3a4270f15835bda8dbdef18efe5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 15\u002B corresponding lines): apps/tauri/src/macos/permissions.rs:49-68 | apps/tauri/src/macos/permissions.rs:81-102 | apps/tauri/src/macos/permissions.rs:105-126 | apps/tauri/src/macos/permissions.rs:190-215 | apps/tauri/src/macos/permissions.rs:221-235 \u2014 These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/tauri/src/macos/permissions.rs"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e56e56a1266161caba1ff44d610df15284aafdf42580a6e17395d687ab894ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): apps/zerocode/src/config/mod.rs:1763-1775 | apps/zerocode/src/config/mod.rs:1783-1790 \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":"apps/zerocode/src/config/mod.rs"},"region":{"startLine":1763}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b6056df82739978114463cbe4ce19e1777b8c8eb87574633ef032a2e6835fbd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/zeroclaw-channels/src/discord/markers.rs:961-976 | crates/zeroclaw-channels/src/matrix.rs:3221-3230 \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/zeroclaw-channels/src/discord/markers.rs"},"region":{"startLine":961}}}],"partialFingerprints":{"codehealthFindingId/v1":"6912aabd4c71f01ce2fcbe5407f205abcdc4e4d24f3dcfe648b0e2a183d4352f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/zeroclaw-channels/src/git/providers/gitea/provider.rs:226-234 | crates/zeroclaw-channels/src/git/providers/github/provider.rs:373-381 \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/zeroclaw-channels/src/git/providers/gitea/provider.rs"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"81c0e82bca72b0c50a26ce11eab8502b3384efb72981c0d4edf2701c03534339"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/zeroclaw-channels/src/matrix.rs:5045-5060 | crates/zeroclaw-channels/src/matrix.rs:5067-5082 \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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":5045}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1a4c1633eb84bb77d65bd11a48fb500c6340b37f5bd53abd5719042d7176048"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/zeroclaw-channels/src/telegram.rs:3414-3425 | crates/zeroclaw-channels/src/telegram.rs:3427-3438 \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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":3414}}}],"partialFingerprints":{"codehealthFindingId/v1":"8512a1b3808f3d1be6b53aa66350ed8dec2eb53067ae41bd958f1187fe99387c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/zeroclaw-gateway/src/api_pairing.rs:328-348 | crates/zeroclaw-gateway/src/canvas.rs:41-58 \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/zeroclaw-gateway/src/api_pairing.rs"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"43fd7ba07931f134091241c61ed39897521df489e8ff51f108d297ff862a8e49"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 17\u002B corresponding lines): crates/zeroclaw-plugins/src/wasm_channel.rs:1278-1297 | crates/zeroclaw-plugins/src/wasm_channel.rs:1299-1315 | crates/zeroclaw-plugins/src/wasm_channel.rs:1322-1338 | crates/zeroclaw-plugins/src/wasm_memory.rs:710-729 \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/zeroclaw-plugins/src/wasm_channel.rs"},"region":{"startLine":1278}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef0867e6564e3a0b539a07c928b6c4c951c7bb363435947faea8f10fcccf0dbe"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/zeroclaw-runtime/src/peers.rs:19-32 | crates/zeroclaw-runtime/src/peers.rs:35-48 \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/zeroclaw-runtime/src/peers.rs"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb92650716a12fa3197079d9971f56211d2b113448fdd133528dfb95d1859f67"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/zeroclaw-runtime/src/quickstart/mod.rs:46-54 | src/quickstart_plugins/mod.rs:1136-1142 \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/zeroclaw-runtime/src/quickstart/mod.rs"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"417e475d2bb01fbc1c77a878c2c8208e547cc1ed5024f355fa423f466a9f4804"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/zeroclaw-runtime/src/rpc/dispatch.rs:12946-12952 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:12954-12963 \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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":12946}}}],"partialFingerprints":{"codehealthFindingId/v1":"28a32b1fa4a4cc8a5b4469670790f42e36e238c525511b45808cd6a6316ee28a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): apps/zerocode/src/dashboard.rs:2608-2619 | apps/zerocode/src/dashboard.rs:2621-2632 \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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":2608}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9a9e1b6dcccb0eabc26d0b5c47584db249e22cd150e99298e9896cf70940bd3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 9\u002B corresponding lines): apps/zerocode/src/enroll.rs:535-546 | apps/zerorelay/src/enroll_proxy.rs:372-380 | crates/zeroclaw-tls/src/lib.rs:238-247 \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":"apps/zerocode/src/enroll.rs"},"region":{"startLine":535}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a31832c708cdf5000807a399857b9ef150ca7d71e6789010aa699fd1ad88665"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 15\u002B corresponding lines): crates/zeroclaw-runtime/src/sop/store/sqlite.rs:431-445 | crates/zeroclaw-runtime/src/sop/store/sqlite.rs:596-611 | crates/zeroclaw-runtime/src/sop/store/sqlite.rs:724-738 \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/zeroclaw-runtime/src/sop/store/sqlite.rs"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ee62ee8a18bfa648dc91100e8b8cb48b2ab65f33e57a54e857edbfa8d971b04"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 14\u002B corresponding lines): crates/zeroclaw-channels/src/discord/slash.rs:15-31 | crates/zeroclaw-config/src/schema/v2.rs:2984-2997 | crates/zeroclaw-runtime/src/sop/procedural_memory.rs:488-501 \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/zeroclaw-channels/src/discord/slash.rs"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2c75e115df5ee0ffa6b2800bb0dccaa13c80e7630c837a4827eb83e39d47c6a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/zeroclaw-config/src/schema/v2.rs:4-15 | crates/zeroclaw-providers/src/lib.rs:1533-1542 \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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":4}}}],"partialFingerprints":{"codehealthFindingId/v1":"db479387786ded7688437fc42034ba67580401061f95886a1a54e1ac0cfebc5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/zeroclaw-gateway/src/api_personality.rs:125-135 | crates/zeroclaw-runtime/src/agent/personality.rs:167-177 \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/zeroclaw-gateway/src/api_personality.rs"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"d62dad13094725eb59c40a8cd73aa3d736dc9d65091369b6bb9304c49f979b2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): crates/zeroclaw-infra/src/session_sqlite.rs:1305-1327 | crates/zeroclaw-infra/src/session_sqlite.rs:1452-1473 \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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":1305}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5063b8facb46cb6bd9e20a5e73fdbfae0d39637231d16bf3a7083304bcf6399"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/zeroclaw-providers/src/azure_openai.rs:379-393 | crates/zeroclaw-providers/src/openai_codex.rs:251-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/zeroclaw-providers/src/azure_openai.rs"},"region":{"startLine":379}}}],"partialFingerprints":{"codehealthFindingId/v1":"3eef361991e51df3dd7d15aafbc0bc422e16deab5bf7cf5a060f0f7d0fadc930"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/zeroclaw-tools/src/mcp_prompts_tool.rs:55-67 | crates/zeroclaw-tools/src/mcp_resources_tool.rs:55-66 \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/zeroclaw-tools/src/mcp_prompts_tool.rs"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"190e179a3e1fdbe90c399c8274075960ca7a082c804b89beda019ca64cb7d0f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): apps/zerocode/src/oidc_enroll.rs:70-79 | crates/zeroclaw-runtime/src/security/auth_provider/enrollment.rs:57-72 \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":"apps/zerocode/src/oidc_enroll.rs"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"40baba349d92a2375c88be5ba879cc203dd53d4d62a1f8598943938355713115"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): apps/zerocode/src/theme.rs:449-460 | apps/zerocode/src/theme.rs:465-477 \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":"apps/zerocode/src/theme.rs"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"8506376605b5e0520a96200c947d2474bed66569904e1689df4deb2e43e69177"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/zeroclaw-infra/src/acp_session_store.rs:1202-1212 | crates/zeroclaw-runtime/src/security/cert_ledger.rs:1409-1418 \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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":1202}}}],"partialFingerprints":{"codehealthFindingId/v1":"88303ddaed4999e5d288ec3559a2d42be2a86e718c954e7348ea746a5af1d0a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 15\u002B corresponding lines): crates/zeroclaw-providers/src/router.rs:402-416 | crates/zeroclaw-providers/src/router.rs:439-454 | crates/zeroclaw-providers/src/router.rs:462-477 | crates/zeroclaw-providers/src/router.rs:505-520 | crates/zeroclaw-providers/src/router.rs:528-542 \u2014 These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-providers/src/router.rs"},"region":{"startLine":402}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed4ccf96258f1fe4bccb9400d7f9252facc40f904df2f5ba4291e6bfdd766534"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/zeroclaw-runtime/src/security/bubblewrap.rs:97-112 | crates/zeroclaw-runtime/src/security/firejail.rs:195-212 \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/zeroclaw-runtime/src/security/bubblewrap.rs"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"44f80f607e184e731cf30a1dd10fba9624866f18d0d65aa49666c61ba496c1d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/zeroclaw-runtime/src/tools/mod.rs:1424-1434 | crates/zeroclaw-runtime/src/tools/mod.rs:1436-1444 \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/zeroclaw-runtime/src/tools/mod.rs"},"region":{"startLine":1424}}}],"partialFingerprints":{"codehealthFindingId/v1":"0225603bdad9aa9f6fc177f5df6420ed39c64f6246f32d4ba277c3c56674a9ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/zeroclaw-tools/src/mcp_client.rs:817-831 | crates/zeroclaw-tools/src/mcp_client.rs:857-874 \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/zeroclaw-tools/src/mcp_client.rs"},"region":{"startLine":817}}}],"partialFingerprints":{"codehealthFindingId/v1":"826b0b9a2e0567ef615f65d212e793441766669a5d7e76c828470905bf3a805d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): apps/zerocode/src/config/mod.rs:169-183 | apps/zerocode/src/config/mod.rs:189-200 \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":"apps/zerocode/src/config/mod.rs"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c792f3e22c9a689803fa98eb93a662c3fd7212c26f74d4eb02c3b9411825519"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/zeroclaw-config/src/typed_value.rs:181-190 | crates/zeroclaw-tools/src/llm_task.rs:316-325 \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/zeroclaw-config/src/typed_value.rs"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b4c50257d73ab8fedf131f04215d6991e0ad327e3cd4fae2c1a0d338bc99ec7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/zeroclaw-gateway/src/api_oidc.rs:788-798 | crates/zeroclaw-infra/src/net_guard.rs:1148-1160 \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/zeroclaw-gateway/src/api_oidc.rs"},"region":{"startLine":788}}}],"partialFingerprints":{"codehealthFindingId/v1":"437b441b04c52f8fc94408ab662f634f9bc664f70c231a9c34a7b93a22f7cbba"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 9\u002B corresponding lines): crates/zeroclaw-infra/src/session_store.rs:408-416 | crates/zeroclaw-runtime/src/doctor/mod.rs:565-573 | crates/zeroclaw-runtime/src/sop/mod.rs:800-808 \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/zeroclaw-infra/src/session_store.rs"},"region":{"startLine":408}}}],"partialFingerprints":{"codehealthFindingId/v1":"a60b9124a5a4b491ad46070f46c7b7c3380e6d0a8c4edf40fc989a81ddac7c49"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/zeroclaw-providers/src/ollama.rs:922-942 | crates/zeroclaw-providers/src/ollama.rs:953-970 \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/zeroclaw-providers/src/ollama.rs"},"region":{"startLine":922}}}],"partialFingerprints":{"codehealthFindingId/v1":"c828f6ce3884a6ccc8fe63d6a632d6e2ea20bdd29339fa2912555aa6b6d63ce8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 30\u002B corresponding lines): crates/zeroclaw-runtime/src/security/leak_detector.rs:156-244 | crates/zeroclaw-runtime/src/security/leak_detector.rs:253-282 | crates/zeroclaw-runtime/src/security/leak_detector.rs:291-323 | crates/zeroclaw-runtime/src/security/leak_detector.rs:434-468 \u2014 These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/security/leak_detector.rs"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"216b4c1a505a5d0c06e3b2fe957e9364673cdae5326b954a811b757444aba1c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/zeroclaw-tools/src/mcp_transport.rs:2149-2155 | crates/zeroclaw-tools/src/mcp_transport.rs:2159-2165 \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/zeroclaw-tools/src/mcp_transport.rs"},"region":{"startLine":2149}}}],"partialFingerprints":{"codehealthFindingId/v1":"136f4203a2617743009a0e57dc4fc16a317b7f1adeddf8156fffe0427243d350"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 10\u002B corresponding lines): apps/zerocode/src/config/mod.rs:1569-1578 | apps/zerocode/src/config/mod.rs:1583-1592 | apps/zerocode/src/config/mod.rs:1748-1757 \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":"apps/zerocode/src/config/mod.rs"},"region":{"startLine":1569}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8e91c43c6f4cfa3869f67d23213ad94f44e62a0298c1847492939fe096ed4d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): apps/zerocode/src/config_manager.rs:1363-1372 | apps/zerocode/src/zerocode_pane.rs:1260-1269 \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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":1363}}}],"partialFingerprints":{"codehealthFindingId/v1":"54817b40e43d102722cf6677b7715e2977850e10548b0fee817ef3f14862909a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): crates/zeroclaw-config/src/policy.rs:3524-3546 | crates/zeroclaw-config/src/policy.rs:3548-3566 \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/zeroclaw-config/src/policy.rs"},"region":{"startLine":3524}}}],"partialFingerprints":{"codehealthFindingId/v1":"f61c163721b8c4974b7eba9b887dc5564fe671ff7d9915aa573e70ba98913280"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/zeroclaw-providers/src/bedrock.rs:777-791 | crates/zeroclaw-providers/src/bedrock.rs:796-810 \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/zeroclaw-providers/src/bedrock.rs"},"region":{"startLine":777}}}],"partialFingerprints":{"codehealthFindingId/v1":"6aa362aa667b82f39191b4f346642b80ee6cbdfd94d1c96cb381e99fa7f132fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/zeroclaw-runtime/src/sop/binding.rs:86-101 | crates/zeroclaw-runtime/src/sop/binding.rs:243-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/zeroclaw-runtime/src/sop/binding.rs"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"94ab1c2b0c0d7c3c406d4aaf324634415e9b27554c6485adb0cf6b78d21b0e9c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): crates/zeroclaw-tools/src/discord_search.rs:29-55 | crates/zeroclaw-tools/src/memory_recall.rs:29-56 \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/zeroclaw-tools/src/discord_search.rs"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"7efa216069c0d4e0a4d6e729722a59939a6cc15f5f942aa9ea09a9e45a2d576c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/zeroclaw-tools/src/microsoft365/graph_client.rs:27-46 | crates/zeroclaw-tools/src/microsoft365/graph_client.rs:111-127 \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/zeroclaw-tools/src/microsoft365/graph_client.rs"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"56354c53e802819c0eb53df16185b85050248f8890f3ebf7cc02bcc996e5aa5b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/zeroclaw-channels/src/link_enricher.rs:66-77 | crates/zeroclaw-hardware/src/datasheet.rs:89-99 \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/zeroclaw-channels/src/link_enricher.rs"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ae9e6198d8a9fdf7384c7c7b24ba3ae32d0d809aab2a3204f9482f1e2329cff"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/zeroclaw-channels/src/matrix.rs:4895-4902 | crates/zeroclaw-channels/src/matrix.rs:4904-4911 \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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":4895}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0d662229a1506078d63a410fce4e39f2ead47cbdd5810919923a237482f26b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 11\u002B corresponding lines): crates/zeroclaw-config/src/providers.rs:315-326 | crates/zeroclaw-config/src/providers.rs:331-341 | crates/zeroclaw-config/src/providers.rs:437-447 \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/zeroclaw-config/src/providers.rs"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2c165f23b04cfd81dceb49988d1f570e6cc331257fae5b3bb1643b5545f9665"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/zeroclaw-gateway/src/api_sections.rs:22-35 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:12134-12146 \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/zeroclaw-gateway/src/api_sections.rs"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"660223ce02d164c8cfd33191b4c68d2431b5eaeefa6161afe6eaffb756870a61"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/zeroclaw-runtime/src/i18n.rs:124-133 | crates/zeroclaw-tools/src/i18n.rs:151-160 \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/zeroclaw-runtime/src/i18n.rs"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"30482ed22c5ab2ff2874ccbeac1612a4baba582bf2a3d972cddcc2c9d2f12df1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/zeroclaw-runtime/src/rpc/dispatch.rs:1339-1351 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:1361-1372 \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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":1339}}}],"partialFingerprints":{"codehealthFindingId/v1":"c813d19baed5738a9227f023a0120e43f8af3eefd36ff0ce5c24de89edf96a39"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/zeroclaw-runtime/src/rpc/dispatch.rs:1424-1440 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:2056-2072 \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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":1424}}}],"partialFingerprints":{"codehealthFindingId/v1":"24da625af25a8c2498eeedbfe66c8d7f18dd42f15daf65829cc1a9b2c0ac3202"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/zeroclaw-runtime/src/sop/dispatch.rs:1525-1535 | crates/zeroclaw-runtime/src/sop/dispatch.rs:1552-1561 \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/zeroclaw-runtime/src/sop/dispatch.rs"},"region":{"startLine":1525}}}],"partialFingerprints":{"codehealthFindingId/v1":"e41e7571f2f52691bf6695dd28066178c4caff5cbd80bbb8dd3a5dc02b04a379"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 10\u002B corresponding lines): crates/zeroclaw-infra/src/session_sqlite.rs:1521-1530 | crates/zeroclaw-infra/src/session_sqlite.rs:1807-1823 | crates/zeroclaw-infra/src/session_sqlite.rs:1825-1841 \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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":1521}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c4f1bb07d14ade5b3ea1696d45dcfc3223296397cddb6f464728b583bf41e9c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 8\u002B corresponding lines): crates/zeroclaw-providers/src/catalog.rs:174-185 | crates/zeroclaw-providers/src/catalog.rs:187-198 | crates/zeroclaw-providers/src/models_dev.rs:59-66 | crates/zeroclaw-providers/src/openrouter_catalog.rs:37-48 | crates/zeroclaw-providers/src/openrouter_catalog.rs:50-61 \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/zeroclaw-providers/src/catalog.rs"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"1834c95b86b33c41cc04cc7522803e90167bf76a18a81a5dc8be9d620166328c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (6 members, 13\u002B corresponding lines): crates/zeroclaw-providers/src/dispatch.rs:615-627 | crates/zeroclaw-providers/src/dispatch.rs:847-859 | crates/zeroclaw-providers/src/dispatch.rs:888-900 | crates/zeroclaw-providers/src/dispatch.rs:976-988 | crates/zeroclaw-providers/src/dispatch.rs:1229-1241 | crates/zeroclaw-providers/src/dispatch.rs:1270-1282 \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/zeroclaw-providers/src/dispatch.rs"},"region":{"startLine":615}}}],"partialFingerprints":{"codehealthFindingId/v1":"73b673c5f3e1b35e9abdd709ede22489cdef736fca5a2e9f8c51a08f70e4da29"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): src/plugins/channel_instance.rs:235-250 | src/plugins/channel_instance.rs:260-272 \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/plugins/channel_instance.rs"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f70acce04b0a0f723a8e964ee351a79477d25602240689711401caf7e9498ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 10\u002B corresponding lines): crates/zeroclaw-channels/src/git/providers/gitea/mapping.rs:16-25 | crates/zeroclaw-channels/src/git/providers/github/mapping.rs:22-31 | crates/zeroclaw-channels/src/git/providers/github/mapping.rs:80-89 \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/zeroclaw-channels/src/git/providers/gitea/mapping.rs"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"e54ffd63defa9a70a9b2e85e3712c8a66d3816d483b5cdcb9430c117b2190f5e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/zeroclaw-gateway/src/api_sop_author.rs:29-36 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:12928-12934 \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/zeroclaw-gateway/src/api_sop_author.rs"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b625dacc90f9ab9070d551d5dd81f68cdfdcf0b66f95f319b549b8ddc818a02"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/zeroclaw-gateway/src/nodes/mdns.rs:380-388 | src/plugin_registry.rs:51-58 \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/zeroclaw-gateway/src/nodes/mdns.rs"},"region":{"startLine":380}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd5a3bbb53372fc5ffff20d364af49eec94dd21a6bb1a0d93f2be356225ff10b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/zeroclaw-plugins/src/component_state.rs:35-47 | crates/zeroclaw-plugins/src/component_state.rs:78-90 \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/zeroclaw-plugins/src/component_state.rs"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5863d5942db14a2650590cca5f69209f244c91d0c4efcec4282202429c65cb2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 13\u002B corresponding lines): crates/zeroclaw-providers/src/dispatch.rs:826-838 | crates/zeroclaw-providers/src/dispatch.rs:867-879 | crates/zeroclaw-providers/src/dispatch.rs:1208-1220 | crates/zeroclaw-providers/src/dispatch.rs:1249-1261 \u2014 These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-providers/src/dispatch.rs"},"region":{"startLine":826}}}],"partialFingerprints":{"codehealthFindingId/v1":"739e4f974baaa5089f111ede4a23fa4531f0644046896db45bdf279a35091bfb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/zeroclaw-tools/src/calculator.rs:231-242 | crates/zeroclaw-tools/src/calculator.rs:244-258 \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/zeroclaw-tools/src/calculator.rs"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"3581ca154629d4303655be35423de2327779aefeac13b015e85f1b8a0baa6df9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/zeroclaw-tools/src/channel_room.rs:295-307 | crates/zeroclaw-tools/src/channel_room.rs:309-318 \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/zeroclaw-tools/src/channel_room.rs"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"45e155ee995c8b12d96a4b8d95a0b107a64fcf6f085e8f981c6b2e630cffc427"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): apps/zerocode/src/sop_pane.rs:876-885 | apps/zerocode/src/sop_pane.rs:887-896 \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":"apps/zerocode/src/sop_pane.rs"},"region":{"startLine":876}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c4706a52ef67f5f999a3d94f831720138c237ad10af5e666763ec7601716870"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/zeroclaw-channels/src/whatsapp_storage.rs:586-599 | crates/zeroclaw-channels/src/whatsapp_storage.rs:1038-1051 \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/zeroclaw-channels/src/whatsapp_storage.rs"},"region":{"startLine":586}}}],"partialFingerprints":{"codehealthFindingId/v1":"242ce8506262ea17a2438de99fc44919db10c17c8d6b88be374c733fc4560aad"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/zeroclaw-config/src/policy.rs:94-107 | crates/zeroclaw-config/src/policy.rs:109-124 \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/zeroclaw-config/src/policy.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"48758fd1eadb6c79400645cc0172f98ad3b44b9139f8d4a06023e698cdd9d1ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 10\u002B corresponding lines): crates/zeroclaw-providers/src/catalog.rs:132-143 | crates/zeroclaw-providers/src/catalog.rs:160-172 | src/plugins/egress_ceremony.rs:320-329 \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/zeroclaw-providers/src/catalog.rs"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecd1fcb2e03d4b84906b8afea9c836f8144d93843cf793741d86496de5c312ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/zeroclaw-rpc-client/src/client.rs:151-166 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:12709-12723 \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/zeroclaw-rpc-client/src/client.rs"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4bdb496ca3f9a0d4f85320eae459f053842068475f7813acaeca3037a3c53a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/zeroclaw-runtime/src/sop/mod.rs:493-504 | crates/zeroclaw-runtime/src/sop/mod.rs:506-513 \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/zeroclaw-runtime/src/sop/mod.rs"},"region":{"startLine":493}}}],"partialFingerprints":{"codehealthFindingId/v1":"658d1d3a5e425c8de61101283c3b45706ee5d38a75de8d90f748d0a282b15bc8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/zeroclaw-tools/src/web_search_tool.rs:257-272 | crates/zeroclaw-tools/src/web_search_tool.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/zeroclaw-tools/src/web_search_tool.rs"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"57b3f6d8319dcae98cdb3130410e0f2b1a19af899085c36365c1fb703e3a0049"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/zeroclaw-channels/src/discord/markers.rs:978-987 | crates/zeroclaw-channels/src/slack.rs:1779-1795 \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/zeroclaw-channels/src/discord/markers.rs"},"region":{"startLine":978}}}],"partialFingerprints":{"codehealthFindingId/v1":"3194e36a0fdc699859477397d16ffc83b67221493ec2306bac4fc31b9d0bfb5c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/zeroclaw-gateway/src/lib.rs:132-145 | crates/zeroclaw-runtime/src/rpc/local.rs:153-165 \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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c251d9f482620cb878326e18cf863de89c51d754f1f061748f458ef4080a945"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/zeroclaw-providers/src/reliable.rs:2460-2473 | crates/zeroclaw-providers/src/reliable.rs:2475-2492 \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/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":2460}}}],"partialFingerprints":{"codehealthFindingId/v1":"84d79412ee062053f2503e2f3340490e8c16ed8645165ee7f9a6f3af125a9c91"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/zeroclaw-runtime/src/control_plane/task_store_sqlite.rs:559-567 | crates/zeroclaw-runtime/src/control_plane/task_store_sqlite.rs:585-593 \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/zeroclaw-runtime/src/control_plane/task_store_sqlite.rs"},"region":{"startLine":559}}}],"partialFingerprints":{"codehealthFindingId/v1":"d849770c4de07c5003a8916095efbfe2b20657ede315c49b3434b6fad5abb4d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/zeroclaw-runtime/src/security/estop.rs:261-273 | crates/zeroclaw-tools/src/http_request.rs:263-279 \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/zeroclaw-runtime/src/security/estop.rs"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b9a410cb1ae4b65c43728da4c937a2f77d08af9ab618d0e4235b0a536e26691"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/zeroclaw-runtime/src/util.rs:111-121 | crates/zeroclaw-tools/src/claude_code_runner.rs:414-422 \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/zeroclaw-runtime/src/util.rs"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec0afd66951b6e63f76e7372d92506b20f0276cdc74494f6f17e8e78272e25f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 7\u002B corresponding lines): apps/zerocode/src/config/mod.rs:1472-1478 | apps/zerocode/src/config/mod.rs:1497-1508 | apps/zerocode/src/config/mod.rs:1510-1521 \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":"apps/zerocode/src/config/mod.rs"},"region":{"startLine":1472}}}],"partialFingerprints":{"codehealthFindingId/v1":"782c8f00fe76dde6379667b819991561102bcb19e734f967c57cd69e102b1518"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/zeroclaw-channels/src/transcription.rs:486-499 | crates/zeroclaw-channels/src/transcription.rs:660-674 \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/zeroclaw-channels/src/transcription.rs"},"region":{"startLine":486}}}],"partialFingerprints":{"codehealthFindingId/v1":"24b2465124318c4de833ff04e68ce67ca9c14e3c187c982d54b26dcef613c8fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/zeroclaw-gateway/src/api_oidc.rs:259-267 | crates/zeroclaw-gateway/src/api_oidc.rs:292-299 \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/zeroclaw-gateway/src/api_oidc.rs"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2eb438a9ce41f3af157316315efc16eda4a04059fd1f9e3ab2eb90452d05b74"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 15\u002B corresponding lines): crates/zeroclaw-infra/src/acp_session_store.rs:2823-2837 | crates/zeroclaw-infra/src/acp_session_store.rs:2843-2857 | crates/zeroclaw-infra/src/acp_session_store.rs:2899-2915 \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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":2823}}}],"partialFingerprints":{"codehealthFindingId/v1":"d28a72e39056281d17f8b5d245619728725ad4178eb14dda5f88d493cdb645c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): crates/zeroclaw-runtime/src/agent/agent.rs:2706-2728 | crates/zeroclaw-runtime/src/agent/agent.rs:2798-2820 \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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":2706}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b093e4f564314712d7349c39ba428cf0ed785b17e8bc946c56720b355452da5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 8\u002B corresponding lines): crates/zeroclaw-runtime/src/plugin_state.rs:432-439 | crates/zeroclaw-runtime/src/plugin_state.rs:447-457 | crates/zeroclaw-runtime/src/plugin_state.rs:464-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 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/zeroclaw-runtime/src/plugin_state.rs"},"region":{"startLine":432}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ae75a73e052118a59bdfdd00986f1b08983a5a325b8d297a83fb7a8e6675439"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/zeroclaw-runtime/src/tools/mod.rs:1619-1626 | crates/zeroclaw-runtime/src/tools/send_message_to_peer.rs:703-718 \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/zeroclaw-runtime/src/tools/mod.rs"},"region":{"startLine":1619}}}],"partialFingerprints":{"codehealthFindingId/v1":"67d9732d7d2a1abec0cfb73b34bdf6e553e2aae66446699c6d57d3f36e3281e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/zeroclaw-tools/src/coding_cli.rs:189-198 | crates/zeroclaw-tools/src/coding_cli.rs:208-217 \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/zeroclaw-tools/src/coding_cli.rs"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b969bfeeca6c552be11827efa4a1b8b793533f5e1d2fbcbe7c416dd7310664c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/zeroclaw-channels/src/discord/mod.rs:1457-1471 | crates/zeroclaw-channels/src/signal.rs:990-1004 \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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":1457}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e3bb1e672813162e21725c212b00086659bdbd705c3a7a4503cc9d32f1cda92"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/zeroclaw-channels/src/matrix.rs:5412-5419 | crates/zeroclaw-channels/src/matrix.rs:5421-5428 \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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":5412}}}],"partialFingerprints":{"codehealthFindingId/v1":"0889ba2330c2c100cb80eb7076a324071584855ac5a6c1f4fa3f513de890e079"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/zeroclaw-config/src/providers.rs:372-390 | crates/zeroclaw-providers/src/factory.rs:594-604 \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/zeroclaw-config/src/providers.rs"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"d47fc19b431de383468c69b88281b080d28545d83e592a3efee8d2a99ac67a5c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/zeroclaw-plugins/src/wasm_memory.rs:428-438 | crates/zeroclaw-plugins/src/wasm_memory.rs:454-467 \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/zeroclaw-plugins/src/wasm_memory.rs"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"780d4c99d93ab1bd7f49f45e0c10692a48b6a2cbcaaf6888703ee1928531f03c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 9\u002B corresponding lines): crates/zeroclaw-runtime/src/live_config_authority.rs:1390-1398 | crates/zeroclaw-runtime/src/live_config_authority.rs:1402-1410 | crates/zeroclaw-runtime/src/live_config_authority.rs:1414-1422 \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/zeroclaw-runtime/src/live_config_authority.rs"},"region":{"startLine":1390}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b771791d49a4e1ecd6d8b54dbedc5bbc61cfc1a44d41e6e569db9e77efefe3b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/zeroclaw-runtime/src/sop/engine.rs:1280-1288 | crates/zeroclaw-runtime/src/sop/engine.rs:1319-1327 \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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":1280}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7eea58d2a2f773dfbcecf141dfcc448d5ce7b274104888a121eee79c35178af"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 15\u002B corresponding lines): crates/zeroclaw-tools/src/cloud_ops.rs:185-199 | crates/zeroclaw-tools/src/cloud_ops.rs:201-217 | crates/zeroclaw-tools/src/cloud_ops.rs:219-234 \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/zeroclaw-tools/src/cloud_ops.rs"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cc9f36a12de0e0b86a9a4c6cd4fa9b5bec25fa08043e57123bb412a8b72c239"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/zeroclaw-tools/src/email_read.rs:172-184 | xtask/src/cmd/mdbook/seo.rs:352-364 \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/zeroclaw-tools/src/email_read.rs"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cd9cbcd593caa34afa297d9ef7671136028d61c4b6eaa3cf26e3bc61602ebc3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 8\u002B corresponding lines): crates/zeroclaw-tools/src/web_search_tool.rs:993-1000 | crates/zeroclaw-tools/src/web_search_tool.rs:1177-1184 | crates/zeroclaw-tools/src/web_search_tool.rs:1372-1379 \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/zeroclaw-tools/src/web_search_tool.rs"},"region":{"startLine":993}}}],"partialFingerprints":{"codehealthFindingId/v1":"429f217c39672792862947a31e374943ac1edaa8b4ab47c9479d97156bc0b1e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 12\u002B corresponding lines): crates/zeroclaw-channels/src/git/providers/gitea/api.rs:188-201 | crates/zeroclaw-channels/src/git/providers/gitea/api.rs:257-268 | crates/zeroclaw-channels/src/git/providers/github/api.rs:507-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 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/zeroclaw-channels/src/git/providers/gitea/api.rs"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"6895a023bcf831606090fd5f730e795478656041c9f2c3d611c302b3ced8ca00"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/zeroclaw-config/src/schema.rs:14196-14207 | src/security_status.rs:420-430 \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/zeroclaw-config/src/schema.rs"},"region":{"startLine":14196}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bd6129fe9bbcfebef26ebd73bc4c30b68ab8a72f412f8216374584a691340b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/zeroclaw-gateway/src/dashboard_core.rs:282-288 | crates/zeroclaw-gateway/src/dashboard_core.rs:306-315 \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/zeroclaw-gateway/src/dashboard_core.rs"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca19650647034c2d8713c237c8affe925ac732034a18157edc9af05162ffec48"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 13\u002B corresponding lines): crates/zeroclaw-providers/src/hailo_ollama.rs:653-665 | crates/zeroclaw-runtime/src/skills/improver.rs:227-239 | tools/fill-translations/src/main.rs:165-177 \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/zeroclaw-providers/src/hailo_ollama.rs"},"region":{"startLine":653}}}],"partialFingerprints":{"codehealthFindingId/v1":"6623322288eb3e9cdc6056dc4a33d925900da41a5dbd8499fd85560b1f6ce99f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/zeroclaw-runtime/src/hooks/builtin/webhook_audit.rs:128-137 | crates/zeroclaw-tools/src/http_request.rs:818-829 \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/zeroclaw-runtime/src/hooks/builtin/webhook_audit.rs"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"34c076afc69fe1fcec2182c283df2430342911dfb9c338aeb233d257025e0e72"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/zeroclaw-runtime/src/tools/param_options.rs:132-140 | crates/zeroclaw-runtime/src/tools/param_options.rs:142-149 \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/zeroclaw-runtime/src/tools/param_options.rs"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"9aa0935874c5cbf3be7bcf8e1c4c467a816dbd56794e2946f2b195baa5453eca"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): crates/zeroclaw-tools/src/http_request.rs:59-80 | crates/zeroclaw-tools/src/http_request.rs:91-112 \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/zeroclaw-tools/src/http_request.rs"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa3cb5c71a4732b30d9bee71e6021d41bbe76ceaa194e029bf5a00d3afc04da4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/zeroclaw-api/src/channel.rs:621-634 | crates/zeroclaw-api/src/channel.rs:653-666 \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/zeroclaw-api/src/channel.rs"},"region":{"startLine":621}}}],"partialFingerprints":{"codehealthFindingId/v1":"40b082a38e253f360c2dd7367a9988e814432243e2384f95f76776686a66656e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/zeroclaw-channels/src/orchestrator/mod.rs:3262-3273 | crates/zeroclaw-channels/src/orchestrator/mod.rs:3337-3349 \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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":3262}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d797ffa2f3bf43f1a5295c501b290dbfe6f11885f8b19504a4e41c19fc2a2be"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/zeroclaw-providers/src/openai.rs:756-766 | crates/zeroclaw-providers/src/openrouter.rs:602-614 \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/zeroclaw-providers/src/openai.rs"},"region":{"startLine":756}}}],"partialFingerprints":{"codehealthFindingId/v1":"2411af861a8ecd8f5d968003686ee84c17f80ea6d2ef54ed277e8fa26d8c1b9e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/zeroclaw-runtime/src/service/mod.rs:3342-3354 | crates/zeroclaw-runtime/src/service/mod.rs:3356-3365 \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/zeroclaw-runtime/src/service/mod.rs"},"region":{"startLine":3342}}}],"partialFingerprints":{"codehealthFindingId/v1":"02fb859d94a460ab986dcdf4ce0e2242dd6e66e4ddf6e1c558831dcde7c3b1c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/zeroclaw-runtime/src/sop/engine.rs:2127-2133 | crates/zeroclaw-runtime/src/sop/engine.rs:2204-2215 \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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":2127}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f3a8742b34e5070ebd81f47cd782929b057bab341b8f2861dd0943e84bb5f12"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): xtask/src/cmd/mdbook/linkcheck.rs:121-133 | crates/zeroclaw-config/src/paths.rs:21-33 \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":"xtask/src/cmd/mdbook/linkcheck.rs"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b9e11125de925677675e25fc259295ac3988a870fd5b358803855b9eba3b4a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 6\u002B corresponding lines): apps/tauri/src/commands/agent.rs:9-17 | apps/tauri/src/commands/gateway.rs:14-19 | apps/tauri/src/commands/pairing.rs:6-11 \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":"apps/tauri/src/commands/agent.rs"},"region":{"startLine":9}}}],"partialFingerprints":{"codehealthFindingId/v1":"531d54aae53e19389b60ce1bb825f6cb6502b02832c5b4a2de8c180862f9533b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): apps/zerocode/src/chat.rs:8546-8559 | apps/zerocode/src/chat.rs:8617-8627 \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":"apps/zerocode/src/chat.rs"},"region":{"startLine":8546}}}],"partialFingerprints":{"codehealthFindingId/v1":"03d30280b8d62142e880cf673295e66e42bf4c0ee8552ec61e74c4163988a53e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/zeroclaw-config/src/schema/v2.rs:2251-2260 | crates/zeroclaw-config/src/schema/v2.rs:2434-2443 \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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":2251}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f09929309bc2dfd459d0fc11650aa80a0ac3c94e476b5811ca15cd80431133e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/zeroclaw-gateway/src/a2a.rs:372-389 | crates/zeroclaw-gateway/src/a2a.rs:414-431 \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/zeroclaw-gateway/src/a2a.rs"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d7ebb7b5b7c01fa908041b3c3c66f8446f8a6d0edd63ce8dfc9a2537aa9d067"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/zeroclaw-providers/src/dispatch/accounting.rs:246-255 | crates/zeroclaw-providers/src/dispatch/accounting.rs:257-266 \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/zeroclaw-providers/src/dispatch/accounting.rs"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"f22bab426634b5b37620ba14f71c260930a1cf3059a6fd97a0234bc09feea176"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/zeroclaw-runtime/src/tools/cron_add.rs:109-123 | crates/zeroclaw-runtime/src/tools/cron_common.rs:111-123 \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/zeroclaw-runtime/src/tools/cron_add.rs"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"71370ebf6904254d9f1fd9a239f545ce0bbcb79bee0ac35020a7226d8cee6f0a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/zeroclaw-tools/src/backup_tool.rs:54-67 | crates/zeroclaw-tools/src/data_management.rs:42-54 \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/zeroclaw-tools/src/backup_tool.rs"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"87df226d0a69f8c046a6ef97f2afb7bc806942d298fab311e16372aa8beed84f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 10\u002B corresponding lines): crates/zeroclaw-channels/src/orchestrator/mod.rs:16495-16504 | crates/zeroclaw-gateway/src/a2a.rs:192-201 | crates/zeroclaw-runtime/src/live_config_authority.rs:1270-1281 | src/plugins/channel_instance.rs:170-180 \u2014 These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":16495}}}],"partialFingerprints":{"codehealthFindingId/v1":"735c68b98097b0c3ef17114810092c15b917150fb7620d27df6357624a0f7929"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/zeroclaw-providers/src/compatible.rs:3934-3943 | crates/zeroclaw-providers/src/compatible.rs:3945-3954 \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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":3934}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbda4ee6e95e1fac708120576b0af04c384f7941c2ecb0337198b2d8e500088b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): crates/zeroclaw-tools/src/claude_code_runner.rs:85-107 | crates/zeroclaw-tools/src/llm_task.rs:117-144 \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/zeroclaw-tools/src/claude_code_runner.rs"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a09c60af5aa783eb7ce1cbb96ae4a2f29151eaadd929ec084eaa2630a782059"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): apps/zerocode/src/enroll.rs:486-494 | apps/zerorelay/src/enroll_proxy.rs:389-397 \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":"apps/zerocode/src/enroll.rs"},"region":{"startLine":486}}}],"partialFingerprints":{"codehealthFindingId/v1":"d065aa0c1f8faddc43f1acf8dff4edb38c314e97c09c61402091b90c27dce5b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 13\u002B corresponding lines): crates/zeroclaw-channels/src/clawdtalk.rs:305-326 | crates/zeroclaw-channels/src/linq.rs:372-386 | crates/zeroclaw-channels/src/nextcloud_talk.rs:781-793 | crates/zeroclaw-channels/src/whatsapp.rs:1100-1115 \u2014 These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/clawdtalk.rs"},"region":{"startLine":305}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7d27a448e693dba320bcb7453a108d89e30bd6987edcc8c15ef5e22bded78cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/zeroclaw-channels/src/discord/chunk.rs:220-232 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:3520-3528 \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/zeroclaw-channels/src/discord/chunk.rs"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"db136c8ceab24b7dd7ce709fa324eb2bf46d015275a40a39464facaa21705631"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/zeroclaw-channels/src/telegram.rs:3931-3939 | crates/zeroclaw-channels/src/wechat.rs:1337-1344 \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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":3931}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fe9499708bd7e45d8dfe0deab99ab5bb07a0394ab2dd682c9badcd0f0f37c50"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 11\u002B corresponding lines): crates/zeroclaw-plugins/src/host.rs:1281-1291 | crates/zeroclaw-plugins/src/host.rs:1296-1307 | crates/zeroclaw-plugins/src/host.rs:1318-1331 \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/zeroclaw-plugins/src/host.rs"},"region":{"startLine":1281}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff288540bd540601388ee73345cf89116eaa5bee7bea48454a8adfa1cef20c3b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/zeroclaw-plugins/src/wasm_channel.rs:1052-1065 | crates/zeroclaw-plugins/src/wasm_memory.rs:313-326 \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/zeroclaw-plugins/src/wasm_channel.rs"},"region":{"startLine":1052}}}],"partialFingerprints":{"codehealthFindingId/v1":"caf1bda58352e451a55834fd4bc02826d3cd7d9b5f8d488e73e050953ec7293a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 15\u002B corresponding lines): crates/zeroclaw-channels/src/discord/markers.rs:930-944 | crates/zeroclaw-channels/src/signal.rs:1128-1142 | crates/zeroclaw-channels/src/whatsapp_web.rs:3173-3187 \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/zeroclaw-channels/src/discord/markers.rs"},"region":{"startLine":930}}}],"partialFingerprints":{"codehealthFindingId/v1":"c88c2009f68e6b8821934fc6b8d7daa428b27515bea72cba3542c49766beb2af"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/zeroclaw-tools/src/web_fetch.rs:106-120 | crates/zeroclaw-tools/src/text_browser.rs:112-123 \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/zeroclaw-tools/src/web_fetch.rs"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce0abb46dfa3b939e4e454ac1cbf5dfa3e188367bf1ff9ae5cfc6e5557612e5f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): src/plugins/channel_instance.rs:776-786 | crates/zeroclaw-memory/src/sqlite.rs:841-850 \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/plugins/channel_instance.rs"},"region":{"startLine":776}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d922d295cc59841073d57a873d33ab7506259b681e302627a17a05c4c07a370"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 8\u002B corresponding lines): crates/zeroclaw-api/src/channel.rs:1106-1113 | crates/zeroclaw-plugins/src/wasm_channel.rs:1269-1276 | crates/zeroclaw-runtime/src/peers.rs:52-59 \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/zeroclaw-api/src/channel.rs"},"region":{"startLine":1106}}}],"partialFingerprints":{"codehealthFindingId/v1":"1df8119e36e2324791a900c30d4f5ebd954ea32775240acfa70030f3b4c89ac4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/zeroclaw-channels/src/slack.rs:3483-3494 | crates/zeroclaw-channels/src/slack.rs:3883-3894 \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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":3483}}}],"partialFingerprints":{"codehealthFindingId/v1":"55e5271f2fb8838d40e27fb890680dc29456717d64ad963e86911eaf47052fb9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (5 members, 8\u002B corresponding lines): crates/zeroclaw-gateway/src/dashboard_core.rs:1723-1730 | crates/zeroclaw-gateway/src/dashboard_core.rs:1740-1747 | crates/zeroclaw-gateway/src/dashboard_core.rs:1757-1764 | crates/zeroclaw-gateway/src/dashboard_core.rs:1773-1780 | crates/zeroclaw-gateway/src/dashboard_core.rs:1789-1796 \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/zeroclaw-gateway/src/dashboard_core.rs"},"region":{"startLine":1723}}}],"partialFingerprints":{"codehealthFindingId/v1":"d293ea8a5047eb59974910fdb099e9219410f98549ce83e3558fede3d95bbfae"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/zeroclaw-infra/src/acp_session_store.rs:683-701 | crates/zeroclaw-runtime/src/control_plane/task_store_sqlite.rs:781-793 \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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":683}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff19cb938672255796203e6d4d51465b7e2b762a4ca3657af557c85e050cf6b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/zeroclaw-runtime/src/tools/skill_http.rs:39-47 | crates/zeroclaw-runtime/src/tools/skill_tool.rs:105-115 \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/zeroclaw-runtime/src/tools/skill_http.rs"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"e82357e30b6bfedd99bda4e6e5a368435b1ce96806fcdb490ec95b00670c9134"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/zeroclaw-runtime/src/approval/mod.rs:491-499 | crates/zeroclaw-runtime/src/doctor/mod.rs:2056-2064 \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/zeroclaw-runtime/src/approval/mod.rs"},"region":{"startLine":491}}}],"partialFingerprints":{"codehealthFindingId/v1":"1291bc0cfc6f6debc4046905fed982cdeb25c46ff5f8557361f1441ade270114"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 20\u002B corresponding lines): crates/zeroclaw-runtime/src/tools/deliver_file.rs:191-210 | crates/zeroclaw-tools/src/file_edit.rs:41-60 | crates/zeroclaw-tools/src/file_write.rs:51-71 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 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/zeroclaw-runtime/src/tools/deliver_file.rs"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f9b097e78d709c3ef1119cfe89ba5cd89f9e3226fb94e4670d59b4cd04567f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/zeroclaw-runtime/src/tools/send_message_to_peer.rs:774-781 | crates/zeroclaw-channels/src/matrix.rs:1869-1876 \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/zeroclaw-runtime/src/tools/send_message_to_peer.rs"},"region":{"startLine":774}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ecde3921c65ec776718f476be2e967d510888bf3bb8091b155117951912ee76"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/zeroclaw-api/src/media.rs:322-331 | crates/zeroclaw-channels/src/slack.rs:3242-3251 \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/zeroclaw-api/src/media.rs"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"cba72d88940327404183922fce886c74c56e201a71cc10ce1a77b4d9e5c9c926"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/zeroclaw-channels/src/git/providers/gitea/api.rs:59-65 | crates/zeroclaw-channels/src/git/providers/github/api.rs:90-97 \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/zeroclaw-channels/src/git/providers/gitea/api.rs"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"814858e075a1aa20864c226a74447345a1d6956ddbf7de5427ed5f97e8b05b86"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 10\u002B corresponding lines): crates/zeroclaw-infra/src/acp_session_store.rs:2737-2746 | crates/zeroclaw-providers/src/lib.rs:1080-1091 | crates/zeroclaw-tools/src/file_upload.rs:125-135 \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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":2737}}}],"partialFingerprints":{"codehealthFindingId/v1":"65f8a1a78814c457c5356f1c4f95dd1810dd6a06ec87ae982f19b0536c9897c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/zeroclaw-providers/src/dispatch.rs:452-463 | crates/zeroclaw-providers/src/reliable.rs:217-228 \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/zeroclaw-providers/src/dispatch.rs"},"region":{"startLine":452}}}],"partialFingerprints":{"codehealthFindingId/v1":"1acf3ff02fc2a032ff56d59fa31375004e6cb05cddb4e2933a957a3b5d99ba48"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/zeroclaw-tools/src/git_forge.rs:728-737 | xtask/src/cmd/mdbook/keymap.rs:30-39 \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/zeroclaw-tools/src/git_forge.rs"},"region":{"startLine":728}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd0cdd0d44103c96913c52c2b2aa281f9a832e705679b6b8fe92d33b21e274bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/zeroclaw-api/src/tool_carrier.rs:222-230 | crates/zeroclaw-log/src/reader.rs:515-528 \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/zeroclaw-api/src/tool_carrier.rs"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"66836efcce3580bab8c6bb32714ce2f16010593fcf4b558d11c05924e55b1e9e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/zeroclaw-channels/src/orchestrator/mod.rs:358-371 | crates/zeroclaw-providers/src/multimodal.rs:1188-1197 \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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"f351c3c33344ea4ad4d91b0708b0618247a3cad1a99700b4f9492c9259d33e9d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 11\u002B corresponding lines): crates/zeroclaw-config/src/pairing.rs:886-898 | crates/zeroclaw-config/src/pairing.rs:908-919 | crates/zeroclaw-config/src/pairing.rs:925-936 | crates/zeroclaw-config/src/pairing.rs:941-951 \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/zeroclaw-config/src/pairing.rs"},"region":{"startLine":886}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0680e6c46251b16e62b08d5a9e001e6f204662eae0e9802b6dd1e9dfbfe6660"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 11\u002B corresponding lines): crates/zeroclaw-infra/src/acp_session_store.rs:2984-2994 | crates/zeroclaw-infra/src/session_sqlite.rs:1497-1509 | crates/zeroclaw-runtime/src/control_plane/task_store_sqlite.rs:111-121 \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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":2984}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f51025171405ef7d78bcb98e01eb1a8e5765668569968d47b5359fc9d855cb9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/zeroclaw-runtime/src/tools/skill_tool.rs:382-390 | crates/zeroclaw-tools/src/mcp_tool.rs:78-86 \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/zeroclaw-runtime/src/tools/skill_tool.rs"},"region":{"startLine":382}}}],"partialFingerprints":{"codehealthFindingId/v1":"91601750e64ca21e52b0467bd3561c28a3a57c2498e80c75f4ad5e64ad18a2f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/zeroclaw-tools/src/microsoft365/graph_client.rs:400-407 | crates/zeroclaw-runtime/src/agent/history_pruner.rs:118-124 \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/zeroclaw-tools/src/microsoft365/graph_client.rs"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"7abfe82cd89efe50d454fa1ff52605ebe36061a535a62b3b23bcc35de82bbcb5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): apps/zerocode/src/client.rs:949-959 | crates/zeroclaw-gateway/src/lib.rs:1100-1110 \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":"apps/zerocode/src/client.rs"},"region":{"startLine":949}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9f511449484a5ccf99860d237a1a6dd803e190f0abdd3169ea785b3f85ebc35"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/zeroclaw-runtime/src/migration.rs:332-339 | src/memory/cli.rs:452-459 \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/zeroclaw-runtime/src/migration.rs"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"42afb8fb5566ce3a34ce320e3ab7c3cd22f1fdccf76d27be792c78687bf1ada0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 8\u002B corresponding lines): crates/zeroclaw-channels/src/telegram.rs:458-469 | crates/zeroclaw-plugins/src/wasm_channel.rs:879-890 | crates/zeroclaw-runtime/src/plugin_runtime.rs:940-948 | crates/zeroclaw-runtime/src/tools/cron_runs.rs:153-160 \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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5420dab401383d9d837329a69ac34324ea76519dcf4701a8bf9db51b2da080b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/zeroclaw-channels/src/bluesky.rs:156-161 | crates/zeroclaw-channels/src/reddit.rs:118-123 \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/zeroclaw-channels/src/bluesky.rs"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0a26bbddc29a4d2ee9eead2338353ab6355f10390d7da488d5195a49dece41c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/zeroclaw-runtime/src/tools/sop_workshop.rs:312-317 | crates/zeroclaw-tools/src/a2a_client.rs:1755-1760 \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/zeroclaw-runtime/src/tools/sop_workshop.rs"},"region":{"startLine":312}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d04675a9ec10236dd5eb3af86f6ed5e12e3aa9d12aed94e1f5548e48dd41590"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/zeroclaw-channels/src/discord/slash_options.rs:230-237 | crates/zeroclaw-runtime/src/sop/condition.rs:327-334 \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/zeroclaw-channels/src/discord/slash_options.rs"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cecc51c5ff5d4b3ccb9f378910f85fed072e26525ca7d5f1b0f621639d69d4b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/zeroclaw-channels/src/linq.rs:388-399 | crates/zeroclaw-channels/src/nextcloud_talk.rs:795-804 \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/zeroclaw-channels/src/linq.rs"},"region":{"startLine":388}}}],"partialFingerprints":{"codehealthFindingId/v1":"e29814f682c7c12a32986c382ab7effd58c2ccfda304379d86f19998a523cc12"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/zeroclaw-gateway/src/api_oidc.rs:391-402 | crates/zeroclaw-gateway/src/principal_gate.rs:286-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/zeroclaw-gateway/src/api_oidc.rs"},"region":{"startLine":391}}}],"partialFingerprints":{"codehealthFindingId/v1":"51bc937221dde67d9cfac2fc8b82b38ec85ffdde0ffd9cec9d5c9058110d8fe6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): crates/zeroclaw-gateway/src/api_sop_author.rs:38-42 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:13493-13497 \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/zeroclaw-gateway/src/api_sop_author.rs"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"cafce21dd7bcdbe92697a12b81ae2404a94eaab85e7d4659eb7bfb814ea6c9b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 7\u002B corresponding lines): crates/zeroclaw-channels/src/wecom_ws.rs:2184-2190 | crates/zeroclaw-runtime/src/skills/creator.rs:537-543 | crates/zeroclaw-runtime/src/tools/param_options.rs:163-170 | crates/zeroclaw-tools/src/knowledge_tool.rs:820-827 \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/zeroclaw-channels/src/wecom_ws.rs"},"region":{"startLine":2184}}}],"partialFingerprints":{"codehealthFindingId/v1":"443e4bc2cdcb59410bfb34d5f48913e7b24b6ced14da0b03a5e899fd364f16db"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/zeroclaw-channels/src/transcription.rs:705-711 | crates/zeroclaw-channels/src/tts.rs:212-218 \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/zeroclaw-channels/src/transcription.rs"},"region":{"startLine":705}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7ece8775eeef0564d068d82188d3b5c3a1ad9c0be6e8cc45d2a9047ceb70eaa"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/zeroclaw-channels/src/whatsapp.rs:423-428 | crates/zeroclaw-tools/src/embedded_resource.rs:426-432 \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/zeroclaw-channels/src/whatsapp.rs"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"427cb65f8aa56b0d46b97fa9dc4b82eefed65e3df8c47da542569e0a372f4746"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): crates/zeroclaw-plugins/src/component_websocket.rs:376-395 | xtask/src/cmd/mdbook/protected.rs:566-593 \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/zeroclaw-plugins/src/component_websocket.rs"},"region":{"startLine":376}}}],"partialFingerprints":{"codehealthFindingId/v1":"11a530c243d8606f36890f63e2263fff8188ffe38825b0e26983d1a40b484063"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/zeroclaw-channels/src/git/providers/gitea/api.rs:158-171 | crates/zeroclaw-channels/src/git/providers/github/api.rs:284-297 \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/zeroclaw-channels/src/git/providers/gitea/api.rs"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1a0b8c49aac52fbae6beb678dba795f1657dd87e5d9e7ef115a6fca435251db"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/zeroclaw-runtime/src/agent/loop_.rs:3598-3612 | crates/zeroclaw-runtime/src/tools/delegate.rs:3093-3107 \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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":3598}}}],"partialFingerprints":{"codehealthFindingId/v1":"761d176e5890282026109d84c5b85155b4aa26cd6a0f8ce11e6367930af1ad77"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): apps/zerocode/src/i18n.rs:263-270 | crates/zeroclaw-providers/src/auth/mod.rs:927-932 \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":"apps/zerocode/src/i18n.rs"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"56f9fdc18b15058ad35e506e7883bc230387e7120db2d266e307843127dad6e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/zeroclaw-channels/src/git/providers/gitea/api.rs:143-151 | crates/zeroclaw-channels/src/git/providers/github/api.rs:304-317 \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/zeroclaw-channels/src/git/providers/gitea/api.rs"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"24ac5e4bf96a4e0c1bb91c20b6ce0b12c210feb23892b759244d0bd586a24ddf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/zeroclaw-tools/src/backup_tool.rs:877-886 | crates/zeroclaw-tools/src/data_management.rs:227-236 \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/zeroclaw-tools/src/backup_tool.rs"},"region":{"startLine":877}}}],"partialFingerprints":{"codehealthFindingId/v1":"29a14b8be4cce83c4b39a31c41d4e8ecce26573aa386e92a425a89829c74bdc5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): apps/zerocode/src/sop_pane.rs:479-485 | crates/zeroclaw-runtime/src/sop/mod.rs:1673-1679 \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":"apps/zerocode/src/sop_pane.rs"},"region":{"startLine":479}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e519759682e5918b461bcf612718cd561af663660a62c4c6bfbc0fda8780d8a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/zeroclaw-buildinfo/src/lib.rs:62-67 | src/main.rs:3344-3351 \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/zeroclaw-buildinfo/src/lib.rs"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"01af41bd12a387838413a34f783e9f12efb133c541edbc216094cb2e14cc2109"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/zeroclaw-channels/src/slack.rs:893-901 | crates/zeroclaw-channels/src/whatsapp_web.rs:132-143 \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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":893}}}],"partialFingerprints":{"codehealthFindingId/v1":"49d87f914e59c27a67695620727f12d3e176883b3e35f7c4c94f84c0cbd5876c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): crates/zeroclaw-channels/src/slack.rs:3228-3236 | crates/zeroclaw-providers/src/multimodal.rs:4452-4455 \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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":3228}}}],"partialFingerprints":{"codehealthFindingId/v1":"423219f1f3f5ea6d297f2cbcb4b5432161d5941ec8f6d18fcb51b65c6533db93"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/zeroclaw-gateway/src/api_config.rs:294-301 | src/main.rs:829-838 \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/zeroclaw-gateway/src/api_config.rs"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff964863c508adcd553c41e517987e01540782fe8c934cbe250edca9b48d966f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/zeroclaw-log/src/config.rs:204-215 | crates/zeroclaw-runtime/src/security/estop.rs:251-259 \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/zeroclaw-log/src/config.rs"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"afe04b9493a25c46d144b50fe7b3cc6bbb72f02c69de95ae5bea5e45ddfbf231"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/zeroclaw-runtime/src/identity.rs:679-685 | crates/zeroclaw-runtime/src/sop/condition.rs:319-325 \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/zeroclaw-runtime/src/identity.rs"},"region":{"startLine":679}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ffd3aa9280bf2628713e3d9c5bcbe11d622bda428d3b18ca32e0b6cd471d954"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/zeroclaw-runtime/src/quickstart/mod.rs:2328-2335 | crates/zeroclaw-runtime/src/sop/approval/channel_route.rs:74-80 \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/zeroclaw-runtime/src/quickstart/mod.rs"},"region":{"startLine":2328}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1e5c1949aef11cb7c0f9168285cb04ad358a9ef0261d7c3147c063751e1647f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): apps/zerocode/src/client.rs:6838-6843 | apps/zerorelay/src/frontdoor.rs:659-664 \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":"apps/zerocode/src/client.rs"},"region":{"startLine":6838}}}],"partialFingerprints":{"codehealthFindingId/v1":"34b4894bf2fe37f8ca22daf044f4f27ca7cd70a431898a9548d102eac33c8bc7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): apps/zerocode/src/quickstart_pane.rs:751-759 | src/main.rs:1814-1821 \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":"apps/zerocode/src/quickstart_pane.rs"},"region":{"startLine":751}}}],"partialFingerprints":{"codehealthFindingId/v1":"0627d544713c1fe99b8272eaac4924e781e1156f3903b5df27cc348c187d6ee4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/zeroclaw-api/src/tool.rs:525-531 | crates/zeroclaw-runtime/src/agent/mod.rs:48-54 \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/zeroclaw-api/src/tool.rs"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff6efce2349eb99b148f4f5e2532e444d38ac271f93cac41229296e4fe04348e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/zeroclaw-channels/src/git/providers/gitea/api.rs:47-53 | crates/zeroclaw-channels/src/git/providers/github/api.rs:75-82 \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/zeroclaw-channels/src/git/providers/gitea/api.rs"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"93ba3b873c3777afcb509082e4a61ad4f64913eca7c34170103800b907e856c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): crates/zeroclaw-gateway/src/api_config.rs:285-289 | crates/zeroclaw-gateway/src/api_sections.rs:101-105 \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/zeroclaw-gateway/src/api_config.rs"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d99c777f60e330ebc8ec249cfee60d010287f2ea4190a77fc273ddfc86f6608"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/zeroclaw-runtime/src/migration.rs:396-401 | crates/zeroclaw-runtime/src/sop/mod.rs:684-689 \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/zeroclaw-runtime/src/migration.rs"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"57a3d5637be2601c4c7e9b08363d44153b42efc3b247764ce4750999919e91e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/zeroclaw-runtime/src/security/bubblewrap.rs:31-38 | crates/zeroclaw-runtime/src/security/firejail.rs:130-137 \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/zeroclaw-runtime/src/security/bubblewrap.rs"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"59a061cb970745343178da37bcbaaf55cc3d99d5f95e683a1e379e7ef4af8a4f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): src/commands/update.rs:50-63 | src/memory/cli.rs:298-313 \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/commands/update.rs"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dd03f7c408f5201b2f83a59fa5df67abe15ce476a7e6569c460940d75265a03"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): apps/zerocode/src/keymap/overrides.rs:17-22 | apps/zerocode/src/theme.rs:99-104 \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":"apps/zerocode/src/keymap/overrides.rs"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d6adf6dc777c4a1f2d4231ad2a2bae2f5559227fffc7bfb4daebd507b84bfae"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/zeroclaw-channels/src/slack.rs:3504-3513 | crates/zeroclaw-tools/src/embedded_resource.rs:212-220 \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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":3504}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ba80027aac8a807f610edc51e2ecc6b1de50af5339a9d559de687dfc32c54da"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/zeroclaw-gateway/src/api_skills.rs:69-77 | crates/zeroclaw-gateway/src/api_sop_author.rs:1083-1088 \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/zeroclaw-gateway/src/api_skills.rs"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bbf73a797da9bc8aa4d73c7a7c373ded6c22145cb7087af7003f05610653230"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/zeroclaw-providers/src/bedrock.rs:374-379 | src/bin/zeroclaw-acp-bridge.rs:185-190 \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/zeroclaw-providers/src/bedrock.rs"},"region":{"startLine":374}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e72f8b0f4f00184b7f5dfe61948ca4169bdc386381153f0a09ff8089b84969e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 4\u002B corresponding lines): crates/zeroclaw-runtime/src/tunnel/cloudflare.rs:129-132 | crates/zeroclaw-runtime/src/tunnel/ngrok.rs:122-125 | crates/zeroclaw-runtime/src/tunnel/openvpn.rs:159-162 \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/zeroclaw-runtime/src/tunnel/cloudflare.rs"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"55b09f9930b937c2bdbc72263921d3e9e55af423482715e05666148ef523bf4d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/zeroclaw-tools/src/backup_tool.rs:28-34 | crates/zeroclaw-tools/src/data_management.rs:22-28 \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/zeroclaw-tools/src/backup_tool.rs"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e486ca79d36c960e27278809b7004d03102b56b8f19009fe58babe50bf0164c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): apps/zerocode/src/client_crypto.rs:61-68 | crates/zeroclaw-tls/src/lib.rs:473-480 \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":"apps/zerocode/src/client_crypto.rs"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab85009f2fb1916f3aed65e6aab806c1d2fe16bef797bb1add5feafbc3ebe649"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/zeroclaw-config/src/schema.rs:8876-8886 | crates/zeroclaw-tools/src/browser.rs:44-54 \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/zeroclaw-config/src/schema.rs"},"region":{"startLine":8876}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2d11373a8438b827e020c6382998a103e7bf235d301f1f8af5b19123b52c4cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/zeroclaw-hardware/src/peripherals/uno_q_setup.rs:106-112 | xtask/src/cmd/mdbook/protected.rs:768-773 \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/zeroclaw-hardware/src/peripherals/uno_q_setup.rs"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"af1245fedfeec11381f479a1f4e330532e7cb3733b52dfa4c68eb93fe198f44c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/zeroclaw-memory/src/lib.rs:523-532 | crates/zeroclaw-runtime/src/migration.rs:140-149 \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/zeroclaw-memory/src/lib.rs"},"region":{"startLine":523}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f3bc7d7fc6cab3f4e683dde560bcd7c2e182664df353cb22cf50ce9c633dfff"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/zeroclaw-channels/src/mochat.rs:36-45 | crates/zeroclaw-channels/src/twitter.rs:33-40 \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/zeroclaw-channels/src/mochat.rs"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"b044135590c0081643a8013d670afb19bdfda5d0602ee7af53ae5e06170ccff5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/zeroclaw-runtime/src/tools/cron_run.rs:136-149 | crates/zeroclaw-runtime/src/tools/cron_runs.rs:62-71 \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/zeroclaw-runtime/src/tools/cron_run.rs"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4c5cd43d21500cbb9935c632dfdf6f3c0c704464378a708114ea9306c2773ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/zeroclaw-channels/src/matrix.rs:1712-1717 | crates/zeroclaw-runtime/src/approval/mod.rs:106-113 \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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":1712}}}],"partialFingerprints":{"codehealthFindingId/v1":"310db50cf12ac61c227751b0b056cf68a14ccc3d33df162cb80057d8af4c331a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/zeroclaw-channels/src/nextcloud_talk.rs:609-614 | crates/zeroclaw-runtime/src/util.rs:57-62 \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/zeroclaw-channels/src/nextcloud_talk.rs"},"region":{"startLine":609}}}],"partialFingerprints":{"codehealthFindingId/v1":"c36b9fe8d3ce87a30dfb04afdf64e5cd4f5732d90bafea7a917999328efa4292"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/zeroclaw-hardware/src/peripherals/arduino_flash.rs:28-34 | crates/zeroclaw-hardware/src/peripherals/nucleo_flash.rs:13-19 \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/zeroclaw-hardware/src/peripherals/arduino_flash.rs"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfbebd3a2dd824e65d3df82f658dc6cbb8b4bbc5e7532b0210ced3c679d5e516"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/zeroclaw-runtime/src/agent/history_trim.rs:88-98 | crates/zeroclaw-runtime/src/agent/turn/media_degrade.rs:17-26 \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/zeroclaw-runtime/src/agent/history_trim.rs"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"76612a1bb998648bd38afb47fb4a24cd8e8e8a882df7dca104e9684a2aa6e7e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 3\u002B corresponding lines): apps/zerocode/src/mouse.rs:13-15 | apps/zerocode/src/quickstart_pane.rs:283-285 | apps/zerocode/src/sop_pane.rs:2246-2248 \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":"apps/zerocode/src/mouse.rs"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"edbe2f9d14803319b5933fdb67eb957eb9ae5c915e9e3499ccc02e7ce3624c95"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/zeroclaw-channels/src/wecom_ws.rs:1968-1974 | crates/zeroclaw-runtime/src/skills/suggestions.rs:347-353 \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/zeroclaw-channels/src/wecom_ws.rs"},"region":{"startLine":1968}}}],"partialFingerprints":{"codehealthFindingId/v1":"91e00492bdeeb8524da4de16d1354b246e7b84b7ae4533c7f2ee308d7cd5c0d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 6\u002B corresponding lines): crates/zeroclaw-config/src/schema/v2.rs:3064-3071 | crates/zeroclaw-tools/src/hardware_memory_map.rs:41-46 | xtask/src/generate/openrpc.rs:119-125 \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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":3064}}}],"partialFingerprints":{"codehealthFindingId/v1":"805d144e501ad27949a100f8aeb49aafa107ac751f9247f64874a4f662a24d01"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 4\u002B corresponding lines): crates/zeroclaw-channels/src/git/channel.rs:205-209 | crates/zeroclaw-channels/src/imessage.rs:84-87 | crates/zeroclaw-channels/src/irc.rs:264-267 \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/zeroclaw-channels/src/git/channel.rs"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8219cc60484476e6c2beee8ef45d24a11ce24097aff9e33407b57137bab8a7d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/zeroclaw-channels/src/line.rs:224-229 | crates/zeroclaw-channels/src/webhook.rs:308-313 \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/zeroclaw-channels/src/line.rs"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"08c5797cede71ef1dbbd0fef7d9910e941e53c63d531bddfd4e8ac795529c6ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/zeroclaw-config/src/schema.rs:10056-10062 | crates/zeroclaw-runtime/src/agent/personality.rs:78-83 \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/zeroclaw-config/src/schema.rs"},"region":{"startLine":10056}}}],"partialFingerprints":{"codehealthFindingId/v1":"619033dd3d837e261d8d20c0b40dc0e55b814354e4f3050602d0d0e5778c083f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/zeroclaw-infra/src/session_queue.rs:186-192 | crates/zeroclaw-runtime/src/rpc/session.rs:1930-1935 \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/zeroclaw-infra/src/session_queue.rs"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c2f47ecd0a5358e30ad73f03803617ec0328dd259933ab258c95e61094323ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): crates/zeroclaw-providers/src/request_payload.rs:1-7 | crates/zeroclaw-tools/src/git_forge.rs:686-690 \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/zeroclaw-providers/src/request_payload.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f65a668df1b8c06ba5ce44715fd46771a457f254d72d80d51613003bc046a971"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/zeroclaw-runtime/src/agent/personality_templates/mod.rs:74-80 | xtask/src/cmd/mdbook/check.rs:71-76 \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/zeroclaw-runtime/src/agent/personality_templates/mod.rs"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"7200d1a0f398f4b3e7631ed179cc678b0d7cbe2eff4791aef4a5077223191494"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): crates/zeroclaw-runtime/src/agent/tool_execution.rs:38-40 | crates/zeroclaw-tools/src/pipeline.rs:122-127 \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/zeroclaw-runtime/src/agent/tool_execution.rs"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a52542b8239343da193dbd8b02f739ff43d9ec9d52090562a8d1b86e04146f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/zeroclaw-runtime/src/tools/read_skill.rs:35-46 | crates/zeroclaw-runtime/src/tools/sop_execute.rs:78-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/zeroclaw-runtime/src/tools/read_skill.rs"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"47048de6a817a8cd24f020403baa66d73c3264913bdfc42dc5a9ced5e1e47b61"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 12\u002B corresponding lines): crates/zeroclaw-runtime/src/tools/spawn_subagent.rs:199-210 | crates/zeroclaw-tools/src/codex_cli.rs:73-88 | crates/zeroclaw-tools/src/gemini_cli.rs:53-68 | crates/zeroclaw-tools/src/opencode_cli.rs:53-68 \u2014 These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/tools/spawn_subagent.rs"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f19bb1a48ea59e628abd192248c6dd6fca8150cb4c78b5d9c380e99b70166ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/zeroclaw-tools/src/browser_open.rs:95-106 | crates/zeroclaw-tools/src/web_fetch.rs:434-445 \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/zeroclaw-tools/src/browser_open.rs"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"799e16346bdacb9abd569fa6fdf0202413a8eaed3c9b10b7eebb5bcbec6a3c96"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/zeroclaw-channels/src/qq.rs:792-797 | crates/zeroclaw-tls/src/lib.rs:228-233 \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/zeroclaw-channels/src/qq.rs"},"region":{"startLine":792}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc0aef574d2dddc350dbd6e9b6eb054c42d3d4c13632707a344cad69b97f8612"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 6\u002B corresponding lines): crates/zeroclaw-channels/src/telegram.rs:6343-6349 | crates/zeroclaw-config/src/schema_markdown.rs:372-377 | crates/zeroclaw-tools/src/report_templates.rs:31-37 \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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":6343}}}],"partialFingerprints":{"codehealthFindingId/v1":"29a354faf444beb8a37b11f7c00d1643726e48f730b82e0f045d2cdd90cf12af"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/zeroclaw-channels/src/transcription.rs:62-67 | crates/zeroclaw-config/src/policy.rs:3893-3898 \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/zeroclaw-channels/src/transcription.rs"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1f610d2106b949e9f94e1c04fe1cf57db723b896b23cb2c73a97e97fb978886"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/zeroclaw-hardware/src/peripherals/arduino_upload.rs:184-193 | crates/zeroclaw-hardware/src/pico_code.rs:82-90 \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/zeroclaw-hardware/src/peripherals/arduino_upload.rs"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"90b8dcf29702db73497882f139973f398483b3b4bb3724b4e52d401bce484a94"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 10\u002B corresponding lines): crates/zeroclaw-providers/src/auth/gemini_oauth.rs:327-336 | crates/zeroclaw-providers/src/auth/openai_oauth.rs:228-237 | crates/zeroclaw-providers/src/auth/xai_oauth.rs:351-360 \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/zeroclaw-providers/src/auth/gemini_oauth.rs"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"65198fb922e5c93d3d6f32c370e8205c688df16c884250d9440686e8707c36b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 4\u002B corresponding lines): apps/zerocode/src/main.rs:217-220 | crates/zeroclaw-channels/src/telegram.rs:4609-4612 | crates/zeroclaw-config/src/schema.rs:11522-11525 \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":"apps/zerocode/src/main.rs"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cf9a5e1f98be14ac85222d17f5d41068270c0572094f32b4739b0faf7ff18a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/zeroclaw-channels/src/matrix.rs:362-369 | crates/zeroclaw-channels/src/orchestrator/mod.rs:2487-2494 \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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":362}}}],"partialFingerprints":{"codehealthFindingId/v1":"62176333ca34e18cc27a5dfcb5a31120bd97e6742ed6136c93beea67370783d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): crates/zeroclaw-providers/src/gemini.rs:682-688 | crates/zeroclaw-tools/src/microsoft365/auth.rs:346-349 \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/zeroclaw-providers/src/gemini.rs"},"region":{"startLine":682}}}],"partialFingerprints":{"codehealthFindingId/v1":"397d9fa38089b76402c54c6d193368846938cccafdf8008cac30c23f8c06497a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/zeroclaw-runtime/src/agent/loop_.rs:1557-1574 | crates/zeroclaw-runtime/src/agent/system_prompt.rs:228-246 \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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":1557}}}],"partialFingerprints":{"codehealthFindingId/v1":"39c2238b245cb1e50c70c928138eba723d5f1f96d016e85d08da299d7b6478f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 5\u002B corresponding lines): crates/zeroclaw-runtime/src/control_plane/task_store_sqlite.rs:214-219 | src/plugins/update.rs:53-58 | src/quickstart_plugins/model.rs:608-612 \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/zeroclaw-runtime/src/control_plane/task_store_sqlite.rs"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"238f89be9c45bd5866231495c2ec49a63dec658646452a4a7d47e817f557fb20"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): crates/zeroclaw-runtime/src/security/bubblewrap.rs:138-141 | crates/zeroclaw-runtime/src/security/firejail.rs:242-245 \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/zeroclaw-runtime/src/security/bubblewrap.rs"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd85706e48d6a036dd831a0bc797f6a3ae55f2f328f1316dae5b164386490829"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): apps/zerorelay/src/frontdoor.rs:292-303 | crates/zeroclaw-runtime/src/enroll/mod.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":"apps/zerorelay/src/frontdoor.rs"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"026ce06581f5f8783e6d42ec72803e65626e6d4ffc11db0a783781675423344b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/zeroclaw-channels/src/orchestrator/mod.rs:3557-3562 | crates/zeroclaw-runtime/src/rpc/session.rs:2531-2536 \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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":3557}}}],"partialFingerprints":{"codehealthFindingId/v1":"02933ed6653350fe44321c0528f28ba2c6339f4829650d5ff1443bf8a549ec60"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/zeroclaw-channels/src/slack.rs:1464-1470 | crates/zeroclaw-channels/src/transcription.rs:130-135 \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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":1464}}}],"partialFingerprints":{"codehealthFindingId/v1":"0672dd8b222120a735cd83325c68c4ecbfb663380ad14110a2327dd967ef64c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/zeroclaw-providers/src/compatible.rs:3066-3071 | crates/zeroclaw-providers/src/openai.rs:1227-1232 \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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":3066}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e1a047150ace5c41f47d4b92f406ba7e89fb2d8a6fe053b9323470b08602f6b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/zeroclaw-providers/src/model_pin.rs:231-241 | crates/zeroclaw-providers/src/vision_override.rs:239-249 \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/zeroclaw-providers/src/model_pin.rs"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f94d1a98ef898431e2ebce096d99b15ef7bb9c8fd998e08949f054f1378f670"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 4\u002B corresponding lines): crates/zeroclaw-tools/src/file_download.rs:176-179 | crates/zeroclaw-tools/src/http_request.rs:756-759 | crates/zeroclaw-tools/src/web_fetch.rs:638-641 \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/zeroclaw-tools/src/file_download.rs"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"4331cc72117c09cde63e985d81d5d1899b66e398d1846fd7818409f7e138a700"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (84\u201391 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1217-1307 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1557-1640 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1217\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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":1217}}}],"partialFingerprints":{"codehealthFindingId/v1":"761011ef94d37793c2402cdc8314d70af7aaaa1d596d66b78ee375f04df6c14d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (75\u201380 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:1968-2042 | crates/zeroclaw-channels/src/util.rs:228-307 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs\u0060 and \u0060crates/zeroclaw-channels/src/util.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 143 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/zeroclaw-channels/src/orchestrator/mod.rs:1968\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":1968}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4d77ad927fb6b68b8c6eb22271cacfc04b531b7e3ba97ab5b0e282fa166ba35"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (75 lines \u00D7 2): crates/zeroclaw-providers/src/compatible.rs:4147-4221 | crates/zeroclaw-providers/src/compatible.rs:4250-4324 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/compatible.rs:4147\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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":4147}}}],"partialFingerprints":{"codehealthFindingId/v1":"01d8e09702ea5bb1b9e80c6c339c591aecf8a3513571ccfae81659e20608824c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (50\u201355 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1804-1858 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:3058-3107 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1804\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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":1804}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f3bcd0cb9d08a0b56652885064df982621009a4b54ee2138e3067def134413f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (123\u2013124 lines \u00D7 2): crates/zeroclaw-providers/src/reliable.rs:3306-3428 | crates/zeroclaw-providers/src/reliable.rs:3682-3805 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/reliable.rs:3306\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/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":3306}}}],"partialFingerprints":{"codehealthFindingId/v1":"a61cddbdb1957e46037579ad8e33dd69bddebb59c50c3185f658a739c1c28970"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (49 lines \u00D7 5): crates/zeroclaw-tools/src/claude_code.rs:140-188 | crates/zeroclaw-tools/src/claude_code_runner.rs:138-186 | crates/zeroclaw-tools/src/codex_cli.rs:122-170 | crates/zeroclaw-tools/src/gemini_cli.rs:102-150 | crates/zeroclaw-tools/src/opencode_cli.rs:102-150 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/claude_code.rs\u0060 and \u0060crates/zeroclaw-tools/src/claude_code_runner.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 68 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/zeroclaw-tools/src/claude_code.rs"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"529d017ee053135998c74737fb87e64e936ad9a3a7d40e7a339f369083f16b86"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (44\u201348 lines \u00D7 2): crates/zeroclaw-providers/src/compatible.rs:5109-5156 | crates/zeroclaw-providers/src/compatible.rs:5263-5306 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/compatible.rs:5109\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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":5109}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b8bc8997c4f545a7b39cd27b62a13af3d9ecef254b212fad354ff8c417c6079"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (48 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/loop_.rs:2333-2380 | crates/zeroclaw-runtime/src/agent/loop_.rs:2952-2999 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/agent/loop_.rs:2333\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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":2333}}}],"partialFingerprints":{"codehealthFindingId/v1":"1597f62915a7c8ab0f64ce1214796d86e08f7f0aa88c6897fc243b2761ecedd9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (44\u201347 lines \u00D7 2): crates/zeroclaw-providers/src/reliable.rs:4112-4158 | crates/zeroclaw-providers/src/reliable.rs:4201-4244 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/reliable.rs:4112\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/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":4112}}}],"partialFingerprints":{"codehealthFindingId/v1":"2892eb00da48ee147a30bbaac686df477875cf19c75fac47cdcf335a6e3b1b2a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (43\u201346 lines \u00D7 2): crates/zeroclaw-providers/src/compatible.rs:2728-2773 | crates/zeroclaw-providers/src/compatible.rs:2848-2890 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/compatible.rs:2728\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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":2728}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffab27c9973acfee9481329bdb5313fec08fa3537811378f117913f25fca2a2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (39\u201344 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1154-1197 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1499-1537 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1154\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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":1154}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1dc88c92a3f02566f1399fe7bf0d9bfcdb13cff4442f32a2b053d9ab83228f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (44 lines \u00D7 2): crates/zeroclaw-providers/src/hailo_ollama.rs:565-608 | crates/zeroclaw-providers/src/ollama.rs:419-462 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/hailo_ollama.rs\u0060 and \u0060crates/zeroclaw-providers/src/ollama.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 108 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/zeroclaw-providers/src/hailo_ollama.rs:565\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/zeroclaw-providers/src/hailo_ollama.rs"},"region":{"startLine":565}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4a4ff2d34fb055e713f1d407ce908aaca98ac0ad590d8cef00e673fa27d423e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (42\u201344 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/loop_.rs:2540-2581 | crates/zeroclaw-runtime/src/agent/loop_.rs:3205-3248 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":2540}}}],"partialFingerprints":{"codehealthFindingId/v1":"76d96a2c0059eaf1c00af3d1bb56a891db6549dbdca1a29731b04d56d571d189"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (43 lines \u00D7 4): crates/zeroclaw-providers/src/reliable.rs:2760-2802 | crates/zeroclaw-providers/src/reliable.rs:3074-3116 | crates/zeroclaw-providers/src/reliable.rs:3523-3565 | crates/zeroclaw-providers/src/reliable.rs:3900-3942 \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/zeroclaw-providers/src/reliable.rs:2760\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/zeroclaw-providers/src/reliable.rs:2805\u0060 calls \u0060with_outcome\u0060, \u0060with_attrs\u0060 and \u0060crates/zeroclaw-providers/src/reliable.rs:3117\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/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":2760}}}],"partialFingerprints":{"codehealthFindingId/v1":"63fb1056c247ff5623d4da91e1048f05255415f9af471665f309a42b95ca2fb7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (43 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:2050-2092 | crates/zeroclaw-channels/src/util.rs:318-360 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs\u0060 and \u0060crates/zeroclaw-channels/src/util.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 143 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/zeroclaw-channels/src/orchestrator/mod.rs:2050\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/zeroclaw-channels/src/util.rs:315\u0060 calls \u0060Some\u0060, \u0060matching_close_tag\u0060 and \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:2048\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":2050}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3786b38100e52f08746e48e229e647c02aff3f86142e036c3d92e4f43690361"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (39\u201340 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/loop_.rs:2417-2456 | crates/zeroclaw-runtime/src/agent/loop_.rs:3072-3110 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/agent/loop_.rs:2417\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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":2417}}}],"partialFingerprints":{"codehealthFindingId/v1":"346a4a322301cdc75c7b8f9bccbdc88cad0705a467a58523d751bfcc3ad13784"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (40 lines \u00D7 2): src/cron/mod.rs:292-331 | src/cron/mod.rs:479-518 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/cron/mod.rs:292\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, \u0060src/cron/mod.rs:476\u0060 calls \u0060parse_delay\u0060, \u0060now\u0060 and \u0060src/cron/mod.rs:291\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/cron/mod.rs"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f497c06a7dcb10ce47732b6abc619f093785a7b64eb09e2a9b9af7d5ba95e0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (74\u201376 lines \u00D7 4): crates/zeroclaw-providers/src/reliable.rs:2682-2757 | crates/zeroclaw-providers/src/reliable.rs:2998-3071 | crates/zeroclaw-providers/src/reliable.rs:3447-3520 | crates/zeroclaw-providers/src/reliable.rs:3824-3897 \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/zeroclaw-providers/src/reliable.rs:2682\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/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":2682}}}],"partialFingerprints":{"codehealthFindingId/v1":"887ac3a7d3559655b477414fe85d94358b69f4df56887729270687a1b23e70f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (38\u201339 lines \u00D7 2): crates/zeroclaw-channels/src/telegram.rs:4247-4284 | crates/zeroclaw-channels/src/telegram.rs:4316-4354 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/telegram.rs:4316\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":4247}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e99ee06d4c56b7367d93d2c66348bc2d3153e09acb760e4934d4f099fa85548"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (36\u201338 lines \u00D7 2): crates/zeroclaw-gateway/src/canvas.rs:165-202 | crates/zeroclaw-gateway/src/ws_sop_runs.rs:32-67 \u2014 before extracting anything, compare \u0060crates/zeroclaw-gateway/src/canvas.rs\u0060 and \u0060crates/zeroclaw-gateway/src/ws_sop_runs.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 74 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/zeroclaw-gateway/src/canvas.rs:165\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/zeroclaw-gateway/src/canvas.rs"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"e767e498c7f520de956409d25d322cb76aeee48395becc0989b1089100fb9c77"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (35\u201338 lines \u00D7 2): crates/zeroclaw-providers/src/compatible.rs:5170-5207 | crates/zeroclaw-providers/src/compatible.rs:5317-5351 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/compatible.rs:5170\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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":5170}}}],"partialFingerprints":{"codehealthFindingId/v1":"c223439d9308ef5c29f34404dde007a8cd7a22b4dfd83ab6e83ecc219e16eadd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (37 lines \u00D7 4): crates/zeroclaw-providers/src/reliable.rs:2610-2646 | crates/zeroclaw-providers/src/reliable.rs:2907-2943 | crates/zeroclaw-providers/src/reliable.rs:3358-3394 | crates/zeroclaw-providers/src/reliable.rs:3735-3771 \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/zeroclaw-providers/src/reliable.rs:2610\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/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":2610}}}],"partialFingerprints":{"codehealthFindingId/v1":"c32f117eff4ee0f504f9e751e449f202576e05fc835e5eb0caa505c206b96a88"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (36\u201337 lines \u00D7 2): crates/zeroclaw-providers/src/telnyx.rs:189-225 | crates/zeroclaw-providers/src/telnyx.rs:257-292 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/telnyx.rs:189\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/zeroclaw-providers/src/telnyx.rs"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ec9889be2608715974e7315a7bb3d3caae4755a13db254621e874445dab3e64"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (35 lines \u00D7 2): crates/zeroclaw-memory/src/lucid.rs:416-450 | crates/zeroclaw-memory/src/markdown.rs:205-239 \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/zeroclaw-memory/src/lucid.rs"},"region":{"startLine":416}}}],"partialFingerprints":{"codehealthFindingId/v1":"ece1c3319c0fc670198a40dd87d0d090d904d4a4dd67f16ee29a8c3c5dee210b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (35 lines \u00D7 2): crates/zeroclaw-memory/src/qdrant.rs:182-216 | crates/zeroclaw-memory/src/qdrant.rs:885-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-memory/src/qdrant.rs:182\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/zeroclaw-memory/src/qdrant.rs"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bdea82afaeebd9e5355a4bc8335726ee00b5277112945ceb88340d5ec807f50"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (35 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/loop_.rs:1777-1811 | crates/zeroclaw-runtime/src/agent/loop_.rs:3866-3900 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/agent/loop_.rs:1777\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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":1777}}}],"partialFingerprints":{"codehealthFindingId/v1":"113d95c8120b32c648bf4503b29ea504def7acc25186988343ec049757098a88"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 2): crates/zeroclaw-channels/src/telegram.rs:6733-6766 | crates/zeroclaw-channels/src/telegram.rs:6777-6810 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/telegram.rs:6733\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":6733}}}],"partialFingerprints":{"codehealthFindingId/v1":"acd5e63d2df8df0ace1bb4405e8e460a281f063b6c69b6bc939a5f79e66504f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 2): crates/zeroclaw-channels/src/telegram.rs:6826-6859 | crates/zeroclaw-channels/src/telegram.rs:6870-6903 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/telegram.rs:6826\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":6826}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea8c275edefac18676f5ab1a4d43a330fa95faff35d0233599fc44eeba074b4b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (48\u201350 lines \u00D7 2): crates/zeroclaw-memory/src/qdrant.rs:790-839 | crates/zeroclaw-memory/src/qdrant.rs:1182-1229 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-memory/src/qdrant.rs:790\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/zeroclaw-memory/src/qdrant.rs"},"region":{"startLine":790}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d548e5f722d5e45676efbe569d2a6db9e0c3cb7ebfe20e7b0882eed39fe8322"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33\u201334 lines \u00D7 2): crates/zeroclaw-providers/src/azure_openai.rs:637-670 | crates/zeroclaw-providers/src/azure_openai.rs:712-744 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/azure_openai.rs:637\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/zeroclaw-providers/src/azure_openai.rs"},"region":{"startLine":637}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc7d24ab1810dc92abf4de55fef3d63eef7b69082d1c6312859ea5f4f4a138bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33\u201334 lines \u00D7 2): crates/zeroclaw-providers/src/reliable.rs:2569-2602 | crates/zeroclaw-providers/src/reliable.rs:2866-2898 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/reliable.rs:2569\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/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":2569}}}],"partialFingerprints":{"codehealthFindingId/v1":"98620084bab5fa5e110184c01201291d75850a5c8982ee0283e9c90ec244cf79"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/agent.rs:4468-4501 | crates/zeroclaw-runtime/src/agent/agent.rs:5004-5037 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/agent/agent.rs:4468\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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":4468}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e250241a9d65e0b6480e1c50a2914a891cb0d4249a71b7ef97fda40f4cb0e63"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31\u201333 lines \u00D7 2): crates/zeroclaw-gateway/src/api_sop_author.rs:529-559 | crates/zeroclaw-gateway/src/api_sop_author.rs:811-843 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-gateway/src/api_sop_author.rs"},"region":{"startLine":529}}}],"partialFingerprints":{"codehealthFindingId/v1":"f748c00a96653881cc1ab3618d1c5d510930f5702320b6cc809fed15e1a25a33"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33 lines \u00D7 2): crates/zeroclaw-gateway/src/nodes.rs:179-211 | crates/zeroclaw-gateway/src/ws.rs:106-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. 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/zeroclaw-gateway/src/nodes.rs"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"80fde026a28aa6db271401ae49af22426a19352341f635022eb1bf5de195c09f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27\u201333 lines \u00D7 2): crates/zeroclaw-runtime/src/observability/otel.rs:400-432 | crates/zeroclaw-runtime/src/observability/otel.rs:457-483 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/observability/otel.rs:400\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/zeroclaw-runtime/src/observability/otel.rs"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c1db6d768f24070fa803b14a4816233522639584e69e99e296db40d54b305f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30\u201333 lines \u00D7 2): src/alias_cli/export.rs:828-860 | src/alias_cli/export.rs:939-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/alias_cli/export.rs"},"region":{"startLine":828}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c50c9842c87e9ddb34e028cdcd73ca5a8bc03bb4219a87fbf407f7485475b1c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29\u201332 lines \u00D7 3): crates/zeroclaw-channels/src/discord/mod.rs:4054-4085 | crates/zeroclaw-channels/src/signal.rs:1553-1581 | crates/zeroclaw-channels/src/slack.rs:6294-6322 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/discord/mod.rs\u0060 and \u0060crates/zeroclaw-channels/src/signal.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 53 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/zeroclaw-channels/src/discord/mod.rs:4054\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":4054}}}],"partialFingerprints":{"codehealthFindingId/v1":"266352657f5189a32ba743adeff4adde33a22b896938175948cab1e322160b0d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29\u201332 lines \u00D7 3): crates/zeroclaw-providers/src/compatible.rs:4938-4968 | crates/zeroclaw-providers/src/compatible.rs:5147-5178 | crates/zeroclaw-providers/src/compatible.rs:5297-5325 \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/zeroclaw-providers/src/compatible.rs:4938\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/zeroclaw-providers/src/compatible.rs:4934\u0060 calls \u0060targets_mistral_tool_call_contract\u0060 and \u0060crates/zeroclaw-providers/src/compatible.rs:5140\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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":4938}}}],"partialFingerprints":{"codehealthFindingId/v1":"257541e0ba912c6c0fcec2bec886c13c4c09c69dfab865c080cae3f879833467"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (48 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1396-1443 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1692-1739 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1396\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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":1396}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b0d34a837f6ae9e74d0000f6e315a7cbb1876d1c039c6d3258b5c927e5006fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (32 lines \u00D7 2): crates/zeroclaw-providers/src/reliable.rs:4161-4192 | crates/zeroclaw-providers/src/reliable.rs:4246-4277 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/reliable.rs:4161\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/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":4161}}}],"partialFingerprints":{"codehealthFindingId/v1":"82e52ea9895930375396a51a716f4c775a61608dfe2fecac5c082890db2789fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28\u201332 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/loop_.rs:1819-1850 | crates/zeroclaw-runtime/src/agent/loop_.rs:3906-3933 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/agent/loop_.rs:1819\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/zeroclaw-runtime/src/agent/loop_.rs:1851\u0060 calls \u0060as_deref\u0060 and \u0060crates/zeroclaw-runtime/src/agent/loop_.rs:3934\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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":1819}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bd37da2fb0a3fe81aceed594b6f86197ecc806107cca1c23415c058d2ad10e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29\u201332 lines \u00D7 2): crates/zeroclaw-runtime/src/cron/store.rs:624-655 | crates/zeroclaw-runtime/src/cron/store.rs:708-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/zeroclaw-runtime/src/cron/store.rs:624\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/zeroclaw-runtime/src/cron/store.rs"},"region":{"startLine":624}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7ccf2e89654599fc1c376f8deec3207dc088bf5d496611b9bbc5e9cb6587195"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29\u201332 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/deliver_file.rs:233-261 | crates/zeroclaw-runtime/src/tools/file_read.rs:115-146 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/tools/deliver_file.rs\u0060 and \u0060crates/zeroclaw-runtime/src/tools/file_read.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 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/zeroclaw-runtime/src/tools/deliver_file.rs"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5fe5777fc4fc405620bfb78b51f7a1ac01d217c1d21c19566f9415ece5af5f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2): crates/zeroclaw-config/src/policy.rs:2956-2986 | crates/zeroclaw-config/src/policy.rs:3010-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/zeroclaw-config/src/policy.rs:2956\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/zeroclaw-config/src/policy.rs"},"region":{"startLine":2956}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8f18fdf437cb66ca3fab751f5d4fca885614ca2413f7faa94036d4e4107d33d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2): crates/zeroclaw-memory/src/hygiene.rs:225-255 | crates/zeroclaw-memory/src/hygiene.rs:318-348 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-memory/src/hygiene.rs:225\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/zeroclaw-memory/src/hygiene.rs:222\u0060 calls \u0060join\u0060, \u0060create_dir_all\u0060 and \u0060crates/zeroclaw-memory/src/hygiene.rs:316\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/zeroclaw-memory/src/hygiene.rs"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1c2038cb4100d3fd222c9efa55a89172f39301e450d6423018529690ba02e88"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/dispatch.rs:927-957 | crates/zeroclaw-runtime/src/sop/dispatch.rs:976-1006 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/dispatch.rs:927\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/zeroclaw-runtime/src/sop/dispatch.rs"},"region":{"startLine":927}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b7a4beee58dfe3784f844880b72b3114513e1e5c04c23abd57372ee1ff7dbc0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2): crates/zeroclaw-tools/src/file_upload.rs:176-206 | crates/zeroclaw-tools/src/file_upload_bundle.rs:231-261 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/file_upload.rs\u0060 and \u0060crates/zeroclaw-tools/src/file_upload_bundle.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 126 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/zeroclaw-tools/src/file_upload.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/zeroclaw-tools/src/file_upload.rs"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"9780db52f684d486a4d77041015a179d3b0c88240191cebd8a0bce8e825d78fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29\u201330 lines \u00D7 2): apps/zerocode/src/config_manager.rs:3767-3796 | apps/zerocode/src/config_manager.rs:3965-3993 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/config_manager.rs:3767\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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":3767}}}],"partialFingerprints":{"codehealthFindingId/v1":"8efaf176b7edd221ea807f61111bcb88d0bb42a2f05d8638140407064a154015"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): crates/zeroclaw-providers/src/compatible.rs:1027-1056 | crates/zeroclaw-providers/src/compatible.rs:1102-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":1027}}}],"partialFingerprints":{"codehealthFindingId/v1":"c01c95dcc587015b8ff0a0ffbb7d96374f6975d9fb7b10408c29ff43191daccd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/engine.rs:5543-5572 | crates/zeroclaw-runtime/src/sop/engine.rs:5614-5643 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/engine.rs:5543\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":5543}}}],"partialFingerprints":{"codehealthFindingId/v1":"48a299948aa3bd7e9143abfa7909bce3a22697d189538d7c23920ae095c612bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26\u201330 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/engine.rs:6473-6502 | crates/zeroclaw-runtime/src/sop/engine.rs:6532-6557 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/engine.rs:6473\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":6473}}}],"partialFingerprints":{"codehealthFindingId/v1":"4417030e80392f63f72ff345b8079c0aae2c948c33b0372b36616bf5164d2e14"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): crates/zeroclaw-tools/src/backup_tool.rs:314-343 | crates/zeroclaw-tools/src/backup_tool.rs:402-431 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-tools/src/backup_tool.rs"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"79446a9dabafdc5ffe95366e58cdcfc6df295d24234210d7e90d07186fcf2e34"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): apps/zerocode/src/enroll.rs:424-452 | apps/zerorelay/src/enroll_proxy.rs:420-448 \u2014 before extracting anything, compare \u0060apps/zerocode/src/enroll.rs\u0060 and \u0060apps/zerorelay/src/enroll_proxy.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 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":"apps/zerocode/src/enroll.rs"},"region":{"startLine":424}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc8068541d09b7fed8809457344b2a378ee707c8a64c90336166c962c073baef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27\u201329 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1329-1357 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1661-1687 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":1329}}}],"partialFingerprints":{"codehealthFindingId/v1":"64de114dbae82a8908f34c23cffd99fbfcc7c5d8643c61e57f0716a32fa2ffae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28\u201329 lines \u00D7 2): crates/zeroclaw-providers/src/gemini.rs:1352-1379 | crates/zeroclaw-providers/src/gemini.rs:1380-1408 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/gemini.rs:1352\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/zeroclaw-providers/src/gemini.rs"},"region":{"startLine":1352}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b1a50af464445c7f8feed313c4707e4dbf919b1ea39828bad444990d1cdb76b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28\u201329 lines \u00D7 2): crates/zeroclaw-providers/src/ollama.rs:840-867 | crates/zeroclaw-providers/src/ollama.rs:886-914 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/ollama.rs:840\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/zeroclaw-providers/src/ollama.rs"},"region":{"startLine":840}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ab6f6a87019232419966a948900c8b30f102b502faceaa6e28d6fec7a7cf7e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): crates/zeroclaw-providers/src/openrouter.rs:682-710 | crates/zeroclaw-providers/src/openrouter.rs:755-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/zeroclaw-providers/src/openrouter.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":"crates/zeroclaw-providers/src/openrouter.rs"},"region":{"startLine":682}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a4338dd733de125f1079ac7bc5dfd3b530d6c9c16ebae35e3e9a84559e66c76"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201329 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/loop_.rs:2022-2037 | crates/zeroclaw-runtime/src/agent/loop_.rs:4047-4075 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/agent/loop_.rs:2022\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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":2022}}}],"partialFingerprints":{"codehealthFindingId/v1":"109c1c6729cf05e3f7f0155b0286c6c73c987bc3af94636d22867762f721a0e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/delegate.rs:665-693 | crates/zeroclaw-runtime/src/tools/delegate.rs:726-754 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/tools/delegate.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":665}}}],"partialFingerprints":{"codehealthFindingId/v1":"819be75899589a5321780e2bee4126bba3d13543420c5e0829d5f6c3b25eb13e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26\u201328 lines \u00D7 4): crates/zeroclaw-providers/src/azure_openai.rs:396-421 | crates/zeroclaw-providers/src/copilot.rs:373-400 | crates/zeroclaw-providers/src/openai.rs:374-399 | crates/zeroclaw-providers/src/openrouter.rs:312-338 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/azure_openai.rs\u0060 and \u0060crates/zeroclaw-providers/src/copilot.rs\u0060 as WHOLE FILES: this scan already matched 5 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. 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/zeroclaw-providers/src/azure_openai.rs:396\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/zeroclaw-providers/src/azure_openai.rs"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5465fa914a8882769d65483303ffba0f4a0a5cad2415b14a4633707a1d502a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 3): crates/zeroclaw-runtime/src/tools/cron_add.rs:79-106 | crates/zeroclaw-runtime/src/tools/cron_remove.rs:30-57 | crates/zeroclaw-runtime/src/tools/cron_update.rs:50-77 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/tools/cron_add.rs\u0060 and \u0060crates/zeroclaw-runtime/src/tools/cron_update.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 114 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/zeroclaw-runtime/src/tools/cron_add.rs"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c8a640ccf9de66e10d621582ba989bf083df4087300bea754e51c250bca9207"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27\u201328 lines \u00D7 2): crates/zeroclaw-channels/src/slack.rs:1270-1296 | crates/zeroclaw-channels/src/slack.rs:5378-5405 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":1270}}}],"partialFingerprints":{"codehealthFindingId/v1":"8aebe7b0a0f9f4e4680bf8f0fef13349e94041557243c45fdaa4b24ce1c1a12d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (75 lines \u00D7 2): crates/zeroclaw-macros/src/lib.rs:546-620 | crates/zeroclaw-macros/src/lib.rs:976-1050 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-macros/src/lib.rs:546\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/zeroclaw-macros/src/lib.rs"},"region":{"startLine":546}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7f638a643785f002edc03a3ad8e23795fec73fdc88d4d71d4f39bbdd5f50b0e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): crates/zeroclaw-providers/src/glm.rs:188-215 | crates/zeroclaw-providers/src/glm.rs:243-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/zeroclaw-providers/src/glm.rs:188\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/zeroclaw-providers/src/glm.rs"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"979bd669af723bb76882a474bf89b49de81b9859c92dbc873e33b5714900216a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27\u201328 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/loop_.rs:1660-1687 | crates/zeroclaw-runtime/src/agent/loop_.rs:3783-3809 \u2014 both copies are in the same file, so extract the block 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 after the matched lines, \u0060crates/zeroclaw-runtime/src/agent/loop_.rs:3809\u0060 calls \u0060to_string\u0060 and \u0060crates/zeroclaw-runtime/src/agent/loop_.rs:1687\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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":1660}}}],"partialFingerprints":{"codehealthFindingId/v1":"15d02fa42a96509bc4bd6e320a9549dcf70a2bd2c19da7263a50d485e0fde29d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26\u201328 lines \u00D7 2): crates/zeroclaw-tools/src/ask_user.rs:261-288 | crates/zeroclaw-tools/src/escalate.rs:395-420 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/ask_user.rs\u0060 and \u0060crates/zeroclaw-tools/src/escalate.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 96 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/zeroclaw-tools/src/ask_user.rs:261\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/zeroclaw-tools/src/ask_user.rs"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a844a2e7b998a9ad30330afe52c8178e4dd113ad2ac36dccfd2282c74543f1a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): crates/zeroclaw-tools/src/jira_tool.rs:212-239 | crates/zeroclaw-tools/src/jira_tool.rs:284-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/zeroclaw-tools/src/jira_tool.rs:212\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/zeroclaw-tools/src/jira_tool.rs"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"da0df91a8d7eb1c57576431abc85e21876de8df20d968e45cce566f621ef334a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): firmware/nucleo/src/main.rs:33-60 | firmware/pico/src/main.rs:34-61 \u2014 before extracting anything, compare \u0060firmware/nucleo/src/main.rs\u0060 and \u0060firmware/pico/src/main.rs\u0060 as WHOLE FILES: this scan already matched 3 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 \u0060firmware/nucleo/src/main.rs:33\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":"firmware/nucleo/src/main.rs"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"d429ee7cbb1cc17131bd9229cca288d4d6aa824ae8372f9b87ef3fa76b3467bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26\u201327 lines \u00D7 2): crates/zeroclaw-channels/src/slack.rs:6025-6050 | crates/zeroclaw-channels/src/slack.rs:6143-6169 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/slack.rs:6025\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":6025}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9ac189ef4cc9e3801f89ebd4398220bb06b7a69450abb7bb254c818caa85c3b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201327 lines \u00D7 2): crates/zeroclaw-gateway/src/api_oidc.rs:855-881 | crates/zeroclaw-gateway/src/api_oidc.rs:1056-1076 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-gateway/src/api_oidc.rs"},"region":{"startLine":855}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bcf31decce242647fab8f403a02dc6b458fc91ca55d392c7c358eeb191abc5e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23\u201327 lines \u00D7 2): crates/zeroclaw-providers/src/anthropic.rs:3029-3055 | crates/zeroclaw-providers/src/anthropic.rs:3281-3303 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/anthropic.rs:3029\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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":3029}}}],"partialFingerprints":{"codehealthFindingId/v1":"56325eb5bb586247a30b8e542219fc4d7fe6542ac142d0a017066f522b4f6e7a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2): crates/zeroclaw-providers/src/azure_openai.rs:439-465 | crates/zeroclaw-providers/src/openai.rs:417-443 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/azure_openai.rs\u0060 and \u0060crates/zeroclaw-providers/src/openai.rs\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 226 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/zeroclaw-providers/src/azure_openai.rs:439\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/zeroclaw-providers/src/azure_openai.rs"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"f635f0176926e891365e3d6cd958b4d05340ac4fe648f179026ccdd6d91376b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26\u201327 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/agent.rs:4697-4722 | crates/zeroclaw-runtime/src/agent/agent.rs:5354-5380 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/agent/agent.rs:4697\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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":4697}}}],"partialFingerprints":{"codehealthFindingId/v1":"07c83ab23e5c9e75f8e1362fd5b343759bc17eaaef35dd4a5976d4ef476a9933"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26\u201327 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/turn/mod.rs:2069-2094 | crates/zeroclaw-runtime/src/agent/turn/mod.rs:3786-3812 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/agent/turn/mod.rs:2069\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 before the matched lines, \u0060crates/zeroclaw-runtime/src/agent/turn/mod.rs:2069\u0060 calls \u0060as_ref\u0060 and \u0060crates/zeroclaw-runtime/src/agent/turn/mod.rs:3786\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/zeroclaw-runtime/src/agent/turn/mod.rs"},"region":{"startLine":2069}}}],"partialFingerprints":{"codehealthFindingId/v1":"edd7e8c3c2a9fec133869db9bd5f8daa49ac4564c107066c51316d499bb23c7d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27 lines \u00D7 2): crates/zeroclaw-runtime/src/skills/mod.rs:798-824 | crates/zeroclaw-runtime/src/skills/mod.rs:927-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/zeroclaw-runtime/src/skills/mod.rs:798\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/zeroclaw-runtime/src/skills/mod.rs"},"region":{"startLine":798}}}],"partialFingerprints":{"codehealthFindingId/v1":"571adb093d16d37f6f91a62c0254542f1d26117b520c1ed25bb0fa149df69fbb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): crates/zeroclaw-api/src/memory_traits.rs:662-687 | crates/zeroclaw-memory/src/agent_scoped.rs:608-633 \u2014 before extracting anything, compare \u0060crates/zeroclaw-api/src/memory_traits.rs\u0060 and \u0060crates/zeroclaw-memory/src/agent_scoped.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 62 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/zeroclaw-api/src/memory_traits.rs"},"region":{"startLine":662}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b78ff770cc35dd922c2b18c49bfe85c9bae6ca7e1e454879623828ab87c7c48"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23\u201326 lines \u00D7 2): crates/zeroclaw-channels/src/slack.rs:4536-4558 | crates/zeroclaw-channels/src/slack.rs:5987-6012 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":4536}}}],"partialFingerprints":{"codehealthFindingId/v1":"08e73bd33e0d682be6dc7ecde64161b45252b128f158ea237236bad54f70e43c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201326 lines \u00D7 2): crates/zeroclaw-providers/src/gemini.rs:1210-1229 | crates/zeroclaw-providers/src/gemini.rs:1532-1557 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/gemini.rs:1210\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/zeroclaw-providers/src/gemini.rs"},"region":{"startLine":1210}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c2e84508716d4eb3eefb6e8ebc216846ced6e4d345b1850764411321dfd0030"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): crates/zeroclaw-providers/src/multimodal.rs:1359-1384 | crates/zeroclaw-providers/src/multimodal.rs:1510-1535 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/multimodal.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/zeroclaw-providers/src/multimodal.rs"},"region":{"startLine":1359}}}],"partialFingerprints":{"codehealthFindingId/v1":"a065637d4d038c04222a0caddbb96600ee29f1876056ff54f8c950ed1d3d8106"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u201325 lines \u00D7 4): crates/zeroclaw-channels/src/discord/mod.rs:2496-2497 | crates/zeroclaw-channels/src/discord/mod.rs:2511-2535 | crates/zeroclaw-channels/src/discord/mod.rs:2543-2544 | crates/zeroclaw-channels/src/discord/mod.rs:2723-2747 \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/zeroclaw-channels/src/discord/mod.rs:2496\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":"crates/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":2496}}}],"partialFingerprints":{"codehealthFindingId/v1":"4eb90b7b18e26d67b00369e190048ad9e19eb2b5183299386dbf9bffe7584e9e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): crates/zeroclaw-channels/src/slack.rs:4607-4631 | crates/zeroclaw-channels/src/slack.rs:6052-6076 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/slack.rs:4607\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/zeroclaw-channels/src/slack.rs:4603\u0060 calls \u0060resolve_sender_identity\u0060 and \u0060crates/zeroclaw-channels/src/slack.rs:6048\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":4607}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e7a14376eeb8f8bdde7e54d420c21c057924c3302d381fd558583fdcf36382e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201325 lines \u00D7 2): crates/zeroclaw-channels/src/telegram.rs:2705-2729 | crates/zeroclaw-channels/src/wechat.rs:1002-1023 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/telegram.rs\u0060 and \u0060crates/zeroclaw-channels/src/wechat.rs\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 158 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/zeroclaw-channels/src/telegram.rs:2705\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":2705}}}],"partialFingerprints":{"codehealthFindingId/v1":"edd4e92092c71a8d3461850c043c33c98b141f4e60fb69ea654a34d4ec35673f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201325 lines \u00D7 2): crates/zeroclaw-config/src/schema.rs:26916-26940 | crates/zeroclaw-config/src/schema.rs:27073-27089 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-config/src/schema.rs"},"region":{"startLine":26916}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5b2fb7c212bde02ba99c9b08e22ada606245193d7ceaa70b2debee669a0595a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): crates/zeroclaw-infra/src/acp_session_store.rs:1329-1353 | crates/zeroclaw-infra/src/acp_session_store.rs:3032-3056 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-infra/src/acp_session_store.rs:1329\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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":1329}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a8c3244b9c7777bcc8e103752a14bbc9772bde3a1cd8df417f0a84b4147ee68"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): crates/zeroclaw-providers/src/compatible.rs:4559-4583 | crates/zeroclaw-providers/src/compatible.rs:4687-4711 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-providers/src/compatible.rs:4685\u0060 calls \u0060sanitize_api_error\u0060 and \u0060crates/zeroclaw-providers/src/compatible.rs:4558\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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":4559}}}],"partialFingerprints":{"codehealthFindingId/v1":"871ef3b4f2afde77509016c5e21d70c0275e2c0ffa5d09366c88104fed4ec6ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): crates/zeroclaw-providers/src/dispatch.rs:720-748 | crates/zeroclaw-providers/src/dispatch.rs:1100-1128 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/dispatch.rs:720\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/zeroclaw-providers/src/dispatch.rs"},"region":{"startLine":720}}}],"partialFingerprints":{"codehealthFindingId/v1":"77e75503e15e6ca914f2b269ca50ee5776cbfc49eece0aab8dbccee9b08e1338"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (41 lines \u00D7 2): crates/zeroclaw-providers/src/openrouter.rs:826-866 | crates/zeroclaw-providers/src/openrouter.rs:1063-1103 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/openrouter.rs:826\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/zeroclaw-providers/src/openrouter.rs"},"region":{"startLine":826}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbad4639a7e956779d0740db26e5139dacaae7dd6a0baf4fac73757c8bc9224c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/store/sqlite.rs:317-341 | crates/zeroclaw-runtime/src/sop/store/sqlite.rs:361-385 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/store/sqlite.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/zeroclaw-runtime/src/sop/store/sqlite.rs"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a66707f13fa0746e783f71950f9129952e701624dc381b10fb77cd722467874"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): crates/zeroclaw-tools/src/microsoft365/mod.rs:118-142 | crates/zeroclaw-tools/src/microsoft365/mod.rs:419-443 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/microsoft365/mod.rs:118\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/zeroclaw-tools/src/microsoft365/mod.rs"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1f9f0b0b87daee0d7d8a2e137c977ff4282cd0e9ed467092251cdefbfb422a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201324 lines \u00D7 3): crates/zeroclaw-providers/src/reliable.rs:2648-2668 | crates/zeroclaw-providers/src/reliable.rs:3396-3419 | crates/zeroclaw-providers/src/reliable.rs:3773-3796 \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/zeroclaw-providers/src/reliable.rs:2648\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/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":2648}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2d400489d8e60bb7a5708412a4adca8ed060ec42cf59afc0bb15a2c9556e20c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201324 lines \u00D7 2): apps/zerocode/src/file_explorer.rs:302-325 | apps/zerocode/src/file_explorer.rs:444-465 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/file_explorer.rs:444\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":"apps/zerocode/src/file_explorer.rs"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"690cfcfeefbfd975334c122e55570471652b49f7558dda079b43b7cea3f9ebef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): apps/zerocode/src/wire.rs:274-297 | crates/zeroclaw-config/src/traits.rs:322-345 \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":"apps/zerocode/src/wire.rs"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"04ee66f4c75bd8c8936ec0b89240aadee988e21358ebb0b11f675abebc36e3fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201324 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1779-1799 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:3030-3053 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1779\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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":1779}}}],"partialFingerprints":{"codehealthFindingId/v1":"870eaf52db6895281ba9fefb38ec45901ab779c27de45a042133c1f79500afa8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23\u201324 lines \u00D7 2): crates/zeroclaw-hardware/src/introspect.rs:105-127 | crates/zeroclaw-tools/src/hardware_board_info.rs:181-204 \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/zeroclaw-tools/src/hardware_board_info.rs:181\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/zeroclaw-hardware/src/introspect.rs"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6de56d6426a6c8e7afac37e1421f3d4921cbf74aa7b7e73849cb8f4651e06ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201324 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/loop_.rs:1884-1907 | crates/zeroclaw-runtime/src/agent/loop_.rs:3967-3988 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/agent/loop_.rs:1884\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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":1884}}}],"partialFingerprints":{"codehealthFindingId/v1":"3162106e626dc215cc63bd55e171134911d9710b33523f1c3a9b25da426f53b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23\u201324 lines \u00D7 2): crates/zeroclaw-runtime/src/skills/mod.rs:847-870 | crates/zeroclaw-runtime/src/skills/mod.rs:976-998 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/skills/mod.rs:847\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/zeroclaw-runtime/src/skills/mod.rs"},"region":{"startLine":847}}}],"partialFingerprints":{"codehealthFindingId/v1":"8415b91d5a5f37746b1092cbbd0ee28624ea10ce16cfde11bc54bf8e100c8548"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201324 lines \u00D7 2): crates/zeroclaw-tools/src/discord_search.rs:92-115 | crates/zeroclaw-tools/src/memory_recall.rs:83-104 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/discord_search.rs\u0060 and \u0060crates/zeroclaw-tools/src/memory_recall.rs\u0060 as WHOLE FILES: this scan already matched 4 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/zeroclaw-tools/src/discord_search.rs:92\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/zeroclaw-tools/src/discord_search.rs"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"c902e03a534bef526557b43cbdd5fab61047f4f07ebec4b3e2877619436c9565"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): crates/zeroclaw-tools/src/sessions.rs:915-938 | crates/zeroclaw-tools/src/sessions.rs:1041-1064 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/sessions.rs:915\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/zeroclaw-tools/src/sessions.rs"},"region":{"startLine":915}}}],"partialFingerprints":{"codehealthFindingId/v1":"1343207337f266dc04c26cf68fc128e5eed84d114453eb85c9e599e7d7d6323d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 3): crates/zeroclaw-tools/src/codex_cli.rs:185-207 | crates/zeroclaw-tools/src/gemini_cli.rs:165-187 | crates/zeroclaw-tools/src/opencode_cli.rs:165-187 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/codex_cli.rs\u0060 and \u0060crates/zeroclaw-tools/src/gemini_cli.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 127 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/zeroclaw-tools/src/codex_cli.rs:185\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/zeroclaw-tools/src/codex_cli.rs"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"3444672159b68b339b204cf4387500d65549cd57b84c3ef39d0c219bc0b96993"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): apps/zerocode/src/osc_status.rs:428-450 | src/plugins/update.rs:140-162 \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 \u0060apps/zerocode/src/osc_status.rs:428\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":"apps/zerocode/src/osc_status.rs"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b30b9b5ac520572613d23c9954c9a8f6da814f05e669d11cb928e26518cc4cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201323 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/acp_server.rs:2807-2828 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:2865-2887 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/acp_server.rs:2807\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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":2807}}}],"partialFingerprints":{"codehealthFindingId/v1":"23fe3455c984133578f1b4b067abc6adcf16aa8db0c47718ca947e1f928f9854"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201323 lines \u00D7 2): crates/zeroclaw-gateway/src/api.rs:1984-2000 | crates/zeroclaw-gateway/src/api.rs:2077-2099 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/api.rs:2077\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/zeroclaw-gateway/src/api.rs"},"region":{"startLine":1984}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3d7c24019897769adbd8d5344e5682c945f2abcbf206f9a9d4a198004b78731"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201323 lines \u00D7 2): crates/zeroclaw-gateway/src/canvas.rs:294-316 | crates/zeroclaw-gateway/src/ws_sop_runs.rs:160-180 \u2014 before extracting anything, compare \u0060crates/zeroclaw-gateway/src/canvas.rs\u0060 and \u0060crates/zeroclaw-gateway/src/ws_sop_runs.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 74 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/zeroclaw-gateway/src/canvas.rs:294\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/zeroclaw-gateway/src/canvas.rs"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab98d837193f3d10c0fb7206b8d1b835af8b1ffb2084729504dbc8602eb0f1cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): crates/zeroclaw-memory/src/sqlite.rs:2167-2189 | crates/zeroclaw-memory/src/sqlite.rs:2479-2501 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-memory/src/sqlite.rs:2167\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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":2167}}}],"partialFingerprints":{"codehealthFindingId/v1":"afee84d577e3afcac02c31390927857d130fe109be3b528a5f6f2b25939efaf5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201323 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/turn/mod.rs:2357-2379 | crates/zeroclaw-runtime/src/agent/turn/mod.rs:2528-2549 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-runtime/src/agent/turn/mod.rs"},"region":{"startLine":2357}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b705863d521d68945b84566544911ae9f26bd3b3021442c90ec5ab296266ebe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): crates/zeroclaw-runtime/src/verifiable_intent/issuance.rs:59-81 | crates/zeroclaw-runtime/src/verifiable_intent/issuance.rs:172-194 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/verifiable_intent/issuance.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/verifiable_intent/issuance.rs"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7f7f40dc5284c53802896e7aa23f9b46e450f60f240fdaebcafa7f4c25cc083"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201323 lines \u00D7 2): crates/zeroclaw-tool-call-parser/src/lib.rs:2198-2219 | crates/zeroclaw-tool-call-parser/src/lib.rs:2245-2267 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-tool-call-parser/src/lib.rs"},"region":{"startLine":2198}}}],"partialFingerprints":{"codehealthFindingId/v1":"54e175f881606e8f0d777e1022a210b36d78f26729d3ef4a561444ea845f9686"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): src/main.rs:15636-15658 | src/main.rs:15671-15693 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/main.rs:15636\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/main.rs"},"region":{"startLine":15636}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb7fa17a4155001455ce230d739cf0f9de0aa0d784fab8bd8b26dd1cb798bba1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): src/memory/cli.rs:186-208 | src/memory/cli.rs:402-424 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/memory/cli.rs:186\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/memory/cli.rs:425\u0060 calls \u0060Ok\u0060 and \u0060src/memory/cli.rs: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":"src/memory/cli.rs"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"e82f94172feb8c34a5fdc8e855c5b0b4606a912a552ead234d6178c453cb8dd5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201322 lines \u00D7 3): crates/zeroclaw-channels/src/line.rs:827-846 | crates/zeroclaw-channels/src/telegram.rs:2714-2735 | crates/zeroclaw-channels/src/wechat.rs:1011-1029 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/line.rs\u0060 and \u0060crates/zeroclaw-channels/src/telegram.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/zeroclaw-channels/src/line.rs:827\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/zeroclaw-channels/src/line.rs"},"region":{"startLine":827}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8c9302ab9bade74e12867bab2abe463ef82ff29b2b076195036dd9e5d511156"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 3): crates/zeroclaw-channels/src/qq.rs:156-177 | crates/zeroclaw-channels/src/telegram.rs:1049-1070 | crates/zeroclaw-channels/src/wechat.rs:347-368 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/qq.rs\u0060 and \u0060crates/zeroclaw-channels/src/telegram.rs\u0060 as WHOLE FILES: this scan already matched 3 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. 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/zeroclaw-channels/src/qq.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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/zeroclaw-channels/src/telegram.rs:1071\u0060 calls \u0060from_marker\u0060 and \u0060crates/zeroclaw-channels/src/qq.rs:178\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/zeroclaw-channels/src/qq.rs"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"53fbedffcfeb240405a46bddacda2af1dc5e962ee5633b2ace7f539f61bcde8c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21\u201322 lines \u00D7 2): crates/zeroclaw-channels/src/git/providers/gitea/provider.rs:94-114 | crates/zeroclaw-channels/src/git/providers/github/provider.rs:181-202 \u2014 \u0060crates/zeroclaw-channels/src/git/providers/gitea/provider.rs\u0060 and \u0060crates/zeroclaw-channels/src/git/providers/github/provider.rs\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 3 separate duplicated blocks between them, totalling at least 52 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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/zeroclaw-channels/src/git/providers/gitea/provider.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"be8b350ab473c70d317754e0f4a24694d602d7a7fd508c07020936aee161bb15"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): crates/zeroclaw-channels/src/lark.rs:4117-4139 | crates/zeroclaw-channels/src/lark.rs:4242-4264 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/lark.rs:4117\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":4117}}}],"partialFingerprints":{"codehealthFindingId/v1":"058320d51537b5e841741a032741a2fac9c2ceb35b1c64cfec7917c918378005"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): crates/zeroclaw-config/src/policy.rs:2244-2265 | crates/zeroclaw-config/src/policy.rs:2279-2300 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-config/src/policy.rs:2244\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/zeroclaw-config/src/policy.rs"},"region":{"startLine":2244}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b09247b991d0a4b31410d226b0e7fa8d5d4c13ddd699efd28de8ca60e262900"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201322 lines \u00D7 2): crates/zeroclaw-config/src/schema.rs:12495-12512 | crates/zeroclaw-config/src/schema.rs:12658-12679 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-config/src/schema.rs:12495\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/zeroclaw-config/src/schema.rs"},"region":{"startLine":12495}}}],"partialFingerprints":{"codehealthFindingId/v1":"f51a023a2ee99a0096d3d13a843369d459778b7f72d8b26af812a4c9af0b2eac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): crates/zeroclaw-providers/src/auth/mod.rs:1687-1708 | crates/zeroclaw-providers/src/auth/mod.rs:1773-1794 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/auth/mod.rs:1687\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/zeroclaw-providers/src/auth/mod.rs"},"region":{"startLine":1687}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b444c26119baec08a33011a431aef9a29185c82cbe374733a0093314658c2dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): crates/zeroclaw-runtime/src/live_config_authority.rs:248-269 | crates/zeroclaw-runtime/src/live_config_authority.rs:283-304 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/live_config_authority.rs:248\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/zeroclaw-runtime/src/live_config_authority.rs"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a65c71452f06b782c5b633b8c321c6f255b79669552dd1bf0dd8db54b4e82e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/cron_add.rs:212-233 | crates/zeroclaw-runtime/src/tools/cron_update.rs:152-173 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/tools/cron_add.rs\u0060 and \u0060crates/zeroclaw-runtime/src/tools/cron_update.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 114 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/zeroclaw-runtime/src/tools/cron_add.rs:212\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/zeroclaw-runtime/src/tools/cron_add.rs"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"240a2e44c69209098d1e0789c24dacd24a44ca907ad658251ea2594c2ae83866"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): crates/zeroclaw-tools/src/hardware_board_info.rs:89-110 | crates/zeroclaw-tools/src/hardware_memory_map.rs:72-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/zeroclaw-tools/src/hardware_board_info.rs"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"6aaf153408ad23e234f40d07da325749fa8a67eebfa330e0c028ddb48a855d6c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): src/cron/mod.rs:199-220 | src/cron/mod.rs:374-395 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/cron/mod.rs:199\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/cron/mod.rs"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebe8820323dabf52a16e72abb780af44e2f5ad4b778eec6f21f1ae7242aad495"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): src/main.rs:10862-10883 | src/main.rs:12398-12419 \u2014 both copies are in the same file, so extract the block 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/main.rs"},"region":{"startLine":10862}}}],"partialFingerprints":{"codehealthFindingId/v1":"cde040c2ae7f59cf6e66e213af9808527855339e131ef1ca96eac86e921cdf83"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 4): crates/zeroclaw-tools/src/sessions.rs:442-462 | crates/zeroclaw-tools/src/sessions.rs:645-665 | crates/zeroclaw-tools/src/sessions.rs:903-923 | crates/zeroclaw-tools/src/sessions.rs:1029-1049 \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/zeroclaw-tools/src/sessions.rs:442\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/zeroclaw-tools/src/sessions.rs"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"6807cc997293d2db9e63498726abea3d710a6654c38df68dc227c37e7cad62f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 3): crates/zeroclaw-providers/src/reliable.rs:2578-2598 | crates/zeroclaw-providers/src/reliable.rs:2647-2667 | crates/zeroclaw-providers/src/reliable.rs:2874-2894 \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/zeroclaw-providers/src/reliable.rs:2578\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/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":2578}}}],"partialFingerprints":{"codehealthFindingId/v1":"b39fb1babd31478d838d710c14b7ffa3c87f4e6c8a2d03329c5166bd9c2867bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (1\u201321 lines \u00D7 10): crates/zeroclaw-channels/src/discord/mod.rs:2492-2493 | crates/zeroclaw-channels/src/discord/mod.rs:2507-2508 | crates/zeroclaw-channels/src/discord/mod.rs:2539-2540 | crates/zeroclaw-channels/src/discord/mod.rs:2719-2720 | crates/zeroclaw-channels/src/discord/mod.rs:2775-2776 | crates/zeroclaw-channels/src/discord/mod.rs:2803-2823 | crates/zeroclaw-channels/src/discord/mod.rs:2845-2845 | crates/zeroclaw-channels/src/discord/mod.rs:2907-2927 | crates/zeroclaw-channels/src/discord/mod.rs:2962-2962 | crates/zeroclaw-channels/src/discord/mod.rs:2984-2985 \u2014 all 10 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/zeroclaw-channels/src/discord/mod.rs:2492\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":2492}}}],"partialFingerprints":{"codehealthFindingId/v1":"e988ce63504a3bfe1635afa09310d4c6d19abfc3102c7dae8f0cd74f5eca8e31"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): crates/zeroclaw-channels/src/discord/rest.rs:39-59 | crates/zeroclaw-channels/src/discord/rest.rs:67-87 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/discord/rest.rs"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"0279bfd2fb132a27582445c117a84291de6c4d3402dabe529eaedaf8c64ed524"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): crates/zeroclaw-gateway/src/lib.rs:1662-1682 | crates/zeroclaw-gateway/src/lib.rs:1832-1852 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/lib.rs:1662\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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":1662}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1e4f05931fb3e01c5553a6eaf28dc6990b27405f7923147eeb2d67c95323aaa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): crates/zeroclaw-providers/src/azure_openai.rs:468-488 | crates/zeroclaw-providers/src/openai.rs:446-466 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/azure_openai.rs\u0060 and \u0060crates/zeroclaw-providers/src/openai.rs\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 226 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/zeroclaw-providers/src/azure_openai.rs"},"region":{"startLine":468}}}],"partialFingerprints":{"codehealthFindingId/v1":"18172c3a2cca48f011067e6b5a32c375f7ccd30ad77d31ca3e16dc3b59da298f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201321 lines \u00D7 2): crates/zeroclaw-providers/src/compatible.rs:1558-1578 | crates/zeroclaw-providers/src/compatible.rs:4412-4431 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/compatible.rs:1558\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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":1558}}}],"partialFingerprints":{"codehealthFindingId/v1":"b30e6895b42aff3043b72678015721ec8d8f1fbc3c1644ba80a5b266ef6221cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/sop_advance.rs:158-178 | crates/zeroclaw-runtime/src/tools/sop_approve.rs:122-142 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/tools/sop_advance.rs\u0060 and \u0060crates/zeroclaw-runtime/src/tools/sop_approve.rs\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 \u0060crates/zeroclaw-runtime/src/tools/sop_advance.rs:158\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/zeroclaw-runtime/src/tools/sop_advance.rs"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ca89cccbfd5a0cd8d0fa0d3f6303a1b7e1bb8d6940dcfc1a1cc86f30dc24b58"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201321 lines \u00D7 2): crates/zeroclaw-runtime/src/verifiable_intent/issuance.rs:37-57 | crates/zeroclaw-runtime/src/verifiable_intent/issuance.rs:151-170 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/verifiable_intent/issuance.rs:37\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/zeroclaw-runtime/src/verifiable_intent/issuance.rs"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"0dc067b30c8a41c2ec0bb540b6a9292eefb663d13dba4798e5bfef64ac330727"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): crates/zeroclaw-tool-call-parser/src/lib.rs:1465-1486 | crates/zeroclaw-tool-call-parser/src/lib.rs:1538-1559 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tool-call-parser/src/lib.rs:1465\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/zeroclaw-tool-call-parser/src/lib.rs"},"region":{"startLine":1465}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba3c5bad5ed7e6d950b8d7fce1748191ef323a564e39f2b50b31923d1ba09812"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201321 lines \u00D7 2): crates/zeroclaw-tools/src/file_edit.rs:150-170 | crates/zeroclaw-tools/src/file_upload.rs:232-251 \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/zeroclaw-tools/src/file_edit.rs:150\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/zeroclaw-tools/src/file_edit.rs"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7cf0afd223678beda571d47e91504cc93fd183409045c760fd5e4e3edc42f36"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 3): crates/zeroclaw-infra/src/session_sqlite.rs:1257-1276 | crates/zeroclaw-infra/src/session_sqlite.rs:1662-1681 | crates/zeroclaw-infra/src/session_sqlite.rs:1714-1733 \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/zeroclaw-infra/src/session_sqlite.rs:1257\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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":1257}}}],"partialFingerprints":{"codehealthFindingId/v1":"9300eb612e78bc9fd096f09aea64516535a7fd9b47e3603199c700bcbfd9a27e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201320 lines \u00D7 3): crates/zeroclaw-providers/src/auth/mod.rs:254-270 | crates/zeroclaw-providers/src/auth/mod.rs:345-364 | crates/zeroclaw-providers/src/auth/mod.rs:435-451 \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/zeroclaw-providers/src/auth/mod.rs:254\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/zeroclaw-providers/src/auth/mod.rs:272\u0060 calls \u0060extract_account_id_from_jwt\u0060, \u0060or_else\u0060, \u0060clone\u0060 and \u0060crates/zeroclaw-providers/src/auth/mod.rs:366\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/zeroclaw-providers/src/auth/mod.rs"},"region":{"startLine":254}}}],"partialFingerprints":{"codehealthFindingId/v1":"2600809badee49150f1dff749c730fb9cea144303c3a39662c4e813fbe549777"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 3): crates/zeroclaw-providers/src/azure_openai.rs:423-442 | crates/zeroclaw-providers/src/openai.rs:401-420 | crates/zeroclaw-providers/src/openrouter.rs:340-359 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/azure_openai.rs\u0060 and \u0060crates/zeroclaw-providers/src/openai.rs\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 226 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/zeroclaw-providers/src/azure_openai.rs:423\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/zeroclaw-providers/src/azure_openai.rs"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"71b42e6d87c6718d58791284fda15ee66aab1039bf1c0e502e575270945685f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 3): crates/zeroclaw-providers/src/reliable.rs:2965-2984 | crates/zeroclaw-providers/src/reliable.rs:3414-3433 | crates/zeroclaw-providers/src/reliable.rs:3791-3810 \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/zeroclaw-providers/src/reliable.rs:2965\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/zeroclaw-providers/src/reliable.rs:2963\u0060 calls \u0060Some\u0060, \u0060candidate_name\u0060, \u0060to_string\u0060 and \u0060crates/zeroclaw-providers/src/reliable.rs:3413\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/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":2965}}}],"partialFingerprints":{"codehealthFindingId/v1":"831ad4854f5b1aa6baa3eea24ce1f4b3c32bca3c1c0c2af65e560792d8c005d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): apps/zerocode/src/app.rs:3682-3701 | apps/zerocode/src/app.rs:3736-3755 \u2014 both copies are in the same file, so extract the block 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":"apps/zerocode/src/app.rs"},"region":{"startLine":3682}}}],"partialFingerprints":{"codehealthFindingId/v1":"39c1f6052c5275cd8aadfa9ecddba0b8d1b7dcef651675752c5c9c6164974bb5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201320 lines \u00D7 2): apps/zerocode/src/client.rs:1826-1845 | apps/zerocode/src/client.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 \u0060apps/zerocode/src/client.rs:1826\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":"apps/zerocode/src/client.rs"},"region":{"startLine":1826}}}],"partialFingerprints":{"codehealthFindingId/v1":"acc004ed738c3a464fe76cce3e3ab316ce1ef0847e46ca3ea847a59482d5436c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): crates/zeroclaw-channels/src/mochat.rs:64-83 | crates/zeroclaw-channels/src/twitter.rs:74-93 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/mochat.rs\u0060 and \u0060crates/zeroclaw-channels/src/twitter.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 115 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/zeroclaw-channels/src/mochat.rs"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3d4d8107cf2adc58aa9845cebaa3b635a5e12a2000153c35600eb7b1deff338"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): crates/zeroclaw-channels/src/qq.rs:1669-1688 | crates/zeroclaw-channels/src/qq.rs:1742-1761 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/qq.rs:1669\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/zeroclaw-channels/src/qq.rs"},"region":{"startLine":1669}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ed0d20d37603084a5fd0a43a80f057a09c839026f907bba3f3af845da6ccedf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): crates/zeroclaw-channels/src/whatsapp_web.rs:4420-4439 | crates/zeroclaw-channels/src/whatsapp_web.rs:4460-4479 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/whatsapp_web.rs"},"region":{"startLine":4420}}}],"partialFingerprints":{"codehealthFindingId/v1":"505abfbd28ac2e20f24843264a0c27b608669ae1bbdaa109397415403363158d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): crates/zeroclaw-config/src/schema.rs:12470-12489 | crates/zeroclaw-config/src/schema.rs:12557-12576 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-config/src/schema.rs"},"region":{"startLine":12470}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ab360cdba2c88020b43c92b652a3da56aaeca710598ea02866c4ab321975a58"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201320 lines \u00D7 2): crates/zeroclaw-gateway/src/ws.rs:989-1007 | crates/zeroclaw-gateway/src/ws.rs:1208-1227 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/ws.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/zeroclaw-gateway/src/ws.rs"},"region":{"startLine":989}}}],"partialFingerprints":{"codehealthFindingId/v1":"18f575722ed866ea42feb3ac51b815d7963ed25a602e94d8b360f922f2c16a08"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): crates/zeroclaw-memory/src/agent_scoped_markdown.rs:182-201 | crates/zeroclaw-memory/src/agent_scoped_markdown.rs:235-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-memory/src/agent_scoped_markdown.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/zeroclaw-memory/src/agent_scoped_markdown.rs"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"274fc20567a0ec2b63663b73f30be699caa1031ba473ee2eb43e5f3459053676"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): crates/zeroclaw-memory/src/consolidation.rs:217-236 | crates/zeroclaw-memory/src/consolidation.rs:350-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-memory/src/consolidation.rs"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fc87827d9562dfd706556974f8bd47bdb9f482c4062c85384218608add33b2e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201320 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/loop_.rs:374-393 | src/main.rs:72-85 \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/zeroclaw-runtime/src/agent/loop_.rs:374\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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":374}}}],"partialFingerprints":{"codehealthFindingId/v1":"457323276e9816a2898d7447ff68e54412c60e3c5818d89c05e4ce42d7e4d1e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): crates/zeroclaw-runtime/src/cron/store.rs:670-689 | crates/zeroclaw-runtime/src/cron/store.rs:734-753 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/cron/store.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/zeroclaw-runtime/src/cron/store.rs"},"region":{"startLine":670}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0c490d289f37a2e8910fa6d2f4e457eac8e04315464d9c0ab7c5d2934b3211b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/skill_http.rs:50-69 | crates/zeroclaw-runtime/src/tools/skill_tool.rs:118-137 \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/zeroclaw-runtime/src/tools/skill_http.rs"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"28a12d28c8cff22170a12ed35b15dd5e3ba42446a2215ce29beb869f8c775aaf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): crates/zeroclaw-tools/src/file_upload.rs:238-257 | crates/zeroclaw-tools/src/file_upload_bundle.rs:339-358 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/file_upload.rs\u0060 and \u0060crates/zeroclaw-tools/src/file_upload_bundle.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 126 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/zeroclaw-tools/src/file_upload.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/zeroclaw-tools/src/file_upload.rs"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b5c977cb1a009165469b49c23d0ca6976c859a0f2196df07db21b2a5fd4d0d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): crates/zeroclaw-tools/src/file_upload.rs:336-355 | crates/zeroclaw-tools/src/file_upload_bundle.rs:488-507 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/file_upload.rs\u0060 and \u0060crates/zeroclaw-tools/src/file_upload_bundle.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 126 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/zeroclaw-tools/src/file_upload.rs:336\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/zeroclaw-tools/src/file_upload.rs"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"52bf4eef1e21b5bb9f0f6144de6527b4f159d3df0050005e970feb5996957105"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): firmware/nucleo/src/main.rs:76-95 | firmware/pico/src/main.rs:78-97 \u2014 before extracting anything, compare \u0060firmware/nucleo/src/main.rs\u0060 and \u0060firmware/pico/src/main.rs\u0060 as WHOLE FILES: this scan already matched 3 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 \u0060firmware/nucleo/src/main.rs:76\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":"firmware/nucleo/src/main.rs"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf7834e324148fb99c3a5972b5d3532e1a162699626823945d567b59f39d5a87"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201320 lines \u00D7 2): src/cron/mod.rs:343-362 | src/cron/mod.rs:523-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 \u0060src/cron/mod.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":"src/cron/mod.rs"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"da141476c38c8f1fe245fb0cd169a4b6dfbe9e92e6d54addfc09b4dfb91b4a65"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201320 lines \u00D7 2): src/cron/mod.rs:397-416 | src/cron/mod.rs:439-457 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/cron/mod.rs:397\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/cron/mod.rs"},"region":{"startLine":397}}}],"partialFingerprints":{"codehealthFindingId/v1":"833848bd2eec249c60244d1e6d07d0e486d363e31941daa4edc2a204755672c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 3): apps/zerocode/src/i18n.rs:134-152 | crates/zeroclaw-runtime/src/i18n.rs:222-240 | crates/zeroclaw-tools/src/i18n.rs:91-109 \u2014 before extracting anything, compare \u0060apps/zerocode/src/i18n.rs\u0060 and \u0060crates/zeroclaw-tools/src/i18n.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. 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 \u0060apps/zerocode/src/i18n.rs:134\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":"apps/zerocode/src/i18n.rs"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c7d6521656f8257ed07c853ed75bd0dce6b81c44816da53628581d4d417bbd9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201319 lines \u00D7 3): crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1787-1802 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:3038-3056 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:3131-3146 \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/zeroclaw-channels/src/orchestrator/acp_server.rs:1787\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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":1787}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e5968af5f59f67d3a6e67ceb1263ea84c4663efc7df76d4b08f6e75a6b42725"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u201319 lines \u00D7 4): crates/zeroclaw-hardware/src/peripherals/rpi.rs:156-174 | crates/zeroclaw-hardware/src/peripherals/serial.rs:314-332 | crates/zeroclaw-hardware/src/peripherals/uno_q_bridge.rs:161-179 | crates/zeroclaw-hardware/src/rpi.rs:398-401 \u2014 before extracting anything, compare \u0060crates/zeroclaw-hardware/src/peripherals/rpi.rs\u0060 and \u0060crates/zeroclaw-hardware/src/rpi.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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/zeroclaw-hardware/src/peripherals/rpi.rs:156\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/zeroclaw-hardware/src/peripherals/rpi.rs"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a8b77f68f2a44cb298e86b7a340063125cabb1c3fd09346b1cfe6b3a0ce102a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201319 lines \u00D7 3): crates/zeroclaw-providers/src/compatible.rs:1036-1054 | crates/zeroclaw-providers/src/compatible.rs:1111-1129 | crates/zeroclaw-providers/src/openai.rs:1198-1214 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/compatible.rs\u0060 and \u0060crates/zeroclaw-providers/src/openai.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \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/zeroclaw-providers/src/compatible.rs:1036\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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":1036}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2130d2bc631b08ccea04dd6614deea59b5026e8f9b950a3d815a00f0a4280fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201319 lines \u00D7 2): apps/zerocode/src/app.rs:1787-1805 | apps/zerocode/src/app.rs:1844-1860 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/app.rs:1787\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":"apps/zerocode/src/app.rs"},"region":{"startLine":1787}}}],"partialFingerprints":{"codehealthFindingId/v1":"c57104e3fddb9b6fbaf4a42cacd694ce595b1820e9f2e390801f6ee0ba30a6f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): crates/zeroclaw-api/src/memory_traits.rs:702-720 | crates/zeroclaw-memory/src/agent_scoped.rs:640-658 \u2014 before extracting anything, compare \u0060crates/zeroclaw-api/src/memory_traits.rs\u0060 and \u0060crates/zeroclaw-memory/src/agent_scoped.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 62 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/zeroclaw-api/src/memory_traits.rs:702\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/zeroclaw-api/src/memory_traits.rs"},"region":{"startLine":702}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4c62de6d85d80bd969ac65f55892a2e90730216cbc9139c119aa2a05fa8627a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): crates/zeroclaw-channels/src/discord/mod.rs:552-570 | crates/zeroclaw-channels/src/discord/mod.rs:679-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/zeroclaw-channels/src/discord/mod.rs:552\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":552}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f4329b64ad732ea074b9681b8918c22883daf2673d4029ad7c3e617b28a9111"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): crates/zeroclaw-channels/src/email_channel.rs:103-121 | crates/zeroclaw-channels/src/gmail_push.rs:814-832 \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/zeroclaw-channels/src/email_channel.rs"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"871a041d370231c10f9cf4fe132ef570cce3bb35c1eab5b87c5014d8ebb02095"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): crates/zeroclaw-channels/src/matrix.rs:4637-4655 | crates/zeroclaw-channels/src/matrix.rs:4705-4723 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/matrix.rs:4637\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":4637}}}],"partialFingerprints":{"codehealthFindingId/v1":"263fae758cbc19283e4124f6c879ca4b7faff9fc6ce15afff112786c94bca1fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): crates/zeroclaw-channels/src/mochat.rs:239-257 | crates/zeroclaw-channels/src/twitter.rs:352-370 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/mochat.rs\u0060 and \u0060crates/zeroclaw-channels/src/twitter.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 115 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/zeroclaw-channels/src/mochat.rs:239\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/zeroclaw-channels/src/mochat.rs"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"695706fb93f356368f897b3bed140bec6f57030641419874c557bbb02301d6bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201319 lines \u00D7 2): crates/zeroclaw-config/src/alias_refs.rs:323-338 | crates/zeroclaw-config/src/alias_refs.rs:473-491 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-config/src/alias_refs.rs:323\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/zeroclaw-config/src/alias_refs.rs"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"91d91d6b0f7dbcf48248bf7a2d4e76c380d5e856d89e3a999e3d7e70f59581bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201319 lines \u00D7 2): crates/zeroclaw-hardware/src/gpio.rs:119-136 | crates/zeroclaw-hardware/src/gpio.rs:223-241 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-hardware/src/gpio.rs:119\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/zeroclaw-hardware/src/gpio.rs"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"5509fc4629b96b82d171fda12ea99f0c8f9277bf76acb667732589cf9d95d411"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): crates/zeroclaw-macros/src/lib.rs:824-842 | crates/zeroclaw-macros/src/lib.rs:1078-1096 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-macros/src/lib.rs:824\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/zeroclaw-macros/src/lib.rs"},"region":{"startLine":824}}}],"partialFingerprints":{"codehealthFindingId/v1":"c416113a471275ae9a7128f248a87531d22b168b07ec845694bc88228c5f1a51"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201319 lines \u00D7 2): crates/zeroclaw-providers/src/anthropic.rs:945-962 | crates/zeroclaw-providers/src/bedrock.rs:1337-1355 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/anthropic.rs\u0060 and \u0060crates/zeroclaw-providers/src/bedrock.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. 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/zeroclaw-providers/src/anthropic.rs:945\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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":945}}}],"partialFingerprints":{"codehealthFindingId/v1":"01b15842b1b3e740cdd57334a8a47cb27052940e6601ad5e730138459d72acab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): crates/zeroclaw-providers/src/dispatch/accounting.rs:402-420 | crates/zeroclaw-providers/src/dispatch/accounting.rs:429-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/dispatch/accounting.rs:402\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/zeroclaw-providers/src/dispatch/accounting.rs"},"region":{"startLine":402}}}],"partialFingerprints":{"codehealthFindingId/v1":"3524b06c504bfad16aadb473495098633f9e5cb66e92edd32ec7db54dcac25d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): crates/zeroclaw-providers/src/hailo_ollama.rs:622-640 | crates/zeroclaw-providers/src/ollama.rs:477-495 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/hailo_ollama.rs\u0060 and \u0060crates/zeroclaw-providers/src/ollama.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 108 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/zeroclaw-providers/src/hailo_ollama.rs:622\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/zeroclaw-providers/src/hailo_ollama.rs"},"region":{"startLine":622}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f35363f382bee5cd90160e92d0579ea0807e5a429ad9a5a2421d96b569c5323"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/loop_.rs:2247-2265 | crates/zeroclaw-runtime/src/agent/loop_.rs:2839-2857 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/agent/loop_.rs:2247\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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":2247}}}],"partialFingerprints":{"codehealthFindingId/v1":"5848ca6771775c8a2463ac25afcd272726176e894d977dc5ac0aa5dcbbe96667"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): crates/zeroclaw-runtime/src/cron/store.rs:1323-1341 | crates/zeroclaw-runtime/src/cron/store.rs:1371-1389 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/cron/store.rs:1323\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/zeroclaw-runtime/src/cron/store.rs"},"region":{"startLine":1323}}}],"partialFingerprints":{"codehealthFindingId/v1":"926cf71ce7ed35612b8fb69d1a197494baefe2ab48c982facc7cd798081eab0b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): crates/zeroclaw-runtime/src/quickstart/mod.rs:1849-1867 | crates/zeroclaw-runtime/src/quickstart/mod.rs:1871-1889 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-runtime/src/quickstart/mod.rs"},"region":{"startLine":1849}}}],"partialFingerprints":{"codehealthFindingId/v1":"49d7671f676001add6c5823a50366a9f1ca0c49c7507c90bd2bb694db55ee5dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/delegate.rs:2653-2671 | crates/zeroclaw-runtime/src/tools/delegate.rs:2709-2727 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/tools/delegate.rs:2653\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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":2653}}}],"partialFingerprints":{"codehealthFindingId/v1":"d677ddee0ce97e8f2f4fef74cf14d85fbc8a20288ba961e379ea1bc47bcf42dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): crates/zeroclaw-tools/src/ask_user.rs:93-111 | crates/zeroclaw-tools/src/poll.rs:189-207 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/ask_user.rs\u0060 and \u0060crates/zeroclaw-tools/src/poll.rs\u0060 as WHOLE FILES: this scan already matched 7 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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/ask_user.rs:93\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/zeroclaw-tools/src/ask_user.rs"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a927eed9ad1febc85d76903b9c5c246af250d29bc6b5ce05644bcc2e1fc87f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201319 lines \u00D7 2): crates/zeroclaw-tools/src/linkedin_client.rs:233-251 | crates/zeroclaw-tools/src/linkedin_client.rs:687-704 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/linkedin_client.rs:233\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/zeroclaw-tools/src/linkedin_client.rs"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"bafdabcab7c1341472bb88d77df42a7d997f31f194ef56054e92a143fefd6b77"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201318 lines \u00D7 4): crates/zeroclaw-providers/src/auth/mod.rs:220-236 | crates/zeroclaw-providers/src/auth/mod.rs:308-324 | crates/zeroclaw-providers/src/auth/mod.rs:405-419 | crates/zeroclaw-providers/src/auth/mod.rs:521-538 \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/zeroclaw-providers/src/auth/mod.rs:220\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/zeroclaw-providers/src/auth/mod.rs"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3258ffdf7c4b308f0cf8c6beb6b539520abdd60b352f5f41c6ef6cfed0345e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201318 lines \u00D7 3): apps/zerocode/src/chat.rs:8636-8652 | apps/zerocode/src/chat.rs:8713-8726 | apps/zerocode/src/file_explorer.rs:549-566 \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":"apps/zerocode/src/chat.rs"},"region":{"startLine":8636}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ed4510c9c95cbb370b53fdc4517c38742fb14129da43e728ed85598db467c1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 3): crates/zeroclaw-api/src/model_provider.rs:238-254 | crates/zeroclaw-channels/src/orchestrator/mod.rs:6034-6051 | crates/zeroclaw-providers/src/ollama.rs:258-275 \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/zeroclaw-api/src/model_provider.rs"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"177e3ccf895438dce4933baad7b009382a8df8f659e065465473175bfbfe1221"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201318 lines \u00D7 3): crates/zeroclaw-providers/src/compatible.rs:3349-3364 | crates/zeroclaw-providers/src/compatible.rs:3372-3389 | crates/zeroclaw-providers/src/openrouter.rs:428-445 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/compatible.rs\u0060 and \u0060crates/zeroclaw-providers/src/openrouter.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 81 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/zeroclaw-providers/src/compatible.rs:3347\u0060 calls \u0060is_tool_result_carrier\u0060 and \u0060crates/zeroclaw-providers/src/openrouter.rs:425\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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":3349}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f08b603151980357f72a01a7b3202b1f025b08165e3fbbc2d3efd31f10766d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201318 lines \u00D7 3): crates/zeroclaw-providers/src/gemini.rs:1221-1233 | crates/zeroclaw-providers/src/gemini.rs:1303-1320 | crates/zeroclaw-providers/src/gemini.rs:1549-1561 \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/zeroclaw-providers/src/gemini.rs:1221\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/zeroclaw-providers/src/gemini.rs"},"region":{"startLine":1221}}}],"partialFingerprints":{"codehealthFindingId/v1":"17e02cc1532d064e3df5851838589c20f0befabc026909e29183340ccc37a03a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 3): crates/zeroclaw-runtime/src/sop/dispatch.rs:922-939 | crates/zeroclaw-runtime/src/sop/dispatch.rs:971-988 | crates/zeroclaw-runtime/src/sop/dispatch.rs:1212-1229 \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/zeroclaw-runtime/src/sop/dispatch.rs:922\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/zeroclaw-runtime/src/sop/dispatch.rs"},"region":{"startLine":922}}}],"partialFingerprints":{"codehealthFindingId/v1":"22b215061278655e7da212a315bea5185e965aed5e5922ddf52d111625bc59e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 3): crates/zeroclaw-runtime/src/sop/store/sqlite.rs:184-201 | crates/zeroclaw-runtime/src/sop/store/sqlite.rs:242-259 | crates/zeroclaw-runtime/src/sop/store/sqlite.rs:279-296 \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/zeroclaw-runtime/src/sop/store/sqlite.rs:184\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/zeroclaw-runtime/src/sop/store/sqlite.rs"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"c89702d5edfdab5f53eacbc271dda2ba260cdfd177c47a1b65f01d9bdf64950b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 3): crates/zeroclaw-runtime/src/tools/cron_remove.rs:89-106 | crates/zeroclaw-runtime/src/tools/cron_run.rs:152-169 | crates/zeroclaw-runtime/src/tools/cron_runs.rs:74-91 \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/zeroclaw-runtime/src/tools/cron_remove.rs"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd2da8c924e81c27152bed9d3f4b04e1fa42f536673e6f0c9d429dfed87a85e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): apps/zerocode/src/chat.rs:4150-4167 | apps/zerocode/src/chat.rs:4178-4195 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/chat.rs:4150\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":"apps/zerocode/src/chat.rs"},"region":{"startLine":4150}}}],"partialFingerprints":{"codehealthFindingId/v1":"94d4638cbd21c1dc23152b20b6d35aac4cf68235095b5122fcf9884b2f1efdb5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 2): apps/zerocode/src/config_manager.rs:4581-4598 | apps/zerocode/src/config_manager.rs:4632-4648 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/config_manager.rs:4581\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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":4581}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbafc502661f305648ed6f84080d269fdfe9918b7771ca0e0b10f20d594e9064"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 2): apps/zerocode/src/diff.rs:130-147 | apps/zerocode/src/diff.rs:207-223 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/diff.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":"apps/zerocode/src/diff.rs"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"2caa1a0ddfad06faa28c59e03a3bfc4f425293dc15a2334ab915455cdf3783ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/zeroclaw-channels/src/discord/mod.rs:2609-2626 | crates/zeroclaw-channels/src/discord/mod.rs:3031-3048 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/discord/mod.rs:2609\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":2609}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac4619eb8d9ce23ce436cb7ac775abab8b32225cab83f56aa83903017ef2cddf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/zeroclaw-channels/src/git/providers/gitea/provider.rs:67-84 | crates/zeroclaw-channels/src/git/providers/github/provider.rs:127-144 \u2014 \u0060crates/zeroclaw-channels/src/git/providers/gitea/provider.rs\u0060 and \u0060crates/zeroclaw-channels/src/git/providers/github/provider.rs\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 3 separate duplicated blocks between them, totalling at least 52 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/git/providers/gitea/provider.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/zeroclaw-channels/src/git/providers/gitea/provider.rs"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"5507f8e0e35715901e42d328c4f07437e2357170fb1a63d8cec83cf50e1ba065"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201318 lines \u00D7 2): crates/zeroclaw-channels/src/nextcloud_talk.rs:262-279 | crates/zeroclaw-channels/src/nextcloud_talk.rs:391-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/nextcloud_talk.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/zeroclaw-channels/src/nextcloud_talk.rs"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fa20e767c308f0393950cebe98acc5ccdfd36632e367271f310a80f49b4f2d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/zeroclaw-channels/src/telegram.rs:2323-2340 | crates/zeroclaw-channels/src/telegram.rs:2385-2402 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/telegram.rs:2323\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":2323}}}],"partialFingerprints":{"codehealthFindingId/v1":"a58d6eed1f133057fbeb56a0fdccc69948bb77cb4a3067687fd07536c232b351"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/zeroclaw-log/src/reader.rs:283-300 | crates/zeroclaw-log/src/reader.rs:838-855 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-log/src/reader.rs:283\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/zeroclaw-log/src/reader.rs"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"229b3f3ffb202e6291eb866e16d5c210afc9695405f4c68c52a35964720ae272"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/zeroclaw-memory/src/consolidation.rs:249-266 | crates/zeroclaw-memory/src/consolidation.rs:382-399 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-memory/src/consolidation.rs:249\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/zeroclaw-memory/src/consolidation.rs"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f96189a88dd2c509ca788c15e7203b5116a0a260b939e6472b3b329ac100017"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 2): crates/zeroclaw-providers/src/anthropic.rs:3360-3376 | crates/zeroclaw-providers/src/anthropic.rs:3516-3533 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":3360}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd8f061d7cda4a451f3f98d5144bb62ad0a1f84f9b32c2be4d7097b963fbb07c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/zeroclaw-providers/src/multimodal.rs:2905-2922 | crates/zeroclaw-providers/src/multimodal.rs:2979-2996 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-providers/src/multimodal.rs:2975\u0060 calls \u0060Some\u0060, \u0060get\u0060, \u0060Ok\u0060 and \u0060crates/zeroclaw-providers/src/multimodal.rs:2903\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/zeroclaw-providers/src/multimodal.rs"},"region":{"startLine":2905}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba9bd939c1e9ae3c6e70cbcb35c2ba58d2bc180f335dd9c9aed84272793e5143"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/zeroclaw-providers/src/multimodal.rs:4331-4348 | crates/zeroclaw-providers/src/multimodal.rs:4378-4395 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/multimodal.rs:4331\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/zeroclaw-providers/src/multimodal.rs"},"region":{"startLine":4331}}}],"partialFingerprints":{"codehealthFindingId/v1":"893b48ec4e3e23cc1be7069250370f909288ca0b16ab1c81f3c63141ac0e4917"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 2): crates/zeroclaw-providers/src/openai.rs:633-666 | crates/zeroclaw-providers/src/openai.rs:721-754 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/openai.rs:633\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/zeroclaw-providers/src/openai.rs"},"region":{"startLine":633}}}],"partialFingerprints":{"codehealthFindingId/v1":"51ed486d0236cc34da27ccfdc0b58d72dde723765f8920b37a8ebb6a4a060cd0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/zeroclaw-runtime/src/daemon/mod.rs:2626-2643 | crates/zeroclaw-runtime/src/daemon/mod.rs:2752-2769 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/daemon/mod.rs:2626\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/zeroclaw-runtime/src/daemon/mod.rs"},"region":{"startLine":2626}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad3e51b2907b5caf40eb801271e184497a1ee0fe6a4ad78d6d17df5b47a1d1e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 2): crates/zeroclaw-runtime/src/rpc/dispatch.rs:5825-5841 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:9310-9327 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/rpc/dispatch.rs:5825\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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":5825}}}],"partialFingerprints":{"codehealthFindingId/v1":"1676797e939bfc765b10082b75f07affc4d13059f243dc9bf8b67c359e189195"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/zeroclaw-runtime/src/rpc/dispatch.rs:10848-10865 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:10957-10974 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/rpc/dispatch.rs:10848\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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":10848}}}],"partialFingerprints":{"codehealthFindingId/v1":"52ba991f82ea0b0d40509b786c500f97cbaf10b8e9b2e5e9b7f8db56e3727e87"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 2): crates/zeroclaw-runtime/src/rpc/local.rs:810-843 | crates/zeroclaw-runtime/src/rpc/wss.rs:1259-1292 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/rpc/local.rs\u0060 and \u0060crates/zeroclaw-runtime/src/rpc/wss.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 81 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/zeroclaw-runtime/src/rpc/local.rs:810\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/zeroclaw-runtime/src/rpc/local.rs"},"region":{"startLine":810}}}],"partialFingerprints":{"codehealthFindingId/v1":"c873750d0c94beedf85849392a35b9cb73f3747c184448563dfc8e5c7102bded"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/engine.rs:2647-2664 | crates/zeroclaw-runtime/src/sop/engine.rs:4938-4955 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/engine.rs:2647\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/zeroclaw-runtime/src/sop/engine.rs:4961\u0060 calls \u0060resolve_sop_step\u0060 and \u0060crates/zeroclaw-runtime/src/sop/engine.rs:2666\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":2647}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e76840b5b2b495c8bd5ecc81e4c550724a445edb060ee7819ec3541f4a1fc6a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201318 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/engine.rs:4087-4104 | crates/zeroclaw-runtime/src/sop/engine.rs:4755-4767 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/engine.rs:4087\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":4087}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d73929f11565fda23651e439dca56a48ca0ac3c6004ee5841a39e4c24722c52"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201318 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/metrics.rs:372-389 | crates/zeroclaw-runtime/src/sop/metrics.rs:415-430 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/metrics.rs:372\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/zeroclaw-runtime/src/sop/metrics.rs"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"264a608fb005844770e923cc209620846cea67a26307a31e7936eb0bb3d4d4c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/schedule.rs:457-474 | crates/zeroclaw-runtime/src/tools/schedule.rs:514-531 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/tools/schedule.rs:457\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/zeroclaw-runtime/src/tools/schedule.rs"},"region":{"startLine":457}}}],"partialFingerprints":{"codehealthFindingId/v1":"18d2802e00bc81ee37ff22daf00baa548149174e25907ccf79c457a09814f151"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29\u201330 lines \u00D7 2): crates/zeroclaw-runtime/src/verifiable_intent/issuance.rs:227-256 | crates/zeroclaw-runtime/src/verifiable_intent/issuance.rs:280-308 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-runtime/src/verifiable_intent/issuance.rs"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fd2b32aacce70e1cee571181b3799f8df08357578c5ea0c0e78d1715b821074"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201318 lines \u00D7 2): crates/zeroclaw-tools/src/file_upload.rs:260-275 | crates/zeroclaw-tools/src/file_upload_bundle.rs:361-378 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/file_upload.rs\u0060 and \u0060crates/zeroclaw-tools/src/file_upload_bundle.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 126 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/zeroclaw-tools/src/file_upload.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. 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/zeroclaw-tools/src/file_upload_bundle.rs:381\u0060 calls \u0060display\u0060 and \u0060crates/zeroclaw-tools/src/file_upload.rs:278\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/zeroclaw-tools/src/file_upload.rs"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6639f5eceb9afca1c30742d469d4c0152f0c965b1eb61198f20e00f14a4a31b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 2): crates/zeroclaw-tools/src/linkedin_client.rs:58-74 | crates/zeroclaw-tools/src/pushover.rs:25-42 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/linkedin_client.rs\u0060 and \u0060crates/zeroclaw-tools/src/pushover.rs\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. 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/zeroclaw-tools/src/linkedin_client.rs"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"6deb7044a8ce17130abe76f02d5d18e81ddefa2927f5ad123779970fce000cdf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/zeroclaw-tools/src/microsoft365/mod.rs:175-192 | crates/zeroclaw-tools/src/microsoft365/mod.rs:491-508 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-tools/src/microsoft365/mod.rs"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"bec7f48d456fd667d7b3a8b23f25b3f063ac5f041230605a45464c0ce9eea0cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/zeroclaw-tools/src/model_routing_config.rs:137-154 | crates/zeroclaw-tools/src/proxy_config.rs:65-82 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/model_routing_config.rs\u0060 and \u0060crates/zeroclaw-tools/src/proxy_config.rs\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 143 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/zeroclaw-tools/src/model_routing_config.rs"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"89687c048ce018580b88b64514da19f5d61da0c6114035a0d6e08c73194328ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 4): crates/zeroclaw-infra/src/session_sqlite.rs:1253-1269 | crates/zeroclaw-infra/src/session_sqlite.rs:1563-1579 | crates/zeroclaw-infra/src/session_sqlite.rs:1659-1674 | crates/zeroclaw-infra/src/session_sqlite.rs:1711-1726 \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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":1253}}}],"partialFingerprints":{"codehealthFindingId/v1":"734d0b5b7aaf64f324e771ec19e6cac18235569e3e8aa94cc177a089130ac951"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 4): crates/zeroclaw-providers/src/openrouter.rs:673-689 | crates/zeroclaw-providers/src/openrouter.rs:746-762 | crates/zeroclaw-providers/src/openrouter.rs:817-833 | crates/zeroclaw-providers/src/openrouter.rs:1054-1070 \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/zeroclaw-providers/src/openrouter.rs"},"region":{"startLine":673}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbe5f1db65d0443edb0428aa19325da051390592d10e231c6c2a61e2ff5e4840"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 3): crates/zeroclaw-api/src/memory_traits.rs:704-719 | crates/zeroclaw-memory/src/agent_scoped.rs:642-657 | crates/zeroclaw-tools/src/memory_export.rs:20-36 \u2014 before extracting anything, compare \u0060crates/zeroclaw-api/src/memory_traits.rs\u0060 and \u0060crates/zeroclaw-memory/src/agent_scoped.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 62 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/zeroclaw-api/src/memory_traits.rs"},"region":{"startLine":704}}}],"partialFingerprints":{"codehealthFindingId/v1":"002773259c4ac202ccb6c1b14df29f367364d96aad687b4dfa0f6898ec29ecef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 3): crates/zeroclaw-channels/src/discord/markers.rs:49-65 | crates/zeroclaw-channels/src/slack.rs:347-363 | crates/zeroclaw-channels/src/util.rs:377-393 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/discord/markers.rs:49\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/zeroclaw-channels/src/discord/markers.rs"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5c7eaecb756ef9bdd378040c989cf65bcac2e96d17217f808654e273c522ef8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 3): crates/zeroclaw-channels/src/discord/markers.rs:75-91 | crates/zeroclaw-channels/src/slack.rs:373-389 | crates/zeroclaw-channels/src/util.rs:400-416 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/discord/markers.rs:75\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/zeroclaw-channels/src/discord/markers.rs"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"61d3a8d6321d25fe8acace2b86847d969f8c784a2507a0159e84005fabe7595b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201317 lines \u00D7 3): crates/zeroclaw-config/src/alias_refs.rs:325-338 | crates/zeroclaw-config/src/alias_refs.rs:397-410 | crates/zeroclaw-config/src/alias_refs.rs:475-491 \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/zeroclaw-config/src/alias_refs.rs"},"region":{"startLine":325}}}],"partialFingerprints":{"codehealthFindingId/v1":"e750b78be58818ff1004ad8d04734165f9674341aa9eff4e1050e7a2c45a2d41"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): apps/zerocode/src/client_crypto.rs:97-113 | crates/zeroclaw-tls/src/lib.rs:512-528 \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":"apps/zerocode/src/client_crypto.rs"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"117a37bcc0c916f3c323b42befcd577dd1936501ffbde4d2f23293c8fb117db4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:13448-13464 | crates/zeroclaw-channels/src/orchestrator/mod.rs:14701-14716 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:13448\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":13448}}}],"partialFingerprints":{"codehealthFindingId/v1":"d494919b67ab38accd585b5d329ce27ca652b35e7c18238e03fb0ca5afcd51be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): crates/zeroclaw-channels/src/voice_wake.rs:348-364 | crates/zeroclaw-channels/src/voice_wake.rs:423-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/zeroclaw-channels/src/voice_wake.rs:348\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/zeroclaw-channels/src/voice_wake.rs"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"894898f11842009b6bdf47954abeb5725b3142a239479b50f3ea9417e3651904"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/zeroclaw-config/src/presets.rs:234-250 | crates/zeroclaw-config/src/presets.rs:258-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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/zeroclaw-config/src/presets.rs:275\u0060 calls \u0060Some\u0060 and \u0060crates/zeroclaw-config/src/presets.rs:251\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/zeroclaw-config/src/presets.rs"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"54ca73ad16a25636e740961a63854f7cde3ac7bf1616fa83647d3316df6e96ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): crates/zeroclaw-config/src/schema.rs:12526-12542 | crates/zeroclaw-config/src/schema.rs:12687-12702 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-config/src/schema.rs:12526\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/zeroclaw-config/src/schema.rs"},"region":{"startLine":12526}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad26c70689800b72a966e4d45084d0e4ff352c697e3f44edbaf0d3ba3b894952"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/zeroclaw-gateway/src/api_config.rs:1081-1097 | crates/zeroclaw-gateway/src/api_config.rs:1171-1187 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/api_config.rs:1081\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/zeroclaw-gateway/src/api_config.rs"},"region":{"startLine":1081}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8fa0c99a11ed880de4c73fcb2de2b9f40d0a495157cfa69417909b1d1051b34"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/zeroclaw-hardware/src/device.rs:440-456 | crates/zeroclaw-hardware/src/lib.rs:258-274 \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/zeroclaw-hardware/src/device.rs"},"region":{"startLine":440}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ab8249a4514c8be03125b5bdf58039076c193e273cd0335d13711aaad8811dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): crates/zeroclaw-providers/src/auth/mod.rs:1484-1500 | crates/zeroclaw-providers/src/auth/mod.rs:1551-1566 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/auth/mod.rs:1484\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/zeroclaw-providers/src/auth/mod.rs:1567\u0060 calls \u0060clear_pending_oauth_login\u0060 and \u0060crates/zeroclaw-providers/src/auth/mod.rs:1501\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/zeroclaw-providers/src/auth/mod.rs"},"region":{"startLine":1484}}}],"partialFingerprints":{"codehealthFindingId/v1":"aba910aed5f638c1bfeca74f190c29ec450c6147ca13ce2a4c91ede308662a81"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201317 lines \u00D7 2): crates/zeroclaw-providers/src/azure_openai.rs:304-318 | crates/zeroclaw-providers/src/compatible.rs:1331-1347 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/azure_openai.rs\u0060 and \u0060crates/zeroclaw-providers/src/compatible.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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/zeroclaw-providers/src/compatible.rs:1329\u0060 calls \u0060Some\u0060, \u0060clone\u0060 and \u0060crates/zeroclaw-providers/src/azure_openai.rs:303\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/zeroclaw-providers/src/azure_openai.rs"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"72702a683281db73db1cb0081d0090637a346aab07c62b092bc0051bfb764ed1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201317 lines \u00D7 2): crates/zeroclaw-providers/src/compatible.rs:3160-3176 | crates/zeroclaw-providers/src/compatible.rs:3194-3207 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/compatible.rs:3160\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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":3160}}}],"partialFingerprints":{"codehealthFindingId/v1":"278d8c01f28162f9e4c2ff0381ccf8950f952d48c3b3871d05b9a962858ebd00"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/zeroclaw-runtime/src/rpc/dispatch.rs:11051-11067 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:11186-11202 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":11051}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4bdc98ada90aacdcc925b83ec56868cb88cf263e75eab51efe477f4da12f791"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): crates/zeroclaw-runtime/src/skills/document.rs:124-139 | crates/zeroclaw-runtime/src/skills/mod.rs:1592-1608 \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/zeroclaw-runtime/src/skills/document.rs"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"a54fc38d7057fb02715bdc05d37c8d0bd1cd87983cf3b4ebd2f687dea6a35fcb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/delegate.rs:2197-2213 | crates/zeroclaw-runtime/src/tools/delegate.rs:2240-2255 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/tools/delegate.rs:2197\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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":2197}}}],"partialFingerprints":{"codehealthFindingId/v1":"bef8498dd6069b7e4d5eebe45620191f8d8c525a3bd5e4a9935eb8f5f58584f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/delegate.rs:3260-3276 | crates/zeroclaw-runtime/src/tools/delegate.rs:3589-3605 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/tools/delegate.rs:3260\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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":3260}}}],"partialFingerprints":{"codehealthFindingId/v1":"f98d0f33c2c9c0806e18bd1e1eceffd0377c982bd0c3650a924e73f158d4cef3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/zeroclaw-tools/src/model_routing_config.rs:192-208 | crates/zeroclaw-tools/src/proxy_config.rs:94-110 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/model_routing_config.rs\u0060 and \u0060crates/zeroclaw-tools/src/proxy_config.rs\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 143 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/zeroclaw-tools/src/model_routing_config.rs:192\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/zeroclaw-tools/src/model_routing_config.rs"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"3085ef21eb317ce7576dd9b13bc84dcfc37c586ba215f51feddd441063282953"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/zeroclaw-tools/src/model_routing_config.rs:1296-1312 | crates/zeroclaw-tools/src/model_routing_config.rs:1329-1345 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-tools/src/model_routing_config.rs"},"region":{"startLine":1296}}}],"partialFingerprints":{"codehealthFindingId/v1":"32a0f827bba15e2f7ab91488aab319f132bf7c879c8135f97ee69b2d9e4f5e9a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): src/cron/mod.rs:233-249 | src/cron/mod.rs:322-338 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/cron/mod.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":"src/cron/mod.rs"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e836b8fa0d3330ad57582d70a8435449011948d2752e5c9529905875985b69b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201316 lines \u00D7 4): crates/zeroclaw-gateway/src/api_webauthn.rs:70-85 | crates/zeroclaw-gateway/src/api_webauthn.rs:164-176 | crates/zeroclaw-gateway/src/api_webauthn.rs:250-262 | crates/zeroclaw-gateway/src/api_webauthn.rs:295-310 \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/zeroclaw-gateway/src/api_webauthn.rs:70\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/zeroclaw-gateway/src/api_webauthn.rs"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"aab51587bbb7b0d2f2790e95762ece8e1b584247ec3840f2cca672ad2534ff81"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201316 lines \u00D7 3): crates/zeroclaw-api/src/channel.rs:1028-1043 | crates/zeroclaw-channels/src/signal.rs:1235-1246 | crates/zeroclaw-channels/src/whatsapp.rs:1048-1062 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-api/src/channel.rs:1028\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/zeroclaw-api/src/channel.rs"},"region":{"startLine":1028}}}],"partialFingerprints":{"codehealthFindingId/v1":"29e2b3cdd0829db77921c257611fca57486be389682eaa5a48d413b1c69a69b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): crates/zeroclaw-runtime/src/sop/dispatch.rs:941-956 | crates/zeroclaw-runtime/src/sop/dispatch.rs:990-1005 | crates/zeroclaw-runtime/src/sop/dispatch.rs:1232-1247 \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/zeroclaw-runtime/src/sop/dispatch.rs:941\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/zeroclaw-runtime/src/sop/dispatch.rs"},"region":{"startLine":941}}}],"partialFingerprints":{"codehealthFindingId/v1":"937c35c8a91e0298d0051285197301fa3a5007f4f48ce487273a63d7937a01f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): apps/zerocode/src/editor.rs:2-17 | src/skills/mod.rs:1271-1286 \u2014 before extracting anything, compare \u0060apps/zerocode/src/editor.rs\u0060 and \u0060src/skills/mod.rs\u0060 as WHOLE FILES: 95% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. 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":"apps/zerocode/src/editor.rs"},"region":{"startLine":2}}}],"partialFingerprints":{"codehealthFindingId/v1":"5faffd07d98f5765f41a1274252aee1bbb78adb94c6b0455d25a6340fa5f1976"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): apps/zerorelay/src/dashboard.rs:99-114 | crates/zeroclaw-config/src/schema.rs:8578-8593 \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":"apps/zerorelay/src/dashboard.rs"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c62daf2a4d96071e89350c935af5950d33e3f32d423878814488ad76292fcfe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/zeroclaw-channels/src/discord/markers.rs:874-889 | crates/zeroclaw-channels/src/matrix.rs:3380-3395 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/discord/markers.rs\u0060 and \u0060crates/zeroclaw-channels/src/matrix.rs\u0060 as WHOLE FILES: this scan already matched 8 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/zeroclaw-channels/src/discord/markers.rs:874\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/zeroclaw-channels/src/discord/markers.rs"},"region":{"startLine":874}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a008e48532a625d67877d1ee17b15433875195f35c3c7a4bf505ef971533fa9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201316 lines \u00D7 2): crates/zeroclaw-channels/src/discord/mod.rs:2551-2566 | crates/zeroclaw-channels/src/discord/mod.rs:3009-3022 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/discord/mod.rs:2551\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":2551}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb17ff1ba6e784a676158d6be5415fcab691b4fb2a7fea7c6827a04999f6a125"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): crates/zeroclaw-channels/src/discord/mod.rs:3829-3844 | crates/zeroclaw-channels/src/discord/mod.rs:3862-3876 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/discord/mod.rs:3829\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":3829}}}],"partialFingerprints":{"codehealthFindingId/v1":"08b2493bf62d54d31724c5ed7d290b7d297759756353148f1887af0a1e3f8c5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201316 lines \u00D7 2): crates/zeroclaw-channels/src/discord/slash.rs:571-584 | crates/zeroclaw-channels/src/discord/slash.rs:643-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/zeroclaw-channels/src/discord/slash.rs:571\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/zeroclaw-channels/src/discord/slash.rs"},"region":{"startLine":571}}}],"partialFingerprints":{"codehealthFindingId/v1":"08b8bd874e7826dfe8183e8a52a1d2881aaa9a30d921226f0125109e22735259"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): crates/zeroclaw-channels/src/line.rs:1106-1122 | crates/zeroclaw-channels/src/line.rs:1143-1158 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/line.rs:1106\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/zeroclaw-channels/src/line.rs"},"region":{"startLine":1106}}}],"partialFingerprints":{"codehealthFindingId/v1":"61dba275ca7a44a8bc574f4c7087604cdfd6a8a5e2e0548ce946085c833d9a82"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1199-1214 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1539-1554 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1199\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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":1199}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8a4db5ef90a12668ce51f1b9d7accd874b6f04dfad1d3b986ba3b75b56911ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201316 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:6531-6543 | crates/zeroclaw-channels/src/orchestrator/mod.rs:6550-6565 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:6531\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":6531}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bdec56c5eb837ba5799ae02a21634fe32e67561405ae4df81e2f547e300bb7e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:10802-10817 | crates/zeroclaw-channels/src/orchestrator/mod.rs:11307-11322 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:10802\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":10802}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe3287cd574755166b36ec37f06a0f7e79d840f1d3627a1599cf9bbb806b41b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): crates/zeroclaw-channels/src/qq.rs:1700-1720 | crates/zeroclaw-channels/src/qq.rs:1773-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/qq.rs:1700\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/zeroclaw-channels/src/qq.rs"},"region":{"startLine":1700}}}],"partialFingerprints":{"codehealthFindingId/v1":"16966c18d47e2982f9ad3180fe011080caa3acdc0d1a4bac66fdeebb10225f2b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/zeroclaw-gateway/src/api_sop_author.rs:425-440 | crates/zeroclaw-gateway/src/api_sop_author.rs:499-514 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/api_sop_author.rs:425\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/zeroclaw-gateway/src/api_sop_author.rs"},"region":{"startLine":425}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f96bb46faf2953bb224ac7dfe22fd5960f3c0942451bd7fc783df0f82308aba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201316 lines \u00D7 2): crates/zeroclaw-hardware/src/pico_code.rs:344-359 | crates/zeroclaw-hardware/src/pico_code.rs:530-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/zeroclaw-hardware/src/pico_code.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-hardware/src/pico_code.rs"},"region":{"startLine":344}}}],"partialFingerprints":{"codehealthFindingId/v1":"9255b00128790e615ed443168dd3a46c7b7be16a25b35b21be036bbef8ba138e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): crates/zeroclaw-providers/src/hailo_ollama.rs:947-962 | crates/zeroclaw-providers/src/ollama.rs:509-523 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/hailo_ollama.rs\u0060 and \u0060crates/zeroclaw-providers/src/ollama.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 108 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/zeroclaw-providers/src/hailo_ollama.rs:947\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/zeroclaw-providers/src/hailo_ollama.rs"},"region":{"startLine":947}}}],"partialFingerprints":{"codehealthFindingId/v1":"39c40ee9509e222736574c9833c07739d3761aea0afde18e54302e538771bde3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/zeroclaw-providers/src/multimodal.rs:1398-1413 | crates/zeroclaw-providers/src/multimodal.rs:1558-1573 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/multimodal.rs:1398\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/zeroclaw-providers/src/multimodal.rs"},"region":{"startLine":1398}}}],"partialFingerprints":{"codehealthFindingId/v1":"592f2e98c22e69c48805b29ef810b2889d8b77bd947b852e60cee992d6fd36cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/loop_.rs:2308-2323 | crates/zeroclaw-runtime/src/agent/loop_.rs:2914-2929 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/agent/loop_.rs:2308\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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":2308}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e9f6e19e28bb97bb4f6458bdb5c97d41236509fc423a93518bc0542f99a9644"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201316 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/turn/mod.rs:2049-2064 | crates/zeroclaw-runtime/src/agent/turn/mod.rs:3769-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/zeroclaw-runtime/src/agent/turn/mod.rs:2049\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/zeroclaw-runtime/src/agent/turn/mod.rs"},"region":{"startLine":2049}}}],"partialFingerprints":{"codehealthFindingId/v1":"69a797dfa25a24b44495852cdc3cb70992d8f794f86cccee80c6264c9eefb968"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): crates/zeroclaw-runtime/src/daemon/mod.rs:444-459 | crates/zeroclaw-runtime/src/daemon/mod.rs:546-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/daemon/mod.rs:444\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/zeroclaw-runtime/src/daemon/mod.rs"},"region":{"startLine":444}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d546bcc274fa7333000a3c372953cd218ee973440afdc6f2145b952f40b38f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201316 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/executor.rs:1078-1093 | crates/zeroclaw-runtime/src/sop/executor.rs:1195-1208 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/executor.rs:1078\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/zeroclaw-runtime/src/sop/executor.rs"},"region":{"startLine":1078}}}],"partialFingerprints":{"codehealthFindingId/v1":"eefe0ebbd52d5f27a0cee4b554e30a747d890e92be32dbfc90134df8c232f597"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201316 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/executor.rs:1435-1446 | crates/zeroclaw-runtime/src/sop/executor.rs:1462-1477 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-runtime/src/sop/executor.rs"},"region":{"startLine":1435}}}],"partialFingerprints":{"codehealthFindingId/v1":"4894365149c51c183a4243cac721be7fe8b3210f345ea7fb37f192b1aeacd2fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/schedule.rs:428-443 | crates/zeroclaw-runtime/src/tools/schedule.rs:462-477 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/tools/schedule.rs:428\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/zeroclaw-runtime/src/tools/schedule.rs"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e0bfc95989c033fc83b620db8e969b3c106719f9422166a3831a243627cbcd6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201316 lines \u00D7 2): crates/zeroclaw-tool-call-parser/src/lib.rs:2373-2388 | crates/zeroclaw-tool-call-parser/src/lib.rs:2446-2459 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tool-call-parser/src/lib.rs:2373\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/zeroclaw-tool-call-parser/src/lib.rs"},"region":{"startLine":2373}}}],"partialFingerprints":{"codehealthFindingId/v1":"906f2c9983f5827e6968b132380299b8f6e4af382a3a5f345ea1a7a6739f7ea8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/zeroclaw-tools/src/composio.rs:654-669 | crates/zeroclaw-tools/src/composio.rs:704-719 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/composio.rs:654\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/zeroclaw-tools/src/composio.rs"},"region":{"startLine":654}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ed881f8b628520d8ebbf0e529fb73efd28ee87365494aeac18d5a61a648f8c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 4): crates/zeroclaw-providers/src/azure_openai.rs:556-570 | crates/zeroclaw-providers/src/glm.rs:164-178 | crates/zeroclaw-providers/src/openai.rs:509-523 | crates/zeroclaw-providers/src/telnyx.rs:173-187 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/azure_openai.rs\u0060 and \u0060crates/zeroclaw-providers/src/openai.rs\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 226 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/zeroclaw-providers/src/azure_openai.rs:556\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/zeroclaw-providers/src/glm.rs:179\u0060 calls \u0060to_string\u0060 and \u0060crates/zeroclaw-providers/src/azure_openai.rs:571\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/zeroclaw-providers/src/azure_openai.rs"},"region":{"startLine":556}}}],"partialFingerprints":{"codehealthFindingId/v1":"52fc73479c6851847efbefafcd0d929fe8843e07d4bfbe1d0655072e7c6d3278"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 4): crates/zeroclaw-runtime/src/agent/loop_.rs:2185-2199 | crates/zeroclaw-runtime/src/agent/loop_.rs:2286-2300 | crates/zeroclaw-runtime/src/agent/loop_.rs:2422-2436 | crates/zeroclaw-runtime/src/agent/loop_.rs:3076-3090 \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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":2185}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fe939d5c88eea3488c0ef6779b9091a7ddfa166e8909a988e69ff40ee222926"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 3): crates/zeroclaw-channels/src/reddit.rs:131-144 | crates/zeroclaw-channels/src/reddit.rs:328-341 | crates/zeroclaw-channels/src/reddit.rs:353-367 \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/zeroclaw-channels/src/reddit.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/zeroclaw-channels/src/reddit.rs"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a68a5706ce223009f88dd36231ba4bdab63382fb3ab3537784a77342643c689"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): crates/zeroclaw-channels/src/slack.rs:4587-4601 | crates/zeroclaw-channels/src/slack.rs:6034-6048 | crates/zeroclaw-channels/src/slack.rs:6153-6167 \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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":4587}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e84488d6308091e71ccf372eb3627fb1b43ce37d1daaa97e89e888f1382dc9d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): crates/zeroclaw-memory/src/sqlite.rs:2004-2018 | crates/zeroclaw-memory/src/sqlite.rs:2053-2067 | crates/zeroclaw-memory/src/sqlite.rs:2192-2206 \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/zeroclaw-memory/src/sqlite.rs:2004\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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":2004}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae1693465050ed84b7b0ddf8087a9d0061532dfb7be6cb94c3b8a7e5f17cc012"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): crates/zeroclaw-providers/src/reliable.rs:4033-4047 | crates/zeroclaw-providers/src/reliable.rs:4138-4152 | crates/zeroclaw-providers/src/reliable.rs:4226-4240 \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/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":4033}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a15fb3b299e5a14d6252ee417bfc865eba3de1ab7a26547507f850725c879e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 3): crates/zeroclaw-tools/src/browser_open.rs:121-134 | crates/zeroclaw-tools/src/linkedin.rs:175-189 | crates/zeroclaw-tools/src/pushover.rs:143-156 \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/zeroclaw-tools/src/browser_open.rs:121\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/zeroclaw-tools/src/browser_open.rs"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5e402e00cc462aca9e8db66c0c77c946a7a89ff1484c6158d5c7341993d1b38"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): src/cron/mod.rs:231-245 | src/cron/mod.rs:320-334 | src/cron/mod.rs:507-521 \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/cron/mod.rs:231\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/cron/mod.rs"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"d17ea1ac99a4ecc5ef976f9b790bffb5f6ec98735456d83657c6e49665c0cb89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): apps/zerocode/src/dashboard.rs:296-310 | apps/zerocode/src/dashboard.rs:365-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c4934d28830a09e2a73289689ce97333d09df66cc3838a4a0a1b0949a5d6aa5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): apps/zerocode/src/dashboard.rs:1323-1336 | apps/zerocode/src/dashboard.rs:3213-3227 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/dashboard.rs:1323\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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":1323}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc3e1c2ad89694daa94bfdaa7e128d1a16161208ad057c210b4d751b85f70d3f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): apps/zerocode/src/dashboard.rs:1341-1354 | apps/zerocode/src/dashboard.rs:3234-3248 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/dashboard.rs:1341\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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":1341}}}],"partialFingerprints":{"codehealthFindingId/v1":"5affc87830d3d714238bb86d5652180f87484a82d39336ff1dcdd9c7870cdd31"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): apps/zerocode/src/dashboard.rs:2002-2016 | apps/zerocode/src/dashboard.rs:2059-2073 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/dashboard.rs:2002\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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":2002}}}],"partialFingerprints":{"codehealthFindingId/v1":"1313d3adc342e055cdd8165d23cf7bc84408f5a85465087389659ddd29f0e6ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): apps/zerorelay/src/enroll_route.rs:296-309 | apps/zerorelay/src/lib.rs:1704-1718 \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 \u0060apps/zerorelay/src/enroll_route.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":"apps/zerorelay/src/enroll_route.rs"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5ee0a3c27ebf7bb283feb6073cb667183c28b625b0bd983698c4b41e42f8715"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201315 lines \u00D7 2): apps/zerorelay/src/lib.rs:1557-1571 | crates/zeroclaw-runtime/src/relay.rs:1452-1464 \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 \u0060apps/zerorelay/src/lib.rs:1557\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":"apps/zerorelay/src/lib.rs"},"region":{"startLine":1557}}}],"partialFingerprints":{"codehealthFindingId/v1":"458cbae3c28871c8d96956343f4e405f5b9aac21c858702ab4f9f2d26541d1d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): crates/zeroclaw-channels/src/acp_channel.rs:134-148 | crates/zeroclaw-runtime/src/rpc/approval_channel.rs:226-239 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/acp_channel.rs\u0060 and \u0060crates/zeroclaw-runtime/src/rpc/approval_channel.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 49 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/zeroclaw-channels/src/acp_channel.rs:134\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/zeroclaw-channels/src/acp_channel.rs"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"779561e434625353263ecbe782d3aea1372e58cce02ead2f7efc86523f773083"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/zeroclaw-channels/src/dingtalk.rs:248-262 | crates/zeroclaw-channels/src/dingtalk.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/zeroclaw-channels/src/dingtalk.rs"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"6748f581c840ede8e7ca8ddab7ae9eceef9b108d1940da5e559dab6afd6bde76"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201315 lines \u00D7 2): crates/zeroclaw-channels/src/git/channel.rs:694-706 | crates/zeroclaw-channels/src/twitter.rs:438-452 \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/zeroclaw-channels/src/git/channel.rs:694\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/zeroclaw-channels/src/git/channel.rs"},"region":{"startLine":694}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6220abac1c1bfae4c6f86b4cdf8931099641013bb31fa2b623f7cf5a15945ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/zeroclaw-channels/src/git/providers/gitea/api.rs:280-294 | crates/zeroclaw-channels/src/git/providers/github/api.rs:530-544 \u2014 \u0060crates/zeroclaw-channels/src/git/providers/gitea/api.rs\u0060 and \u0060crates/zeroclaw-channels/src/git/providers/github/api.rs\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 6 separate duplicated blocks between them, totalling at least 61 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. 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/zeroclaw-channels/src/git/providers/gitea/api.rs"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"91015876f5356310b03832468898b864acfd1c7a29549f9e95ed93ca7c392ed9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/zeroclaw-channels/src/imessage.rs:306-320 | crates/zeroclaw-channels/src/irc.rs:667-681 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/imessage.rs\u0060 and \u0060crates/zeroclaw-channels/src/irc.rs\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 \u0060crates/zeroclaw-channels/src/imessage.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/zeroclaw-channels/src/imessage.rs"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"b13e7ace08b2120374b41ceec2cb2a1311af2ab688f48f5b79b48b87bfa2814d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:13640-13654 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15963-15977 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":13640}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf5560bc43fc904c2912dae39ae587621b3345dd8400de6cde4fdbf1d7f0247b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201315 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:13719-13733 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15386-15396 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:13719\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":13719}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b28b6f4b5d50ff3ce437cf7cda839deb68635506640edf4299a760501907f50"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:16401-16417 | crates/zeroclaw-channels/src/orchestrator/mod.rs:17449-17464 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:16401\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/zeroclaw-channels/src/orchestrator/mod.rs:16419\u0060 calls \u0060read\u0060 and \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:17465\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":16401}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9a20190ce91650c6c540a312d334f2ca81c62c9d497be0666abac7d51206fd2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/zeroclaw-channels/src/slack.rs:3042-3056 | crates/zeroclaw-channels/src/slack.rs:3785-3799 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/slack.rs:3042\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":3042}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed8afe72a4a9d70189dec405cfcc2d2835ef4b6906610365fe41d3b077ab0bac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 3): crates/zeroclaw-config/src/alias_refs.rs:345-359 | crates/zeroclaw-config/src/alias_refs.rs:414-429 | crates/zeroclaw-config/src/alias_refs.rs:503-517 \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/zeroclaw-config/src/alias_refs.rs:345\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/zeroclaw-config/src/alias_refs.rs"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"407be975e698ce09afb9cd94d671323f56114cff799afd50560c149c5178f4da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/zeroclaw-config/src/policy.rs:3677-3691 | crates/zeroclaw-config/src/policy.rs:3693-3707 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-config/src/policy.rs"},"region":{"startLine":3677}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8faeba1e3fd9b3615a65806666419ce04dd02702124080079c9fa481d48b433"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201324 lines \u00D7 2): crates/zeroclaw-config/src/schema.rs:23760-23783 | crates/zeroclaw-config/src/schema.rs:23807-23824 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-config/src/schema.rs"},"region":{"startLine":23760}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9cd229ec4c5abf5e25d8365de554df595e904631914233a0c5c1fe15bccee98"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/zeroclaw-gateway/src/api_webauthn.rs:110-124 | crates/zeroclaw-gateway/src/api_webauthn.rs:201-215 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/api_webauthn.rs:110\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/zeroclaw-gateway/src/api_webauthn.rs"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"d14c107296f6b6cb6789d642cd13644a27a5077c1ae03f925995438e78864c89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/zeroclaw-infra/src/net_guard.rs:899-913 | crates/zeroclaw-infra/src/net_guard.rs:977-991 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-infra/src/net_guard.rs:899\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/zeroclaw-infra/src/net_guard.rs"},"region":{"startLine":899}}}],"partialFingerprints":{"codehealthFindingId/v1":"b28296a688c7f1c812ec8b760cdc34864f87e68c5a2db00aeb981e98f9821bf5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201315 lines \u00D7 2): crates/zeroclaw-infra/src/session_sqlite.rs:1145-1157 | crates/zeroclaw-infra/src/session_sqlite.rs:1176-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/zeroclaw-infra/src/session_sqlite.rs:1176\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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":1145}}}],"partialFingerprints":{"codehealthFindingId/v1":"33c4a95d499a4da183590b10dff4dc0b826895659234c4e3fb96654c44631a5e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201315 lines \u00D7 2): crates/zeroclaw-macros/src/lib.rs:1604-1614 | crates/zeroclaw-macros/src/lib.rs:1639-1653 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-macros/src/lib.rs:1604\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/zeroclaw-macros/src/lib.rs"},"region":{"startLine":1604}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d114342df541f593fcd1b68b41d693e492f40b545a849e3cb8c28107ef3b7fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/zeroclaw-memory/src/sqlite.rs:1034-1048 | crates/zeroclaw-memory/src/sqlite.rs:2523-2537 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-memory/src/sqlite.rs:1034\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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":1034}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea3a99d501cddb5738553c419b530f2cecf674202aeab3e220c6fc20db4379e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): crates/zeroclaw-providers/src/anthropic.rs:2968-2981 | crates/zeroclaw-providers/src/anthropic.rs:3121-3135 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/anthropic.rs:3121\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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":2968}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a56caad7e8665da88ce37d9b2f6ff7092a45a77722db81753d5497ecff5a904"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/zeroclaw-providers/src/compatible.rs:4808-4822 | crates/zeroclaw-providers/src/compatible.rs:5233-5247 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/compatible.rs:4808\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/zeroclaw-providers/src/compatible.rs:4804\u0060 calls \u0060exact_request_replay_active\u0060 and \u0060crates/zeroclaw-providers/src/compatible.rs:5229\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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":4808}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dd3a97030b1dbe955e556bc837be8726e2671e503a0cea299ccb64732417a48"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/zeroclaw-providers/src/dispatch.rs:518-532 | crates/zeroclaw-providers/src/dispatch.rs:551-565 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/dispatch.rs:518\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/zeroclaw-providers/src/dispatch.rs"},"region":{"startLine":518}}}],"partialFingerprints":{"codehealthFindingId/v1":"6005e0f90f80e0050be4ca7ab97687be0807e80ce8a0c5895b840c5841a19800"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/zeroclaw-providers/src/multimodal.rs:2883-2897 | crates/zeroclaw-providers/src/multimodal.rs:2936-2950 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-providers/src/multimodal.rs"},"region":{"startLine":2883}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c90931b1e7901457d86a782ba2213bae9eb0d047cfbf78d63647a5869ffa3f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201315 lines \u00D7 2): crates/zeroclaw-providers/src/multimodal.rs:3194-3208 | crates/zeroclaw-providers/src/multimodal.rs:3282-3291 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/multimodal.rs:3194\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/zeroclaw-providers/src/multimodal.rs"},"region":{"startLine":3194}}}],"partialFingerprints":{"codehealthFindingId/v1":"1eb3c1990d0a172d758a0eb9c40f06fb5e776ac13f94d1d22ff0dd2f04fddd6b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/zeroclaw-providers/src/reliable.rs:3276-3290 | crates/zeroclaw-providers/src/reliable.rs:3648-3662 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/reliable.rs:3276\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/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":3276}}}],"partialFingerprints":{"codehealthFindingId/v1":"a88814d2db3890c85dc3320be54d7673199036520f1b68990a65f01950e4d0d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/loop_.rs:1948-1962 | crates/zeroclaw-runtime/src/agent/loop_.rs:4008-4021 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":1948}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8a13e0d16bc412ce9c0002ab7c12ff7233975c2c9bb65cf1184bb2ef28edca1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/loop_.rs:2519-2533 | crates/zeroclaw-runtime/src/agent/loop_.rs:3183-3197 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/agent/loop_.rs:2519\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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":2519}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d887fb1606a07e35e07a237d930207dda1c6f1704a9f36dfd9080d5b2324e5e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/zeroclaw-runtime/src/i18n.rs:251-265 | crates/zeroclaw-tools/src/i18n.rs:120-134 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/i18n.rs\u0060 and \u0060crates/zeroclaw-tools/src/i18n.rs\u0060 as WHOLE FILES: this scan already matched 5 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/zeroclaw-runtime/src/i18n.rs:251\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/zeroclaw-runtime/src/i18n.rs"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bfe9c5c5cdff6899f34b31cfa4aea3ad5efbcacf687f04842af5ae75c5e347e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/zeroclaw-runtime/src/rpc/dispatch.rs:4784-4798 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:5217-5231 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":4784}}}],"partialFingerprints":{"codehealthFindingId/v1":"87076c71360e233b18833d0af9406a4987dbc371047951ccc51999642b91e421"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/zeroclaw-runtime/src/security/bubblewrap.rs:68-82 | crates/zeroclaw-runtime/src/security/firejail.rs:164-178 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/security/bubblewrap.rs\u0060 and \u0060crates/zeroclaw-runtime/src/security/firejail.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 53 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/zeroclaw-runtime/src/security/bubblewrap.rs"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac5aaafd2456cb8cf8c576f346e8737e0517cdfc6218cbffa1c7fa7297e3d819"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/zeroclaw-runtime/src/skills/improver.rs:169-183 | crates/zeroclaw-runtime/src/tools/skill_manage.rs:767-781 \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/zeroclaw-runtime/src/skills/improver.rs"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4b5933b390690a97bb08edda837288f38dbc49c100a9d7da66eef214582e086"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201315 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/approval/broker.rs:358-367 | crates/zeroclaw-runtime/src/sop/approval/broker.rs:451-465 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/approval/broker.rs:358\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/zeroclaw-runtime/src/sop/approval/broker.rs"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5de0222d96d8b22bb8627cc229c728d2ec9aa7569f02c770575dffc5c5025dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/engine.rs:869-883 | crates/zeroclaw-runtime/src/sop/engine.rs:933-947 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/engine.rs:869\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":869}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce484b320e446165a3aed55094538cd988b8c2187d822db1f60229f1adcedf87"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201315 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/read_skill.rs:54-68 | crates/zeroclaw-runtime/src/tools/sop_execute.rs:97-106 \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/zeroclaw-runtime/src/tools/read_skill.rs:54\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/zeroclaw-runtime/src/tools/read_skill.rs"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"800eda47c3c31cc816fce7d913aa4783362430423a8885b1be7054d338613d10"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/zeroclaw-tool-call-parser/src/lib.rs:2493-2507 | crates/zeroclaw-tool-call-parser/src/lib.rs:2523-2537 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tool-call-parser/src/lib.rs:2493\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/zeroclaw-tool-call-parser/src/lib.rs"},"region":{"startLine":2493}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1d4e80964c705e33bfbe203e04ddd07e7dcf369c743994ffefdf3e93ef0272b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/zeroclaw-tools/src/backup_tool.rs:1149-1163 | crates/zeroclaw-tools/src/backup_tool.rs:1290-1304 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/backup_tool.rs:1149\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/zeroclaw-tools/src/backup_tool.rs"},"region":{"startLine":1149}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dfe0db8c90f29233d50b147b7f399965dd25ead4d9880e74ce2abf6f227d080"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): crates/zeroclaw-tools/src/model_routing_config.rs:335-364 | crates/zeroclaw-tools/src/proxy_config.rs:128-157 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/model_routing_config.rs\u0060 and \u0060crates/zeroclaw-tools/src/proxy_config.rs\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 143 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/zeroclaw-tools/src/model_routing_config.rs"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"813c61b9ddc16e57f4165f43b041b4f27890fbfa9de92b82c25e0b0eab411c9a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): xtask/src/generate/container.rs:32-46 | xtask/src/generate/packaging.rs:16-30 \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":"xtask/src/generate/container.rs"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"31fa2f383369ae0844fed8de32d097e765a8a9345020d1fa501fca4c21720e19"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 6): crates/zeroclaw-gateway/src/api_webauthn.rs:69-82 | crates/zeroclaw-gateway/src/api_webauthn.rs:109-122 | crates/zeroclaw-gateway/src/api_webauthn.rs:163-176 | crates/zeroclaw-gateway/src/api_webauthn.rs:200-213 | crates/zeroclaw-gateway/src/api_webauthn.rs:249-262 | crates/zeroclaw-gateway/src/api_webauthn.rs:294-307 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/zeroclaw-gateway/src/api_webauthn.rs:291\u0060 calls \u0060Path\u0060 and \u0060crates/zeroclaw-gateway/src/api_webauthn.rs:246\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/zeroclaw-gateway/src/api_webauthn.rs"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"32a6d4c5c42dc7e4589ca0176b64818d5a85366957dc0e994bfa6921648e88b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 4): crates/zeroclaw-providers/src/openai.rs:643-656 | crates/zeroclaw-providers/src/openai.rs:731-744 | crates/zeroclaw-providers/src/openrouter.rs:843-856 | crates/zeroclaw-providers/src/openrouter.rs:1080-1093 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/openai.rs\u0060 and \u0060crates/zeroclaw-providers/src/openrouter.rs\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 145 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/zeroclaw-providers/src/openai.rs:643\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/zeroclaw-providers/src/openai.rs"},"region":{"startLine":643}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8bd33906c49ddeee8b026ca695b994434268fa079a13e7c3116de56e4f2f5f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 4): crates/zeroclaw-providers/src/reliable.rs:2547-2560 | crates/zeroclaw-providers/src/reliable.rs:2844-2857 | crates/zeroclaw-providers/src/reliable.rs:3284-3297 | crates/zeroclaw-providers/src/reliable.rs:3656-3669 \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/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":2547}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bde1febbc6dd243fbeb2158d051aaf73fa469773635a978117dae0c0ff2963a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 4): crates/zeroclaw-runtime/src/tools/schedule.rs:130-143 | crates/zeroclaw-runtime/src/tools/schedule.rs:160-173 | crates/zeroclaw-runtime/src/tools/schedule.rs:183-196 | crates/zeroclaw-runtime/src/tools/schedule.rs:206-219 \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/zeroclaw-runtime/src/tools/schedule.rs:130\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/zeroclaw-runtime/src/tools/schedule.rs"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"47ef460d6be14e0b9f62d94fc1ecbaf12b67bf671454dbf6872de4fb30e1fe95"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201314 lines \u00D7 4): crates/zeroclaw-runtime/src/tunnel/cloudflare.rs:88-97 | crates/zeroclaw-runtime/src/tunnel/custom.rs:61-74 | crates/zeroclaw-runtime/src/tunnel/ngrok.rs:75-84 | crates/zeroclaw-runtime/src/tunnel/openvpn.rs:89-98 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/tunnel/cloudflare.rs\u0060 and \u0060crates/zeroclaw-runtime/src/tunnel/ngrok.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 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/zeroclaw-runtime/src/tunnel/cloudflare.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/zeroclaw-runtime/src/tunnel/cloudflare.rs"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bd46bcfaf8b006c0b4bcb759009e7dabb4077404b966e77a545be8d24acd723"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): apps/zerocode/src/i18n.rs:248-261 | crates/zeroclaw-runtime/src/i18n.rs:260-273 | crates/zeroclaw-tools/src/i18n.rs:129-142 \u2014 before extracting anything, compare \u0060apps/zerocode/src/i18n.rs\u0060 and \u0060crates/zeroclaw-tools/src/i18n.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. 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/zeroclaw-runtime/src/i18n.rs:260\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":"apps/zerocode/src/i18n.rs"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"718b17f56e1f439ee1fdc8b0f7b79f035b5f562d520467189c0fb736f6ec704d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201314 lines \u00D7 3): crates/zeroclaw-channels/src/orchestrator/mod.rs:13720-13730 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15386-15393 | crates/zeroclaw-gateway/src/lib.rs:1987-2000 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs\u0060 and \u0060crates/zeroclaw-gateway/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 96 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/zeroclaw-channels/src/orchestrator/mod.rs:13720\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":13720}}}],"partialFingerprints":{"codehealthFindingId/v1":"af307ac63f96666da8aeb03b85e32f31fa690d293e4df6899d8c14b704427c11"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): crates/zeroclaw-channels/src/qq.rs:186-199 | crates/zeroclaw-channels/src/telegram.rs:1079-1092 | crates/zeroclaw-channels/src/wechat.rs:377-390 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/qq.rs\u0060 and \u0060crates/zeroclaw-channels/src/telegram.rs\u0060 as WHOLE FILES: this scan already matched 3 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. 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/zeroclaw-channels/src/qq.rs:186\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/zeroclaw-channels/src/qq.rs"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"11985fd621d47f1b7963323ce437fc4d5b487e81e6cfb0d1b0289dfd4291a0f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): crates/zeroclaw-providers/src/auth/mod.rs:273-286 | crates/zeroclaw-providers/src/auth/mod.rs:370-383 | crates/zeroclaw-providers/src/auth/mod.rs:458-471 \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/zeroclaw-providers/src/auth/mod.rs:273\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/zeroclaw-providers/src/auth/mod.rs:456\u0060 calls \u0060Some\u0060, \u0060as_str\u0060 and \u0060crates/zeroclaw-providers/src/auth/mod.rs:368\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/zeroclaw-providers/src/auth/mod.rs"},"region":{"startLine":273}}}],"partialFingerprints":{"codehealthFindingId/v1":"1168f285ff06e26d8bcaa312ad54c5509ccf8b2403f8303e38bad1f274be69d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): crates/zeroclaw-providers/src/azure_openai.rs:469-482 | crates/zeroclaw-providers/src/openai.rs:447-460 | crates/zeroclaw-providers/src/openrouter.rs:451-464 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/azure_openai.rs\u0060 and \u0060crates/zeroclaw-providers/src/openai.rs\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 226 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/zeroclaw-providers/src/azure_openai.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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/zeroclaw-providers/src/azure_openai.rs:468\u0060 calls \u0060effective_content\u0060 and \u0060crates/zeroclaw-providers/src/openrouter.rs:450\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/zeroclaw-providers/src/azure_openai.rs"},"region":{"startLine":469}}}],"partialFingerprints":{"codehealthFindingId/v1":"9befc26f1e5ecbc2e90348f9b170292bdb713ec48565c8e4884d058de8482d51"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201314 lines \u00D7 2): apps/zerocode/src/config/keybindings.rs:72-85 | apps/zerocode/src/config/keybindings.rs:108-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 \u0060apps/zerocode/src/config/keybindings.rs:72\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":"apps/zerocode/src/config/keybindings.rs"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"676f6c41bbc70a16f1adfce06747297ee046231995e7b3407cf7d4bb30fcab13"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): apps/zerocode/src/config_manager.rs:2903-2916 | apps/zerocode/src/config_manager.rs:3025-3038 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/config_manager.rs:2903\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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":2903}}}],"partialFingerprints":{"codehealthFindingId/v1":"82991161d1d435b84e6657f41f383b118599928b8627cdc9df8a115b7618734d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): apps/zerocode/src/jsonrpc.rs:248-261 | crates/zeroclaw-api/src/jsonrpc.rs:404-417 \u2014 before extracting anything, compare \u0060apps/zerocode/src/jsonrpc.rs\u0060 and \u0060crates/zeroclaw-api/src/jsonrpc.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 \u0060apps/zerocode/src/jsonrpc.rs:248\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":"apps/zerocode/src/jsonrpc.rs"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe026561247b2cbd8db4294d0fd5787953b8bd846c915144fa2ca15e875e0527"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-channels/src/acp_channel.rs:98-111 | crates/zeroclaw-channels/src/acp_channel.rs:500-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/acp_channel.rs:98\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/zeroclaw-channels/src/acp_channel.rs"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"93a7a8a64cbb20c9a5f02ff8fa458f1510b8bc7723f4de9ba5bae61a56851876"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-channels/src/discord/mod.rs:2647-2660 | crates/zeroclaw-channels/src/discord/mod.rs:3059-3072 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/discord/mod.rs:2647\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":2647}}}],"partialFingerprints":{"codehealthFindingId/v1":"05eb0e3bd8b05f373c52187d1d168a9bb644730567e969328829af8b0b517be4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201314 lines \u00D7 2): crates/zeroclaw-channels/src/email_channel.rs:86-99 | crates/zeroclaw-channels/src/gmail_push.rs:373-383 \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/zeroclaw-channels/src/email_channel.rs"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"824e8937c30b2590a2aa22c7861f663f90c14f0f96519d4934a694971c8c78cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): crates/zeroclaw-channels/src/email_channel.rs:489-501 | crates/zeroclaw-channels/src/email_channel.rs:542-555 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/email_channel.rs:489\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/zeroclaw-channels/src/email_channel.rs"},"region":{"startLine":489}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd9de9ffbc8e2432f4cec14a787ca7c47a7b8b075edc725e1e8c5da5a2aa9770"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1124-1137 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1473-1486 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1124\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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":1124}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcea76624b1aef33b9888efc46ea88a6aeecb7f9a7e461857178566fc30e626d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:10821-10834 | crates/zeroclaw-channels/src/orchestrator/mod.rs:11326-11338 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:10821\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":10821}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b0f30c432c10786d7e3bfbf47662e589debe24d3c210599a8439f3d9074c397"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:13986-14003 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15676-15693 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":13986}}}],"partialFingerprints":{"codehealthFindingId/v1":"90c33d4970dbb4377bd56506f122a26c78038ce072e61e725025819c484ac593"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201314 lines \u00D7 2): crates/zeroclaw-channels/src/slack.rs:4241-4251 | crates/zeroclaw-channels/src/slack.rs:4267-4280 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/slack.rs:4241\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":4241}}}],"partialFingerprints":{"codehealthFindingId/v1":"22825a245286d1b3ac4a65c6e1045b71ecb683e39cf73a554d2dc68cb115ea29"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-channels/src/telegram.rs:978-991 | crates/zeroclaw-channels/src/wechat.rs:305-318 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/telegram.rs\u0060 and \u0060crates/zeroclaw-channels/src/wechat.rs\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 158 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/zeroclaw-channels/src/telegram.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":978}}}],"partialFingerprints":{"codehealthFindingId/v1":"b85f800b9c5029b72f16ae52d6077cb4e373b2717c1818050885018d5c27d05d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201314 lines \u00D7 2): crates/zeroclaw-channels/src/telegram.rs:5695-5706 | crates/zeroclaw-channels/src/telegram.rs:6110-6123 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":5695}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfb7f4cfd5f95b0236ab1791c5cbb33b5350e329260ac29d0fe100120f466152"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-channels/src/wecom_ws.rs:1135-1148 | crates/zeroclaw-channels/src/wecom_ws.rs:1170-1183 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/wecom_ws.rs"},"region":{"startLine":1135}}}],"partialFingerprints":{"codehealthFindingId/v1":"18b38953288b21c9c98a9ca3898e9db192d7235bc0f1156b55ab101f51d03b9e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-channels/src/wecom_ws.rs:1207-1220 | crates/zeroclaw-channels/src/wecom_ws.rs:2528-2541 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/wecom_ws.rs:1207\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/zeroclaw-channels/src/wecom_ws.rs"},"region":{"startLine":1207}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b9a41e7e4f4f682f2e6ce941741acdb52dd23bc6c1868ca95dc2780f395b272"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-hardware/src/gpio.rs:92-105 | crates/zeroclaw-hardware/src/gpio.rs:195-208 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-hardware/src/gpio.rs"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"8297bf24c971d0ed1050807551217e09b21805cf1ca6d1a36f5bae322a3a8647"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-infra/src/session_sqlite.rs:688-701 | crates/zeroclaw-infra/src/session_sqlite.rs:872-885 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-infra/src/session_sqlite.rs:688\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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":688}}}],"partialFingerprints":{"codehealthFindingId/v1":"be64eef27f7cecaef56c08c8e9473b18b156e56500826ae3c484fcc8aba6fa41"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-memory/src/knowledge_graph.rs:489-502 | crates/zeroclaw-memory/src/knowledge_graph.rs:522-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/zeroclaw-memory/src/knowledge_graph.rs:489\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/zeroclaw-memory/src/knowledge_graph.rs"},"region":{"startLine":489}}}],"partialFingerprints":{"codehealthFindingId/v1":"c45b0b10b87565dbdc5e6f401a4ab6866a263f4159ed10ef214c4ae48d235952"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-memory/src/sqlite.rs:772-785 | crates/zeroclaw-memory/src/sqlite.rs:928-941 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-memory/src/sqlite.rs:772\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/zeroclaw-memory/src/sqlite.rs:771\u0060 calls \u0060IN\u0060 and \u0060crates/zeroclaw-memory/src/sqlite.rs:926\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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":772}}}],"partialFingerprints":{"codehealthFindingId/v1":"db1ea3cbd90b098c176b4b186d0bdfb0d0c66d1256815b9aea969db0a0e12cab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-providers/src/auth/mod.rs:1271-1284 | crates/zeroclaw-providers/src/auth/mod.rs:1526-1539 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/auth/mod.rs:1271\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/zeroclaw-providers/src/auth/mod.rs"},"region":{"startLine":1271}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8ff85bab506c3ebb2be5953e5656f3a486cf1f9c4f5e0cf1e3f83f10f94e231"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-providers/src/auth/mod.rs:1768-1781 | crates/zeroclaw-providers/src/auth/mod.rs:1832-1845 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-providers/src/auth/mod.rs:1847\u0060 calls \u0060clear_pending_oauth_login\u0060 and \u0060crates/zeroclaw-providers/src/auth/mod.rs:1783\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/zeroclaw-providers/src/auth/mod.rs"},"region":{"startLine":1768}}}],"partialFingerprints":{"codehealthFindingId/v1":"c28077b7ba2d9210d118fee32aace365f42af4d9144c72185fec8491eb8ec402"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-providers/src/auth/mod.rs:1783-1796 | crates/zeroclaw-providers/src/auth/mod.rs:1848-1861 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/auth/mod.rs:1783\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/zeroclaw-providers/src/auth/mod.rs:1847\u0060 calls \u0060clear_pending_oauth_login\u0060 and \u0060crates/zeroclaw-providers/src/auth/mod.rs:1782\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/zeroclaw-providers/src/auth/mod.rs"},"region":{"startLine":1783}}}],"partialFingerprints":{"codehealthFindingId/v1":"06505e24372f74963dcb58daea0348756e6265ccd40878444fd2d8927a8402dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-providers/src/dispatch.rs:911-924 | crates/zeroclaw-providers/src/dispatch.rs:1293-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. 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/zeroclaw-providers/src/dispatch.rs"},"region":{"startLine":911}}}],"partialFingerprints":{"codehealthFindingId/v1":"4eedee91ff6b678dbf4432b7fa45691c10d747600dae72f610d89af700ee93c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201314 lines \u00D7 2): crates/zeroclaw-providers/src/hailo_ollama.rs:151-161 | crates/zeroclaw-providers/src/hailo_ollama.rs:320-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/zeroclaw-providers/src/hailo_ollama.rs:320\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/zeroclaw-providers/src/hailo_ollama.rs"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9087de30b3724293b1ae4a447261758a0f19687c81ca4175a065b6ae367db6a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-providers/src/lib.rs:410-423 | crates/zeroclaw-providers/src/lib.rs:555-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/zeroclaw-providers/src/lib.rs:410\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/zeroclaw-providers/src/lib.rs"},"region":{"startLine":410}}}],"partialFingerprints":{"codehealthFindingId/v1":"c44a1c2124053dd8b40e36263450afff7e0bf0273085081a67186735874bf76f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/agent.rs:1973-1986 | crates/zeroclaw-runtime/src/agent/agent.rs:4441-4454 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/agent/agent.rs:1973\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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":1973}}}],"partialFingerprints":{"codehealthFindingId/v1":"f64ca8ea0941a261d8157c92468c856295e40777354cede5f6ea8b756eeb3fb6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/tool_execution.rs:245-266 | crates/zeroclaw-runtime/src/agent/tool_execution.rs:277-298 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/agent/tool_execution.rs:245\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/zeroclaw-runtime/src/agent/tool_execution.rs"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"a464ea07937ed0a5d87312b85359fdf6cdd6acb9484f85e008f81c99683149bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/turn/mod.rs:5067-5079 | crates/zeroclaw-runtime/src/sop/executor.rs:1329-1342 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/agent/turn/mod.rs\u0060 and \u0060crates/zeroclaw-runtime/src/sop/executor.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/zeroclaw-runtime/src/agent/turn/mod.rs:5067\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/zeroclaw-runtime/src/agent/turn/mod.rs"},"region":{"startLine":5067}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfe1ea3dd5c2a051a5f5b2eff93321fa288c4bea5517c34722bffdf75f3f9505"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): crates/zeroclaw-runtime/src/cron/store.rs:292-305 | crates/zeroclaw-runtime/src/cron/store.rs:509-521 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/cron/store.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/zeroclaw-runtime/src/cron/store.rs"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"b62c54eaf0b8d97fc76bc72b0ea2171d6af376c77f606612dcd8378e9ab87991"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/zeroclaw-runtime/src/daemon/mod.rs:488-504 | crates/zeroclaw-runtime/src/daemon/mod.rs:523-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/daemon/mod.rs:488\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/zeroclaw-runtime/src/daemon/mod.rs"},"region":{"startLine":488}}}],"partialFingerprints":{"codehealthFindingId/v1":"798a578f4ccd1e20e2d5a8e6f25065afe72bb1205b9fdf1380db664e5feaaed6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201314 lines \u00D7 2): crates/zeroclaw-runtime/src/doctor/mod.rs:1305-1318 | crates/zeroclaw-runtime/src/doctor/mod.rs:1340-1350 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/doctor/mod.rs:1305\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/zeroclaw-runtime/src/doctor/mod.rs"},"region":{"startLine":1305}}}],"partialFingerprints":{"codehealthFindingId/v1":"b22ce4648bfdd9df98285d6754501d6d6f9ef6cbe65615d80578aa01d0f34735"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-runtime/src/skills/mod.rs:3105-3118 | crates/zeroclaw-runtime/src/skills/mod.rs:3320-3333 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/skills/mod.rs:3105\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/zeroclaw-runtime/src/skills/mod.rs"},"region":{"startLine":3105}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ea014d6339abcd52437af8e373d5e083099a3676bfe6b09c57bae29777d56a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-runtime/src/skills/mod.rs:3282-3295 | crates/zeroclaw-runtime/src/skills/mod.rs:3404-3417 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/skills/mod.rs:3282\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/zeroclaw-runtime/src/skills/mod.rs"},"region":{"startLine":3282}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d4dd142be9bb11643224b47f2beff2a303325bb89de7a64b8a8f0774b8d3710"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201314 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/engine.rs:2404-2417 | crates/zeroclaw-runtime/src/sop/engine.rs:5082-5092 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/engine.rs:5082\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 \u0060crate) fn reserve_run_slot(\u0026mut\u0060 in one and \u0060\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":2404}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7ec0231fe420966d52eab1f36730b8d4a86d684644d886ac3a72b852eb7bdd3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/engine.rs:5498-5511 | crates/zeroclaw-runtime/src/sop/engine.rs:5590-5603 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/engine.rs:5498\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":5498}}}],"partialFingerprints":{"codehealthFindingId/v1":"35890b218cd7de5f4050ab799dd7988d963bd77fb55db9f006982e1a1d1d7641"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/delegate.rs:3219-3232 | crates/zeroclaw-runtime/src/tools/delegate.rs:3555-3568 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/tools/delegate.rs:3219\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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":3219}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac04463b528acdb1e49dbf64bf1383829d7d379bb678c3b3006996b9fbf99dec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-tool-call-parser/src/lib.rs:1169-1182 | crates/zeroclaw-tool-call-parser/src/lib.rs:1328-1341 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tool-call-parser/src/lib.rs:1169\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/zeroclaw-tool-call-parser/src/lib.rs"},"region":{"startLine":1169}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f07ca56ad07ff7ace8e15e72787e3596e2d40352c020e82f40f59dbc7951721"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-tool-call-parser/src/lib.rs:2349-2362 | crates/zeroclaw-tool-call-parser/src/lib.rs:2397-2410 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-tool-call-parser/src/lib.rs"},"region":{"startLine":2349}}}],"partialFingerprints":{"codehealthFindingId/v1":"c428bb537c16d2da27d8a85e2da8a6d135cb4f0849c7cf1e7193777df4b2de99"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-tools/src/backup_tool.rs:1032-1045 | crates/zeroclaw-tools/src/backup_tool.rs:1072-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/zeroclaw-tools/src/backup_tool.rs:1032\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/zeroclaw-tools/src/backup_tool.rs:1069\u0060 calls \u0060join\u0060 and \u0060crates/zeroclaw-tools/src/backup_tool.rs:1029\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/zeroclaw-tools/src/backup_tool.rs"},"region":{"startLine":1032}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfafb63dbcdeafa606e907de4732ef4d7d8fd10d2d98ad1a3d70795041321939"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-tools/src/canvas.rs:82-95 | crates/zeroclaw-tools/src/canvas.rs:149-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/canvas.rs"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"73e5528f5ccafdd2274b86ed8fc3c6db4613b3f10ceb71c875a3447c42da0ba0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-tools/src/content_search.rs:764-777 | crates/zeroclaw-tools/src/content_search.rs:819-832 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/content_search.rs:764\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/zeroclaw-tools/src/content_search.rs"},"region":{"startLine":764}}}],"partialFingerprints":{"codehealthFindingId/v1":"9978e5c5762662bc8d84a107ebde271815fe50798a7854b35b3b50415e5628ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-tools/src/data_management.rs:294-307 | crates/zeroclaw-tools/src/data_management.rs:383-396 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/data_management.rs:294\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/zeroclaw-tools/src/data_management.rs"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"be0fd2ee8e162bf78ad6dfc350cc43fb98b6ef7b45f9a17668b03040c0f96bac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-tools/src/mcp_client.rs:979-992 | crates/zeroclaw-tools/src/mcp_client.rs:1131-1144 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/mcp_client.rs:979\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/zeroclaw-tools/src/mcp_client.rs:978\u0060 calls \u0060stub_server\u0060 and \u0060crates/zeroclaw-tools/src/mcp_client.rs:1129\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/zeroclaw-tools/src/mcp_client.rs"},"region":{"startLine":979}}}],"partialFingerprints":{"codehealthFindingId/v1":"25d9e85d94871cf0d225512957f8f2ee4679e7e0f9561c1fbcabc77bcc683802"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-tools/src/mcp_prompts_tool.rs:79-92 | crates/zeroclaw-tools/src/mcp_resources_tool.rs:78-91 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/mcp_prompts_tool.rs\u0060 and \u0060crates/zeroclaw-tools/src/mcp_resources_tool.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. 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/zeroclaw-tools/src/mcp_prompts_tool.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/mcp_prompts_tool.rs"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"2556ce467ff77528070091d51fdb482044c2d73444426dc2451f12c75db3df0b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201314 lines \u00D7 2): src/alias_cli/export.rs:806-819 | src/alias_cli/export.rs:927-935 \u2014 both copies are in the same file, so extract the block 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/alias_cli/export.rs"},"region":{"startLine":806}}}],"partialFingerprints":{"codehealthFindingId/v1":"32230e64b3b39026ebfd4baf0f46ae6bbfed77f5a85c1968665af0e67ae4e487"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): src/skills/mod.rs:427-440 | src/skills/mod.rs:450-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/skills/mod.rs"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b8b6d6dcc5ddfe56e1ba9dcf5e6cac36d8a4dfb22ad29de3749e5cdc2134cb5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 4): crates/zeroclaw-infra/src/acp_session_store.rs:346-358 | crates/zeroclaw-infra/src/acp_session_store.rs:382-394 | crates/zeroclaw-infra/src/acp_session_store.rs:417-429 | crates/zeroclaw-infra/src/acp_session_store.rs:530-542 \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/zeroclaw-infra/src/acp_session_store.rs:346\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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"c90de528e769df1ee95243bf279db48ec9c6c0359327ecc2694506b3a4213125"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 4): crates/zeroclaw-providers/src/azure_openai.rs:433-445 | crates/zeroclaw-providers/src/copilot.rs:408-420 | crates/zeroclaw-providers/src/openai.rs:411-423 | crates/zeroclaw-providers/src/openrouter.rs:350-362 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/azure_openai.rs\u0060 and \u0060crates/zeroclaw-providers/src/copilot.rs\u0060 as WHOLE FILES: this scan already matched 5 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. 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/zeroclaw-providers/src/azure_openai.rs:433\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/zeroclaw-providers/src/azure_openai.rs"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"2faf2d1087ec79b1e10855033a09955feec29e71eba50ca5ebdefdbd9136018e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 4): crates/zeroclaw-tools/src/claude_code.rs:217-230 | crates/zeroclaw-tools/src/codex_cli.rs:178-191 | crates/zeroclaw-tools/src/gemini_cli.rs:158-171 | crates/zeroclaw-tools/src/opencode_cli.rs:158-171 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/claude_code.rs\u0060 and \u0060crates/zeroclaw-tools/src/codex_cli.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 94 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/zeroclaw-tools/src/claude_code.rs:217\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/zeroclaw-tools/src/claude_code.rs"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c5f72f912c2162fbea336e6c4b214b2d2b490d8a5e45cbb8d9082d90aa04423"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201313 lines \u00D7 3): crates/zeroclaw-channels/src/bluesky.rs:572-584 | crates/zeroclaw-channels/src/lark.rs:2028-2038 | crates/zeroclaw-channels/src/mattermost.rs:952-961 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/bluesky.rs\u0060 and \u0060crates/zeroclaw-channels/src/mattermost.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/zeroclaw-channels/src/bluesky.rs:572\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/zeroclaw-channels/src/bluesky.rs"},"region":{"startLine":572}}}],"partialFingerprints":{"codehealthFindingId/v1":"23b811d5e10074b640b9d57ac740d6204498f76e2206ed479cf7d3410b0dc8f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): crates/zeroclaw-channels/src/dingtalk.rs:372-384 | crates/zeroclaw-channels/src/mochat.rs:243-255 | crates/zeroclaw-channels/src/twitter.rs:356-368 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/mochat.rs\u0060 and \u0060crates/zeroclaw-channels/src/twitter.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 115 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/zeroclaw-channels/src/dingtalk.rs:372\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/zeroclaw-channels/src/dingtalk.rs"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"98c3fe9979f2104735e37c0de9f3fc643a09d9939ed5e2cb641a155fd3a44fcd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 3): crates/zeroclaw-infra/src/acp_session_store.rs:879-891 | crates/zeroclaw-infra/src/acp_session_store.rs:1134-1145 | crates/zeroclaw-infra/src/acp_session_store.rs:1261-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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/zeroclaw-infra/src/acp_session_store.rs:1257\u0060 calls \u0060is_some\u0060, \u0060Ok\u0060 and \u0060crates/zeroclaw-infra/src/acp_session_store.rs:877\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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":879}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fd7bb032ea2c2c658d45dc671b95ed7265a92db66c4ef0dffea5e3d1a7503ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): crates/zeroclaw-macros/src/lib.rs:581-593 | crates/zeroclaw-macros/src/lib.rs:1011-1023 | crates/zeroclaw-macros/src/lib.rs:1709-1721 \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/zeroclaw-macros/src/lib.rs:581\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/zeroclaw-macros/src/lib.rs"},"region":{"startLine":581}}}],"partialFingerprints":{"codehealthFindingId/v1":"22aa1f080aad97c63756eafc77c8e1d1b9b3a357f62159d2967c7ddade17d134"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 3): crates/zeroclaw-memory/src/hygiene.rs:232-243 | crates/zeroclaw-memory/src/hygiene.rs:281-293 | crates/zeroclaw-memory/src/hygiene.rs:325-336 \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/zeroclaw-memory/src/hygiene.rs:232\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/zeroclaw-memory/src/hygiene.rs"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"d92efa7cfe36a195d57c4ff46b67b84479d94591f2e01be10d077d10906a859f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): crates/zeroclaw-providers/src/compatible.rs:4921-4933 | crates/zeroclaw-providers/src/compatible.rs:5128-5140 | crates/zeroclaw-providers/src/compatible.rs:5282-5294 \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/zeroclaw-providers/src/compatible.rs:4934\u0060 calls \u0060targets_mistral_tool_call_contract\u0060 and \u0060crates/zeroclaw-providers/src/compatible.rs:5143\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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":4921}}}],"partialFingerprints":{"codehealthFindingId/v1":"1679fcff75ab779fc4d929801fce401cff036e402c1c0786de3a284b3e4e28fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): crates/zeroclaw-runtime/src/skills/mod.rs:826-838 | crates/zeroclaw-runtime/src/skills/mod.rs:955-967 | crates/zeroclaw-runtime/src/skills/mod.rs:1086-1098 \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/zeroclaw-runtime/src/skills/mod.rs:826\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/zeroclaw-runtime/src/skills/mod.rs"},"region":{"startLine":826}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dacc73b7c8fe67801d5fe1441f3f6b607b3adafa51838716173c2c32810387d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 3): crates/zeroclaw-tools/src/ask_user.rs:161-172 | crates/zeroclaw-tools/src/escalate.rs:271-282 | crates/zeroclaw-tools/src/poll.rs:259-271 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/ask_user.rs\u0060 and \u0060crates/zeroclaw-tools/src/escalate.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 96 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/zeroclaw-tools/src/ask_user.rs:161\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/zeroclaw-tools/src/ask_user.rs"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"1450588a35b664fb1067b47dbe50ee83dd67546bf0fd6937e8d577e512895315"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): crates/zeroclaw-tools/src/http_request.rs:120-132 | crates/zeroclaw-tools/src/text_browser.rs:215-227 | crates/zeroclaw-tools/src/web_fetch.rs:711-723 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/http_request.rs\u0060 and \u0060crates/zeroclaw-tools/src/web_fetch.rs\u0060 as WHOLE FILES: this scan already matched 9 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":"crates/zeroclaw-tools/src/http_request.rs"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c9ab8af86b6ebf56e1e5c3f703b1d67d042608d1bbb46271917a60d90f7ed36"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): src/cron/mod.rs:238-250 | src/cron/mod.rs:327-339 | src/cron/mod.rs:418-430 \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/cron/mod.rs:238\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/cron/mod.rs"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"18995ffdb47c38290ea22e651681773b5584671387bc19f49302a3ded63e695e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): apps/zerocode/src/chat.rs:2628-2640 | apps/zerocode/src/chat.rs:2643-2654 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/chat.rs:2643\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, \u0060apps/zerocode/src/chat.rs:2656\u0060 calls \u0060mark_dirty_full\u0060 and \u0060apps/zerocode/src/chat.rs:2640\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":"apps/zerocode/src/chat.rs"},"region":{"startLine":2628}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fa7975c01de84685c4175c53e336de8fbe3d4b1ea4a2408e9aba49cbefdc2cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): apps/zerocode/src/client.rs:1867-1879 | apps/zerocode/src/client.rs:2161-2173 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/client.rs:1867\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":"apps/zerocode/src/client.rs"},"region":{"startLine":1867}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c75ca4812797d30b943e084339610d0baedf2e5f0d6db87c75b244eabc7f112"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): apps/zerocode/src/jsonrpc.rs:234-246 | crates/zeroclaw-api/src/jsonrpc.rs:380-392 \u2014 before extracting anything, compare \u0060apps/zerocode/src/jsonrpc.rs\u0060 and \u0060crates/zeroclaw-api/src/jsonrpc.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 \u0060apps/zerocode/src/jsonrpc.rs:234\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":"apps/zerocode/src/jsonrpc.rs"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bc026ff010926f1aa309f0a7c0984ac3f16191dadfdb0b50705187acfad0aec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): apps/zerocode/src/logs.rs:1660-1672 | apps/zerocode/src/logs.rs:1729-1741 \u2014 both copies are in the same file, so extract the block 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":"apps/zerocode/src/logs.rs"},"region":{"startLine":1660}}}],"partialFingerprints":{"codehealthFindingId/v1":"baaf41db6a140fe6d89d5e5734f594f4dbaddbfbb5b466431fd546ed31c27caf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): apps/zerocode/src/wire.rs:210-222 | crates/zeroclaw-config/src/traits.rs:427-439 \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":"apps/zerocode/src/wire.rs"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c9607b1b2b49d2a2587e897497921ac8883f6454218392bdc1e3e8594b2b211"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-api/src/elicitation.rs:133-145 | crates/zeroclaw-api/src/elicitation.rs:172-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-api/src/elicitation.rs:133\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/zeroclaw-api/src/elicitation.rs"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfc588bd40714326843a8fe8332252eb78dcc6c49fcec7cf573dbdeee7771ffa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-channels/src/lark.rs:1874-1886 | crates/zeroclaw-channels/src/lark.rs:2011-2023 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/lark.rs:1874\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/zeroclaw-channels/src/lark.rs:2010\u0060 calls \u0060file_download_url\u0060 and \u0060crates/zeroclaw-channels/src/lark.rs:1872\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":1874}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b97fa34c0352350d2acaca3b8d5346afa647f88a4e4240d007a2aa2afdbaf1c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-channels/src/mochat.rs:155-167 | crates/zeroclaw-channels/src/twitter.rs:254-266 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/mochat.rs\u0060 and \u0060crates/zeroclaw-channels/src/twitter.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 115 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/zeroclaw-channels/src/mochat.rs:155\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/zeroclaw-channels/src/mochat.rs"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b98b07c42e28d3acffa776846c7f3a73d8460b0f80946c93bd30a51fca75432"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:9762-9773 | crates/zeroclaw-channels/src/orchestrator/mod.rs:10663-10675 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:9762\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":9762}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7f1f3837845beda205be4a90644eaabd3ea116ceffa9c2be8c8574fa1032e85"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:13493-13505 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15256-15268 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/orchestrator/mod.rs:15255\u0060 calls \u0060channel_workspace_dir\u0060 and \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:13492\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":13493}}}],"partialFingerprints":{"codehealthFindingId/v1":"babab78a3994333d829d086cacef861d0cf4c2c2ea2e6038d5c36d8dd3f1e8a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-channels/src/telegram.rs:8362-8374 | crates/zeroclaw-channels/src/telegram.rs:8388-8400 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/telegram.rs:8362\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":8362}}}],"partialFingerprints":{"codehealthFindingId/v1":"7640ef49afe4d90b089faf03104d73591120b46598ca4a07a20f6e5e01750ec9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-config/src/schema.rs:22260-22272 | crates/zeroclaw-config/src/schema.rs:22275-22287 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-config/src/schema.rs"},"region":{"startLine":22260}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b761bcf80a6ae5e4bc2a754a611b4220b174193f703e843950c17b201e92c7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201314 lines \u00D7 2): crates/zeroclaw-config/src/schema.rs:23115-23128 | crates/zeroclaw-config/src/schema.rs:23184-23193 \u2014 both copies are in the same file, so extract the block 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. 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/zeroclaw-config/src/schema.rs"},"region":{"startLine":23115}}}],"partialFingerprints":{"codehealthFindingId/v1":"5eb5f6937f08cfac7bfee6dba1816280a4f7ade7b1b013cd896495aa317eedd5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201313 lines \u00D7 2): crates/zeroclaw-gateway/src/acp.rs:74-83 | src/main.rs:10351-10363 \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/zeroclaw-gateway/src/acp.rs:74\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/zeroclaw-gateway/src/acp.rs"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"5be93c0c5b04a1d85158082a46a62abbc7f57190472f1ac4aa016eddafd6b324"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-gateway/src/api_config.rs:1091-1103 | crates/zeroclaw-gateway/src/api_config.rs:2551-2563 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-gateway/src/api_config.rs"},"region":{"startLine":1091}}}],"partialFingerprints":{"codehealthFindingId/v1":"186d3ca28f02e415415c62e13dc9457327f47966ceabcc64f7cf6067aa3a690b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201313 lines \u00D7 2): crates/zeroclaw-gateway/src/api_oidc.rs:625-634 | crates/zeroclaw-gateway/src/api_oidc.rs:846-858 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-gateway/src/api_oidc.rs"},"region":{"startLine":625}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9ea68603f15888555b5800bf50173347c5f47dab5b6ab5ab3f2b9d6d42aa313"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-gateway/src/api_sop_author.rs:441-453 | crates/zeroclaw-gateway/src/api_sop_author.rs:701-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/zeroclaw-gateway/src/api_sop_author.rs:441\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/zeroclaw-gateway/src/api_sop_author.rs"},"region":{"startLine":441}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed63e5b60341ca42c42f35720401deff3fc11427a4213d7276c8769852c7d33b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201313 lines \u00D7 2): crates/zeroclaw-gateway/src/canvas.rs:279-291 | crates/zeroclaw-gateway/src/ws_sop_runs.rs:150-158 \u2014 before extracting anything, compare \u0060crates/zeroclaw-gateway/src/canvas.rs\u0060 and \u0060crates/zeroclaw-gateway/src/ws_sop_runs.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 74 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/zeroclaw-gateway/src/canvas.rs:279\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/zeroclaw-gateway/src/canvas.rs"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d590cac1de60091f881d716a7b1ad2d7a1399ebca884dc246e549fac153f4bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-gateway/src/lib.rs:498-510 | crates/zeroclaw-gateway/src/lib.rs:532-544 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"5663baa8999f2c913bbd28e7e5e4c21748a49bd6900678c128df45fbb9c38ceb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): crates/zeroclaw-memory/src/qdrant.rs:157-168 | crates/zeroclaw-memory/src/qdrant.rs:860-872 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-memory/src/qdrant.rs"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"77d12cc97c4bc704bc148dbbae92158bfae4d6649c87621969275dc8b4655a48"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): crates/zeroclaw-providers/src/anthropic.rs:2743-2754 | crates/zeroclaw-providers/src/anthropic.rs:2825-2837 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/anthropic.rs:2743\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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":2743}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3ca488369e08f1156f0d15ea2ec38503bd757a5cf2e7f155d8b06685da2ec25"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): crates/zeroclaw-providers/src/auth/mod.rs:1430-1442 | crates/zeroclaw-providers/src/auth/mod.rs:1491-1502 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/auth/mod.rs:1430\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/zeroclaw-providers/src/auth/mod.rs"},"region":{"startLine":1430}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f54e678729c4c758af85ec1123cee3540bd27eef691c98168a9159c9347cd7e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-providers/src/azure_openai.rs:589-601 | crates/zeroclaw-providers/src/openai.rs:542-554 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/azure_openai.rs\u0060 and \u0060crates/zeroclaw-providers/src/openai.rs\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 226 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/zeroclaw-providers/src/azure_openai.rs:589\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/zeroclaw-providers/src/azure_openai.rs"},"region":{"startLine":589}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd7ada0914c9889c8a0a0dea4a08c0ff147cdd6b203054116b80e13049da4537"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/zeroclaw-providers/src/gemini_cli.rs:128-142 | crates/zeroclaw-providers/src/kilocli.rs:125-139 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/gemini_cli.rs\u0060 and \u0060crates/zeroclaw-providers/src/kilocli.rs\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 164 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/zeroclaw-providers/src/gemini_cli.rs:128\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/zeroclaw-providers/src/gemini_cli.rs"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"3290ff5f1d6a048951c88b0b55fb276958acafa6a66fc855cb6ae16b06239efd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-providers/src/gemini_cli.rs:255-267 | crates/zeroclaw-providers/src/kilocli.rs:252-264 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/gemini_cli.rs\u0060 and \u0060crates/zeroclaw-providers/src/kilocli.rs\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 164 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/zeroclaw-providers/src/gemini_cli.rs"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c37673db2f0fad5f79b1e1124b95bb97b37844ed81f62d8be8df9ae1312d3e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-providers/src/glm.rs:225-237 | crates/zeroclaw-providers/src/telnyx.rs:246-258 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/glm.rs\u0060 and \u0060crates/zeroclaw-providers/src/telnyx.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 49 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/zeroclaw-providers/src/glm.rs"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad8b87478b7e05a94def5d35a810365e4e1bacd84262b7e3294c998c50eef9bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-providers/src/openai.rs:1380-1392 | crates/zeroclaw-providers/src/openai.rs:1454-1466 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-providers/src/openai.rs"},"region":{"startLine":1380}}}],"partialFingerprints":{"codehealthFindingId/v1":"e639cdc744d20a7dbe5251406b0e5bb7accf43d82366fbc8bced34775c094e04"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/agent.rs:4537-4549 | crates/zeroclaw-runtime/src/agent/agent.rs:5100-5112 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/agent/agent.rs:4537\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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":4537}}}],"partialFingerprints":{"codehealthFindingId/v1":"a75634f7e6648c9963495c30b25d949b6c7c5dd0077712445caee2017be41eeb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/agent.rs:4669-4681 | crates/zeroclaw-runtime/src/agent/agent.rs:5328-5340 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/agent/agent.rs:4669\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/zeroclaw-runtime/src/agent/agent.rs:5342\u0060 calls \u0060take\u0060 and \u0060crates/zeroclaw-runtime/src/agent/agent.rs:4682\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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":4669}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5f0fa9d104909354e901ef84da156dc0f260900f5643eb37cd7fa2ffd99fe59"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/loop_.rs:396-408 | src/main.rs:105-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. 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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c835760a2029ecc4852c8532d229c988db2892b86a9e23974708b465f90cd3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/turn/mod.rs:3098-3110 | crates/zeroclaw-runtime/src/agent/turn/mod.rs:3130-3142 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/agent/turn/mod.rs:3098\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/zeroclaw-runtime/src/agent/turn/mod.rs"},"region":{"startLine":3098}}}],"partialFingerprints":{"codehealthFindingId/v1":"93c22b6e2783cc60820b10d65cf68c8c2f6fb45dce01d59b46a836a20002cf80"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/turn/protocol_detect.rs:183-195 | crates/zeroclaw-tool-call-parser/src/lib.rs:707-719 \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/zeroclaw-runtime/src/agent/turn/protocol_detect.rs:183\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/zeroclaw-runtime/src/agent/turn/protocol_detect.rs"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"7aaf2ad48bdadb8dbdb3129e5d060b172baee5185fcb142f33c9e68fa6f64d62"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-runtime/src/hooks/runner.rs:199-211 | crates/zeroclaw-runtime/src/hooks/runner.rs:258-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/zeroclaw-runtime/src/hooks/runner.rs:199\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/zeroclaw-runtime/src/hooks/runner.rs"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce54b093f872fee186b9a6f5314052c9aeab24ecd6b52c6c124a307132cff9bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201313 lines \u00D7 2): crates/zeroclaw-runtime/src/observability/otel.rs:440-450 | crates/zeroclaw-runtime/src/observability/otel.rs:531-543 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/observability/otel.rs:440\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/zeroclaw-runtime/src/observability/otel.rs"},"region":{"startLine":440}}}],"partialFingerprints":{"codehealthFindingId/v1":"c52db590a5a2f5731d88bb96b2c4e918d9f337c85099e697811b45a7f991a38c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-runtime/src/rpc/dispatch.rs:6132-6144 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:6146-6158 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/rpc/dispatch.rs:6132\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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":6132}}}],"partialFingerprints":{"codehealthFindingId/v1":"66eb0c558a55c14b4b4726e9532b674edf797b00a9c7f43b0f9dfc8e47af8c79"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-runtime/src/rpc/session.rs:1819-1831 | crates/zeroclaw-runtime/src/rpc/session.rs:2602-2614 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/rpc/session.rs:1819\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/zeroclaw-runtime/src/rpc/session.rs"},"region":{"startLine":1819}}}],"partialFingerprints":{"codehealthFindingId/v1":"991789d59cdb85469d72251c94d6264888710d48533c058e8ea53a5e677bc33d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (1\u201313 lines \u00D7 4): crates/zeroclaw-runtime/src/security/estop.rs:83-83 | crates/zeroclaw-runtime/src/security/estop.rs:89-89 | crates/zeroclaw-runtime/src/skills/mod.rs:873-885 | crates/zeroclaw-runtime/src/skills/mod.rs:1001-1013 \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/zeroclaw-runtime/src/security/estop.rs: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. 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/zeroclaw-runtime/src/security/estop.rs:83\u0060 calls \u0060with_outcome\u0060, \u0060with_attrs\u0060, \u0060display\u0060 and \u0060crates/zeroclaw-runtime/src/skills/mod.rs:873\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/zeroclaw-runtime/src/security/estop.rs"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a4cac45137c7b923dd514dd4a9f6834cf721c63680b75146d75cc0adac8cb13"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-runtime/src/skills/mod.rs:1303-1315 | crates/zeroclaw-runtime/src/skills/mod.rs:3051-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/zeroclaw-runtime/src/skills/mod.rs:1303\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/zeroclaw-runtime/src/skills/mod.rs"},"region":{"startLine":1303}}}],"partialFingerprints":{"codehealthFindingId/v1":"3321fae9c83c6e989979413383ce93271f18935615ab824f5e87a4e0ade04bf5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/engine.rs:4370-4382 | crates/zeroclaw-runtime/src/sop/engine.rs:4512-4524 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/engine.rs:4370\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/zeroclaw-runtime/src/sop/engine.rs:4384\u0060 calls \u0060persisted\u0060 and \u0060crates/zeroclaw-runtime/src/sop/engine.rs:4526\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":4370}}}],"partialFingerprints":{"codehealthFindingId/v1":"68b6332b10ef94567bf69604e8c2cfbbb729a14878c1d3226b6be1e163d015e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/engine.rs:4632-4644 | crates/zeroclaw-runtime/src/sop/engine.rs:5693-5705 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/engine.rs:4632\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":4632}}}],"partialFingerprints":{"codehealthFindingId/v1":"907ac26bed90e8cb5cf55e560e06e4a320a0f78f0477c0ef9fdb4841a2da3023"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201313 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/delegate.rs:1911-1920 | crates/zeroclaw-runtime/src/tools/delegate.rs:1958-1970 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":1911}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0f6281c47434e671d64e5e770152eee761e033504551895031222d1677f8f39"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u201313 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/scoped.rs:1064-1076 | crates/zeroclaw-runtime/src/tools/scoped.rs:1344-1349 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/tools/scoped.rs:1064\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/zeroclaw-runtime/src/tools/scoped.rs"},"region":{"startLine":1064}}}],"partialFingerprints":{"codehealthFindingId/v1":"37e0e8f1e73446c26faa63f1ddd63677053acd03afc1521c94e6fa4e88ca7453"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201313 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/sop_advance.rs:246-255 | crates/zeroclaw-runtime/src/tools/sop_execute.rs:164-176 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/tools/sop_advance.rs\u0060 and \u0060crates/zeroclaw-runtime/src/tools/sop_execute.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 73 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/zeroclaw-runtime/src/tools/sop_advance.rs:246\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/zeroclaw-runtime/src/tools/sop_advance.rs"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb7685d6a046aade31d39afab8e89cab1f3cf4ce67dab697ce99269a0181d654"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201313 lines \u00D7 2): crates/zeroclaw-runtime/src/tunnel/ngrok.rs:52-62 | crates/zeroclaw-runtime/src/tunnel/pinggy.rs:62-74 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/tunnel/ngrok.rs\u0060 and \u0060crates/zeroclaw-runtime/src/tunnel/pinggy.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 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/zeroclaw-runtime/src/tunnel/ngrok.rs:52\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/zeroclaw-runtime/src/tunnel/ngrok.rs"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"98ac6d43dc3811e294ce7fccb8707813da51df47b9d3526c29cd8543bccc6417"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201313 lines \u00D7 2): crates/zeroclaw-tool-call-parser/src/lib.rs:1208-1220 | src/main.rs:9173-9183 \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/zeroclaw-tool-call-parser/src/lib.rs:1208\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/zeroclaw-tool-call-parser/src/lib.rs:1220\u0060 calls \u0060Some\u0060, \u0060push\u0060 and \u0060src/main.rs:9183\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/zeroclaw-tool-call-parser/src/lib.rs"},"region":{"startLine":1208}}}],"partialFingerprints":{"codehealthFindingId/v1":"0595b81367339adbf8123718fe39146c02d00050bb560039a3cd4c477bf7b5ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-tools/src/backup_tool.rs:613-625 | crates/zeroclaw-tools/src/backup_tool.rs:637-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/zeroclaw-tools/src/backup_tool.rs:613\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/zeroclaw-tools/src/backup_tool.rs"},"region":{"startLine":613}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d55b7d6b0c6f11a54cba41632693397020ba107244cc4a832ee11e1effec869"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-tools/src/file_write.rs:222-234 | crates/zeroclaw-tools/src/file_write.rs:242-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/file_write.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. 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/zeroclaw-tools/src/file_write.rs"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad8be1d1ac558ddbb83016fe5d3a5c89b5e5c3dfa158dfea985c9e58e98afbdc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-tools/src/model_routing_config.rs:122-134 | crates/zeroclaw-tools/src/proxy_config.rs:50-62 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/model_routing_config.rs\u0060 and \u0060crates/zeroclaw-tools/src/proxy_config.rs\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 143 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/zeroclaw-tools/src/model_routing_config.rs:122\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/zeroclaw-tools/src/model_routing_config.rs"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a2b8c16594ca2acd6971b4633c1b180452e02ca7dd68c4dbd3d21bbb97cbfbf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-tools/src/model_routing_config.rs:389-401 | crates/zeroclaw-tools/src/model_routing_config.rs:421-433 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/model_routing_config.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/zeroclaw-tools/src/model_routing_config.rs"},"region":{"startLine":389}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff4f665c840ff673178971c70fccce874643eb4119193bf08e569ae786a6b545"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-tools/src/pipeline.rs:389-401 | crates/zeroclaw-tools/src/weather_tool.rs:430-442 \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/zeroclaw-tools/src/pipeline.rs:389\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/zeroclaw-tools/src/pipeline.rs"},"region":{"startLine":389}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dfe97a54e2318fd2ffd5a047a07526168bee6b4004725242504dc28d114805b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-tools/src/text_browser.rs:420-432 | crates/zeroclaw-tools/src/web_fetch.rs:859-871 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/text_browser.rs\u0060 and \u0060crates/zeroclaw-tools/src/web_fetch.rs\u0060 as WHOLE FILES: this scan already matched 4 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. 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/zeroclaw-tools/src/text_browser.rs:420\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/zeroclaw-tools/src/text_browser.rs"},"region":{"startLine":420}}}],"partialFingerprints":{"codehealthFindingId/v1":"35308323666c27e92a9a676fafbb38c56094ce66908215c7a482b6b3770154a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): src/main.rs:2319-2331 | src/main.rs:2585-2597 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/main.rs:2319\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/main.rs"},"region":{"startLine":2319}}}],"partialFingerprints":{"codehealthFindingId/v1":"88f2bfd24bb801365885a82efd5b23e985a6bf754dfea3ce5c242debcfe96ebc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): src/main.rs:15781-15792 | src/main.rs:15800-15812 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/main.rs:15781\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/main.rs"},"region":{"startLine":15781}}}],"partialFingerprints":{"codehealthFindingId/v1":"f102c69fb179efbe582d217b4515ad460e21bbfe67238a1affcfca05ba94ddae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): src/skills/discovery.rs:556-568 | src/skills/discovery.rs:607-619 \u2014 both copies are in the same file, so extract the block 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/skills/discovery.rs"},"region":{"startLine":556}}}],"partialFingerprints":{"codehealthFindingId/v1":"63cae2c36915293fd26660190a1e01c4559acec2b7c59f8ddd02487bdd559b89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5\u201312 lines \u00D7 10): crates/zeroclaw-channels/src/bluesky.rs:558-569 | crates/zeroclaw-channels/src/lark.rs:1878-1887 | crates/zeroclaw-channels/src/lark.rs:2015-2024 | crates/zeroclaw-channels/src/mattermost.rs:939-948 | crates/zeroclaw-channels/src/mattermost.rs:2153-2161 | crates/zeroclaw-channels/src/slack.rs:1565-1574 | crates/zeroclaw-channels/src/slack.rs:2650-2659 | crates/zeroclaw-channels/src/slack.rs:4755-4759 | crates/zeroclaw-channels/src/slack.rs:4953-4957 | crates/zeroclaw-channels/src/telegram.rs:8720-8726 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/bluesky.rs\u0060 and \u0060crates/zeroclaw-channels/src/mattermost.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/zeroclaw-channels/src/bluesky.rs:558\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/zeroclaw-channels/src/bluesky.rs"},"region":{"startLine":558}}}],"partialFingerprints":{"codehealthFindingId/v1":"b82be07923baf8c6892a76ec687743abec3b7dcd1e3fc8133084ba1e7f1fa908"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 6): crates/zeroclaw-channels/src/imessage.rs:304-315 | crates/zeroclaw-channels/src/irc.rs:665-676 | crates/zeroclaw-channels/src/lark.rs:1758-1768 | crates/zeroclaw-channels/src/mochat.rs:233-244 | crates/zeroclaw-channels/src/qq.rs:1703-1713 | crates/zeroclaw-channels/src/qq.rs:1776-1786 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/imessage.rs\u0060 and \u0060crates/zeroclaw-channels/src/irc.rs\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 \u0060crates/zeroclaw-channels/src/imessage.rs:304\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/zeroclaw-channels/src/imessage.rs"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"05109481b73e493f4670000d9c821102a9ac0384259135b9abeb425b345292c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 6): crates/zeroclaw-providers/src/azure_openai.rs:651-662 | crates/zeroclaw-providers/src/azure_openai.rs:725-736 | crates/zeroclaw-providers/src/openai.rs:647-658 | crates/zeroclaw-providers/src/openai.rs:735-746 | crates/zeroclaw-providers/src/openrouter.rs:847-858 | crates/zeroclaw-providers/src/openrouter.rs:1084-1095 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/azure_openai.rs\u0060 and \u0060crates/zeroclaw-providers/src/openai.rs\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 226 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/zeroclaw-providers/src/azure_openai.rs:651\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/zeroclaw-providers/src/azure_openai.rs"},"region":{"startLine":651}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ded6dc0f8283db4e41c1d513a537442730d22837359fc20d7039d2ae7b7e10c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 5): crates/zeroclaw-memory/src/qdrant.rs:187-198 | crates/zeroclaw-memory/src/qdrant.rs:593-603 | crates/zeroclaw-memory/src/qdrant.rs:802-813 | crates/zeroclaw-memory/src/qdrant.rs:890-901 | crates/zeroclaw-memory/src/qdrant.rs:1194-1205 \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/zeroclaw-memory/src/qdrant.rs:187\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/zeroclaw-memory/src/qdrant.rs"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"55553fc9ed816564a3a1da152121c891de7115969f7323581d379d4da319cdb9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 5): crates/zeroclaw-tools/src/claude_code.rs:96-108 | crates/zeroclaw-tools/src/claude_code_runner.rs:118-130 | crates/zeroclaw-tools/src/codex_cli.rs:99-111 | crates/zeroclaw-tools/src/gemini_cli.rs:79-91 | crates/zeroclaw-tools/src/opencode_cli.rs:79-91 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/claude_code.rs\u0060 and \u0060crates/zeroclaw-tools/src/claude_code_runner.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 68 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/zeroclaw-tools/src/claude_code.rs:96\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/zeroclaw-tools/src/claude_code.rs"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9196f6b196ff43493435cddfd21fb40fe74b3cba0d1fd60cd2e46c1188e959d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): crates/zeroclaw-channels/src/cli.rs:72-83 | crates/zeroclaw-channels/src/imessage.rs:306-317 | crates/zeroclaw-channels/src/irc.rs:667-678 | crates/zeroclaw-channels/src/mochat.rs:235-246 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/imessage.rs\u0060 and \u0060crates/zeroclaw-channels/src/irc.rs\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 \u0060crates/zeroclaw-channels/src/cli.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/cli.rs"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb5b0876140fc7ac21e55e96ccaee1454feb8616dba00d7c981767357409082d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): crates/zeroclaw-infra/src/acp_session_store.rs:2100-2111 | crates/zeroclaw-infra/src/acp_session_store.rs:2274-2285 | crates/zeroclaw-infra/src/acp_session_store.rs:2299-2310 | crates/zeroclaw-infra/src/acp_session_store.rs:2458-2469 \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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":2100}}}],"partialFingerprints":{"codehealthFindingId/v1":"fffe2141bd88ea3336ee69ed90b06b8220d056ee735679af0c69c3781d045bd5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 3): apps/zerocode/src/config_manager.rs:5187-5198 | apps/zerocode/src/config_manager.rs:5513-5524 | apps/zerocode/src/config_manager.rs:5777-5787 \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 \u0060apps/zerocode/src/config_manager.rs:5187\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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":5187}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3ef3aef4e8b44aa59b68aece398c0269c6eb8125b957d2ace302751b2081b75"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): crates/zeroclaw-channels/src/git/providers/gitea/provider.rs:75-86 | crates/zeroclaw-channels/src/git/providers/github/provider.rs:135-146 | crates/zeroclaw-channels/src/git/providers/github/provider.rs:162-173 \u2014 \u0060crates/zeroclaw-channels/src/git/providers/gitea/provider.rs\u0060 and \u0060crates/zeroclaw-channels/src/git/providers/github/provider.rs\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 3 separate duplicated blocks between them, totalling at least 52 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/git/providers/gitea/provider.rs:75\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/zeroclaw-channels/src/git/providers/gitea/provider.rs"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"52a2a0447a1909633ae475f39b25b414ba909b084671fd3bde88fc7eae4d6aeb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 3): crates/zeroclaw-channels/src/orchestrator/mod.rs:1959-1970 | crates/zeroclaw-channels/src/util.rs:219-230 | crates/zeroclaw-tool-call-parser/src/lib.rs:1070-1080 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs\u0060 and \u0060crates/zeroclaw-channels/src/util.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 143 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/zeroclaw-channels/src/orchestrator/mod.rs:1959\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":1959}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6d0ae39d0198371680e01e395f817581f973861eec89a19797663031560a47d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): crates/zeroclaw-channels/src/slack.rs:1273-1284 | crates/zeroclaw-channels/src/slack.rs:1329-1340 | crates/zeroclaw-channels/src/slack.rs:5381-5392 \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/zeroclaw-channels/src/slack.rs:1273\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":1273}}}],"partialFingerprints":{"codehealthFindingId/v1":"b602ddda1fac9631af49dacdbb62ed9e5c582865283212fbc03b807dd08e51af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): crates/zeroclaw-gateway/src/lib.rs:134-145 | crates/zeroclaw-runtime/src/rpc/local.rs:154-165 | crates/zeroclaw-runtime/src/rpc/wss.rs:605-616 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/rpc/local.rs\u0060 and \u0060crates/zeroclaw-runtime/src/rpc/wss.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 81 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/zeroclaw-gateway/src/lib.rs:134\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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"d52f0bdb025777ebc993534ed9bc802c7581c68ffb9b0cc9bb311e1c133afc22"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): crates/zeroclaw-providers/src/openai.rs:496-507 | crates/zeroclaw-providers/src/openai.rs:584-595 | crates/zeroclaw-providers/src/openai.rs:680-691 \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/zeroclaw-providers/src/openai.rs:496\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/zeroclaw-providers/src/openai.rs"},"region":{"startLine":496}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd515d861c9da994402bdf30d0da7aba0fcccf74b8e410b75b001621fba79c0a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): crates/zeroclaw-runtime/src/daemon/mod.rs:1214-1225 | crates/zeroclaw-runtime/src/daemon/mod.rs:1239-1250 | crates/zeroclaw-runtime/src/daemon/mod.rs:1264-1275 \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/zeroclaw-runtime/src/daemon/mod.rs:1214\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/zeroclaw-runtime/src/daemon/mod.rs"},"region":{"startLine":1214}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8415a9cc470dd3d9593d58611818fae3f2e720aaeae7d95fe05d2fb5ed65612"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 3): crates/zeroclaw-runtime/src/tools/delegate.rs:2636-2647 | crates/zeroclaw-runtime/src/tools/delegate.rs:2694-2703 | crates/zeroclaw-runtime/src/tools/send_message_to_peer.rs:516-525 \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/zeroclaw-runtime/src/tools/delegate.rs:2636\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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":2636}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef51c80d958493a260e42f56b79b69203bda28169299a997edcea7927d0809e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): crates/zeroclaw-runtime/src/tools/delegate.rs:3293-3304 | crates/zeroclaw-runtime/src/tools/delegate.rs:3622-3633 | crates/zeroclaw-runtime/src/tools/delegate.rs:4185-4196 \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/zeroclaw-runtime/src/tools/delegate.rs:3293\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, \u0060crates/zeroclaw-runtime/src/tools/delegate.rs:3621\u0060 calls \u0060as_deref\u0060 and \u0060crates/zeroclaw-runtime/src/tools/delegate.rs:3292\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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":3293}}}],"partialFingerprints":{"codehealthFindingId/v1":"3734d3775a8eadc523adbc7129057cabf2bb2a04b31b630871e0c71fb96f3d9f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): crates/zeroclaw-tools/src/backup_tool.rs:1030-1041 | crates/zeroclaw-tools/src/backup_tool.rs:1070-1081 | crates/zeroclaw-tools/src/backup_tool.rs:1195-1206 \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 before the matched lines, \u0060crates/zeroclaw-tools/src/backup_tool.rs:1069\u0060 calls \u0060join\u0060 and \u0060crates/zeroclaw-tools/src/backup_tool.rs:1029\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/zeroclaw-tools/src/backup_tool.rs"},"region":{"startLine":1030}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1507cfdfa868cccfcd96aa31f60473d6db7a95f42dc18a4a4cdc1c9ffcf59e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): apps/tauri/src/macos/permissions.rs:57-68 | apps/tauri/src/macos/permissions.rs:224-235 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/tauri/src/macos/permissions.rs:57\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":"apps/tauri/src/macos/permissions.rs"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"b60b8578ccd9fde47c6c1c72ca50158a4fac9a39f27f274de86978bb3175b80c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): apps/zerocode/src/chat.rs:4106-4117 | apps/zerocode/src/chat.rs:4363-4374 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/chat.rs:4106\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":"apps/zerocode/src/chat.rs"},"region":{"startLine":4106}}}],"partialFingerprints":{"codehealthFindingId/v1":"e15cb47c18367a775accd98ecaad45e8267050ce8af816aef0a0e202fa679ed8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): apps/zerocode/src/dashboard.rs:1582-1593 | apps/zerocode/src/dashboard.rs:1610-1621 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/dashboard.rs:1582\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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":1582}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8380b2c00d5ef0e297582a632b74b9573efde93a69580e367ead315624418db"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): apps/zerocode/src/enroll.rs:465-476 | apps/zerorelay/src/enroll_proxy.rs:356-367 \u2014 before extracting anything, compare \u0060apps/zerocode/src/enroll.rs\u0060 and \u0060apps/zerorelay/src/enroll_proxy.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 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 \u0060apps/zerocode/src/enroll.rs:465\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":"apps/zerocode/src/enroll.rs"},"region":{"startLine":465}}}],"partialFingerprints":{"codehealthFindingId/v1":"db7a6bb0300ff220dded01131525d81192a06381a9df6c39d1008431af3f299e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): apps/zerocode/src/quickstart_pane.rs:1759-1770 | apps/zerocode/src/quickstart_pane.rs:1777-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/quickstart_pane.rs"},"region":{"startLine":1759}}}],"partialFingerprints":{"codehealthFindingId/v1":"34d0bb6757b0907039e14b8df4e484a3152af6facd4cd0f7e3ea2ccad796ef54"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): apps/zerocode/src/quickstart_pane.rs:1871-1882 | apps/zerocode/src/quickstart_pane.rs:1914-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 \u0060apps/zerocode/src/quickstart_pane.rs:1871\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":"apps/zerocode/src/quickstart_pane.rs"},"region":{"startLine":1871}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e1755a91938b31b15447880f4347c309e9419d07b1a5a356707c14db3926e0b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): apps/zerocode/src/quickstart_pane.rs:3158-3169 | apps/zerocode/src/quickstart_pane.rs:3219-3230 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/quickstart_pane.rs:3158\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":"apps/zerocode/src/quickstart_pane.rs"},"region":{"startLine":3158}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2311adb9980e4482b01bf500266272f0fc5ba8606eb7353ed25d40d3fc80f05"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-channels/src/acp_channel.rs:193-204 | crates/zeroclaw-channels/src/acp_channel.rs:226-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/zeroclaw-channels/src/acp_channel.rs:193\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/zeroclaw-channels/src/acp_channel.rs"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"be6a1a781cc7ae2778443d684a004a52ebd650cda916c0a851144f1d212a3f00"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-channels/src/bluesky.rs:498-509 | crates/zeroclaw-channels/src/mattermost.rs:1046-1057 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/bluesky.rs\u0060 and \u0060crates/zeroclaw-channels/src/mattermost.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/zeroclaw-channels/src/bluesky.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/zeroclaw-channels/src/bluesky.rs"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"3081c752efd1918a61cfb9d582bf6a7cb775632409d8d8b2aa259c14e9d9ead5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-channels/src/discord/mod.rs:1528-1539 | crates/zeroclaw-channels/src/telegram.rs:701-712 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/discord/mod.rs\u0060 and \u0060crates/zeroclaw-channels/src/telegram.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any \u0060return\u0060 inside it is the body\u0027s own exit and keeps its meaning in the moved unit."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":1528}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e71c74b28605f6746fc487b9ebfbd18820c95a04393bab3b06c71892968930e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): crates/zeroclaw-channels/src/discord/mod.rs:1857-1868 | crates/zeroclaw-channels/src/discord/mod.rs:3787-3797 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":1857}}}],"partialFingerprints":{"codehealthFindingId/v1":"455e00f5d98bdbdae923186e501f60728ec1a7b6762738cf4f5738fb49cdc010"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-channels/src/discord/mod.rs:2052-2063 | crates/zeroclaw-channels/src/qq.rs:1424-1435 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/discord/mod.rs\u0060 and \u0060crates/zeroclaw-channels/src/qq.rs\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. 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/zeroclaw-channels/src/discord/mod.rs:2052\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":2052}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0982a00ccf6f59af461af4d6f51ad66dbddc69c622442d173a1ae44b8dbcd29"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-channels/src/git/providers/gitea/mapping.rs:85-96 | crates/zeroclaw-channels/src/git/providers/github/mapping.rs:199-210 \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/zeroclaw-channels/src/git/providers/gitea/mapping.rs"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e1c0e18da3604bb06d792e99b8dde6181502a34ab3127357d0e6eb7875eb93c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 2): crates/zeroclaw-channels/src/lark.rs:2722-2731 | crates/zeroclaw-channels/src/lark.rs:2767-2778 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/lark.rs:2722\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":2722}}}],"partialFingerprints":{"codehealthFindingId/v1":"a17576a6493caccfd8d1e378d2b0a5f4bacdeaf80e04237c499f6d1e7be6e72a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-channels/src/lark.rs:2890-2901 | crates/zeroclaw-channels/src/lark.rs:3377-3388 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":2890}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8976dfbf56b830374886f1a3e1dd8c980d293cf83345128b6418465af1bf60a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-channels/src/lark.rs:3000-3011 | crates/zeroclaw-channels/src/lark.rs:3092-3103 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/lark.rs:3000\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":3000}}}],"partialFingerprints":{"codehealthFindingId/v1":"e64b5279582e43d763bba405a080826ee42d6bd0d66530952aa39cef8b1e0de0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-channels/src/lark.rs:3020-3031 | crates/zeroclaw-channels/src/lark.rs:3141-3152 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/lark.rs:3020\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":3020}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce64bd70530f3e3c8e309eff3a7066431dea945c41ad4823542c5b6a8d335e9f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-channels/src/line.rs:333-344 | crates/zeroclaw-channels/src/webhook.rs:356-367 \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/zeroclaw-channels/src/line.rs"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"93f3fc657ea6260acfc549904d89fb311bc471bd5243f7b2139821efe16ff66d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-channels/src/matrix.rs:3355-3366 | crates/zeroclaw-channels/src/whatsapp_web.rs:3112-3123 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/matrix.rs\u0060 and \u0060crates/zeroclaw-channels/src/whatsapp_web.rs\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 68 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/zeroclaw-channels/src/matrix.rs:3355\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":3355}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ceb31d0adb79fb25fa143249f880b9bc50b56ec0b0b34f17d9223535f4607cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-channels/src/matrix.rs:3802-3813 | crates/zeroclaw-channels/src/matrix.rs:3853-3864 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":3802}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a79c03bcb80102531ca36c7cc268d9d89b7b06ac59d0028f94a5bb23e3f849f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-channels/src/mattermost.rs:1576-1587 | crates/zeroclaw-channels/src/mattermost.rs:1634-1645 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/mattermost.rs:1576\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/zeroclaw-channels/src/mattermost.rs"},"region":{"startLine":1576}}}],"partialFingerprints":{"codehealthFindingId/v1":"217827676a995f842f4c3ce8c74bf3754ca64b8991bba49c03a98cc28e38aff3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-channels/src/nostr.rs:239-250 | crates/zeroclaw-channels/src/nostr.rs:292-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/zeroclaw-channels/src/nostr.rs:239\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/zeroclaw-channels/src/nostr.rs"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"8259f0915bb0cc0fdb31046e3456f51bfb3ec32cc38f1484d51f8bc7b1dee846"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:17094-17105 | crates/zeroclaw-gateway/src/lib.rs:2093-2104 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs\u0060 and \u0060crates/zeroclaw-gateway/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 96 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/zeroclaw-channels/src/orchestrator/mod.rs:17094\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":17094}}}],"partialFingerprints":{"codehealthFindingId/v1":"2efd7c8ebb7c264eec4414889837cc0222529d992de29e46ccd9b28222493098"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:17358-17369 | crates/zeroclaw-runtime/src/tools/delegate.rs:5646-5657 \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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":17358}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f5530a565b97dcaa9b0c60dc31eb228521b7317af9926c5f5413d9a39d972fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-channels/src/slack.rs:1578-1590 | crates/zeroclaw-channels/src/slack.rs:2663-2674 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/slack.rs:1578\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":1578}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9be5ed6597f558023f62d5275a80792c7c807394366bd499073e1249e5b4f7c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-channels/src/slack.rs:4761-4772 | crates/zeroclaw-channels/src/slack.rs:4959-4970 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/slack.rs:4761\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":4761}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cf46d855598f00bb8bc4cf4fe86f8f74d922e325c0ae6d0cdda7c9de35dcaad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): crates/zeroclaw-channels/src/slack.rs:4827-4837 | crates/zeroclaw-channels/src/slack.rs:5061-5072 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/slack.rs:4827\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":4827}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb39e9bc8b6178c5a9625b676b4cd0d34db04de56decfe74a63f4193493455fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 2): crates/zeroclaw-channels/src/slack.rs:5618-5629 | crates/zeroclaw-channels/src/slack.rs:5699-5708 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/slack.rs:5631\u0060 calls \u0060and_then\u0060 and \u0060crates/zeroclaw-channels/src/slack.rs:5709\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":5618}}}],"partialFingerprints":{"codehealthFindingId/v1":"edf3b086ecb57191c2b5f04c69f8d503a69044dc70f3e0e3ffb5914fa874045d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-channels/src/slack.rs:6249-6260 | crates/zeroclaw-channels/src/telegram.rs:9100-9111 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/slack.rs\u0060 and \u0060crates/zeroclaw-channels/src/telegram.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 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 \u0060request\u0060 to \u0060\u0026ChannelApprovalRequest\u0060 in one and \u0060\u0026zeroclaw_api::channel::ChannelApprovalRequest\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":6249}}}],"partialFingerprints":{"codehealthFindingId/v1":"30042975c5bc0d210c753a9600bde8cda2075693053db471ea9caafaaa5ed0d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-channels/src/telegram.rs:1003-1014 | crates/zeroclaw-channels/src/wechat.rs:393-404 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/telegram.rs\u0060 and \u0060crates/zeroclaw-channels/src/wechat.rs\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 158 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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":1003}}}],"partialFingerprints":{"codehealthFindingId/v1":"9363fc7a912bf8ccb70bb94ab73cd9bd7a0e5617121022b4a341a9487a452c13"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-channels/src/telegram.rs:9114-9125 | crates/zeroclaw-channels/src/telegram.rs:9155-9166 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/telegram.rs:9114\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":9114}}}],"partialFingerprints":{"codehealthFindingId/v1":"098278e835dd3ddb0e4d6796531ed4d36472d46caec0643c07c22da0c9371858"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-config/src/schema/v2.rs:149-160 | crates/zeroclaw-config/src/schema/v2.rs:189-200 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-config/src/schema/v2.rs:149\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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a05bb0103052b0cfd73354fb61d87afe4b4a026a21c28c822f9f890b109c57e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-gateway/src/api.rs:2045-2056 | crates/zeroclaw-gateway/src/api.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/zeroclaw-gateway/src/api.rs:2045\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/zeroclaw-gateway/src/api.rs"},"region":{"startLine":2045}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfe59ae762b6155b564c6cafcd7de4b39645c41fc1b3a84f4c50a875da6f6f90"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201312 lines \u00D7 2): crates/zeroclaw-gateway/src/api_sections.rs:300-307 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:12017-12028 \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/zeroclaw-runtime/src/rpc/dispatch.rs:12017\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/zeroclaw-gateway/src/api_sections.rs"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc167551675ebeac8e844f3795d2126c4d6fe1c26118f910606d7033590582a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-hardware/src/peripherals/rpi.rs:179-190 | crates/zeroclaw-hardware/src/rpi.rs:436-447 \u2014 before extracting anything, compare \u0060crates/zeroclaw-hardware/src/peripherals/rpi.rs\u0060 and \u0060crates/zeroclaw-hardware/src/rpi.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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/zeroclaw-hardware/src/peripherals/rpi.rs:179\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/zeroclaw-hardware/src/peripherals/rpi.rs"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee01c18fdb5da56ca4659b3039a4770c6698e224b5450165cbf7130cddb48513"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): crates/zeroclaw-infra/src/session_sqlite.rs:1025-1036 | crates/zeroclaw-infra/src/session_sqlite.rs:1058-1068 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":1025}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff23463a905bcbe7d86d9c74692afe7b5a3b05fa1420d296e01093a0de11b68a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-log/src/reader.rs:1003-1014 | crates/zeroclaw-log/src/reader.rs:1069-1080 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-log/src/reader.rs:1003\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/zeroclaw-log/src/reader.rs"},"region":{"startLine":1003}}}],"partialFingerprints":{"codehealthFindingId/v1":"11d1e6f1552cc06b43ef75ab932daa302640ee1407305b1a64747cbaf91a85a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-macros/src/lib.rs:1067-1078 | crates/zeroclaw-macros/src/lib.rs:1593-1604 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-macros/src/lib.rs:1067\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/zeroclaw-macros/src/lib.rs"},"region":{"startLine":1067}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd44cf48c8720e110e751fc6c9636d81cf0fb743d54b67c409e907c47338dbe8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-macros/src/lib.rs:1628-1639 | crates/zeroclaw-macros/src/lib.rs:1678-1689 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-macros/src/lib.rs:1628\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/zeroclaw-macros/src/lib.rs"},"region":{"startLine":1628}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8c65865cf66faf58171e4209624a4d3caf40697f249d833d81c052cf9631e67"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-memory/src/sqlite.rs:1963-1974 | crates/zeroclaw-memory/src/sqlite.rs:2031-2042 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-memory/src/sqlite.rs:1963\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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":1963}}}],"partialFingerprints":{"codehealthFindingId/v1":"f11afeafe97743adbdb21e16c97bce5d5986c778e87fa4515d83de8c9ea062c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-providers/src/anthropic.rs:2618-2629 | crates/zeroclaw-providers/src/anthropic.rs:2707-2718 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":2618}}}],"partialFingerprints":{"codehealthFindingId/v1":"c49c744ab52b7ee7e3f31269f67707a97bc6448e62fa66f945a5b105534cf7d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-providers/src/dispatch.rs:637-648 | crates/zeroclaw-providers/src/dispatch.rs:998-1009 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-providers/src/dispatch.rs"},"region":{"startLine":637}}}],"partialFingerprints":{"codehealthFindingId/v1":"82988ba8e8d23c22737519f9f4f52a230b5fe7dad1b17cfcae3914adb2399262"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-providers/src/gemini_cli.rs:150-161 | crates/zeroclaw-providers/src/kilocli.rs:147-158 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/gemini_cli.rs\u0060 and \u0060crates/zeroclaw-providers/src/kilocli.rs\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 164 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/zeroclaw-providers/src/gemini_cli.rs:150\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/zeroclaw-providers/src/gemini_cli.rs"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"75b1dd9450dee95b3b9ddc27e16bea4671ea9989827cbb57a03969e963e9721a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-providers/src/openai.rs:527-538 | crates/zeroclaw-providers/src/openai.rs:715-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/openai.rs:527\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/zeroclaw-providers/src/openai.rs"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"0875bcca9391160359c26d21f090ea2647e24a62e14744454c72f293161e7aeb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/agent.rs:4759-4770 | crates/zeroclaw-runtime/src/agent/agent.rs:5437-5448 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":4759}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3ddf6ab05d717dde8ab660de85aa966f17fcd4d2f8072ea2fd7723ea3e80bcf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/loop_.rs:1687-1698 | crates/zeroclaw-runtime/src/agent/loop_.rs:3812-3823 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/agent/loop_.rs:1687\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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":1687}}}],"partialFingerprints":{"codehealthFindingId/v1":"96ae6a3f9eb3071ec0dd863d3105ca4c858115dbb515815cd34ba60ce6a21318"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201312 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/loop_.rs:2238-2249 | crates/zeroclaw-runtime/src/agent/loop_.rs:4227-4235 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/agent/loop_.rs:2238\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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":2238}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2e346f30563019bbc01202983b91f287d5a085b065617121ea31d068361fb65"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/pricing_catalog.rs:145-155 | crates/zeroclaw-runtime/src/agent/pricing_catalog.rs:168-179 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/agent/pricing_catalog.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/zeroclaw-runtime/src/agent/pricing_catalog.rs"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ca2d5ade68f86e549d186428234810ecc0960731c1d731011db516865793c25"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): crates/zeroclaw-runtime/src/cron/schedule.rs:18-28 | crates/zeroclaw-runtime/src/cron/schedule.rs:33-44 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/cron/schedule.rs:33\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/zeroclaw-runtime/src/cron/schedule.rs"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a69d565cf781590591f82dc375a761d0c9f5dbb51e9b6a669e8eceb68ea2ea1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-runtime/src/service/mod.rs:3167-3178 | crates/zeroclaw-runtime/src/service/mod.rs:3186-3197 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-runtime/src/service/mod.rs"},"region":{"startLine":3167}}}],"partialFingerprints":{"codehealthFindingId/v1":"efd6a09f5f91dacdc867de47c8224028c320ea57c751a3871b2b4e822431d2c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-runtime/src/skills/document.rs:145-156 | crates/zeroclaw-runtime/src/skills/mod.rs:1622-1633 \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/zeroclaw-runtime/src/skills/document.rs"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"191c7787c65b653dd341bffba5e3bcb9b400498ec050255ebc43f6c62c2a59e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/engine.rs:3265-3276 | crates/zeroclaw-runtime/src/sop/engine.rs:6016-6027 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/engine.rs:3265\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":3265}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce165d0bd7e3a4a3e310361f29a01b6ce76a1047ff3b419442e4483d68439590"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/engine.rs:3409-3420 | crates/zeroclaw-runtime/src/sop/engine.rs:3471-3482 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/engine.rs:3409\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":3409}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a4a6f7020b1bf83119388567fc50b709f8ab9de9ffdab856780cf5d26e5478d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/engine.rs:4459-4469 | crates/zeroclaw-runtime/src/sop/engine.rs:4933-4944 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":4459}}}],"partialFingerprints":{"codehealthFindingId/v1":"d91f31d3a2570ac085460b2f0a1940f9da5d979cb54d8f025200c880397d5e0a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/store/sqlite.rs:295-306 | crates/zeroclaw-runtime/src/sop/store/sqlite.rs:385-395 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/store/sqlite.rs:295\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/zeroclaw-runtime/src/sop/store/sqlite.rs"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"adf6d91df2bd87159d4f9c7e1347af1d7929316a81c28d88be163e7488fa84d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/delegate.rs:3037-3048 | crates/zeroclaw-runtime/src/tools/delegate.rs:4087-4098 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/tools/delegate.rs:3037\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 \u0060args\u0060 to \u0060serde_json::Value\u0060 in one and \u0060\u0026serde_json::Value\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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":3037}}}],"partialFingerprints":{"codehealthFindingId/v1":"31c6e53e63ec262280834e14a3a75b05327628c0c01c54466c332935b1e393e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/deliver_file.rs:48-59 | crates/zeroclaw-runtime/src/tools/file_read.rs:34-45 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/tools/deliver_file.rs\u0060 and \u0060crates/zeroclaw-runtime/src/tools/file_read.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 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/zeroclaw-runtime/src/tools/deliver_file.rs"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"8eafd21b471ddfcb2c766fd6113dad39ee6d8f12501d5817bb9054323cf17c8a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-tools/src/backup_tool.rs:584-595 | crates/zeroclaw-tools/src/data_management.rs:150-161 \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/zeroclaw-tools/src/backup_tool.rs:584\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/zeroclaw-tools/src/backup_tool.rs"},"region":{"startLine":584}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbc789a180bac99101b64e33c2b7395e7d71277992f5c1e17b951a3a6de0e38c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-tools/src/http_request.rs:597-608 | crates/zeroclaw-tools/src/web_fetch.rs:463-474 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/http_request.rs\u0060 and \u0060crates/zeroclaw-tools/src/web_fetch.rs\u0060 as WHOLE FILES: this scan already matched 9 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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/http_request.rs:597\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/zeroclaw-tools/src/http_request.rs"},"region":{"startLine":597}}}],"partialFingerprints":{"codehealthFindingId/v1":"8690d635b5136161c46c6aa7590a45a96390b0730f8257efea41ad83987a04f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 2): crates/zeroclaw-tools/src/linkedin_client.rs:252-263 | crates/zeroclaw-tools/src/linkedin_client.rs:711-720 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/linkedin_client.rs:252\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/zeroclaw-tools/src/linkedin_client.rs"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff6e4f9fa8608ce0e9d0bca23f39fcf66b65e462200d82ab71a854622d4851a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-tools/src/model_routing_config.rs:212-223 | crates/zeroclaw-tools/src/proxy_config.rs:114-125 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/model_routing_config.rs\u0060 and \u0060crates/zeroclaw-tools/src/proxy_config.rs\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 143 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/zeroclaw-tools/src/model_routing_config.rs:212\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/zeroclaw-tools/src/model_routing_config.rs"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d56f9597e4412be5328d7cb9df9c6324f69182efef1303ad884dd82d50f9438"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): src/cron/mod.rs:258-269 | src/cron/mod.rs:640-651 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/cron/mod.rs:258\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/cron/mod.rs"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e2b4b6d2369b023bdf22b5e0a648ee33907b706f57c89d39f0323fc67c1e02b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): src/main.rs:10273-10284 | src/main.rs:10685-10695 \u2014 both copies are in the same file, so extract the block 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/main.rs"},"region":{"startLine":10273}}}],"partialFingerprints":{"codehealthFindingId/v1":"535418bfcc8fd28b373b8bd444e7c21447e6ad901fd3d969b0c98f6d521bedca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): src/main.rs:14591-14602 | src/main.rs:14658-14669 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/main.rs:14591\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, \u0060src/main.rs:14656\u0060 calls \u0060query\u0060, \u0060as_str\u0060, \u0060to_string\u0060 and \u0060src/main.rs:14589\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":"src/main.rs"},"region":{"startLine":14591}}}],"partialFingerprints":{"codehealthFindingId/v1":"959f7f4d1e8bfb930623ef5c50e3e7dcedf9cacae4c7c309fbcb8485a52a5e71"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): src/main.rs:15579-15590 | src/main.rs:15598-15609 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/main.rs:15579\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/main.rs"},"region":{"startLine":15579}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a6433c83c23b143fd39d3d800e45e9fa787041871a63db27c40aab0610d1647"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): src/main.rs:16077-16088 | src/main.rs:16095-16106 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/main.rs:16077\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/main.rs"},"region":{"startLine":16077}}}],"partialFingerprints":{"codehealthFindingId/v1":"117a5008862a2108ea8bc87293231f3cbefa388c7c65b58c26d28786d53d5241"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): tools/fill-translations/src/main.rs:93-103 | xtask/src/cmd/mdbook/check.rs:228-239 \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 \u0060xtask/src/cmd/mdbook/check.rs:228\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":"tools/fill-translations/src/main.rs"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"5beca7386f547752d4771d97c9cab8374cc6fb9632939aa2fe749bc6bde240bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 10): crates/zeroclaw-tools/src/microsoft365/mod.rs:82-92 | crates/zeroclaw-tools/src/microsoft365/mod.rs:114-124 | crates/zeroclaw-tools/src/microsoft365/mod.rs:164-174 | crates/zeroclaw-tools/src/microsoft365/mod.rs:217-227 | crates/zeroclaw-tools/src/microsoft365/mod.rs:247-257 | crates/zeroclaw-tools/src/microsoft365/mod.rs:304-314 | crates/zeroclaw-tools/src/microsoft365/mod.rs:342-352 | crates/zeroclaw-tools/src/microsoft365/mod.rs:415-425 | crates/zeroclaw-tools/src/microsoft365/mod.rs:471-481 | crates/zeroclaw-tools/src/microsoft365/mod.rs:545-555 \u2014 all 10 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/zeroclaw-tools/src/microsoft365/mod.rs:82\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/zeroclaw-tools/src/microsoft365/mod.rs"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"e38b93bd1de777d17e6161b501df1fcdcaeb6780c0219fc96a8b5c53d5c3a9dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u201311 lines \u00D7 9): crates/zeroclaw-runtime/src/sop/engine.rs:836-846 | crates/zeroclaw-runtime/src/sop/engine.rs:4039-4046 | crates/zeroclaw-runtime/src/sop/engine.rs:6247-6257 | crates/zeroclaw-runtime/src/sop/engine.rs:6294-6301 | crates/zeroclaw-runtime/src/sop/executor.rs:225-231 | crates/zeroclaw-runtime/src/sop/executor.rs:677-684 | crates/zeroclaw-runtime/src/sop/executor.rs:1048-1058 | crates/zeroclaw-runtime/src/sop/executor.rs:1257-1267 | crates/zeroclaw-runtime/src/sop/executor.rs:1299-1309 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/sop/engine.rs\u0060 and \u0060crates/zeroclaw-runtime/src/sop/executor.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 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/zeroclaw-runtime/src/sop/engine.rs:836\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":836}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bd991bc354a8334277916b91282aa69ee748789e64887ef96d92f7bba8791a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201311 lines \u00D7 7): crates/zeroclaw-channels/src/orchestrator/mod.rs:16798-16805 | crates/zeroclaw-channels/src/orchestrator/mod.rs:16824-16831 | crates/zeroclaw-gateway/src/ws.rs:651-658 | crates/zeroclaw-gateway/src/ws.rs:1415-1422 | crates/zeroclaw-gateway/src/ws.rs:1506-1513 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:5318-5328 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:5382-5392 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs\u0060 and \u0060crates/zeroclaw-gateway/src/ws.rs\u0060 as WHOLE FILES: this scan already matched 7 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/zeroclaw-channels/src/orchestrator/mod.rs:16798\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":16798}}}],"partialFingerprints":{"codehealthFindingId/v1":"98b69104b9f66335fc9fea165252f9a3b619cafe470f7976aa7ab023ab5d7b47"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201311 lines \u00D7 5): crates/zeroclaw-api/src/model_provider.rs:885-893 | crates/zeroclaw-providers/src/compatible.rs:3912-3919 | crates/zeroclaw-providers/src/hailo_ollama.rs:950-960 | crates/zeroclaw-providers/src/ollama.rs:513-520 | crates/zeroclaw-runtime/src/agent/history.rs:308-315 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/hailo_ollama.rs\u0060 and \u0060crates/zeroclaw-providers/src/ollama.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 108 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/zeroclaw-api/src/model_provider.rs"},"region":{"startLine":885}}}],"partialFingerprints":{"codehealthFindingId/v1":"15381c334d162caba7de9b4385e493cab9a8af096f9939b3ed5091be711c13c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 5): crates/zeroclaw-channels/src/slack.rs:1275-1285 | crates/zeroclaw-channels/src/slack.rs:1331-1341 | crates/zeroclaw-channels/src/slack.rs:3956-3966 | crates/zeroclaw-channels/src/slack.rs:4188-4198 | crates/zeroclaw-channels/src/slack.rs:5383-5393 \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/zeroclaw-channels/src/slack.rs:1275\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":1275}}}],"partialFingerprints":{"codehealthFindingId/v1":"50a627e84bb6d5957d3e0fd8d19b29eb75c38cd5e0167f7c94ae84e900ffe8ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 4): crates/zeroclaw-providers/src/dispatch.rs:769-783 | crates/zeroclaw-providers/src/dispatch.rs:801-815 | crates/zeroclaw-providers/src/dispatch.rs:1147-1161 | crates/zeroclaw-providers/src/dispatch.rs:1179-1193 \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/zeroclaw-providers/src/dispatch.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-providers/src/dispatch.rs"},"region":{"startLine":769}}}],"partialFingerprints":{"codehealthFindingId/v1":"2013f27d92155fb723e85e22323c3059ace62829d3e1a6d62dd3e21f8259aaff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): crates/zeroclaw-providers/src/glm.rs:199-209 | crates/zeroclaw-providers/src/glm.rs:254-264 | crates/zeroclaw-providers/src/telnyx.rs:209-219 | crates/zeroclaw-providers/src/telnyx.rs:276-286 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/glm.rs\u0060 and \u0060crates/zeroclaw-providers/src/telnyx.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 49 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/zeroclaw-providers/src/glm.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/zeroclaw-providers/src/glm.rs"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3b1c4d5670d058a67ede8761ede54acece1761afe76d340bb474ce819a3dcdc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): crates/zeroclaw-providers/src/openrouter.rs:653-663 | crates/zeroclaw-providers/src/openrouter.rs:719-729 | crates/zeroclaw-providers/src/openrouter.rs:792-802 | crates/zeroclaw-providers/src/openrouter.rs:997-1007 \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/zeroclaw-providers/src/openrouter.rs:653\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/zeroclaw-providers/src/openrouter.rs:1010\u0060 calls \u0060is_empty\u0060 and \u0060crates/zeroclaw-providers/src/openrouter.rs:731\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/zeroclaw-providers/src/openrouter.rs"},"region":{"startLine":653}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d948c48bea01720519301936383c610cfbda3a63384bae5b9a8a56d9e8fa76c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): crates/zeroclaw-runtime/src/i18n.rs:210-220 | crates/zeroclaw-runtime/src/i18n.rs:248-258 | crates/zeroclaw-tools/src/i18n.rs:79-89 | crates/zeroclaw-tools/src/i18n.rs:117-127 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/i18n.rs\u0060 and \u0060crates/zeroclaw-tools/src/i18n.rs\u0060 as WHOLE FILES: this scan already matched 5 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/zeroclaw-runtime/src/i18n.rs"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"de464d5da08829acb5a3b866c8393d1184aa2f4d20afdb95a82fa0ebe228c7ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201311 lines \u00D7 3): crates/zeroclaw-channels/src/slack.rs:1581-1590 | crates/zeroclaw-channels/src/slack.rs:2178-2188 | crates/zeroclaw-channels/src/slack.rs:2666-2674 \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/zeroclaw-channels/src/slack.rs:1581\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":1581}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbec0152ae20b98b7bd89a9ad86d4373100f7fde082baf6e3e5772a00ff11cd8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): crates/zeroclaw-gateway/src/api.rs:2044-2054 | crates/zeroclaw-gateway/src/api.rs:2128-2138 | crates/zeroclaw-gateway/src/api.rs:2210-2220 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/zeroclaw-gateway/src/api.rs:2126\u0060 calls \u0060Json\u0060 and \u0060crates/zeroclaw-gateway/src/api.rs:2042\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/zeroclaw-gateway/src/api.rs"},"region":{"startLine":2044}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9571dd06ba8e51644104dff800cc0266a4d9d042978b992181b447e4951722e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): crates/zeroclaw-macros/src/lib.rs:2687-2697 | crates/zeroclaw-macros/src/lib.rs:2779-2789 | crates/zeroclaw-macros/src/lib.rs:3001-3011 \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/zeroclaw-macros/src/lib.rs:2687\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/zeroclaw-macros/src/lib.rs"},"region":{"startLine":2687}}}],"partialFingerprints":{"codehealthFindingId/v1":"cca84956999916933d882e6398cf6265470e132c2cecb2e19d2d12ecb8acc92b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): crates/zeroclaw-providers/src/auth/mod.rs:1686-1696 | crates/zeroclaw-providers/src/auth/mod.rs:1772-1782 | crates/zeroclaw-providers/src/auth/mod.rs:1836-1846 \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/zeroclaw-providers/src/auth/mod.rs:1686\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/zeroclaw-providers/src/auth/mod.rs:1847\u0060 calls \u0060clear_pending_oauth_login\u0060 and \u0060crates/zeroclaw-providers/src/auth/mod.rs:1697\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/zeroclaw-providers/src/auth/mod.rs"},"region":{"startLine":1686}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e67b3d73009dcb3564b2898eb7e9ec025990f177128459f9da61f0464024e9f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): crates/zeroclaw-providers/src/azure_openai.rs:544-554 | crates/zeroclaw-providers/src/azure_openai.rs:615-625 | crates/zeroclaw-providers/src/azure_openai.rs:680-690 \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/zeroclaw-providers/src/azure_openai.rs:544\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/zeroclaw-providers/src/azure_openai.rs"},"region":{"startLine":544}}}],"partialFingerprints":{"codehealthFindingId/v1":"4630683c598f1df79ac6dcee8d08bdded7676ab1e97aa3c4e07603bf91268f64"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): crates/zeroclaw-providers/src/dispatch/accounting.rs:195-205 | crates/zeroclaw-providers/src/dispatch/accounting.rs:403-413 | crates/zeroclaw-providers/src/dispatch/accounting.rs:430-440 \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/zeroclaw-providers/src/dispatch/accounting.rs"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"139b65956f5cbda4be8fc2036c0086d3eff39683030772c939246e672ffb8154"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): crates/zeroclaw-providers/src/openai.rs:530-540 | crates/zeroclaw-providers/src/openai.rs:630-640 | crates/zeroclaw-providers/src/openai.rs:718-728 \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/zeroclaw-providers/src/openai.rs"},"region":{"startLine":530}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b176c4afb794a5e6ffa378615d563c6baf8e20678d80c00ac95196244501f51"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): crates/zeroclaw-providers/src/reliable.rs:2895-2905 | crates/zeroclaw-providers/src/reliable.rs:3346-3356 | crates/zeroclaw-providers/src/reliable.rs:3723-3733 \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/zeroclaw-providers/src/reliable.rs:2895\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/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":2895}}}],"partialFingerprints":{"codehealthFindingId/v1":"0dc7ee66b5b0214ddc11149410605fcefb97ac097478971bbcc86dd9da68a45f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 3): crates/zeroclaw-runtime/src/agent/agent.rs:3394-3404 | crates/zeroclaw-runtime/src/agent/loop_.rs:1794-1803 | crates/zeroclaw-runtime/src/agent/loop_.rs:3883-3892 \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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":3394}}}],"partialFingerprints":{"codehealthFindingId/v1":"94d0b98870ea4d1a989b782faf22e61d15ceac27c6c91aa3f6c85e4e06a05fc5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 3): crates/zeroclaw-runtime/src/agent/loop_.rs:2251-2260 | crates/zeroclaw-runtime/src/agent/loop_.rs:2843-2852 | crates/zeroclaw-runtime/src/agent/loop_.rs:4237-4247 \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/zeroclaw-runtime/src/agent/loop_.rs:2251\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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":2251}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e6f9bbc0f162f44ff9ce44cd271e9b542c65c1128f30d4b45cda12da7f32c2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201311 lines \u00D7 3): crates/zeroclaw-runtime/src/sop/approval/timeout.rs:49-56 | crates/zeroclaw-runtime/src/sop/executor.rs:956-963 | crates/zeroclaw-runtime/src/sop/executor.rs:1004-1014 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/sop/approval/timeout.rs\u0060 and \u0060crates/zeroclaw-runtime/src/sop/executor.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. 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/zeroclaw-runtime/src/sop/approval/timeout.rs:49\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/zeroclaw-runtime/src/sop/approval/timeout.rs"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"9eb9997f21101138d3275b79eaa9a3084789a26821c32e8460b572535cc5af53"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201311 lines \u00D7 3): crates/zeroclaw-runtime/src/tools/delegate.rs:2657-2667 | crates/zeroclaw-runtime/src/tools/delegate.rs:2713-2723 | crates/zeroclaw-runtime/src/tools/send_message_to_peer.rs:545-552 \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/zeroclaw-runtime/src/tools/delegate.rs:2657\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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":2657}}}],"partialFingerprints":{"codehealthFindingId/v1":"6834510e764c7dd70e68817f08d043dd5ea2d2188a9d0af8bfda9728111a4b2b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 3): crates/zeroclaw-tool-call-parser/src/lib.rs:1210-1220 | src/main.rs:9174-9183 | xtask/src/cmd/mdbook/check.rs:223-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tool-call-parser/src/lib.rs:1210\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/zeroclaw-tool-call-parser/src/lib.rs:1220\u0060 calls \u0060Some\u0060, \u0060push\u0060 and \u0060src/main.rs:9183\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/zeroclaw-tool-call-parser/src/lib.rs"},"region":{"startLine":1210}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ab893f26b6c906fc0069ec7c93cfc3b9c46f20f4dc6d9d65b3b08e95868982b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): crates/zeroclaw-tools/src/data_management.rs:297-307 | crates/zeroclaw-tools/src/data_management.rs:343-353 | crates/zeroclaw-tools/src/data_management.rs:386-396 \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/zeroclaw-tools/src/data_management.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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/zeroclaw-tools/src/data_management.rs:354\u0060 calls \u0060to_string_lossy\u0060, \u0060to_string\u0060 and \u0060crates/zeroclaw-tools/src/data_management.rs:397\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/zeroclaw-tools/src/data_management.rs"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"4770d1884e31fbfca1902f1b42ca3ee497e1bf0acbf3134fc04e7e701d278326"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): apps/tauri/src/daemon.rs:427-437 | apps/tauri/src/daemon.rs:451-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/tauri/src/daemon.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":"apps/tauri/src/daemon.rs"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a85a2433537b95853f5552df7da3efece6147450007e373ee19a6a3213df99f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): apps/zerocode/src/chat.rs:7805-7815 | apps/zerocode/src/logs.rs:82-92 \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 \u0060apps/zerocode/src/chat.rs:7805\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":"apps/zerocode/src/chat.rs"},"region":{"startLine":7805}}}],"partialFingerprints":{"codehealthFindingId/v1":"8af5d14575a4e9f28282e42ac690ebb23f92bcfb24f2ceb1c1d0d812ecd1e76b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): apps/zerocode/src/client.rs:1781-1791 | apps/zerocode/src/client.rs:2084-2094 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/client.rs:1781\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, \u0060apps/zerocode/src/client.rs:1780\u0060 calls \u0060lines\u0060 and \u0060apps/zerocode/src/client.rs:2083\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":"apps/zerocode/src/client.rs"},"region":{"startLine":1781}}}],"partialFingerprints":{"codehealthFindingId/v1":"f81153da172ecab3b3a9ee64161e62998f683fe8bd75861a2f6d9523fdffa851"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): apps/zerocode/src/config_manager.rs:5548-5558 | apps/zerocode/src/config_manager.rs:5641-5651 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/config_manager.rs:5548\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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":5548}}}],"partialFingerprints":{"codehealthFindingId/v1":"7215aacfb6ab444c7d2d69e224e08cb2e298cecdc7c412516ccff77998d54a17"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): apps/zerocode/src/config_manager.rs:5610-5620 | apps/zerocode/src/config_manager.rs:5699-5709 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/config_manager.rs:5610\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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":5610}}}],"partialFingerprints":{"codehealthFindingId/v1":"d476c3bebf3025375b160f7eec6dfa6cceb830acdacb5846fb2354f653d001b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): apps/zerocode/src/main.rs:989-999 | apps/zerocode/src/main.rs:1042-1052 \u2014 both copies are in the same file, so extract the block 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":"apps/zerocode/src/main.rs"},"region":{"startLine":989}}}],"partialFingerprints":{"codehealthFindingId/v1":"3280300d3b4f80c8a58c1465218636b44c5d79e0f1147fb571a65d42f930289f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): apps/zerocode/src/quickstart_pane.rs:1238-1248 | apps/zerocode/src/quickstart_pane.rs:1366-1376 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/quickstart_pane.rs:1366\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":"apps/zerocode/src/quickstart_pane.rs"},"region":{"startLine":1238}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1b2c9150398adbec0b282856d546a01e76bcd8a7b828e8cf5b2e591c545dc83"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): apps/zerocode/src/quickstart_pane.rs:3117-3127 | apps/zerocode/src/quickstart_pane.rs:3180-3190 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/quickstart_pane.rs:3117\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":"apps/zerocode/src/quickstart_pane.rs"},"region":{"startLine":3117}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad391e78211404bbdc796a6f48580aba43e57c44cac95b9eeedb3b9a10c19d12"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): crates/zeroclaw-api/src/model_provider.rs:911-921 | crates/zeroclaw-api/src/model_provider.rs:948-957 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-api/src/model_provider.rs:911\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/zeroclaw-api/src/model_provider.rs"},"region":{"startLine":911}}}],"partialFingerprints":{"codehealthFindingId/v1":"195e457a6aec893d9e0e0a60df2f3e6a3d8d29a830e5066e63fff1abbcfde267"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-channels/src/discord/mod.rs:2473-2483 | crates/zeroclaw-channels/src/discord/mod.rs:2665-2675 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/discord/mod.rs:2473\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":2473}}}],"partialFingerprints":{"codehealthFindingId/v1":"e40e7263245c3420779916752d40a6997c3eaf854a6c8e59a818737a56eef5f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-channels/src/discord/mod.rs:3812-3822 | crates/zeroclaw-channels/src/discord/mod.rs:3850-3860 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/discord/mod.rs:3812\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":3812}}}],"partialFingerprints":{"codehealthFindingId/v1":"e51c89f312d4d7c60a9436fcea9d1a398b0b8573ddc3777d387f3316efafee35"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-channels/src/login_probe.rs:45-55 | crates/zeroclaw-channels/src/login_relink.rs:73-83 \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/zeroclaw-channels/src/login_probe.rs:45\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/zeroclaw-channels/src/login_probe.rs"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"abd7db0b5cd795372cf598ec2d58ccb21d00595c8b278bdffbe8f9fde5870874"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-channels/src/matrix.rs:764-774 | crates/zeroclaw-channels/src/orchestrator/mod.rs:8461-8471 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/matrix.rs\u0060 and \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 76 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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":764}}}],"partialFingerprints":{"codehealthFindingId/v1":"1edd18394958460cd65d3ebfa257ca8fd846d77a7047dbfd4d8a18b65839fff3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-channels/src/matrix.rs:5479-5489 | crates/zeroclaw-channels/src/signal.rs:1532-1542 \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/zeroclaw-channels/src/matrix.rs:5479\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":5479}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fe0aa1c135708abdb19d4d4f1b5c10001f4b619112388cfd26e87a4a00d3df6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:4472-4482 | crates/zeroclaw-channels/src/orchestrator/mod.rs:4508-4518 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":4472}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae4ae655be9a5227d13b1884abfd606f74e34b0dbfaf61d0367f95b188384a99"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:11233-11243 | crates/zeroclaw-channels/src/orchestrator/mod.rs:11251-11261 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:11233\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":11233}}}],"partialFingerprints":{"codehealthFindingId/v1":"843f823c6435c52235ae5f9cbcca8456c7814959ca240be2093128f99699b690"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:15114-15124 | crates/zeroclaw-channels/src/orchestrator/mod.rs:16250-16260 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:15114\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":15114}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dd353572853ee509588f46474a45ee88bdff6570ee4646ab6d2c492b1d34f43"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-channels/src/slack.rs:1592-1602 | crates/zeroclaw-channels/src/slack.rs:2676-2686 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/slack.rs:1592\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":1592}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fbd8feac5e3e0be4a4f447f6a736aa2ac11545d3a7ec1d24e0941c86b291610"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-channels/src/slack.rs:2813-2823 | crates/zeroclaw-channels/src/slack.rs:2870-2880 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/slack.rs:2813\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":2813}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfcc451645b686b574d2893b58ab5877d102afb4bdef7235f3569d9c6f8cf20f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-channels/src/slack.rs:2932-2942 | crates/zeroclaw-channels/src/slack.rs:2952-2962 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":2932}}}],"partialFingerprints":{"codehealthFindingId/v1":"554f02cc9c8826707d4c395d6c37addd6babd07517098c888f861bc66a3f6d2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-channels/src/slack.rs:3080-3090 | crates/zeroclaw-channels/src/slack.rs:3818-3828 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/slack.rs:3080\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":3080}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ed7bdf46faf54cbd4a12b89e2873f4a224acaf312f46f3e7cf6084c606b0cac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-channels/src/util.rs:139-149 | crates/zeroclaw-providers/src/compatible.rs:397-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/zeroclaw-channels/src/util.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. 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/zeroclaw-channels/src/util.rs"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddb2eb8c7ba08870b7849778168b04de4f7af2aa9b653e44d5e76a97dcc4a84a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-channels/src/wecom_ws.rs:947-957 | crates/zeroclaw-channels/src/wecom_ws.rs:983-993 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/wecom_ws.rs:947\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/zeroclaw-channels/src/wecom_ws.rs"},"region":{"startLine":947}}}],"partialFingerprints":{"codehealthFindingId/v1":"290d47f588268b5f04613b567b11e2feb4eeead1fe719015e6745145cc1ea61f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-config/src/policy.rs:4387-4397 | crates/zeroclaw-config/src/policy.rs:4587-4597 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-config/src/policy.rs:4387\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/zeroclaw-config/src/policy.rs"},"region":{"startLine":4387}}}],"partialFingerprints":{"codehealthFindingId/v1":"e818ffc1d28cf0c2eede3466ccfbea6947c4b6ed02746e6574abd5b46d4fc6b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-config/src/schema.rs:27684-27698 | crates/zeroclaw-config/src/schema.rs:27944-27954 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-config/src/schema.rs:27677\u0060 calls \u0060Some\u0060 and \u0060crates/zeroclaw-config/src/schema.rs:27943\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/zeroclaw-config/src/schema.rs"},"region":{"startLine":27684}}}],"partialFingerprints":{"codehealthFindingId/v1":"a392be2b7e44d495a89b43695ebcc461e339cd262fa18d1ffe4df8ea7bbfc0bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-config/src/schema/v2.rs:3293-3303 | crates/zeroclaw-config/src/schema/v2.rs:3341-3351 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-config/src/schema/v2.rs:3293\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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":3293}}}],"partialFingerprints":{"codehealthFindingId/v1":"75ad3b1d399bdbf2a0c98ab85d869b2596d8dd362b5ac8e565d3d4b6453c544f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-gateway/src/api.rs:1797-1807 | crates/zeroclaw-gateway/src/api.rs:2175-2185 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-gateway/src/api.rs"},"region":{"startLine":1797}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c2e670bf1591d7a79cf8800829c585892f3b4ef9f859edf11e675e5904a6253"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201311 lines \u00D7 2): crates/zeroclaw-gateway/src/api_oidc.rs:844-854 | crates/zeroclaw-gateway/src/api_oidc.rs:1009-1016 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-gateway/src/api_oidc.rs:1006\u0060 calls \u0060Query\u0060 and \u0060crates/zeroclaw-gateway/src/api_oidc.rs:841\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/zeroclaw-gateway/src/api_oidc.rs"},"region":{"startLine":844}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0d72afcfd8c57d27454bf1cc14ba88105f8a2fb550ff67846e5cac130881b79"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201311 lines \u00D7 2): crates/zeroclaw-gateway/src/lib.rs:2192-2202 | crates/zeroclaw-gateway/src/lib.rs:3135-3142 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/lib.rs:2192\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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":2192}}}],"partialFingerprints":{"codehealthFindingId/v1":"95d88d492da2b0e20636ee64933c560441b181524b159e805f240f6739019c0b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-gateway/src/principal_gate.rs:633-643 | crates/zeroclaw-gateway/src/principal_gate.rs:672-682 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-gateway/src/principal_gate.rs"},"region":{"startLine":633}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce11c58009502e56e94e213d98126b414536b5f043b5c11c7fff8ef430162b1e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-gateway/src/ws.rs:2537-2547 | crates/zeroclaw-gateway/src/ws.rs:2712-2723 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/ws.rs:2537\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/zeroclaw-gateway/src/ws.rs"},"region":{"startLine":2537}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd55ac3fd717ff085be6fba2245cfb218fd140ae8c4627d30f1c9547fc655b5e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-hardware/src/lib.rs:303-313 | crates/zeroclaw-hardware/src/lib.rs:350-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/zeroclaw-hardware/src/lib.rs:303\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/zeroclaw-hardware/src/lib.rs"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"0513141418c6bf459605c433903d5ada5554585825e9d1a80ccf0c4e90f48d7a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): crates/zeroclaw-hardware/src/pico_code.rs:305-334 | crates/zeroclaw-hardware/src/pico_code.rs:490-519 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-hardware/src/pico_code.rs:305\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/zeroclaw-hardware/src/pico_code.rs"},"region":{"startLine":305}}}],"partialFingerprints":{"codehealthFindingId/v1":"500ec61f9b98dea59f4c44da4374523a98f49e44ceb3ce4c5598ba06219c401e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-hardware/src/tool_registry.rs:44-54 | crates/zeroclaw-hardware/src/tool_registry.rs:57-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/zeroclaw-hardware/src/tool_registry.rs:44\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/zeroclaw-hardware/src/tool_registry.rs"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"98102e416a3bd7efb853566929a5a1905fac3f75980c9dbb88f90529b2163aa8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-macros/src/lib.rs:1101-1111 | crates/zeroclaw-macros/src/lib.rs:1157-1167 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-macros/src/lib.rs:1101\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/zeroclaw-macros/src/lib.rs"},"region":{"startLine":1101}}}],"partialFingerprints":{"codehealthFindingId/v1":"54c91578741438e7d484bda716a61ce01225c023a123203021a000a0adf6574c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-macros/src/lib.rs:1477-1487 | crates/zeroclaw-macros/src/lib.rs:1504-1514 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-macros/src/lib.rs:1477\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/zeroclaw-macros/src/lib.rs"},"region":{"startLine":1477}}}],"partialFingerprints":{"codehealthFindingId/v1":"19d67592cf7fc72427863b80fdaff700fe090ebead451c76e5218883bfbace14"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-memory/src/agent_scoped.rs:157-167 | crates/zeroclaw-memory/src/agent_scoped_markdown.rs:100-110 \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/zeroclaw-memory/src/agent_scoped.rs:157\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/zeroclaw-memory/src/agent_scoped.rs"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"e07478f5897ed1b6a8150f6d123a370b0dcf8fcfd748e33109310edb0ae6e500"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-memory/src/qdrant.rs:744-755 | crates/zeroclaw-memory/src/qdrant.rs:1137-1147 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-memory/src/qdrant.rs:744\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/zeroclaw-memory/src/qdrant.rs"},"region":{"startLine":744}}}],"partialFingerprints":{"codehealthFindingId/v1":"d19eb5d073cc17f36e88e3922a20d61861fc27ca2a21465c354ed569e252fbf0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-memory/src/rerank.rs:268-278 | crates/zeroclaw-memory/src/rerank.rs:299-309 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-memory/src/rerank.rs:268\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/zeroclaw-memory/src/rerank.rs"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9319182bd5218350718f75d05bd11ec2577388fca08533e1b530c6e7b7063f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): crates/zeroclaw-memory/src/sqlite.rs:1009-1018 | crates/zeroclaw-memory/src/sqlite.rs:1996-2006 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-memory/src/sqlite.rs:1009\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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":1009}}}],"partialFingerprints":{"codehealthFindingId/v1":"014918b812f883426b5a2819f740f4b6c3519b2f5e52065899e038af6c1676fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-providers/src/anthropic.rs:2905-2915 | crates/zeroclaw-providers/src/anthropic.rs:3017-3027 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/anthropic.rs:2905\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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":2905}}}],"partialFingerprints":{"codehealthFindingId/v1":"9304c3107a4abe2527c68df2c2ab97146b54e22e944e9c4fce52127903aecbf3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-providers/src/auth/email_oauth2.rs:187-197 | crates/zeroclaw-providers/src/auth/openai_oauth.rs:433-443 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/auth/email_oauth2.rs\u0060 and \u0060crates/zeroclaw-providers/src/auth/openai_oauth.rs\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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/auth/email_oauth2.rs:187\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/zeroclaw-providers/src/auth/email_oauth2.rs"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6f513c3a6cf7fb537b361afb562c974855000705632f90b4586fa08051f1952"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-providers/src/azure_openai.rs:692-702 | crates/zeroclaw-providers/src/openai.rs:693-703 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/azure_openai.rs\u0060 and \u0060crates/zeroclaw-providers/src/openai.rs\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 226 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/zeroclaw-providers/src/azure_openai.rs"},"region":{"startLine":692}}}],"partialFingerprints":{"codehealthFindingId/v1":"0694620640faa195678201025a947b2b384a904b5e3e2c5b1e89e9789f538b3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-providers/src/compatible.rs:1570-1580 | crates/zeroclaw-providers/src/compatible.rs:4668-4678 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":1570}}}],"partialFingerprints":{"codehealthFindingId/v1":"24bb4ca38018a052bfbe149a9605d24d49f3ec5accfa3a7adb3093a367995805"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-providers/src/compatible.rs:4522-4532 | crates/zeroclaw-providers/src/compatible.rs:4666-4676 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/compatible.rs:4522\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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":4522}}}],"partialFingerprints":{"codehealthFindingId/v1":"e00d8086caa346c38d84732c9cc3bd1c3ccaf2b0afa4b47645cdfff881ba1ebd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-providers/src/factory.rs:1119-1129 | crates/zeroclaw-providers/src/factory.rs:1153-1163 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/factory.rs:1119\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/zeroclaw-providers/src/factory.rs:1152\u0060 calls \u0060canonical_base_url\u0060 and \u0060crates/zeroclaw-providers/src/factory.rs:1118\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/zeroclaw-providers/src/factory.rs"},"region":{"startLine":1119}}}],"partialFingerprints":{"codehealthFindingId/v1":"26860e1a3168e717fa76d42f43988d52a963f6eccb2f607e3f531a9848e8de9e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-providers/src/gemini_cli.rs:212-222 | crates/zeroclaw-providers/src/kilocli.rs:209-219 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/gemini_cli.rs\u0060 and \u0060crates/zeroclaw-providers/src/kilocli.rs\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 164 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/zeroclaw-providers/src/gemini_cli.rs:212\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/zeroclaw-providers/src/gemini_cli.rs"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfdf4ad81021a60f98c881cc9dd1916f98fefd8a5539e549e98f67a2f5ba7925"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-providers/src/hailo_ollama.rs:553-563 | crates/zeroclaw-providers/src/ollama.rs:407-417 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/hailo_ollama.rs\u0060 and \u0060crates/zeroclaw-providers/src/ollama.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 108 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/zeroclaw-providers/src/hailo_ollama.rs:553\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/zeroclaw-providers/src/hailo_ollama.rs"},"region":{"startLine":553}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b5b6317d97b31a04c69707031104336db473e4fae430da4b4e19294a9f6403f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-providers/src/multimodal.rs:1386-1396 | crates/zeroclaw-providers/src/multimodal.rs:1542-1552 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/multimodal.rs:1386\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/zeroclaw-providers/src/multimodal.rs"},"region":{"startLine":1386}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e2762c0812eee7fbc9551924286180068499eddce99e998b6c2630ee7ce0497"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/agent.rs:3376-3386 | crates/zeroclaw-runtime/src/agent/turn/mod.rs:4149-4158 \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/zeroclaw-runtime/src/agent/agent.rs:3376\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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":3376}}}],"partialFingerprints":{"codehealthFindingId/v1":"76a8b54d87728ff28c9f8910167a6d59cd804e6ef33ae20c481e14ebb7f4cbfa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/agent.rs:5037-5047 | crates/zeroclaw-runtime/src/agent/agent.rs:5060-5069 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/agent/agent.rs:5037\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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":5037}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fa67c4c9ca296556f610b8c9fb68efc3fb83e6a46a54ba95332672126d87677"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/loop_.rs:1703-1712 | crates/zeroclaw-runtime/src/agent/loop_.rs:3830-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":1703}}}],"partialFingerprints":{"codehealthFindingId/v1":"baaaf2e729344afaae35f377c03a2a38592fe1d8d3c3d38c42a9af7acc142f0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/turn/provider_call.rs:448-458 | crates/zeroclaw-runtime/src/agent/turn/provider_call.rs:463-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/zeroclaw-runtime/src/agent/turn/provider_call.rs:448\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/zeroclaw-runtime/src/agent/turn/provider_call.rs"},"region":{"startLine":448}}}],"partialFingerprints":{"codehealthFindingId/v1":"04d81c1867a4d40ea5a4cf58cff9d40d07f9b1dd97789a994957ee0d19528137"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-runtime/src/doctor/mod.rs:1861-1871 | crates/zeroclaw-runtime/src/doctor/mod.rs:1896-1906 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-runtime/src/doctor/mod.rs"},"region":{"startLine":1861}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d18852f0bbcbf386b4ae9297b840aaad3079fdd90ec2443d9b2f1dfa0c51bcd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-runtime/src/observability/mod.rs:311-321 | crates/zeroclaw-runtime/src/observability/mod.rs:328-338 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/observability/mod.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/zeroclaw-runtime/src/observability/mod.rs"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a1bab47d3a756a6e82d29abc3cdf2fac786bde5a8ed8d3f9fd08d78ee5cbfa2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-runtime/src/peers.rs:20-30 | crates/zeroclaw-runtime/src/peers.rs:36-46 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-runtime/src/peers.rs"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"305dff4ad361cc550181aa8661b91868c6d8375ccd4ab7a218020c668cd3cf0a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-runtime/src/rpc/dispatch.rs:5269-5279 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:5288-5298 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/rpc/dispatch.rs:5269\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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":5269}}}],"partialFingerprints":{"codehealthFindingId/v1":"cada2780d8d0de6411b60b08eb638c6faf11cceb43678f37dc8479982a69ffea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-runtime/src/rpc/local.rs:670-680 | crates/zeroclaw-runtime/src/rpc/wss.rs:959-969 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/rpc/local.rs\u0060 and \u0060crates/zeroclaw-runtime/src/rpc/wss.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 81 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/zeroclaw-runtime/src/rpc/local.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/zeroclaw-runtime/src/rpc/local.rs"},"region":{"startLine":670}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec72db3a4ebaa2af755e9854ad7e7b18e693755f26780e9794469a736d674da9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-runtime/src/security/audit.rs:674-684 | crates/zeroclaw-runtime/src/security/audit.rs:688-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/zeroclaw-runtime/src/security/audit.rs:674\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/zeroclaw-runtime/src/security/audit.rs"},"region":{"startLine":674}}}],"partialFingerprints":{"codehealthFindingId/v1":"b57de95a9da7ffb03ca65b8a2d5dbd79566e1ff6808b2182f4661d106ca583c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/delegate.rs:4648-4658 | crates/zeroclaw-runtime/src/tools/delegate.rs:4848-4858 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/tools/delegate.rs:4648\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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":4648}}}],"partialFingerprints":{"codehealthFindingId/v1":"40997577da9a60e6f290646751530bbe2c8757676fad45970e8b8fe1def96936"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/skill_manage.rs:418-427 | crates/zeroclaw-runtime/src/tools/skill_manage.rs:519-529 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-runtime/src/tools/skill_manage.rs"},"region":{"startLine":418}}}],"partialFingerprints":{"codehealthFindingId/v1":"9671465576c9b88815327c9f0f4313452f22d90745150b0b8542801899b5e000"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/skill_tool.rs:246-256 | crates/zeroclaw-tools/src/google_workspace.rs:453-463 \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/zeroclaw-runtime/src/tools/skill_tool.rs:246\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/zeroclaw-runtime/src/tools/skill_tool.rs"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea654061fed1247d86ecfff866a4da466b9639e61ab0099e5b90e120dd8ceff4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/sop_workshop.rs:177-187 | crates/zeroclaw-tools/src/git_operations.rs:1787-1797 \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/zeroclaw-runtime/src/tools/sop_workshop.rs:177\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/zeroclaw-runtime/src/tools/sop_workshop.rs"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"9aca58e4f2f9ed342aee569884a1828d1fbf5adde452cbed0415ff65eea4f3a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-runtime/src/tunnel/cloudflare.rs:65-75 | crates/zeroclaw-runtime/src/tunnel/openvpn.rs:66-76 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/tunnel/cloudflare.rs\u0060 and \u0060crates/zeroclaw-runtime/src/tunnel/openvpn.rs\u0060 as WHOLE FILES: this scan already matched 4 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. 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/zeroclaw-runtime/src/tunnel/cloudflare.rs:65\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/zeroclaw-runtime/src/tunnel/cloudflare.rs"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c9ce6065b53b99b59547a468cb16a6aded22b85d9099fdd3fb546fe56b6cb66"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-tool-call-parser/src/lib.rs:764-774 | crates/zeroclaw-tool-call-parser/src/lib.rs:795-805 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tool-call-parser/src/lib.rs:764\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/zeroclaw-tool-call-parser/src/lib.rs"},"region":{"startLine":764}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a8f81dc7f65db9a8ad7aa8375517cf76a8e207de5544c506e89bf1713c6dbcd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-tools/src/a2a_client.rs:2087-2097 | crates/zeroclaw-tools/src/a2a_client.rs:2134-2144 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/a2a_client.rs:2087\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/zeroclaw-tools/src/a2a_client.rs"},"region":{"startLine":2087}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4d659f3cf2e9329f78f074ed344b35a87097133868726d7f0493c47dc09fdcb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201320 lines \u00D7 3): crates/zeroclaw-tools/src/ask_user.rs:141-158 | crates/zeroclaw-tools/src/escalate.rs:249-268 | crates/zeroclaw-tools/src/poll.rs:246-256 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/ask_user.rs\u0060 and \u0060crates/zeroclaw-tools/src/escalate.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 96 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/zeroclaw-tools/src/ask_user.rs:141\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/zeroclaw-tools/src/ask_user.rs"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd2ca05f807b14a3b36db31cdf6a69b0a6cbee64b47a8687e7fbf09262ecc756"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): crates/zeroclaw-tools/src/git_operations.rs:231-241 | crates/zeroclaw-tools/src/git_operations.rs:273-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/zeroclaw-tools/src/git_operations.rs:231\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/zeroclaw-tools/src/git_operations.rs"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"886ecf347716a48314fb4e9100c388b8653fad4784980e9c5958209bf0a92626"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-tools/src/jira_tool.rs:503-513 | crates/zeroclaw-tools/src/jira_tool.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/zeroclaw-tools/src/jira_tool.rs:503\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/zeroclaw-tools/src/jira_tool.rs"},"region":{"startLine":503}}}],"partialFingerprints":{"codehealthFindingId/v1":"281054ad5a66dcf03736f248360c7ef8d3c62db4827862ddecc52f4b1e204373"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-tools/src/linkedin_client.rs:85-96 | crates/zeroclaw-tools/src/pushover.rs:60-71 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/linkedin_client.rs\u0060 and \u0060crates/zeroclaw-tools/src/pushover.rs\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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/linkedin_client.rs:85\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/zeroclaw-tools/src/linkedin_client.rs"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0da864819babaac7c46be32ec47f07d15f1f96afd842d3fb2921af9bc6807d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-tools/src/mcp_transport.rs:1242-1252 | crates/zeroclaw-tools/src/mcp_transport.rs:2018-2028 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/mcp_transport.rs:1242\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/zeroclaw-tools/src/mcp_transport.rs"},"region":{"startLine":1242}}}],"partialFingerprints":{"codehealthFindingId/v1":"24245d21718c100db3fe9a0093322456854c70eaaf1a6058ecdb1a7d58a84092"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): src/main.rs:10795-10805 | src/main.rs:12380-12389 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/main.rs:10795\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/main.rs"},"region":{"startLine":10795}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed3e6c17bc024e8fa5de50b7326af835933d5d12fec83ffa77942cf0a999a9c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src/main.rs:15599-15609 | src/main.rs:15696-15706 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/main.rs:15599\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/main.rs"},"region":{"startLine":15599}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c04a97ea941b8a714a1da0467b86c486f3d446d1b0ca13570d5279213831429"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): xtask/src/generate/docs.rs:228-237 | xtask/src/generate/review_docs.rs:114-124 \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 \u0060xtask/src/generate/docs.rs:228\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":"xtask/src/generate/docs.rs"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"01491f833be901a0d6359d72a452fedd9a11a9108433e00f6f92709dacc3ccc4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u201310 lines \u00D7 8): crates/zeroclaw-channels/src/lark.rs:927-932 | crates/zeroclaw-channels/src/lark.rs:960-965 | crates/zeroclaw-channels/src/lark.rs:974-979 | crates/zeroclaw-gateway/src/dashboard_session.rs:918-927 | crates/zeroclaw-runtime/src/cron/scheduler.rs:1005-1010 | crates/zeroclaw-runtime/src/rpc/locales.rs:62-67 | crates/zeroclaw-runtime/src/sop/executor.rs:1002-1011 | crates/zeroclaw-runtime/src/tools/send_message_to_peer.rs:302-308 \u2014 there are 8 copies across 6 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 8 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/zeroclaw-channels/src/lark.rs:927\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":927}}}],"partialFingerprints":{"codehealthFindingId/v1":"63803278d954a99a66d89c161327b78e61ae25a3c052f5f86cc53d30ce100ffa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 7): crates/zeroclaw-channels/src/telegram.rs:6739-6748 | crates/zeroclaw-channels/src/telegram.rs:6783-6792 | crates/zeroclaw-channels/src/telegram.rs:6832-6841 | crates/zeroclaw-channels/src/telegram.rs:6876-6885 | crates/zeroclaw-channels/src/telegram.rs:6925-6934 | crates/zeroclaw-channels/src/telegram.rs:6974-6983 | crates/zeroclaw-channels/src/telegram.rs:7023-7032 \u2014 all 7 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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":6739}}}],"partialFingerprints":{"codehealthFindingId/v1":"c149957250ee2170ee9d636cc578225d376015d574445a04b87c3237fcf5ca3a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 7): crates/zeroclaw-providers/src/azure_openai.rs:653-661 | crates/zeroclaw-providers/src/azure_openai.rs:727-735 | crates/zeroclaw-providers/src/compatible.rs:4738-4747 | crates/zeroclaw-providers/src/openai.rs:649-657 | crates/zeroclaw-providers/src/openai.rs:737-745 | crates/zeroclaw-providers/src/openrouter.rs:849-857 | crates/zeroclaw-providers/src/openrouter.rs:1086-1094 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/azure_openai.rs\u0060 and \u0060crates/zeroclaw-providers/src/compatible.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/zeroclaw-providers/src/azure_openai.rs:653\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/zeroclaw-providers/src/azure_openai.rs"},"region":{"startLine":653}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f1522c880fc6ac8dbb5bd3ab78d58105c969b59459037deb8eed6f3e7736010"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 7): crates/zeroclaw-tools/src/web_search_tool.rs:744-753 | crates/zeroclaw-tools/src/web_search_tool.rs:892-901 | crates/zeroclaw-tools/src/web_search_tool.rs:1066-1075 | crates/zeroclaw-tools/src/web_search_tool.rs:1446-1455 | crates/zeroclaw-tools/src/web_search_tool.rs:1679-1688 | crates/zeroclaw-tools/src/web_search_tool.rs:1726-1735 | crates/zeroclaw-tools/src/web_search_tool.rs:1866-1875 \u2014 all 7 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/zeroclaw-tools/src/web_search_tool.rs:744\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/zeroclaw-tools/src/web_search_tool.rs"},"region":{"startLine":744}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0d70cf1784158d8dca40daa19bceceda66d32e9ea83e5d10932cc3dedaff791"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 6): crates/zeroclaw-channels/src/cli.rs:71-81 | crates/zeroclaw-channels/src/imessage.rs:305-315 | crates/zeroclaw-channels/src/irc.rs:666-676 | crates/zeroclaw-channels/src/mochat.rs:234-244 | crates/zeroclaw-channels/src/qq.rs:1704-1713 | crates/zeroclaw-channels/src/qq.rs:1777-1786 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/imessage.rs\u0060 and \u0060crates/zeroclaw-channels/src/irc.rs\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 \u0060crates/zeroclaw-channels/src/cli.rs:71\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/zeroclaw-channels/src/cli.rs"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"693e98b7342724019721ca20c11cf048b253888d9533a44b4d6ceb45761a48be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 6): crates/zeroclaw-providers/src/glm.rs:201-210 | crates/zeroclaw-providers/src/glm.rs:256-265 | crates/zeroclaw-providers/src/openrouter.rs:696-705 | crates/zeroclaw-providers/src/openrouter.rs:769-778 | crates/zeroclaw-providers/src/telnyx.rs:211-220 | crates/zeroclaw-providers/src/telnyx.rs:278-287 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/glm.rs\u0060 and \u0060crates/zeroclaw-providers/src/telnyx.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 49 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/zeroclaw-providers/src/glm.rs:201\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/zeroclaw-providers/src/glm.rs"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"374b75e9467027ada94621be5bb7ebff59429678d1ba574520770963ca1b16b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u201310 lines \u00D7 4): crates/zeroclaw-channels/src/mattermost.rs:2173-2179 | crates/zeroclaw-channels/src/mochat.rs:159-168 | crates/zeroclaw-channels/src/telegram.rs:8737-8744 | crates/zeroclaw-channels/src/twitter.rs:258-267 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/mattermost.rs\u0060 and \u0060crates/zeroclaw-channels/src/telegram.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 36 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/zeroclaw-channels/src/mattermost.rs:2173\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/zeroclaw-channels/src/mattermost.rs"},"region":{"startLine":2173}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f9516698ccf7c510bd92f24abc0dd6fc28245d0b2f77253ecbe5d329f13566b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): crates/zeroclaw-macros/src/lib.rs:534-543 | crates/zeroclaw-macros/src/lib.rs:1195-1204 | crates/zeroclaw-macros/src/lib.rs:1380-1389 | crates/zeroclaw-macros/src/lib.rs:1726-1735 \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/zeroclaw-macros/src/lib.rs"},"region":{"startLine":534}}}],"partialFingerprints":{"codehealthFindingId/v1":"48bc2331afc6324ee8f52d4604c54f96a9151f2165b506600bd0131cc237fabb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u201310 lines \u00D7 4): crates/zeroclaw-runtime/src/plugin_runtime.rs:1146-1151 | crates/zeroclaw-runtime/src/plugin_runtime.rs:1159-1164 | crates/zeroclaw-runtime/src/plugin_runtime.rs:1201-1210 | crates/zeroclaw-runtime/src/tools/mod.rs:4009-4014 \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/zeroclaw-runtime/src/plugin_runtime.rs:1146\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/zeroclaw-runtime/src/plugin_runtime.rs"},"region":{"startLine":1146}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bbd80e5803db47d6f9142802fbd1529f044a03c1a9b2ea15652f6ab85dff566"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): apps/zerocode/src/config_manager.rs:3124-3133 | apps/zerocode/src/config_manager.rs:3783-3792 | apps/zerocode/src/config_manager.rs:3980-3989 \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 \u0060apps/zerocode/src/config_manager.rs:3124\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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":3124}}}],"partialFingerprints":{"codehealthFindingId/v1":"b59472531c18ff670a158929ad2e6aab64051d3b0d1a5511d0c0888a14c8b1c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 3): apps/zerocode/src/config_manager.rs:3543-3551 | apps/zerocode/src/config_manager.rs:3765-3774 | apps/zerocode/src/config_manager.rs:3963-3971 \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 \u0060apps/zerocode/src/config_manager.rs:3543\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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":3543}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dce8f903f03b70dfe5e6b240c627d04376adc92113d3db39d3a9dbd7e8391d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): crates/zeroclaw-channels/src/telegram.rs:4270-4279 | crates/zeroclaw-channels/src/telegram.rs:4339-4348 | crates/zeroclaw-channels/src/whatsapp_web.rs:3789-3798 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/telegram.rs\u0060 and \u0060crates/zeroclaw-channels/src/whatsapp_web.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 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/zeroclaw-channels/src/telegram.rs:4270\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":4270}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b0bcc2cd5549626aa3dc6094d9d9bb6ba9c3ea8e40e5d55f5076ebfaa948716"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): crates/zeroclaw-channels/src/telegram.rs:6597-6606 | crates/zeroclaw-channels/src/telegram.rs:7065-7074 | crates/zeroclaw-channels/src/telegram.rs:7107-7116 \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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":6597}}}],"partialFingerprints":{"codehealthFindingId/v1":"19f714b990c4e6a66bed0ec5e4ad1e9747cecebb98e7ffaa7bd4b39a83c8fe17"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): crates/zeroclaw-gateway/src/api_skills.rs:256-265 | crates/zeroclaw-gateway/src/api_skills.rs:286-295 | crates/zeroclaw-gateway/src/api_skills.rs:314-323 \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/zeroclaw-gateway/src/api_skills.rs:256\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/zeroclaw-gateway/src/api_skills.rs:283\u0060 calls \u0060Json\u0060 and \u0060crates/zeroclaw-gateway/src/api_skills.rs:253\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/zeroclaw-gateway/src/api_skills.rs"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"13b5985317e564d7ea475348390df5b5720953fc9dedaca591babbc16cd39e37"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 3): crates/zeroclaw-gateway/src/api_sop_author.rs:443-452 | crates/zeroclaw-gateway/src/api_sop_author.rs:672-680 | crates/zeroclaw-gateway/src/api_sop_author.rs:703-712 \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/zeroclaw-gateway/src/api_sop_author.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/zeroclaw-gateway/src/api_sop_author.rs"},"region":{"startLine":443}}}],"partialFingerprints":{"codehealthFindingId/v1":"05dba037057137545373f5923e44175ecc3e0642ed74b67248fa8a0308970f06"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 3): crates/zeroclaw-providers/src/auth/mod.rs:238-247 | crates/zeroclaw-providers/src/auth/mod.rs:326-335 | crates/zeroclaw-providers/src/auth/mod.rs:421-428 \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/zeroclaw-providers/src/auth/mod.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/zeroclaw-providers/src/auth/mod.rs"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f012a0b5c33521696f7e1241d63960044a39503128858f16a890522805ffac7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u201310 lines \u00D7 3): crates/zeroclaw-providers/src/azure_openai.rs:647-656 | crates/zeroclaw-providers/src/azure_openai.rs:721-730 | crates/zeroclaw-providers/src/copilot.rs:482-487 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/azure_openai.rs\u0060 and \u0060crates/zeroclaw-providers/src/copilot.rs\u0060 as WHOLE FILES: this scan already matched 5 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. 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. 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/zeroclaw-providers/src/azure_openai.rs"},"region":{"startLine":647}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d916a448cf76f4d314df0752aa9fbc93a578c86ee1e5ece7a9f717eaeac740e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): crates/zeroclaw-providers/src/reliable.rs:4005-4014 | crates/zeroclaw-providers/src/reliable.rs:4115-4124 | crates/zeroclaw-providers/src/reliable.rs:4205-4214 \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/zeroclaw-providers/src/reliable.rs:4005\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/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":4005}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7a9a4a970dc298320378a47bac380fe7b8673d7b87ec5537ed9c72d9ddc99a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 3): crates/zeroclaw-runtime/src/hooks/runner.rs:197-205 | crates/zeroclaw-runtime/src/hooks/runner.rs:224-232 | crates/zeroclaw-runtime/src/hooks/runner.rs:255-264 \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/zeroclaw-runtime/src/hooks/runner.rs:197\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/zeroclaw-runtime/src/hooks/runner.rs"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d7940eab5c0c5e4cb0d80708416c22517e4221254e88a954d22ef057f55f188"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): crates/zeroclaw-runtime/src/tools/deliver_file.rs:244-253 | crates/zeroclaw-runtime/src/tools/file_read.rs:127-136 | crates/zeroclaw-tools/src/file_upload.rs:231-240 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/tools/deliver_file.rs\u0060 and \u0060crates/zeroclaw-runtime/src/tools/file_read.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 54 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/zeroclaw-runtime/src/tools/deliver_file.rs"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"2028e0741fb01c9e42e76673baa6c742a49d85742ceb1dc62c1b0f39ff60559e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): crates/zeroclaw-tools/src/notion_tool.rs:64-73 | crates/zeroclaw-tools/src/notion_tool.rs:113-122 | crates/zeroclaw-tools/src/notion_tool.rs:161-170 \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/zeroclaw-tools/src/notion_tool.rs:64\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/zeroclaw-tools/src/notion_tool.rs"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"95738db25405d3600b375dc49f7ea38c3ec7984041d56084160a67bb7d538f49"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): apps/zerocode/src/app.rs:3353-3362 | apps/zerocode/src/dashboard.rs:3647-3656 \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":"apps/zerocode/src/app.rs"},"region":{"startLine":3353}}}],"partialFingerprints":{"codehealthFindingId/v1":"93519cc4f2722399c9170645a7d733e4218cd9ed4310255d96eab8309596a1d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): apps/zerocode/src/diff.rs:160-170 | apps/zerocode/src/diff.rs:230-239 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/diff.rs:160\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":"apps/zerocode/src/diff.rs"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"581d42ca064ac7a7716b3dfbf53c3013c7e2dd7b183e319e6b55fbfbcb9a0aa5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): apps/zerocode/src/input_bar.rs:1737-1746 | apps/zerocode/src/input_bar.rs:1970-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":"apps/zerocode/src/input_bar.rs"},"region":{"startLine":1737}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b6370daa1d60d570981e3bd2511166939552c200ece06b2ca80a89343d4bf0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): apps/zerocode/src/logs.rs:1691-1700 | apps/zerocode/src/logs.rs:1773-1782 \u2014 both copies are in the same file, so extract the block 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":"apps/zerocode/src/logs.rs"},"region":{"startLine":1691}}}],"partialFingerprints":{"codehealthFindingId/v1":"959c3f1a229575cffc41419a87f44a05134e472a4c91ef9a4c9b5a20098887e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): apps/zerocode/src/todo_tracker.rs:190-199 | apps/zerocode/src/todo_tracker.rs:228-236 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/todo_tracker.rs:190\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":"apps/zerocode/src/todo_tracker.rs"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed426e9643a562c0d1e71fe0a5edb8481aba5294105ab7fd6230ee15345938d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): apps/zerocode/src/zerocode_pane.rs:1276-1284 | apps/zerocode/src/zerocode_pane.rs:1906-1915 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/zerocode_pane.rs:1906\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":"apps/zerocode/src/zerocode_pane.rs"},"region":{"startLine":1276}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc8c3a39704c944141835390ed3802cfe25d5149aee5ae7b9249d5501e0343ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): apps/zerorelay/src/enroll_proxy.rs:177-186 | apps/zerorelay/src/enroll_proxy.rs:250-259 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerorelay/src/enroll_proxy.rs:177\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":"apps/zerorelay/src/enroll_proxy.rs"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"e117e3a0fa7aca1fa52952e1ede954ed90f5bfbc30313b8f8a3aa5f705f563d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-channels/src/acp_channel.rs:378-388 | crates/zeroclaw-runtime/src/rpc/approval_channel.rs:266-276 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/acp_channel.rs\u0060 and \u0060crates/zeroclaw-runtime/src/rpc/approval_channel.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 49 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/zeroclaw-channels/src/acp_channel.rs:378\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/zeroclaw-channels/src/acp_channel.rs"},"region":{"startLine":378}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e109a56089436f099995f3a46e033c43250e57feea98af05acccff9e9173e6e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-channels/src/clawdtalk.rs:120-129 | crates/zeroclaw-channels/src/clawdtalk.rs:183-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/zeroclaw-channels/src/clawdtalk.rs:120\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/zeroclaw-channels/src/clawdtalk.rs"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b1f088844bdad6a779e586a034991b3b80010767a66489fe46e8a50312dc2b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-channels/src/discord/markers.rs:791-800 | crates/zeroclaw-channels/src/matrix.rs:3305-3314 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/discord/markers.rs\u0060 and \u0060crates/zeroclaw-channels/src/matrix.rs\u0060 as WHOLE FILES: this scan already matched 8 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/zeroclaw-channels/src/discord/markers.rs:791\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/zeroclaw-channels/src/discord/markers.rs"},"region":{"startLine":791}}}],"partialFingerprints":{"codehealthFindingId/v1":"369297da49c48578d668ac870d8a90c4211a4af5f1108ea5df0a5c3fa341451f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 2): crates/zeroclaw-channels/src/discord/mod.rs:1829-1836 | crates/zeroclaw-channels/src/discord/mod.rs:1854-1863 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":1829}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c072471fb5f7012e1f69de904875d9fa05964edb037d2aa9524774a2a0f9dac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): crates/zeroclaw-channels/src/discord/mod.rs:2139-2147 | crates/zeroclaw-channels/src/qq.rs:1504-1513 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/discord/mod.rs\u0060 and \u0060crates/zeroclaw-channels/src/qq.rs\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. 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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":2139}}}],"partialFingerprints":{"codehealthFindingId/v1":"70a89f1ceabeac7921bd87e7ae56d49ae724c7de6a1802364f40c733e061bb8e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u201310 lines \u00D7 2): crates/zeroclaw-channels/src/email_channel.rs:480-486 | crates/zeroclaw-channels/src/email_channel.rs:529-538 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/email_channel.rs:480\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/zeroclaw-channels/src/email_channel.rs"},"region":{"startLine":480}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0d4a7dc3bce3445897f9184cc52f64381086c91b0823380fc24edca223b947a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-channels/src/gmail_push.rs:187-196 | crates/zeroclaw-channels/src/gmail_push.rs:261-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/gmail_push.rs"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f32a3f6783b2e95e88a130371a4b96e9a5100d870fadbe909777a8cf9d5a645"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-channels/src/gmail_push.rs:206-215 | crates/zeroclaw-channels/src/gmail_push.rs:592-601 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/gmail_push.rs:206\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/zeroclaw-channels/src/gmail_push.rs"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"160bc8c3636a8f67ddd974b9b32eca766130576961bfcf5495f3f153e2c818f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): crates/zeroclaw-channels/src/lark.rs:2421-2429 | crates/zeroclaw-channels/src/lark.rs:2835-2844 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/lark.rs:2421\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":2421}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9ff2ae6be77617ff1d839db9f06227823b7c736212468ff6ba2c3812045857c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-channels/src/line.rs:119-128 | crates/zeroclaw-channels/src/line.rs:163-172 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/line.rs:119\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/zeroclaw-channels/src/line.rs"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fe60927a5f6279512825a794a53b0331eaac39ce80268a0a5e939f1061d3331"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-channels/src/line.rs:468-477 | crates/zeroclaw-channels/src/line.rs:498-507 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/line.rs:468\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/zeroclaw-channels/src/line.rs"},"region":{"startLine":468}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d681fd87fe02d6e1b7fc186ed4227315f2fdb8641d25de0a978482d53b1efc8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-channels/src/matrix.rs:5179-5188 | crates/zeroclaw-channels/src/matrix.rs:5263-5272 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/matrix.rs:5179\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":5179}}}],"partialFingerprints":{"codehealthFindingId/v1":"30e0991c973329cc051ffd5ed577d9e27a994b7329a2c5f0de3936d39fe69535"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-channels/src/mattermost.rs:2157-2166 | crates/zeroclaw-channels/src/mattermost.rs:2175-2184 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/mattermost.rs:2157\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/zeroclaw-channels/src/mattermost.rs"},"region":{"startLine":2157}}}],"partialFingerprints":{"codehealthFindingId/v1":"43c472d66c2117613cff449919292afed0a5eb98bbf40ca3b0d67e119854a7ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1308-1317 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1645-1654 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1308\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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":1308}}}],"partialFingerprints":{"codehealthFindingId/v1":"1684182aac3c6baa262af2645e9cda402f92d255b24292688783ca3bc58d8f66"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1882-1891 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:3155-3164 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":1882}}}],"partialFingerprints":{"codehealthFindingId/v1":"b901abd19ad2125f31abc93ddf990cbffee80eca050abc9438d5596962f3ae4f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-channels/src/qq.rs:1543-1552 | crates/zeroclaw-channels/src/qq.rs:1592-1601 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/qq.rs"},"region":{"startLine":1543}}}],"partialFingerprints":{"codehealthFindingId/v1":"e52988d07941c1510d0930c4e892ee784f1cc0fab7d9a6f8c0b0271ff0b53054"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u201310 lines \u00D7 2): crates/zeroclaw-channels/src/slack.rs:2162-2171 | crates/zeroclaw-channels/src/slack.rs:2952-2957 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/slack.rs:2162\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":2162}}}],"partialFingerprints":{"codehealthFindingId/v1":"351cbb9bcd0be2bbac9f9bb45983b387a9321a913125014ebe37bd198de9daa8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): crates/zeroclaw-channels/src/slack.rs:4816-4824 | crates/zeroclaw-channels/src/slack.rs:5048-5057 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/slack.rs:4816\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":4816}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ca977354b7d0351b7a9a6ab3870207b11c160f98f7a167116ef2649a7b1c6e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 2): crates/zeroclaw-channels/src/slack.rs:4977-4986 | crates/zeroclaw-gateway/src/lib.rs:5317-5324 \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/zeroclaw-channels/src/slack.rs:4977\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":4977}}}],"partialFingerprints":{"codehealthFindingId/v1":"7885c0b62fffe3a4b178b348ed621562942e4d1565f28a35c60a91306170de7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): crates/zeroclaw-channels/src/slack.rs:5724-5745 | crates/zeroclaw-channels/src/slack.rs:5769-5790 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/slack.rs:5724\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":5724}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1d3a4adf5c65a78cd73838e7f026a3b66327295045b5b464f3797ee6a9e3830"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): crates/zeroclaw-channels/src/telegram.rs:5348-5356 | crates/zeroclaw-channels/src/telegram.rs:6104-6113 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/telegram.rs:5357\u0060 calls \u0060extract_sender_info\u0060 and \u0060crates/zeroclaw-channels/src/telegram.rs:6116\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":5348}}}],"partialFingerprints":{"codehealthFindingId/v1":"7961cfcca71439801c1e61da289585dab3d1912a6669db6ed5ce68ca45308c13"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-channels/src/telegram.rs:8027-8036 | crates/zeroclaw-channels/src/telegram.rs:9149-9159 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/telegram.rs:8027\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":8027}}}],"partialFingerprints":{"codehealthFindingId/v1":"e94309ca835be031a9e49b88b3e5b936154095ca0b71260e887a802d0dabbc71"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-channels/src/transcription.rs:228-237 | crates/zeroclaw-channels/src/transcription.rs:334-343 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/transcription.rs:228\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/zeroclaw-channels/src/transcription.rs"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc78412606f1788b3fa4348e847d69b8c0b83276dc91d8428733aeb6f458744f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-channels/src/wechat.rs:870-879 | crates/zeroclaw-channels/src/whatsapp_web.rs:1291-1300 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/wechat.rs\u0060 and \u0060crates/zeroclaw-channels/src/whatsapp_web.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 46 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/zeroclaw-channels/src/wechat.rs:870\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/zeroclaw-channels/src/wechat.rs"},"region":{"startLine":870}}}],"partialFingerprints":{"codehealthFindingId/v1":"93e6ac42eb13ac01e1eda2d9387b600efba39dcc879366fa1b37f9c8792db000"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-channels/src/wechat.rs:1200-1209 | crates/zeroclaw-channels/src/wechat.rs:1242-1251 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/wechat.rs"},"region":{"startLine":1200}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c8b2132bda7fb312590c0f73eb727568eac7a2aedca8787a5407f6f1258ce56"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-channels/src/whatsapp_storage.rs:494-503 | crates/zeroclaw-channels/src/whatsapp_storage.rs:542-551 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/whatsapp_storage.rs:494\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/zeroclaw-channels/src/whatsapp_storage.rs"},"region":{"startLine":494}}}],"partialFingerprints":{"codehealthFindingId/v1":"68f075d627e680c5fd007538c69a76fb7a9eda9b5004f1bf00a0cfa7654a0ebc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-config/src/schema.rs:26169-26178 | crates/zeroclaw-config/src/schema.rs:26194-26203 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-config/src/schema.rs:26169\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/zeroclaw-config/src/schema.rs:26168\u0060 calls \u0060iter\u0060, \u0060enumerate\u0060 and \u0060crates/zeroclaw-config/src/schema.rs:26193\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/zeroclaw-config/src/schema.rs"},"region":{"startLine":26169}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e36b9d0f42a2b61d344156501905840846b73a337a672153cf6e05c466bef67"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-gateway/src/api.rs:713-722 | crates/zeroclaw-gateway/src/api.rs:776-785 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-gateway/src/api.rs"},"region":{"startLine":713}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd16cb69dd3edffd307cf0d2c87019674c6f24f1df809ab5195e5dc61eb5e444"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): crates/zeroclaw-gateway/src/api_sop.rs:282-291 | crates/zeroclaw-gateway/src/ws.rs:534-542 \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/zeroclaw-gateway/src/api_sop.rs:282\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/zeroclaw-gateway/src/api_sop.rs"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a19835939040b59faf1faa6897dce0df6aa9239a64eb3a1a7d10c7ea8746a86"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-gateway/src/api_sop_author.rs:323-332 | crates/zeroclaw-gateway/src/api_sop_author.rs:337-346 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/api_sop_author.rs:323\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/zeroclaw-gateway/src/api_sop_author.rs"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"5396092747387699a7e229e4667f4e0db14ed3369c577164b03c3bac62e93782"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u201310 lines \u00D7 2): crates/zeroclaw-gateway/src/dashboard_session.rs:920-929 | crates/zeroclaw-gateway/src/dashboard_session.rs:1006-1012 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/dashboard_session.rs:920\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/zeroclaw-gateway/src/dashboard_session.rs"},"region":{"startLine":920}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e038a72c46c1636411302e0de2e5dffb2aa4bcde21b151b21fe697d74ff0215"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-gateway/src/lib.rs:4954-4963 | crates/zeroclaw-gateway/src/lib.rs:5084-5093 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/lib.rs:4954\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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":4954}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8a9c975aa8a395264e8955f4013c5935d62199e15bec3e09f5246e495a4a5de"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-gateway/src/ws.rs:977-986 | crates/zeroclaw-gateway/src/ws.rs:1196-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/ws.rs:977\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/zeroclaw-gateway/src/ws.rs"},"region":{"startLine":977}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2d748123c3994ea9996bdec89482dee103dfa29a87da3f8b48f04ec9de49f62"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-hardware/src/gpio.rs:61-70 | crates/zeroclaw-hardware/src/gpio.rs:182-191 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-hardware/src/gpio.rs"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6097f7249c6b6d306a47130bb83c461e7def825f3e888a1bd3cb6dcd25b6f4f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-hardware/src/peripherals/rpi.rs:106-117 | crates/zeroclaw-hardware/src/rpi.rs:519-530 \u2014 before extracting anything, compare \u0060crates/zeroclaw-hardware/src/peripherals/rpi.rs\u0060 and \u0060crates/zeroclaw-hardware/src/rpi.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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/zeroclaw-hardware/src/peripherals/rpi.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/zeroclaw-hardware/src/peripherals/rpi.rs"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"6486bad5b9fc3be05a404e6b4c7f0683a5427ea9e6c2f21aa63a07f610ba12f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-hardware/src/peripherals/uno_q_bridge.rs:105-114 | crates/zeroclaw-hardware/src/peripherals/uno_q_bridge.rs:181-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/zeroclaw-hardware/src/peripherals/uno_q_bridge.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/zeroclaw-hardware/src/peripherals/uno_q_bridge.rs"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4342cedecd9dad99ae99ab29cc7724c271fdd18fe0acd16e556ae758e464b0f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-hardware/src/uf2.rs:162-171 | crates/zeroclaw-hardware/src/uf2.rs:209-218 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-hardware/src/uf2.rs:162\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/zeroclaw-hardware/src/uf2.rs"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"410bfa01677b675b80999bfd59f4cdf1ed29d26163fdf2bad6daa01a4223d258"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-macros/src/lib.rs:1050-1059 | crates/zeroclaw-macros/src/lib.rs:1559-1568 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-macros/src/lib.rs:1050\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/zeroclaw-macros/src/lib.rs"},"region":{"startLine":1050}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c98fb5579540312648f4db23fdfc75170bc37f969fe2cfebbcb2224d9c26839"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-memory/src/hygiene.rs:181-190 | crates/zeroclaw-memory/src/hygiene.rs:280-289 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-memory/src/hygiene.rs:181\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/zeroclaw-memory/src/hygiene.rs"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"26c7db9a6b66d957635902d4a0586b5be64273dc6504b83be3d76edb45f23fd9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-memory/src/qdrant.rs:163-172 | crates/zeroclaw-memory/src/qdrant.rs:1153-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-memory/src/qdrant.rs"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"b002710b260d1712be3db8a432e3930d79aafc18be5ec5bb95babb42095f5810"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-memory/src/scanned.rs:196-205 | crates/zeroclaw-memory/src/scanned.rs:256-265 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-memory/src/scanned.rs:196\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/zeroclaw-memory/src/scanned.rs"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb76a48a81279537b33ce346fd4fe421288b2fd1c9a442c144b7412a2c520f18"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-plugins/src/wasi_http.rs:210-219 | crates/zeroclaw-plugins/src/wasi_http.rs:234-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/zeroclaw-plugins/src/wasi_http.rs:210\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/zeroclaw-plugins/src/wasi_http.rs"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"02a60f54ed0972eea695c84ad0c32bafa9b1f1e0e00513abaf5c5817fd1bdfad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-providers/src/anthropic.rs:3061-3070 | crates/zeroclaw-providers/src/anthropic.rs:3308-3317 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/anthropic.rs:3061\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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":3061}}}],"partialFingerprints":{"codehealthFindingId/v1":"f19892e7cc75289981c2529e11da30a83dd098669dfd6ae7187e691df272597c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-providers/src/auth/email_oauth2.rs:107-116 | crates/zeroclaw-providers/src/auth/openai_oauth.rs:155-164 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/auth/email_oauth2.rs\u0060 and \u0060crates/zeroclaw-providers/src/auth/openai_oauth.rs\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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/auth/email_oauth2.rs:107\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/zeroclaw-providers/src/auth/email_oauth2.rs"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7e89d2c68f0f1425d9adf0b880f115c49085f2fb2e165d5f4afb527358dd143"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): crates/zeroclaw-providers/src/auth/email_oauth2.rs:152-161 | crates/zeroclaw-providers/src/auth/xai_oauth.rs:298-306 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/auth/email_oauth2.rs\u0060 and \u0060crates/zeroclaw-providers/src/auth/xai_oauth.rs\u0060 as WHOLE FILES: this scan already matched 4 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 \u0060crates/zeroclaw-providers/src/auth/email_oauth2.rs:152\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/zeroclaw-providers/src/auth/email_oauth2.rs"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"3649599ef1bb6fd2e5322198370148e7df30c12d13b298a4ebd45cc5055a0828"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-providers/src/auth/gemini_oauth.rs:444-453 | crates/zeroclaw-providers/src/auth/openai_oauth.rs:314-323 \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/zeroclaw-providers/src/auth/gemini_oauth.rs"},"region":{"startLine":444}}}],"partialFingerprints":{"codehealthFindingId/v1":"6874c869c4325ef383b2e3597b7c9272dc1dbfd11c17b9bdeec6be3a6a6f1ab9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-providers/src/auth/gemini_oauth.rs:523-532 | crates/zeroclaw-providers/src/auth/openai_oauth.rs:354-363 \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/zeroclaw-providers/src/auth/gemini_oauth.rs:523\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/zeroclaw-providers/src/auth/gemini_oauth.rs"},"region":{"startLine":523}}}],"partialFingerprints":{"codehealthFindingId/v1":"353dcf3179580807828a3f68fb806e803359369406245c4ba3068258f641e8dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-providers/src/auth/mod.rs:1210-1219 | crates/zeroclaw-providers/src/auth/mod.rs:1456-1465 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/auth/mod.rs:1210\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/zeroclaw-providers/src/auth/mod.rs"},"region":{"startLine":1210}}}],"partialFingerprints":{"codehealthFindingId/v1":"07f7d397f0eabe783fcaf4ec3c75667e7f3e864797359f1c8b3ead8b4718bec4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-providers/src/auth/mod.rs:1358-1367 | crates/zeroclaw-providers/src/auth/mod.rs:1379-1388 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/auth/mod.rs:1358\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/zeroclaw-providers/src/auth/mod.rs"},"region":{"startLine":1358}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3fd325bc8677a10f1f83889c9337818afe57288ba08769b7ddcd04fba01f1ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): crates/zeroclaw-providers/src/bedrock.rs:169-177 | crates/zeroclaw-providers/src/bedrock.rs:264-273 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/bedrock.rs:169\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/zeroclaw-providers/src/bedrock.rs"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbf704210403597f6c26f3870ffa6f5dfa1624c5382303e0050ef18664960e52"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-providers/src/compatible.rs:1467-1476 | crates/zeroclaw-providers/src/compatible.rs:4043-4052 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/compatible.rs:1467\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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":1467}}}],"partialFingerprints":{"codehealthFindingId/v1":"fabcf46ae6a7ffdbcd62eae907a9f2c0dc685f91a2559ecf751950d7a8e5ff8e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-providers/src/compatible.rs:1580-1589 | crates/zeroclaw-providers/src/compatible.rs:4435-4444 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/compatible.rs:1580\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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":1580}}}],"partialFingerprints":{"codehealthFindingId/v1":"9232f5d1294409d9356547301f0072a382c4762c72b5615446d007f04310fa00"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u201310 lines \u00D7 2): crates/zeroclaw-providers/src/compatible.rs:4585-4590 | crates/zeroclaw-providers/src/compatible.rs:4732-4741 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/compatible.rs:4585\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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":4585}}}],"partialFingerprints":{"codehealthFindingId/v1":"33959d6566378bb60a315d4e3654183ce88b98f12359358975201e36eddb7210"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-providers/src/factory.rs:1062-1071 | crates/zeroclaw-providers/src/factory.rs:1627-1636 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/factory.rs:1062\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/zeroclaw-providers/src/factory.rs"},"region":{"startLine":1062}}}],"partialFingerprints":{"codehealthFindingId/v1":"649a19c3495a8d767cf72effc07ce073ada9be6073d548d47fc83d4042f64ac8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-providers/src/gemini_cli.rs:165-174 | crates/zeroclaw-providers/src/kilocli.rs:162-171 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/gemini_cli.rs\u0060 and \u0060crates/zeroclaw-providers/src/kilocli.rs\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 164 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/zeroclaw-providers/src/gemini_cli.rs:165\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/zeroclaw-providers/src/gemini_cli.rs"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"d001a1befb841891d4da5924df244958b36ce8a2b36650457c27e51127e41bb8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-providers/src/gemini_cli.rs:199-208 | crates/zeroclaw-providers/src/kilocli.rs:196-205 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/gemini_cli.rs\u0060 and \u0060crates/zeroclaw-providers/src/kilocli.rs\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 164 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/zeroclaw-providers/src/gemini_cli.rs:199\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/zeroclaw-providers/src/gemini_cli.rs"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4babea98b52e26bbccd5c61e154402b5937eee3012d0218b9e2bd3f23e8ad22"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-providers/src/gemini_cli.rs:225-234 | crates/zeroclaw-providers/src/kilocli.rs:222-231 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/gemini_cli.rs\u0060 and \u0060crates/zeroclaw-providers/src/kilocli.rs\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 164 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/zeroclaw-providers/src/gemini_cli.rs:225\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/zeroclaw-providers/src/gemini_cli.rs"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a006fc93e3cc59f73969998cff6887b9763c95ebb8e630a0280521bb572a6d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-providers/src/openai.rs:1251-1260 | crates/zeroclaw-providers/src/openai.rs:1281-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 \u0060crates/zeroclaw-providers/src/openai.rs:1251\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/zeroclaw-providers/src/openai.rs"},"region":{"startLine":1251}}}],"partialFingerprints":{"codehealthFindingId/v1":"d304e931f2dff64a9ecc6a39302908c2fd186cc9bc977ec289efb651ef5bdb2e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-providers/src/openrouter.rs:804-813 | crates/zeroclaw-providers/src/openrouter.rs:904-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/zeroclaw-providers/src/openrouter.rs:804\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/zeroclaw-providers/src/openrouter.rs"},"region":{"startLine":804}}}],"partialFingerprints":{"codehealthFindingId/v1":"123b3fc1df61a3ed8555b811055067fa4628cabed98d6d81d184f860744ca8a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-providers/src/reliable.rs:2809-2818 | crates/zeroclaw-providers/src/reliable.rs:3949-3958 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/reliable.rs:2809\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/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":2809}}}],"partialFingerprints":{"codehealthFindingId/v1":"431bee2052a4440b3f5f8fcb0fb6e45ae2ce1801d8b8922434b249a5a07d1d55"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-providers/src/telnyx.rs:162-171 | crates/zeroclaw-providers/src/telnyx.rs:235-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/zeroclaw-providers/src/telnyx.rs:162\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/zeroclaw-providers/src/telnyx.rs"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a4b3cd662c3bbd310f75254bc7b1f715b8bd1b866cce2c98a500a46bbed2576"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/loop_.rs:2235-2244 | crates/zeroclaw-runtime/src/agent/loop_.rs:2827-2836 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/agent/loop_.rs:2235\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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":2235}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b9ba3331ad24fdfb0d85697b9e413bcb9b0a6fb5962a151d99792c6fe5c881f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/turn/mod.rs:5109-5118 | crates/zeroclaw-runtime/src/sop/engine.rs:3507-3516 \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/zeroclaw-runtime/src/agent/turn/mod.rs:5109\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/zeroclaw-runtime/src/sop/engine.rs:3519\u0060 calls \u0060as_str\u0060 and \u0060crates/zeroclaw-runtime/src/agent/turn/mod.rs:5121\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/zeroclaw-runtime/src/agent/turn/mod.rs"},"region":{"startLine":5109}}}],"partialFingerprints":{"codehealthFindingId/v1":"d58bca8e697ad578f6632b3d3a6deee3190441f825f911e32e3efcc779363ecc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-runtime/src/browse.rs:119-128 | crates/zeroclaw-runtime/src/browse.rs:227-236 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/browse.rs:119\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/zeroclaw-runtime/src/browse.rs"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f1f9618624137d5fdd929c29ccaba1ddb477a4f2a12d61f4fd64bc59a9261d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-runtime/src/rpc/dispatch.rs:3463-3472 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:3485-3494 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/rpc/dispatch.rs:3463\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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":3463}}}],"partialFingerprints":{"codehealthFindingId/v1":"efca817f8cd47c7b317b3a21b3c2fc01bbdd4550dd7f296ec84f73deacbf865e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-runtime/src/service/mod.rs:3238-3247 | crates/zeroclaw-runtime/src/service/mod.rs:3266-3275 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-runtime/src/service/mod.rs"},"region":{"startLine":3238}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f1eba238160b9dc5878c2f835dbac5ced7db27545564a997603258b6b0fba83"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/engine.rs:857-866 | crates/zeroclaw-runtime/src/sop/engine.rs:919-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/zeroclaw-runtime/src/sop/engine.rs:857\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":857}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f8df2dba0fbfc5d4b3cef52fb067decb9d8faacbf0ef475043f0cdfcf07cd77"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/engine.rs:6462-6471 | crates/zeroclaw-runtime/src/sop/engine.rs:6521-6530 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":6462}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee75eb70d4a6e6de4bf80c31718bcb275acd2d22dc75d4643fc5010d5005c3aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/metrics.rs:510-519 | crates/zeroclaw-runtime/src/sop/metrics.rs:555-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/sop/metrics.rs"},"region":{"startLine":510}}}],"partialFingerprints":{"codehealthFindingId/v1":"61017ed8971ac3811c85f6d8c4dffb91502a2f764e06a725583c1e88d16f0fee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/store/sqlite.rs:436-445 | crates/zeroclaw-runtime/src/sop/store/sqlite.rs:729-738 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/store/sqlite.rs:436\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/zeroclaw-runtime/src/sop/store/sqlite.rs"},"region":{"startLine":436}}}],"partialFingerprints":{"codehealthFindingId/v1":"3631f0be4f379ba6eedfb44e7bfc15407c1b64fc101acafec7efadab922c12fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/store/sqlite.rs:527-536 | crates/zeroclaw-runtime/src/sop/store/sqlite.rs:552-561 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/store/sqlite.rs:527\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/zeroclaw-runtime/src/sop/store/sqlite.rs"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"005efc2d6a2f571d5ded001cc60ba8e10767aedcc141d756a0c2e1babfc93fc0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/store/sqlite.rs:574-583 | crates/zeroclaw-runtime/src/sop/store/sqlite.rs:597-606 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/store/sqlite.rs:574\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/zeroclaw-runtime/src/sop/store/sqlite.rs"},"region":{"startLine":574}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2817268980d0a9496c255c3e3c778cdb047921c7a189304e92771488a4397e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/file_read.rs:179-188 | crates/zeroclaw-tools/src/file_upload.rs:284-293 \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/zeroclaw-runtime/src/tools/file_read.rs"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"458dc4a8167da92a91ae76bf64673cc2c761520a3b34f239e18c4393328d7433"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/mod.rs:4070-4079 | crates/zeroclaw-runtime/src/tools/mod.rs:4087-4096 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/tools/mod.rs:4070\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/zeroclaw-runtime/src/tools/mod.rs"},"region":{"startLine":4070}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea93b4950cfc9af0e3ba7e95c5821e627aa434d5914d2c2061f354f281bdb373"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/send_message_to_peer.rs:180-189 | crates/zeroclaw-tools/src/pushover.rs:158-167 \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/zeroclaw-runtime/src/tools/send_message_to_peer.rs:180\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/zeroclaw-runtime/src/tools/send_message_to_peer.rs"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfe4d018e25c53cc80ae5503c544d91053346c28ada6f552369d1cd546bd0666"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/sop_advance.rs:95-105 | crates/zeroclaw-runtime/src/tools/sop_approve.rs:88-98 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/tools/sop_advance.rs\u0060 and \u0060crates/zeroclaw-runtime/src/tools/sop_approve.rs\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":"crates/zeroclaw-runtime/src/tools/sop_advance.rs"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"a649ef5fb007d4a680b52a9b0060ab6bd2300a0866b838f4a33542701d122ed6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): crates/zeroclaw-tool-call-parser/src/lib.rs:1678-1686 | crates/zeroclaw-tool-call-parser/src/lib.rs:1847-1856 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tool-call-parser/src/lib.rs:1678\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/zeroclaw-tool-call-parser/src/lib.rs"},"region":{"startLine":1678}}}],"partialFingerprints":{"codehealthFindingId/v1":"2333a3afcaf9fe0085cfdcb227f7493bc253a4260c5704c0383f34764c4c1b2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-tools/src/a2a_client.rs:1147-1156 | crates/zeroclaw-tools/src/a2a_client.rs:1189-1198 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-tools/src/a2a_client.rs"},"region":{"startLine":1147}}}],"partialFingerprints":{"codehealthFindingId/v1":"eabfddea02b522cb9fbeb40d71b6cc41bee701e65abc7599df2466b1605e24a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-tools/src/composio.rs:388-397 | crates/zeroclaw-tools/src/composio.rs:449-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/zeroclaw-tools/src/composio.rs:388\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/zeroclaw-tools/src/composio.rs"},"region":{"startLine":388}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b5348c16d32cbafa321241a3c1b18e362d6bcbbd3df22b111ffc02823db2f1e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-tools/src/git_operations.rs:565-574 | crates/zeroclaw-tools/src/git_operations.rs:636-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/zeroclaw-tools/src/git_operations.rs"},"region":{"startLine":565}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6a9a4375f84479eed9dd88d6a3faf3a3011b29c8744611819f606327e20bc79"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-tools/src/http_request.rs:617-626 | crates/zeroclaw-tools/src/web_fetch.rs:483-492 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/http_request.rs\u0060 and \u0060crates/zeroclaw-tools/src/web_fetch.rs\u0060 as WHOLE FILES: this scan already matched 9 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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/http_request.rs:617\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/zeroclaw-tools/src/http_request.rs"},"region":{"startLine":617}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cc0c2b16b2f663b1f00732c17564a4c090a1a31c2fa9d826ead7ec4647861f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-tools/src/jira_tool.rs:1039-1048 | crates/zeroclaw-tools/src/notion_tool.rs:225-234 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/jira_tool.rs\u0060 and \u0060crates/zeroclaw-tools/src/notion_tool.rs\u0060 as WHOLE FILES: this scan already matched 4 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. 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/zeroclaw-tools/src/jira_tool.rs"},"region":{"startLine":1039}}}],"partialFingerprints":{"codehealthFindingId/v1":"93a0ab4db562dade1841221e16d14d55f9350918a2700feb6c9d746c0aae1afd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-tools/src/mcp_transport.rs:1153-1162 | crates/zeroclaw-tools/src/mcp_transport.rs:1370-1379 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/mcp_transport.rs:1153\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/zeroclaw-tools/src/mcp_transport.rs"},"region":{"startLine":1153}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d78e14cf7b87bb82b476abc2494bffce5eaa2f0129e739e47bc1865e55e1360"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-tools/src/microsoft365/mod.rs:380-389 | crates/zeroclaw-tools/src/microsoft365/mod.rs:443-452 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/microsoft365/mod.rs:380\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/zeroclaw-tools/src/microsoft365/mod.rs"},"region":{"startLine":380}}}],"partialFingerprints":{"codehealthFindingId/v1":"6734f99ec0ce3c2ce2cd1340a7c5b9992fe29fa247a3272bfa6d3cb61d27edd3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): src/main.rs:2268-2276 | src/main.rs:2521-2530 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/main.rs:2268\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/main.rs"},"region":{"startLine":2268}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c5ddbf98f41d2b9eb6618a4a42bea3720f7d0ac46fc43c11f0d4c1af027e703"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): xtask/src/cmd/mdbook/peer_groups.rs:806-815 | xtask/src/cmd/mdbook/peer_groups.rs:838-847 \u2014 both copies are in the same file, so extract the block 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":"xtask/src/cmd/mdbook/peer_groups.rs"},"region":{"startLine":806}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f55685a72b2a6ec5e7de85e7dfd2f0dedbe0b9604a01ca6205a351d80ae7058"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): xtask/src/cmd/mdbook/stats.rs:17-26 | xtask/src/cmd/mdbook/sync.rs:133-142 \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 \u0060xtask/src/cmd/mdbook/stats.rs:17\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":"xtask/src/cmd/mdbook/stats.rs"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"84468d08f0a425e81839350ed3a3a7d631dfce94ee1829ac6bcc48658dc8fd2d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20139 lines \u00D7 12): crates/zeroclaw-channels/src/lark.rs:3286-3291 | crates/zeroclaw-channels/src/lark.rs:3431-3437 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15555-15561 | crates/zeroclaw-gateway/src/api_oidc.rs:1594-1600 | crates/zeroclaw-gateway/src/lib.rs:1809-1815 | crates/zeroclaw-gateway/src/ws.rs:625-631 | crates/zeroclaw-memory/src/lib.rs:828-833 | crates/zeroclaw-runtime/src/rpc/auth.rs:366-371 | crates/zeroclaw-runtime/src/rpc/locales.rs:129-137 | crates/zeroclaw-runtime/src/security/principal_resolver.rs:237-242 | crates/zeroclaw-runtime/src/sop/approval/channel_route.rs:403-409 | src/main.rs:16031-16039 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/lark.rs\u0060 and \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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/zeroclaw-channels/src/lark.rs:3286\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":3286}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3855b13332289d0f9bf422f8e7457cfd4fbb9d6fe048f480cab049b5652e79e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20139 lines \u00D7 7): crates/zeroclaw-channels/src/orchestrator/mod.rs:10600-10608 | crates/zeroclaw-config/src/migration.rs:1667-1672 | crates/zeroclaw-gateway/src/api_pairing.rs:497-502 | crates/zeroclaw-gateway/src/api_plugins.rs:256-262 | crates/zeroclaw-gateway/src/ws.rs:839-844 | crates/zeroclaw-providers/src/grok_cli.rs:883-889 | crates/zeroclaw-runtime/src/tools/skill_http.rs:193-198 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs\u0060 and \u0060crates/zeroclaw-gateway/src/ws.rs\u0060 as WHOLE FILES: this scan already matched 7 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/zeroclaw-channels/src/orchestrator/mod.rs:10600\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":10600}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8d043d2937f78506c3b1b1e7f8a91ab6fdbdb81d7c71d6d56115b303e2f5311"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 7): crates/zeroclaw-tools/src/jira_tool.rs:129-137 | crates/zeroclaw-tools/src/jira_tool.rs:226-234 | crates/zeroclaw-tools/src/jira_tool.rs:298-306 | crates/zeroclaw-tools/src/jira_tool.rs:377-385 | crates/zeroclaw-tools/src/jira_tool.rs:624-632 | crates/zeroclaw-tools/src/jira_tool.rs:715-723 | crates/zeroclaw-tools/src/jira_tool.rs:914-922 \u2014 all 7 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/zeroclaw-tools/src/jira_tool.rs:129\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/zeroclaw-tools/src/jira_tool.rs"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"0350d10c8ff8d8db023b1a30e28e8cd21c4aab094e6df8a8f38778bb15fe60f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20139 lines \u00D7 6): crates/zeroclaw-channels/src/discord/mod.rs:3894-3899 | crates/zeroclaw-channels/src/line.rs:1246-1251 | crates/zeroclaw-channels/src/nextcloud_talk.rs:678-683 | crates/zeroclaw-channels/src/nextcloud_talk.rs:753-759 | crates/zeroclaw-channels/src/telegram.rs:8606-8614 | crates/zeroclaw-channels/src/transcription.rs:1361-1366 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/discord/mod.rs\u0060 and \u0060crates/zeroclaw-channels/src/telegram.rs\u0060 as WHOLE FILES: this scan already matched 4 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/zeroclaw-channels/src/discord/mod.rs:3894\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/zeroclaw-channels/src/nextcloud_talk.rs:686\u0060 calls \u0060Err\u0060 and \u0060crates/zeroclaw-channels/src/line.rs:1254\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":3894}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdcf57bc9106d168e75b0e3263718a2db56b31c2b4ffba5dea28a0023075c7ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20139 lines \u00D7 6): crates/zeroclaw-channels/src/orchestrator/mod.rs:10178-10183 | crates/zeroclaw-channels/src/signal.rs:1309-1317 | crates/zeroclaw-channels/src/signal.rs:1325-1333 | crates/zeroclaw-channels/src/wechat.rs:2251-2259 | crates/zeroclaw-memory/src/consolidation.rs:226-231 | crates/zeroclaw-memory/src/consolidation.rs:359-364 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs\u0060 and \u0060crates/zeroclaw-channels/src/wechat.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 60 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/zeroclaw-channels/src/orchestrator/mod.rs:10178\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/zeroclaw-channels/src/wechat.rs:2262\u0060 calls \u0060sleep\u0060, \u0060from_secs\u0060 and \u0060crates/zeroclaw-channels/src/signal.rs:1320\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":10178}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ad2629a88f026d66dadac08bf9715ca3fc4c8ce6e3ffc8c836c5255f573df50"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 5): apps/zerocode/src/dashboard.rs:785-793 | apps/zerocode/src/dashboard.rs:957-965 | apps/zerocode/src/dashboard.rs:1147-1155 | apps/zerocode/src/dashboard.rs:1634-1642 | apps/zerocode/src/logs.rs:1013-1021 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/dashboard.rs:785\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 \u0060\u0026mut\u0060 in one and \u0060crate) fn draw(\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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":785}}}],"partialFingerprints":{"codehealthFindingId/v1":"a49467c066e511d12771bf9231a80c362cc63d2fabf09ee23932d197387e0926"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 5): crates/zeroclaw-runtime/src/sop/engine.rs:2580-2587 | crates/zeroclaw-runtime/src/sop/engine.rs:2891-2898 | crates/zeroclaw-runtime/src/sop/engine.rs:4084-4092 | crates/zeroclaw-runtime/src/sop/engine.rs:4752-4760 | crates/zeroclaw-runtime/src/sop/engine.rs:5657-5664 \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/zeroclaw-runtime/src/sop/engine.rs:2580\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":2580}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf7b398968f965679f5faba3dd7212fc5003bb4680b8c60492dba4fe1446d5bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 5): crates/zeroclaw-runtime/src/tools/sop_advance.rs:155-164 | crates/zeroclaw-runtime/src/tools/sop_approve.rs:119-128 | crates/zeroclaw-runtime/src/tools/sop_execute.rs:123-132 | crates/zeroclaw-runtime/src/tools/sop_list.rs:48-57 | crates/zeroclaw-runtime/src/tools/sop_status.rs:102-111 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/tools/sop_advance.rs\u0060 and \u0060crates/zeroclaw-runtime/src/tools/sop_approve.rs\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 \u0060crates/zeroclaw-runtime/src/tools/sop_advance.rs:155\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/zeroclaw-runtime/src/tools/sop_advance.rs"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"8926bf744b1e08afb17fe5eaf9bf44715acb081ff816f7117f2fc06e45852cd4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): apps/zerocode/src/config_manager.rs:3122-3130 | apps/zerocode/src/config_manager.rs:3156-3164 | apps/zerocode/src/config_manager.rs:3781-3789 | apps/zerocode/src/config_manager.rs:3978-3986 \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 \u0060apps/zerocode/src/config_manager.rs:3122\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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":3122}}}],"partialFingerprints":{"codehealthFindingId/v1":"46d0661a337c8ab5c7578c1c3cea41cefd9c71d8b87a02917fbf520752b6fd1b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20139 lines \u00D7 4): crates/zeroclaw-channels/src/bluesky.rs:562-570 | crates/zeroclaw-channels/src/bluesky.rs:592-600 | crates/zeroclaw-providers/src/pricing.rs:488-493 | crates/zeroclaw-providers/src/pricing.rs:534-539 \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/zeroclaw-channels/src/bluesky.rs:562\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/zeroclaw-channels/src/bluesky.rs"},"region":{"startLine":562}}}],"partialFingerprints":{"codehealthFindingId/v1":"44c9b84ba4fbaf417663f242c70b4648c039d6fca7b5e3ca8735ac74f8d135c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 4): crates/zeroclaw-channels/src/slack.rs:671-679 | crates/zeroclaw-channels/src/slack.rs:736-744 | crates/zeroclaw-channels/src/slack.rs:1175-1182 | crates/zeroclaw-channels/src/slack.rs:1225-1232 \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/zeroclaw-channels/src/slack.rs:671\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":671}}}],"partialFingerprints":{"codehealthFindingId/v1":"adf8bae8a148b69716f04c77fce838b474ddad4bc6b2c7b040deab7923148c5a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 4): crates/zeroclaw-providers/src/compatible.rs:1598-1606 | crates/zeroclaw-providers/src/compatible.rs:4464-4472 | crates/zeroclaw-providers/src/compatible.rs:4592-4599 | crates/zeroclaw-providers/src/compatible.rs:4744-4751 \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/zeroclaw-providers/src/compatible.rs:1598\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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":1598}}}],"partialFingerprints":{"codehealthFindingId/v1":"e368f869563b96ab7f3f0ceece452e03894cf14949abceb4e926831ef6df0d29"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): crates/zeroclaw-runtime/src/tools/cron_remove.rs:94-102 | crates/zeroclaw-runtime/src/tools/cron_run.rs:157-165 | crates/zeroclaw-runtime/src/tools/cron_runs.rs:79-87 | crates/zeroclaw-runtime/src/tools/cron_update.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 all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/tools/cron_remove.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/zeroclaw-runtime/src/tools/cron_remove.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fa55e4374eb4544d29fe918d2c840c40abaae2cb6d48f9e1e1ada620769aef6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): crates/zeroclaw-tools/src/notion_tool.rs:67-75 | crates/zeroclaw-tools/src/notion_tool.rs:116-124 | crates/zeroclaw-tools/src/notion_tool.rs:142-150 | crates/zeroclaw-tools/src/notion_tool.rs:164-172 \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/zeroclaw-tools/src/notion_tool.rs:67\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/zeroclaw-tools/src/notion_tool.rs"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"552a5a353e7ff612b5158dc4d206cff10031ed35771dff943c13b58180cc3f4c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): apps/zerocode/src/file_explorer.rs:304-312 | apps/zerocode/src/file_explorer.rs:378-386 | apps/zerocode/src/file_explorer.rs:446-454 \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":"apps/zerocode/src/file_explorer.rs"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"70b5eabad1213fb161ecaf24ba7cd399dec894a867335055269d80500b5b8ec6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 3): crates/zeroclaw-channels/src/clawdtalk.rs:86-93 | crates/zeroclaw-channels/src/clawdtalk.rs:122-130 | crates/zeroclaw-channels/src/clawdtalk.rs:185-193 \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/zeroclaw-channels/src/clawdtalk.rs:86\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/zeroclaw-channels/src/clawdtalk.rs"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"781efdb752a95f8b8fc94a1f0c37ff4d13b836fb0bfc98ae3784c6a7c67df8d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/zeroclaw-channels/src/discord/markers.rs:21-29 | crates/zeroclaw-channels/src/telegram.rs:873-881 | crates/zeroclaw-channels/src/wechat.rs:113-121 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/telegram.rs\u0060 and \u0060crates/zeroclaw-channels/src/wechat.rs\u0060 as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 158 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/zeroclaw-channels/src/discord/markers.rs"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee4d9a44de318667fe5e563f2bcf22192226fd4039f70a007bce3daf40f5c9f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/zeroclaw-channels/src/matrix.rs:3550-3559 | crates/zeroclaw-channels/src/matrix.rs:3569-3578 | crates/zeroclaw-channels/src/slack.rs:3344-3352 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/matrix.rs\u0060 and \u0060crates/zeroclaw-channels/src/slack.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. 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/zeroclaw-channels/src/matrix.rs:3550\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":3550}}}],"partialFingerprints":{"codehealthFindingId/v1":"c532bc7948a76e5bef4071f0503e2d22f9054938ba5d89a2d64bd8453eb4728e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/zeroclaw-channels/src/orchestrator/acp_server.rs:950-958 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1184-1192 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1524-1532 \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/zeroclaw-channels/src/orchestrator/acp_server.rs:950\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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":950}}}],"partialFingerprints":{"codehealthFindingId/v1":"f813e6cadc1d54318194f2e54268dfc423ed76cae49ef649f1c98e8c4ea786b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1045-1053 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1393-1401 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1689-1697 \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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":1045}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1412051faa81c643dd042064c55dd98eea6923bf919bae6c94f943491270d01"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1101-1109 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1416-1424 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1712-1720 \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/zeroclaw-channels/src/orchestrator/acp_server.rs:1101\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/zeroclaw-channels/src/orchestrator/acp_server.rs:1413\u0060 calls \u0060disarm\u0060 and \u0060crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1098\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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":1101}}}],"partialFingerprints":{"codehealthFindingId/v1":"7154a62481c9bcc656a72d44092d533d7cae8bee16c40fa0b8635344813d79b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20139 lines \u00D7 3): crates/zeroclaw-channels/src/orchestrator/mod.rs:10601-10609 | crates/zeroclaw-channels/src/orchestrator/mod.rs:10689-10697 | crates/zeroclaw-runtime/src/agent/agent.rs:4110-4115 \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/zeroclaw-channels/src/orchestrator/mod.rs:10601\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":10601}}}],"partialFingerprints":{"codehealthFindingId/v1":"9657dee89e51ceb4b4457971f8e62a3d89fde7951ec78818bba0bf757880d6b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/zeroclaw-channels/src/orchestrator/mod.rs:13709-13717 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15373-15381 | crates/zeroclaw-gateway/src/lib.rs:1975-1983 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs\u0060 and \u0060crates/zeroclaw-gateway/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 96 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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":13709}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a2435456d245f50939977d2c92d1f632c6a5533ba35bd282740485d25e31f3f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/zeroclaw-channels/src/slack.rs:4607-4615 | crates/zeroclaw-channels/src/slack.rs:6052-6060 | crates/zeroclaw-channels/src/slack.rs:6171-6179 \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 before the matched lines, \u0060crates/zeroclaw-channels/src/slack.rs:4603\u0060 calls \u0060resolve_sender_identity\u0060 and \u0060crates/zeroclaw-channels/src/slack.rs:6048\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":4607}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5155c7264765607bf1ed28c794a43118a900d65a0aa9c88707835793b9e235c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/zeroclaw-gateway/src/api_config.rs:1484-1492 | crates/zeroclaw-gateway/src/api_config.rs:1778-1788 | crates/zeroclaw-gateway/src/api_config.rs:2121-2131 \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/zeroclaw-gateway/src/api_config.rs:1484\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/zeroclaw-gateway/src/api_config.rs:2132\u0060 calls \u0060with\u0060 and \u0060crates/zeroclaw-gateway/src/api_config.rs:1789\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/zeroclaw-gateway/src/api_config.rs"},"region":{"startLine":1484}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b7a1080298c7b64c5a7a5147b0dfbb03b42781310dfe7b413cebd7e75540b25"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/zeroclaw-hardware/src/peripherals/rpi.rs:95-103 | crates/zeroclaw-hardware/src/peripherals/serial.rs:265-273 | crates/zeroclaw-hardware/src/peripherals/uno_q_bridge.rs:95-103 \u2014 before extracting anything, compare \u0060crates/zeroclaw-hardware/src/peripherals/serial.rs\u0060 and \u0060crates/zeroclaw-hardware/src/peripherals/uno_q_bridge.rs\u0060 as WHOLE FILES: this scan already matched 3 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/zeroclaw-hardware/src/peripherals/rpi.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/zeroclaw-hardware/src/peripherals/rpi.rs"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa35ca124786dd9f8cc2ed6b43a5d12b566ecbbcd0af9318159ce642183a6c88"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u20139 lines \u00D7 5): crates/zeroclaw-hardware/src/rpi.rs:389-397 | crates/zeroclaw-hardware/src/rpi.rs:399-402 | crates/zeroclaw-hardware/src/rpi.rs:485-493 | crates/zeroclaw-hardware/src/rpi.rs:580-588 | crates/zeroclaw-runtime/src/tools/security_ops.rs:119-122 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-hardware/src/rpi.rs:389\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/zeroclaw-hardware/src/rpi.rs"},"region":{"startLine":389}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf68f7ed9bc7283a061c715352a92500f6d35f20fff8d5c811b3361c740d9fb5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/zeroclaw-hardware/src/rpi.rs:413-421 | crates/zeroclaw-hardware/src/rpi.rs:497-505 | crates/zeroclaw-hardware/src/rpi.rs:607-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-hardware/src/rpi.rs"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"e18e6d5e12f1196e5592961cb108e7df13ae6e53708f9747a05e37ca30f21989"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/zeroclaw-log/src/reader.rs:810-822 | crates/zeroclaw-log/src/reader.rs:1007-1015 | crates/zeroclaw-log/src/reader.rs:1073-1081 \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/zeroclaw-log/src/reader.rs:810\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/zeroclaw-log/src/reader.rs"},"region":{"startLine":810}}}],"partialFingerprints":{"codehealthFindingId/v1":"d47f0ee190bbf4cf2bbc248e8379466b5fe524f8888c972b364e7aecacdb7dde"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/zeroclaw-macros/src/lib.rs:562-570 | crates/zeroclaw-macros/src/lib.rs:992-1000 | crates/zeroclaw-macros/src/lib.rs:1689-1698 \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/zeroclaw-macros/src/lib.rs:562\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/zeroclaw-macros/src/lib.rs"},"region":{"startLine":562}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bd0d36fee88266f91ed02bf314388255729d5a86ba106f6a2350b25d71b9b2b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/zeroclaw-macros/src/lib.rs:1454-1462 | crates/zeroclaw-macros/src/lib.rs:1479-1487 | crates/zeroclaw-macros/src/lib.rs:1506-1514 \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/zeroclaw-macros/src/lib.rs:1454\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/zeroclaw-macros/src/lib.rs:1449\u0060 calls \u0060Some\u0060, \u0060clone\u0060 and \u0060crates/zeroclaw-macros/src/lib.rs:1477\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/zeroclaw-macros/src/lib.rs"},"region":{"startLine":1454}}}],"partialFingerprints":{"codehealthFindingId/v1":"d378edaffcc0d6a1303b776b1a9285e836340445fba12104187d7d516abf81af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/zeroclaw-macros/src/lib.rs:1887-1895 | crates/zeroclaw-macros/src/lib.rs:1908-1916 | crates/zeroclaw-macros/src/lib.rs:1929-1938 \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/zeroclaw-macros/src/lib.rs:1887\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/zeroclaw-macros/src/lib.rs"},"region":{"startLine":1887}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ec7f3726f75276541f9bbe18a0719c4116ba039750a310b489b5f38b6e83a32"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 3): crates/zeroclaw-providers/src/telnyx.rs:64-71 | crates/zeroclaw-providers/src/telnyx.rs:160-168 | crates/zeroclaw-providers/src/telnyx.rs:233-241 \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/zeroclaw-providers/src/telnyx.rs:64\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/zeroclaw-providers/src/telnyx.rs"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b39a69af91a7ad1b016f1319a164cae8ca2e908d32639e8714d39e7c1ab4c6e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/zeroclaw-runtime/src/agent/agent.rs:1980-1988 | crates/zeroclaw-runtime/src/agent/agent.rs:2325-2333 | crates/zeroclaw-runtime/src/agent/agent.rs:4448-4456 \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/zeroclaw-runtime/src/agent/agent.rs:1980\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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":1980}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf337707116fd6ed7d480334d2803502434959268c4bd3c5858b09d6b8cee355"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20139 lines \u00D7 3): crates/zeroclaw-runtime/src/agent/loop_.rs:2237-2245 | crates/zeroclaw-runtime/src/agent/loop_.rs:2829-2837 | crates/zeroclaw-runtime/src/agent/loop_.rs:4226-4231 \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/zeroclaw-runtime/src/agent/loop_.rs:2237\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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":2237}}}],"partialFingerprints":{"codehealthFindingId/v1":"83cfb5747613dfc7d81bac2653aff168c4a03ceb39d7632ec715a0053fd25f04"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/zeroclaw-runtime/src/sop/engine.rs:2650-2658 | crates/zeroclaw-runtime/src/sop/engine.rs:4941-4949 | crates/zeroclaw-runtime/src/sop/engine.rs:5811-5819 \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/zeroclaw-runtime/src/sop/engine.rs:2650\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/zeroclaw-runtime/src/sop/engine.rs:2647\u0060 calls \u0060clone\u0060 and \u0060crates/zeroclaw-runtime/src/sop/engine.rs:5809\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":2650}}}],"partialFingerprints":{"codehealthFindingId/v1":"7295e47708d60f8fd422e81029b495436ca9170cd4a7bc954c21060056772f39"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/zeroclaw-runtime/src/tools/mod.rs:2755-2763 | crates/zeroclaw-runtime/src/tools/mod.rs:2803-2811 | crates/zeroclaw-runtime/src/tools/mod.rs:2908-2916 \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/zeroclaw-runtime/src/tools/mod.rs:2755\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/zeroclaw-runtime/src/tools/mod.rs:2801\u0060 calls \u0060clone\u0060 and \u0060crates/zeroclaw-runtime/src/tools/mod.rs:2907\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/zeroclaw-runtime/src/tools/mod.rs"},"region":{"startLine":2755}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bee11f7c6dc11024f9d8c5905460a15f1f6ee78b031a06a78ff48119aa16d27"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/zeroclaw-tools/src/file_download.rs:579-587 | crates/zeroclaw-tools/src/http_request.rs:598-609 | crates/zeroclaw-tools/src/web_fetch.rs:464-475 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/http_request.rs\u0060 and \u0060crates/zeroclaw-tools/src/web_fetch.rs\u0060 as WHOLE FILES: this scan already matched 9 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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/file_download.rs:579\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/zeroclaw-tools/src/file_download.rs"},"region":{"startLine":579}}}],"partialFingerprints":{"codehealthFindingId/v1":"9faade02def5d2d48cf8560dc173d0c90376c99033d6a2be7bf86d0c9e5fa248"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20139 lines \u00D7 3): crates/zeroclaw-tools/src/jira_tool.rs:406-412 | crates/zeroclaw-tools/src/jira_tool.rs:604-610 | crates/zeroclaw-tools/src/jira_tool.rs:693-701 \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/zeroclaw-tools/src/jira_tool.rs:406\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/zeroclaw-tools/src/jira_tool.rs"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"a65e267496497d35408c8f10f071add566fc84915b69607e07d88113b1f5202e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): apps/zerocode/src/chat.rs:1272-1280 | apps/zerocode/src/chat.rs:1306-1314 \u2014 both copies are in the same file, so extract the block 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 focus_session(\u0026mut\u0060 in one and \u0060\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":"apps/zerocode/src/chat.rs"},"region":{"startLine":1272}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb99e40a10ef02659dbb2dc6b94be58100e48af916504e278a9fb29b4d9ff8e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): apps/zerocode/src/chat.rs:11834-11842 | apps/zerocode/src/client.rs:355-363 \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":"apps/zerocode/src/chat.rs"},"region":{"startLine":11834}}}],"partialFingerprints":{"codehealthFindingId/v1":"37a97b8121f6c77780e22c4de179cff1557bc94517ff3392ee6bb9a6a0b3c1ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): apps/zerocode/src/config_manager.rs:1464-1471 | apps/zerocode/src/config_manager.rs:1498-1506 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/config_manager.rs:1464\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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":1464}}}],"partialFingerprints":{"codehealthFindingId/v1":"53daeb5f3ad3529945afb4b23c352f3fdb05f6ee5ee6bb2f3ca8482f15230fab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): apps/zerocode/src/config_manager.rs:3754-3762 | apps/zerocode/src/config_manager.rs:3950-3958 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/config_manager.rs:3754\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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":3754}}}],"partialFingerprints":{"codehealthFindingId/v1":"f01532d55ad16ae811fb755f58b794003b63ffa684a6dcad7e2c282ea44f6732"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): apps/zerocode/src/quickstart_pane.rs:3141-3156 | apps/zerocode/src/quickstart_pane.rs:3202-3217 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/quickstart_pane.rs:3141\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":"apps/zerocode/src/quickstart_pane.rs"},"region":{"startLine":3141}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2e47e126459b33c9d19f9c732bd1e8b313894e6370051489252f99c8776923c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): apps/zerorelay/src/dashboard.rs:338-346 | apps/zerorelay/src/dashboard.rs:347-355 \u2014 both copies are in the same file, so extract the block 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":"apps/zerorelay/src/dashboard.rs"},"region":{"startLine":338}}}],"partialFingerprints":{"codehealthFindingId/v1":"0be9cb0b29d33ca4806fb998502b9d12c7300a29a0b3477f57f10bca0bd52bea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-api/src/model_provider.rs:850-858 | crates/zeroclaw-api/src/model_provider.rs:991-999 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-api/src/model_provider.rs"},"region":{"startLine":850}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c8f6e4daeb744da74f8ae79de011e95cf6dea71174d51e7696209fe2e45cc62"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-channels/src/discord/markers.rs:837-845 | crates/zeroclaw-channels/src/matrix.rs:3336-3344 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/discord/markers.rs\u0060 and \u0060crates/zeroclaw-channels/src/matrix.rs\u0060 as WHOLE FILES: this scan already matched 8 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/zeroclaw-channels/src/discord/markers.rs:837\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/zeroclaw-channels/src/discord/markers.rs"},"region":{"startLine":837}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe6a0e38a82a8a360609d80e727136bad952c552e3179b029f600b98dfa26a0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-channels/src/discord/mod.rs:431-439 | crates/zeroclaw-channels/src/discord/mod.rs:659-667 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/discord/mod.rs:431\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf354ebe8d59c775db83aff163989fa46ba67806adddef4181882ea6dcc3598d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-channels/src/git/providers/gitea/mapping.rs:69-77 | crates/zeroclaw-channels/src/git/providers/github/mapping.rs:121-129 \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/zeroclaw-channels/src/git/providers/gitea/mapping.rs:69\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 \u0060release\u0060 to \u0060\u0026GiteaRelease\u0060 in one and \u0060\u0026GhRelease\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/zeroclaw-channels/src/git/providers/gitea/mapping.rs"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"bffcc202e0b8fefade07003464dd8fc6a6d40538dbbfd01fd1acabbbf6d0b36a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-channels/src/lark.rs:3588-3596 | crates/zeroclaw-channels/src/lark.rs:3625-3633 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/lark.rs:3588\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":3588}}}],"partialFingerprints":{"codehealthFindingId/v1":"9846ab9d3138b1b2f4513fea2996e7d42f8e8505cdcdc7ebd8eb051af9f02b30"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20139 lines \u00D7 2): crates/zeroclaw-channels/src/line.rs:409-414 | crates/zeroclaw-channels/src/line.rs:524-532 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/line.rs:409\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/zeroclaw-channels/src/line.rs"},"region":{"startLine":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c6a7d80e5074dc046a04b0bb2d6dcf8418d42f91a873dbab26a5ccba69fa014"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-channels/src/matrix.rs:1354-1362 | crates/zeroclaw-channels/src/matrix.rs:1374-1382 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/matrix.rs:1354\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":1354}}}],"partialFingerprints":{"codehealthFindingId/v1":"bddd8e30efcd211ed2bcc753b6fe86643462fb2ad6397cb731e7a3ba84121024"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-channels/src/mattermost.rs:496-504 | crates/zeroclaw-channels/src/slack.rs:1454-1462 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/mattermost.rs\u0060 and \u0060crates/zeroclaw-channels/src/slack.rs\u0060 as WHOLE FILES: this scan already matched 9 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. 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/zeroclaw-channels/src/mattermost.rs"},"region":{"startLine":496}}}],"partialFingerprints":{"codehealthFindingId/v1":"16a388efaa70cd339b43b3c22caf005ef10ca33fd791b10d4e2bcb0543b46f3d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:7304-7312 | crates/zeroclaw-runtime/src/agent/turn/stream_guard.rs:604-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:7304\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":7304}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe26c15bc518df9ae695e773f16d2aba4716bd9dc1ea2f349ca44b74baca3bec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:9344-9352 | crates/zeroclaw-channels/src/orchestrator/mod.rs:12240-12248 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":9344}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f5cadaa24bca6ab3fef624f4b2c6656d640132b1fa82e4d5f924f244d58cbd4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:9976-9984 | crates/zeroclaw-channels/src/orchestrator/mod.rs:9993-10001 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:9976\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":9976}}}],"partialFingerprints":{"codehealthFindingId/v1":"2da9aad5caf83fae541dcbcbc02a77685297309832d22af978224b50efdd676e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:10737-10745 | crates/zeroclaw-runtime/src/agent/loop_.rs:3454-3462 \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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":10737}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9941443d4eb0779d348e1fad72fd3d46e1c3dc4ffe611e0e326414d94e20d35"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:17077-17085 | crates/zeroclaw-gateway/src/lib.rs:2065-2073 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs\u0060 and \u0060crates/zeroclaw-gateway/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 96 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/zeroclaw-channels/src/orchestrator/mod.rs:17077\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":17077}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf7f4c2495da973ed402dcf8c16737d6845a5cec42226e6bbff3708f36fca874"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-channels/src/telegram.rs:2344-2352 | crates/zeroclaw-channels/src/telegram.rs:2407-2415 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/telegram.rs:2344\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":2344}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f31d5948da09dd6cdeacfa23e1f45c98fb7a1643ab8268a431fa302c8ec641f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-channels/src/telegram.rs:2397-2405 | crates/zeroclaw-channels/src/telegram.rs:2475-2483 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/telegram.rs:2397\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":2397}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1346d88b4d8908344505d6267e9daad1b6ebfa13bb827fae85a4bba56b9d1df"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-channels/src/telegram.rs:5382-5390 | crates/zeroclaw-channels/src/telegram.rs:6163-6171 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/telegram.rs:5382\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":5382}}}],"partialFingerprints":{"codehealthFindingId/v1":"f033e27498d38f380831aac308a2b15cfa2c540895a2b884f3e6c1ff0f7b6e03"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-channels/src/tts.rs:135-143 | crates/zeroclaw-channels/src/tts.rs:976-984 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/tts.rs: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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/tts.rs"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"108787832e6734c3e2df8248bb0147627e2f629cdd5ad37c79406465bf473135"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): crates/zeroclaw-channels/src/wecom_ws.rs:2339-2347 | crates/zeroclaw-channels/src/wecom_ws.rs:2539-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/wecom_ws.rs:2339\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/zeroclaw-channels/src/wecom_ws.rs"},"region":{"startLine":2339}}}],"partialFingerprints":{"codehealthFindingId/v1":"8eecda6a9059cd231dd4a668c456f449890df95cfbd999c8b6fec860f887acc4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-config/src/policy.rs:423-431 | crates/zeroclaw-config/src/policy.rs:466-475 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-config/src/policy.rs:423\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/zeroclaw-config/src/policy.rs"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"35e4fef4c2f146fb51c44dc17841a9913249c230967b30240031eda8a766a4c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-config/src/schema.rs:22317-22325 | crates/zeroclaw-config/src/schema.rs:22340-22348 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-config/src/schema.rs:22317\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/zeroclaw-config/src/schema.rs"},"region":{"startLine":22317}}}],"partialFingerprints":{"codehealthFindingId/v1":"10993042fb5d1922a970510694c8bfd1b09e828ad0e62819b8bb3dbb02bf44be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-config/src/schema.rs:25374-25384 | crates/zeroclaw-config/src/schema.rs:25425-25433 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-config/src/schema.rs:25374\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/zeroclaw-config/src/schema.rs"},"region":{"startLine":25374}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3b86a771820879ea871029c0af1be823221556b0b5b9da7d91de153fe6be034"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-config/src/schema/v2.rs:3245-3253 | crates/zeroclaw-config/src/schema/v2.rs:3290-3298 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-config/src/schema/v2.rs:3245\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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":3245}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed86d0fde364dff9f326192f67b2e3ccf21e8a801d5fe9e099f2ef41ca650f55"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): crates/zeroclaw-gateway/src/lib.rs:443-450 | crates/zeroclaw-gateway/src/lib.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/zeroclaw-gateway/src/lib.rs:443\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/zeroclaw-gateway/src/lib.rs:450\u0060 calls \u0060remove\u0060 and \u0060crates/zeroclaw-gateway/src/lib.rs:524\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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":443}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffbfcf866e2f424c55043411a54dbd51c103dd6fdf9e89be7ce60f531963eec6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-gateway/src/lib.rs:5080-5088 | crates/zeroclaw-gateway/src/lib.rs:5220-5228 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/lib.rs:5080\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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":5080}}}],"partialFingerprints":{"codehealthFindingId/v1":"3591f7dcd5bfd50beb22f333cc7a1c2eacba96bdf75ef336b12b00e4e44b68c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-gateway/src/nodes/mdns.rs:312-320 | crates/zeroclaw-gateway/src/nodes/mdns.rs:339-347 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/nodes/mdns.rs:312\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/zeroclaw-gateway/src/nodes/mdns.rs"},"region":{"startLine":312}}}],"partialFingerprints":{"codehealthFindingId/v1":"c84de70a79309aab380e374f74784eb558489dcce232a46523b69741b565999e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-gateway/src/nodes/mdns.rs:322-330 | crates/zeroclaw-gateway/src/nodes/mdns.rs:349-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/zeroclaw-gateway/src/nodes/mdns.rs:322\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/zeroclaw-gateway/src/nodes/mdns.rs"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"9beeb86ac63f9aed4dc7dc8a00402778ff63c3e1fbd892bb57d9446bc0890bfd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-gateway/src/ws.rs:213-221 | crates/zeroclaw-gateway/src/ws_sop_runs.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-gateway/src/ws.rs"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dcb03cb1be80360c676f33ef3a606011cf45b605401336eda694b5f48f0bd2b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-hardware/src/introspect.rs:90-98 | crates/zeroclaw-hardware/src/lib.rs:554-562 \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/zeroclaw-hardware/src/introspect.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/zeroclaw-hardware/src/introspect.rs"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"24e35e4fe757ac84dc305c7e05f34110eb8a6121bd5afbbbc73684d50c03c3fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-hardware/src/uf2.rs:180-188 | crates/zeroclaw-hardware/src/uf2.rs:227-235 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-hardware/src/uf2.rs:180\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/zeroclaw-hardware/src/uf2.rs"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b997b143c53f554685ee29fa8af0a9813b8a64700d95daa293949a728df591f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u20139 lines \u00D7 5): crates/zeroclaw-infra/src/session_sqlite.rs:1233-1241 | crates/zeroclaw-infra/src/session_sqlite.rs:1548-1552 | crates/zeroclaw-infra/src/session_sqlite.rs:1640-1648 | crates/zeroclaw-infra/src/session_sqlite.rs:1700-1703 | crates/zeroclaw-infra/src/session_sqlite.rs:1774-1777 \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/zeroclaw-infra/src/session_sqlite.rs:1233\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/zeroclaw-infra/src/session_sqlite.rs:1242\u0060 calls \u0060get\u0060 and \u0060crates/zeroclaw-infra/src/session_sqlite.rs:1553\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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":1233}}}],"partialFingerprints":{"codehealthFindingId/v1":"9576403e8fb7152034a257210dae437a95a5d034d45622961d14e6960b9671e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-infra/src/session_sqlite.rs:1368-1376 | crates/zeroclaw-infra/src/session_sqlite.rs:1431-1439 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":1368}}}],"partialFingerprints":{"codehealthFindingId/v1":"81db5308c680a5c30a79eae342db64236a18498ad65eba3356b969321c7dc835"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-macros/src/lib.rs:662-671 | crates/zeroclaw-macros/src/lib.rs:699-707 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-macros/src/lib.rs:662\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/zeroclaw-macros/src/lib.rs"},"region":{"startLine":662}}}],"partialFingerprints":{"codehealthFindingId/v1":"017aa6c626443da374b60579bd7a2197043e83c1b837b474dd3da07cf3324a60"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-memory/src/agent_scoped.rs:491-499 | crates/zeroclaw-memory/src/agent_scoped.rs:529-537 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-memory/src/agent_scoped.rs:491\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/zeroclaw-memory/src/agent_scoped.rs"},"region":{"startLine":491}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9e7c899fa3290164b4ea37bdb3d1a5bbbc831240fcca6d7dd89397ec54c6342"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-memory/src/chunker.rs:47-55 | crates/zeroclaw-memory/src/chunker.rs:60-68 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-memory/src/chunker.rs:47\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/zeroclaw-memory/src/chunker.rs"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"061fe0bf08d4bb3ef6bf92b5d31737cee5218ec32b50c2317e139f705dee075b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-memory/src/consolidation.rs:77-85 | crates/zeroclaw-memory/src/consolidation.rs:455-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/zeroclaw-memory/src/consolidation.rs:77\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/zeroclaw-memory/src/consolidation.rs"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbb04ddab6b9b4c703398cd6364dc82d38d5d8894b0150626401597f262bfd40"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-memory/src/consolidation.rs:174-182 | crates/zeroclaw-memory/src/consolidation.rs:314-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/zeroclaw-memory/src/consolidation.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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/zeroclaw-memory/src/consolidation.rs:311\u0060 calls \u0060new_v4\u0060, \u0060compute_importance\u0060 and \u0060crates/zeroclaw-memory/src/consolidation.rs:171\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/zeroclaw-memory/src/consolidation.rs"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"072c15875e26053e4c348bf3c5068ecedd090fdedae1c2325c3ba1c05ed81c81"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-memory/src/sqlite.rs:761-769 | crates/zeroclaw-memory/src/sqlite.rs:918-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/zeroclaw-memory/src/sqlite.rs:761\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/zeroclaw-memory/src/sqlite.rs:771\u0060 calls \u0060IN\u0060 and \u0060crates/zeroclaw-memory/src/sqlite.rs:928\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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":761}}}],"partialFingerprints":{"codehealthFindingId/v1":"1db231262bd153c46ccf9e15ba8d468faed2f9776fc8279b8dfafbe2ab176414"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-plugins/src/component.rs:544-552 | crates/zeroclaw-plugins/src/component.rs:562-570 \u2014 both copies are in the same file, so extract the block 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 state_get( \u0026mut\u0060 in one and \u0060crate) async fn state_delete( \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/zeroclaw-plugins/src/component.rs"},"region":{"startLine":544}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae732d514e912c8229b68f993d6c488566665e5d04d3d709c5ded3ab49327020"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-plugins/src/wasm_memory.rs:225-233 | crates/zeroclaw-plugins/src/wasm_memory.rs:681-689 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-plugins/src/wasm_memory.rs:225\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/zeroclaw-plugins/src/wasm_memory.rs:680\u0060 calls \u0060to_wit_agent_filter\u0060 and \u0060crates/zeroclaw-plugins/src/wasm_memory.rs:224\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/zeroclaw-plugins/src/wasm_memory.rs"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6291e687ca7bc5ae2554b4e5bae303833c9d4f13e17fd7148e1348cbea9f0d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-providers/src/anthropic.rs:3072-3080 | crates/zeroclaw-providers/src/anthropic.rs:3447-3455 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/anthropic.rs:3072\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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":3072}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf61365f2976c8ba17b0b0438e9a77cf8c52c234d8d581939fcc70d6131f4722"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-providers/src/anthropic.rs:3264-3272 | crates/zeroclaw-providers/src/openrouter.rs:887-895 \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/zeroclaw-providers/src/anthropic.rs:3264\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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":3264}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6fb10179cfa8e49fc8d847c87ea5d495f63add4d07efaa6cd19267cd0d7b31e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): crates/zeroclaw-providers/src/auth/mod.rs:1238-1246 | crates/zeroclaw-providers/src/auth/mod.rs:1296-1303 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/auth/mod.rs:1238\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/zeroclaw-providers/src/auth/mod.rs:1304\u0060 calls \u0060clear_pending_oauth_login\u0060 and \u0060crates/zeroclaw-providers/src/auth/mod.rs:1247\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/zeroclaw-providers/src/auth/mod.rs"},"region":{"startLine":1238}}}],"partialFingerprints":{"codehealthFindingId/v1":"3404210c1672849b6369d75bc05e13ca1a6789b4532f66c895d23df7e11d61d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-providers/src/compatible.rs:3093-3101 | crates/zeroclaw-providers/src/openai.rs:356-364 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/compatible.rs\u0060 and \u0060crates/zeroclaw-providers/src/openai.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \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/zeroclaw-providers/src/compatible.rs:3093\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 \u0060tools\u0060 to \u0060Option\u003C\u0026[zeroclaw_api::tool::ToolSpec]\u003E\u0060 in one and \u0060Option\u003C\u0026[ToolSpec]\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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":3093}}}],"partialFingerprints":{"codehealthFindingId/v1":"43b5c8a061643c0d2118240b8b22c14ffaae9d9e9e2a88717c0c03cb8361313a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-providers/src/dispatch/accounting.rs:352-360 | crates/zeroclaw-providers/src/dispatch/accounting.rs:379-387 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-providers/src/dispatch/accounting.rs"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d48e47bfd604e9f2817f74f786c77a8282557cf2db1538d305c8f13825d9962"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20139 lines \u00D7 2): crates/zeroclaw-providers/src/grok_cli/acp.rs:456-464 | crates/zeroclaw-providers/src/grok_cli/acp.rs:686-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/zeroclaw-providers/src/grok_cli/acp.rs:456\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/zeroclaw-providers/src/grok_cli/acp.rs"},"region":{"startLine":456}}}],"partialFingerprints":{"codehealthFindingId/v1":"24a14ff0d06cab0c372295f9eb0aa937640397b21683c1cb38744494ed828ac5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-providers/src/openrouter_catalog.rs:38-46 | crates/zeroclaw-providers/src/openrouter_catalog.rs:51-59 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-providers/src/openrouter_catalog.rs"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf40f11e42bc14b58c1f1119529235f5627a0f2a3cc2656844c6e88108635402"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-providers/src/reliable.rs:2527-2535 | crates/zeroclaw-providers/src/reliable.rs:2826-2834 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-providers/src/reliable.rs:2835\u0060 calls \u0060to_vec\u0060 and \u0060crates/zeroclaw-providers/src/reliable.rs:2541\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/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":2527}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2c047b5652d3118176a6a32c1e7f0ccd19e54c7e8ceeb9c3da304fbd987219f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/agent.rs:123-131 | crates/zeroclaw-runtime/src/composition/config_backed.rs:74-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/zeroclaw-runtime/src/agent/agent.rs:123\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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"4734a7e63491c7cc49ad526365d2dab4803c13499ec105220efb5fd9a6dedc5e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/agent.rs:4429-4437 | crates/zeroclaw-runtime/src/agent/agent.rs:4992-5000 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":4429}}}],"partialFingerprints":{"codehealthFindingId/v1":"6648c2a1f8743cdd20dbfd9345fe095b80f924e4663708394b521dc5a3a24485"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): crates/zeroclaw-runtime/src/cron/store.rs:439-446 | crates/zeroclaw-runtime/src/cron/store.rs:480-488 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/cron/store.rs:439\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/zeroclaw-runtime/src/cron/store.rs"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"75d9cf875ef7e8f8a34cda74bc8d832c0de6d4d584624baf43834995a1775fe6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20139 lines \u00D7 2): crates/zeroclaw-runtime/src/daemon/mod.rs:1086-1091 | src/main.rs:16032-16040 \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/zeroclaw-runtime/src/daemon/mod.rs:1086\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/zeroclaw-runtime/src/daemon/mod.rs"},"region":{"startLine":1086}}}],"partialFingerprints":{"codehealthFindingId/v1":"f96bba27f623119279e4f1c4d82f83e92aabe747a54c254f44b5862f3d324305"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-runtime/src/daemon/mod.rs:2787-2795 | crates/zeroclaw-runtime/src/daemon/mod.rs:2899-2907 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/daemon/mod.rs:2787\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/zeroclaw-runtime/src/daemon/mod.rs"},"region":{"startLine":2787}}}],"partialFingerprints":{"codehealthFindingId/v1":"2554c1afdaffce29a9175c0c77b0cc636dc5fb6acc3d36f2fee921868f582e92"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-runtime/src/live_config_authority.rs:1155-1163 | crates/zeroclaw-runtime/src/live_config_authority.rs:1199-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. 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/zeroclaw-runtime/src/live_config_authority.rs:1209\u0060 calls \u0060Err\u0060 and \u0060crates/zeroclaw-runtime/src/live_config_authority.rs:1164\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/zeroclaw-runtime/src/live_config_authority.rs"},"region":{"startLine":1155}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3618db01ecf34d2d21326263ecfb93e2e1a7b906334e67fb8e7aff6b05cfbd9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-runtime/src/observability/log.rs:117-129 | crates/zeroclaw-runtime/src/observability/log.rs:141-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/zeroclaw-runtime/src/observability/log.rs:117\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/zeroclaw-runtime/src/observability/log.rs"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfd10d84abb6e1d3f0f1d35cfb7677920ebef96c51d107ef4b397f7b524c2cb1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-runtime/src/plugin_runtime.rs:1190-1198 | crates/zeroclaw-runtime/src/tools/mod.rs:4029-4037 \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/zeroclaw-runtime/src/plugin_runtime.rs:1190\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/zeroclaw-runtime/src/plugin_runtime.rs"},"region":{"startLine":1190}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c52cf2e4dafc8cb80642d7bc4be299350086a05e089b4fdb41eb6714e44dbe4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-runtime/src/rpc/dispatch.rs:6005-6013 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:6117-6125 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/rpc/dispatch.rs:6005\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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":6005}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8b4d06a0f82e1e93ecfa84738a7a34464b5c8d12655d7afc64c08562f0375d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-runtime/src/rpc/local.rs:682-690 | crates/zeroclaw-runtime/src/rpc/wss.rs:971-979 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/rpc/local.rs\u0060 and \u0060crates/zeroclaw-runtime/src/rpc/wss.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 81 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/zeroclaw-runtime/src/rpc/local.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":"crates/zeroclaw-runtime/src/rpc/local.rs"},"region":{"startLine":682}}}],"partialFingerprints":{"codehealthFindingId/v1":"a85a2ec8044207471265954da6a222e161eb51196a05c2c0f31d759c172ea887"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): crates/zeroclaw-runtime/src/rpc/session.rs:962-970 | crates/zeroclaw-runtime/src/rpc/session.rs:1156-1163 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/rpc/session.rs:962\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/zeroclaw-runtime/src/rpc/session.rs"},"region":{"startLine":962}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2b7aa6be34e33ac28ec14a8315456310d76240051ef3bee2b77fe9a947d2830"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-runtime/src/security/principal_resolver.rs:293-301 | crates/zeroclaw-runtime/src/security/principal_resolver.rs:324-332 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-runtime/src/security/principal_resolver.rs"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"daa8d408ed281c5752aa726fdaaaa9a68f7beaf468b8abf9ccc962f1b55046cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): crates/zeroclaw-runtime/src/security/webauthn.rs:268-276 | crates/zeroclaw-runtime/src/security/webauthn.rs: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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/security/webauthn.rs:268\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 \u0060response\u0060 to \u0060\u0026RegisterCredentialResponse\u0060 in one and \u0060\u0026AuthenticateCredentialResponse\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/zeroclaw-runtime/src/security/webauthn.rs"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"d62aefebaf7dd249648a40f3f2b30f2b0cd8d2ba40f4f7a61d307e965ae09b06"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): crates/zeroclaw-runtime/src/service/mod.rs:3145-3153 | crates/zeroclaw-runtime/src/service/mod.rs:3236-3243 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/service/mod.rs:3145\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/zeroclaw-runtime/src/service/mod.rs"},"region":{"startLine":3145}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff54680dd70d1cd250f4f0d5e9e9e8156d5ba794d206e838c08cb9083b238a16"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20139 lines \u00D7 2): crates/zeroclaw-runtime/src/skills/creator.rs:400-408 | crates/zeroclaw-runtime/src/skills/creator.rs:434-440 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-runtime/src/skills/creator.rs"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"1924c1d9f965d4badc25018e0fd61900373ff541f455b00b7f19aa740e776c4a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-runtime/src/skills/mod.rs:1039-1047 | crates/zeroclaw-runtime/src/sop/mod.rs:978-986 \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/zeroclaw-runtime/src/skills/mod.rs:1039\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/zeroclaw-runtime/src/skills/mod.rs"},"region":{"startLine":1039}}}],"partialFingerprints":{"codehealthFindingId/v1":"42c43f10b654f913b28905da3c15e38ce3e564571412f8087226ce8c788d1ef3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-runtime/src/skills/mod.rs:1336-1344 | crates/zeroclaw-runtime/src/skills/mod.rs:3084-3092 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-runtime/src/skills/mod.rs"},"region":{"startLine":1336}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4541238628e789c5aef4fabafb44d5429532c5070537c782cafe28d3f762432"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/mod.rs:613-621 | crates/zeroclaw-runtime/src/sop/mod.rs:646-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/mod.rs:613\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/zeroclaw-runtime/src/sop/mod.rs"},"region":{"startLine":613}}}],"partialFingerprints":{"codehealthFindingId/v1":"6351815ace3a21a433772aadb52822db3badca8ea309b0b80b964a8a6b7f235d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-tools/src/browser.rs:463-471 | crates/zeroclaw-tools/src/text_browser.rs:226-234 \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/zeroclaw-tools/src/browser.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/zeroclaw-tools/src/browser.rs"},"region":{"startLine":463}}}],"partialFingerprints":{"codehealthFindingId/v1":"52419b9c061b891382d33dd0bde847cb2226a1de12d798ab1a813267c75f7d84"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-tools/src/content_search.rs:121-129 | crates/zeroclaw-tools/src/glob_search.rs:46-54 \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/zeroclaw-tools/src/content_search.rs:121\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/zeroclaw-tools/src/content_search.rs"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ba6c5cd899201dbb571b8c2011c1098c2a906398edf789cd717ed53a2f6e38d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-tools/src/git_operations.rs:949-957 | crates/zeroclaw-tools/src/git_operations.rs:987-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/git_operations.rs:949\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/zeroclaw-tools/src/git_operations.rs"},"region":{"startLine":949}}}],"partialFingerprints":{"codehealthFindingId/v1":"b83b8768f39cfd4b25474ef82a91cb360821bdc16e66e3652bdd8f457267bf9e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-tools/src/http_request.rs:413-421 | crates/zeroclaw-tools/src/web_fetch.rs:186-194 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/http_request.rs\u0060 and \u0060crates/zeroclaw-tools/src/web_fetch.rs\u0060 as WHOLE FILES: this scan already matched 9 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":"crates/zeroclaw-tools/src/http_request.rs"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa9d9187b5ce2a3a8462b85f37e818bb2b45442864e5e0f2a4d6aa23a0a4cb63"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-tools/src/knowledge_tool.rs:220-228 | crates/zeroclaw-tools/src/knowledge_tool.rs:449-457 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-tools/src/knowledge_tool.rs"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fb8b76cf05fc9cec971795ef47fa5266dea98b513c060a00eaa95a57bcce8f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-tools/src/mcp_transport.rs:1231-1240 | crates/zeroclaw-tools/src/mcp_transport.rs:2008-2016 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/mcp_transport.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/zeroclaw-tools/src/mcp_transport.rs"},"region":{"startLine":1231}}}],"partialFingerprints":{"codehealthFindingId/v1":"72252cc335b0a4852c48195c65bd186cd092b54457e6f47943843274bdbb096b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-tools/src/microsoft365/mod.rs:372-380 | crates/zeroclaw-tools/src/microsoft365/mod.rs:482-490 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-tools/src/microsoft365/mod.rs"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"e79a1d95c5728e9385d3bb95013dc5a71e931d4b86608fddd80e34006b24dfd2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20139 lines \u00D7 2): crates/zeroclaw-tools/src/web_search_tool.rs:1161-1169 | crates/zeroclaw-tools/src/web_search_tool.rs:1542-1548 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/web_search_tool.rs:1161\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/zeroclaw-tools/src/web_search_tool.rs"},"region":{"startLine":1161}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef1025077ac35cf963d41626d18ba9f3134dfafbd1d7fefe328ce079f9f2a1c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): xtask/src/cmd/mdbook/peer_groups.rs:55-63 | xtask/src/cmd/mdbook/placeholders.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 \u0060xtask/src/cmd/mdbook/peer_groups.rs:55\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, \u0060xtask/src/cmd/mdbook/peer_groups.rs:52\u0060 calls \u0060load_params\u0060, \u0060load_env_var_params\u0060 and \u0060xtask/src/cmd/mdbook/placeholders.rs:13\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":"xtask/src/cmd/mdbook/peer_groups.rs"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"cedd4b0e0bc9d156ae9e648e676b047070c23c09597013c7bdb3acfd9891b215"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): xtask/src/cmd/mdbook/peer_groups.rs:817-825 | xtask/src/cmd/mdbook/peer_groups.rs:900-908 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060xtask/src/cmd/mdbook/peer_groups.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":"xtask/src/cmd/mdbook/peer_groups.rs"},"region":{"startLine":817}}}],"partialFingerprints":{"codehealthFindingId/v1":"51b1ba51385afa7ec4b448fa05af0a6f6159efd193f334e0a4b040451c734bdc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 18): crates/zeroclaw-channels/src/orchestrator/mod.rs:14912-14919 | crates/zeroclaw-channels/src/orchestrator/mod.rs:14982-14989 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15332-15339 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15368-15375 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15422-15429 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15447-15454 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15482-15489 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15526-15533 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15591-15598 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15629-15636 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15671-15678 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15721-15728 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15760-15767 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15804-15811 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15839-15846 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15884-15891 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15921-15928 | crates/zeroclaw-channels/src/orchestrator/mod.rs:16018-16025 \u2014 all 18 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/zeroclaw-channels/src/orchestrator/mod.rs:14912\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":14912}}}],"partialFingerprints":{"codehealthFindingId/v1":"08b98440590bbe4ae11874afd8c1220c993e1cecc3114fbf65d4c2abe172e5dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 10): crates/zeroclaw-channels/src/whatsapp_storage.rs:622-629 | crates/zeroclaw-channels/src/whatsapp_storage.rs:678-685 | crates/zeroclaw-channels/src/whatsapp_storage.rs:712-719 | crates/zeroclaw-channels/src/whatsapp_storage.rs:795-802 | crates/zeroclaw-channels/src/whatsapp_storage.rs:848-855 | crates/zeroclaw-channels/src/whatsapp_storage.rs:936-943 | crates/zeroclaw-channels/src/whatsapp_storage.rs:1081-1088 | crates/zeroclaw-channels/src/whatsapp_storage.rs:1109-1116 | crates/zeroclaw-channels/src/whatsapp_storage.rs:1273-1280 | crates/zeroclaw-channels/src/whatsapp_storage.rs:1307-1314 \u2014 all 10 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/zeroclaw-channels/src/whatsapp_storage.rs:622\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/zeroclaw-channels/src/whatsapp_storage.rs"},"region":{"startLine":622}}}],"partialFingerprints":{"codehealthFindingId/v1":"13a8b9fd7b7c3a5bb0187353abce968440906f906149eda84fbcdad3c8538a48"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 7): crates/zeroclaw-runtime/src/tools/read_skill.rs:51-58 | crates/zeroclaw-runtime/src/tools/send_message_to_peer.rs:148-155 | crates/zeroclaw-runtime/src/tools/send_message_to_peer.rs:165-172 | crates/zeroclaw-runtime/src/tools/send_message_to_peer.rs:182-189 | crates/zeroclaw-tools/src/file_download.rs:484-491 | crates/zeroclaw-tools/src/file_download.rs:502-509 | crates/zeroclaw-tools/src/pushover.rs:160-167 \u2014 there are 7 copies across 4 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 7 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/zeroclaw-runtime/src/tools/read_skill.rs:51\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/zeroclaw-runtime/src/tools/read_skill.rs"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2c85783c8b741e68d52b1272874fc650b99591e9f17378dc58c18b6993efa5a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 6): crates/zeroclaw-providers/src/dispatch.rs:745-752 | crates/zeroclaw-providers/src/dispatch.rs:780-787 | crates/zeroclaw-providers/src/dispatch.rs:812-819 | crates/zeroclaw-providers/src/dispatch.rs:1125-1132 | crates/zeroclaw-providers/src/dispatch.rs:1158-1165 | crates/zeroclaw-providers/src/dispatch.rs:1190-1197 \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/zeroclaw-providers/src/dispatch.rs:745\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/zeroclaw-providers/src/dispatch.rs"},"region":{"startLine":745}}}],"partialFingerprints":{"codehealthFindingId/v1":"1aaea793f5c44054c6020c3b76ee1f8fcb3f8e2967ad6f215546721c5ba6cd28"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 6): crates/zeroclaw-runtime/src/hooks/runner.rs:311-318 | crates/zeroclaw-runtime/src/hooks/runner.rs:337-344 | crates/zeroclaw-runtime/src/hooks/runner.rs:372-379 | crates/zeroclaw-runtime/src/hooks/runner.rs:420-427 | crates/zeroclaw-runtime/src/hooks/runner.rs:449-456 | crates/zeroclaw-runtime/src/hooks/runner.rs:488-495 \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/zeroclaw-runtime/src/hooks/runner.rs:311\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/zeroclaw-runtime/src/hooks/runner.rs"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"7babfbbb50745bfb0b186a3def60218638158797fc6cb354de1052f8972f9a89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 6): crates/zeroclaw-tools/src/browser.rs:2397-2404 | crates/zeroclaw-tools/src/browser.rs:2414-2421 | crates/zeroclaw-tools/src/browser.rs:2441-2448 | crates/zeroclaw-tools/src/browser.rs:2468-2475 | crates/zeroclaw-tools/src/browser.rs:2545-2552 | crates/zeroclaw-tools/src/browser.rs:2583-2590 \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/zeroclaw-tools/src/browser.rs:2397\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/zeroclaw-tools/src/browser.rs"},"region":{"startLine":2397}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ee390aec1cc1ba4ab21477047f8965777ecaebef8429119a6b1cccedfb69a58"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 5): crates/zeroclaw-channels/src/slack.rs:2377-2384 | crates/zeroclaw-channels/src/slack.rs:2395-2402 | crates/zeroclaw-channels/src/slack.rs:2426-2433 | crates/zeroclaw-channels/src/slack.rs:2440-2447 | crates/zeroclaw-channels/src/slack.rs:5084-5091 \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/zeroclaw-channels/src/slack.rs:2377\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":2377}}}],"partialFingerprints":{"codehealthFindingId/v1":"c240693d2c7c01ed8b116d1455a1efbf5b0d5c5f57475934021a4b7f02bf9089"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 5): crates/zeroclaw-providers/src/azure_openai.rs:399-407 | crates/zeroclaw-providers/src/compatible.rs:3504-3512 | crates/zeroclaw-providers/src/copilot.rs:376-384 | crates/zeroclaw-providers/src/openai.rs:377-385 | crates/zeroclaw-providers/src/openrouter.rs:315-323 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/azure_openai.rs\u0060 and \u0060crates/zeroclaw-providers/src/compatible.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/zeroclaw-providers/src/azure_openai.rs:399\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/zeroclaw-providers/src/azure_openai.rs"},"region":{"startLine":399}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a9742976358e4ffce473c507ab445646fb8836cbae0fe2767705aa8195246aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 5): crates/zeroclaw-tools/src/jira_tool.rs:205-212 | crates/zeroclaw-tools/src/jira_tool.rs:277-284 | crates/zeroclaw-tools/src/jira_tool.rs:356-363 | crates/zeroclaw-tools/src/jira_tool.rs:795-802 | crates/zeroclaw-tools/src/jira_tool.rs:893-900 \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/zeroclaw-tools/src/jira_tool.rs:205\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/zeroclaw-tools/src/jira_tool.rs:201\u0060 calls \u0060Some\u0060 and \u0060crates/zeroclaw-tools/src/jira_tool.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/zeroclaw-tools/src/jira_tool.rs"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"937010027c71ce91fde6bf7a35ed10c5d6961a8eff5b9935e1397c19122fd752"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 5): crates/zeroclaw-tools/src/notion_tool.rs:69-76 | crates/zeroclaw-tools/src/notion_tool.rs:89-96 | crates/zeroclaw-tools/src/notion_tool.rs:118-125 | crates/zeroclaw-tools/src/notion_tool.rs:144-151 | crates/zeroclaw-tools/src/notion_tool.rs:166-173 \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/zeroclaw-tools/src/notion_tool.rs:69\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/zeroclaw-tools/src/notion_tool.rs"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"91e70f674a18721ca2da95b8c88497a581315b03ab114f80632cc0272de45374"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 5): xtask/src/generate/container.rs:42-49 | xtask/src/generate/docs.rs:239-246 | xtask/src/generate/install_sh.rs:717-724 | xtask/src/generate/packaging.rs:26-33 | xtask/src/generate/setup_bat.rs:234-241 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060xtask/src/generate/container.rs:42\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":"xtask/src/generate/container.rs"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e2c291232b68c375df13df06a4c45cd45908034e535135786e782181aaf74b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): crates/zeroclaw-channels/src/discord/mod.rs:402-409 | crates/zeroclaw-channels/src/discord/mod.rs:434-441 | crates/zeroclaw-channels/src/discord/mod.rs:611-618 | crates/zeroclaw-channels/src/discord/mod.rs:662-669 \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/zeroclaw-channels/src/discord/mod.rs:402\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":402}}}],"partialFingerprints":{"codehealthFindingId/v1":"e29d98553046eba8ea2793e30a6eb4a61c4f353bde848216fa7c8318f574a3d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 4): crates/zeroclaw-channels/src/lark.rs:1942-1949 | crates/zeroclaw-channels/src/lark.rs:2068-2075 | crates/zeroclaw-channels/src/slack.rs:3085-3091 | crates/zeroclaw-channels/src/slack.rs:3823-3829 \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/zeroclaw-channels/src/lark.rs:1942\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":1942}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0ef3fdc66b41fda96af04b7af5e09694503e18aa89a5b554d1b48e866b24f2b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): crates/zeroclaw-channels/src/orchestrator/mod.rs:10811-10818 | crates/zeroclaw-channels/src/orchestrator/mod.rs:11316-11323 | crates/zeroclaw-channels/src/orchestrator/mod.rs:11354-11361 | crates/zeroclaw-channels/src/orchestrator/mod.rs:11488-11495 \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/zeroclaw-channels/src/orchestrator/mod.rs:10811\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":10811}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c74fd499d8851c06645a345badd12a8b5e2d251971f6662c49181bc25601fd5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 4): crates/zeroclaw-providers/src/compatible.rs:3349-3355 | crates/zeroclaw-providers/src/compatible.rs:3372-3379 | crates/zeroclaw-providers/src/compatible.rs:3423-3429 | crates/zeroclaw-providers/src/openrouter.rs:428-435 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/compatible.rs\u0060 and \u0060crates/zeroclaw-providers/src/openrouter.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 81 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/zeroclaw-providers/src/compatible.rs:3349\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/zeroclaw-providers/src/compatible.rs:3347\u0060 calls \u0060is_tool_result_carrier\u0060 and \u0060crates/zeroclaw-providers/src/openrouter.rs:425\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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":3349}}}],"partialFingerprints":{"codehealthFindingId/v1":"08439d319667d00f43b26b9f0ff3ab5aba0a73ead552a43ecb2629c1ba9da49c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): crates/zeroclaw-providers/src/compatible.rs:5022-5029 | crates/zeroclaw-providers/src/compatible.rs:5200-5208 | crates/zeroclaw-providers/src/compatible.rs:5345-5352 | crates/zeroclaw-providers/src/openrouter.rs:975-983 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/compatible.rs\u0060 and \u0060crates/zeroclaw-providers/src/openrouter.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 81 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/zeroclaw-providers/src/compatible.rs:5022\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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":5022}}}],"partialFingerprints":{"codehealthFindingId/v1":"7684726ac3eb3dc6ddaf63282bb951ee74cdd6dceebe26c18355e811f7c8ec25"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): crates/zeroclaw-runtime/src/rpc/dispatch.rs:5486-5493 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:6025-6032 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:6042-6049 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:6249-6256 \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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":5486}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0402393d93bb296f414340f44710b415cd40310635ba4b6f003b7e6c7f3f422"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): crates/zeroclaw-tools/src/file_write.rs:85-92 | crates/zeroclaw-tools/src/knowledge_tool.rs:189-196 | crates/zeroclaw-tools/src/knowledge_tool.rs:490-497 | crates/zeroclaw-tools/src/memory_store.rs:64-71 \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/zeroclaw-tools/src/file_write.rs:85\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 \u0060args\u0060 to \u0060serde_json::Value\u0060 in one and \u0060\u0026serde_json::Value\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/zeroclaw-tools/src/file_write.rs"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"90781de2fc3e811fcf796bfe20b7022cd3681cc69d1c38d22b18c3f0234e558e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): crates/zeroclaw-tools/src/model_routing_config.rs:95-102 | crates/zeroclaw-tools/src/model_routing_config.rs:113-120 | crates/zeroclaw-tools/src/proxy_config.rs:24-31 | crates/zeroclaw-tools/src/proxy_config.rs:41-48 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/model_routing_config.rs\u0060 and \u0060crates/zeroclaw-tools/src/proxy_config.rs\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 143 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/zeroclaw-tools/src/model_routing_config.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/zeroclaw-tools/src/model_routing_config.rs"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"dafd810ed3fde9db42a50b5b89d03891184be46b3e0e7854960cf777195b428a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): crates/zeroclaw-tools/src/web_search_tool.rs:732-739 | crates/zeroclaw-tools/src/web_search_tool.rs:1434-1441 | crates/zeroclaw-tools/src/web_search_tool.rs:1667-1674 | crates/zeroclaw-tools/src/web_search_tool.rs:1854-1861 \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/zeroclaw-tools/src/web_search_tool.rs:732\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/zeroclaw-tools/src/web_search_tool.rs"},"region":{"startLine":732}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9f1fd75904724b6393f1ce44d9200854ca7ee149fdc7f156db5c9fdd9a6dfc6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): apps/zerocode/src/app.rs:3328-3335 | apps/zerocode/src/dashboard.rs:1322-1329 | apps/zerocode/src/dashboard.rs:3212-3219 \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 \u0060apps/zerocode/src/app.rs:3328\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":"apps/zerocode/src/app.rs"},"region":{"startLine":3328}}}],"partialFingerprints":{"codehealthFindingId/v1":"a60f990a0ce269c32542de0bf5a00559d83042f816cfe96e042d3fc8d350f4f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): apps/zerocode/src/config_manager.rs:5022-5029 | apps/zerocode/src/config_manager.rs:5176-5183 | apps/zerocode/src/config_manager.rs:5502-5509 \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 \u0060apps/zerocode/src/config_manager.rs:5022\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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":5022}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a1c17883993cd95f5b5c41514b838a4a7a159b228912013e2e82acdcd6d8712"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 3): crates/zeroclaw-channels/src/discord/markers.rs:877-884 | crates/zeroclaw-channels/src/matrix.rs:3383-3390 | crates/zeroclaw-channels/src/whatsapp_web.rs:3137-3143 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/discord/markers.rs\u0060 and \u0060crates/zeroclaw-channels/src/matrix.rs\u0060 as WHOLE FILES: this scan already matched 8 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/zeroclaw-channels/src/discord/markers.rs:877\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/zeroclaw-channels/src/discord/markers.rs"},"region":{"startLine":877}}}],"partialFingerprints":{"codehealthFindingId/v1":"96c90ee44e66ed4a76da43c39c35cc670d0aa5a0b7427a10f42634d5442b4270"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/zeroclaw-channels/src/discord/mod.rs:2445-2452 | crates/zeroclaw-channels/src/discord/mod.rs:2644-2651 | crates/zeroclaw-channels/src/discord/mod.rs:3056-3063 \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/zeroclaw-channels/src/discord/mod.rs:2456\u0060 calls \u0060interaction_string_option\u0060, \u0060extract_submitted_options\u0060 and \u0060crates/zeroclaw-channels/src/discord/mod.rs:2652\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":2445}}}],"partialFingerprints":{"codehealthFindingId/v1":"232699d05fa2b20b59a526105407f1fef850c231055ffd57da7681ab0aadde1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/zeroclaw-channels/src/lark.rs:2460-2467 | crates/zeroclaw-channels/src/lark.rs:2508-2515 | crates/zeroclaw-channels/src/lark.rs:3702-3709 \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/zeroclaw-channels/src/lark.rs:2460\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":2460}}}],"partialFingerprints":{"codehealthFindingId/v1":"66ca004fd16855e53604e4db86f1172b181d8c275fc0a23a6594b6a1128b4002"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/zeroclaw-channels/src/lark.rs:2649-2657 | crates/zeroclaw-channels/src/nextcloud_talk.rs:263-270 | crates/zeroclaw-channels/src/nextcloud_talk.rs:392-399 \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/zeroclaw-channels/src/lark.rs:2649\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":2649}}}],"partialFingerprints":{"codehealthFindingId/v1":"0606c86c287e167d970a208d5ce4f75102fefbccbde10452599cf0dfe4c8be9c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1882-1890 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:3123-3130 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:3155-3163 \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/zeroclaw-channels/src/orchestrator/acp_server.rs:3123\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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":1882}}}],"partialFingerprints":{"codehealthFindingId/v1":"5877756dd5d9fe08018eb454a55e3b7143ad9b1a3d4165af7e9f365a9cd17bc5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/zeroclaw-channels/src/orchestrator/mod.rs:10738-10745 | crates/zeroclaw-runtime/src/agent/loop_.rs:1303-1311 | crates/zeroclaw-runtime/src/agent/loop_.rs:3455-3462 \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/zeroclaw-channels/src/orchestrator/mod.rs:10738\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/zeroclaw-channels/src/orchestrator/mod.rs:10746\u0060 calls \u0060set_model_route\u0060, \u0060clone\u0060 and \u0060crates/zeroclaw-runtime/src/agent/loop_.rs:1312\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":10738}}}],"partialFingerprints":{"codehealthFindingId/v1":"0053ca7f0622175ce4604dff51ec051a0c3be6124ecc6837246b7969c6c3a041"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/zeroclaw-channels/src/voice_wake.rs:405-412 | crates/zeroclaw-memory/src/lib.rs:624-631 | crates/zeroclaw-runtime/src/skills/review.rs:234-241 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/voice_wake.rs\u0060 and \u0060crates/zeroclaw-memory/src/lib.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/zeroclaw-channels/src/voice_wake.rs:405\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/zeroclaw-channels/src/voice_wake.rs"},"region":{"startLine":405}}}],"partialFingerprints":{"codehealthFindingId/v1":"e70560e957a2d8e7ccba85667775b8e494d72c3eaa6a3f55b6bea9b54ecd983a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): crates/zeroclaw-hardware/src/pico_code.rs:167-176 | crates/zeroclaw-hardware/src/pico_code.rs:288-297 | crates/zeroclaw-hardware/src/pico_code.rs:473-482 \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/zeroclaw-hardware/src/pico_code.rs:167\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/zeroclaw-hardware/src/pico_code.rs"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"08a615f2163e5a65a23dad406b25520152549a065ab4a36f6fa84e1d0b5d4a28"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/zeroclaw-infra/src/session_sqlite.rs:1024-1032 | crates/zeroclaw-infra/src/session_sqlite.rs:1057-1064 | crates/zeroclaw-infra/src/session_sqlite.rs:1427-1434 \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/zeroclaw-infra/src/session_sqlite.rs:1024\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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":1024}}}],"partialFingerprints":{"codehealthFindingId/v1":"153082f9c3dbc093726872042f1d15204539c59e1b068d5848d93de1c093a58a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/zeroclaw-infra/src/session_store.rs:409-416 | crates/zeroclaw-runtime/src/doctor/mod.rs:566-573 | crates/zeroclaw-runtime/src/sop/mod.rs:801-808 \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/zeroclaw-infra/src/session_store.rs"},"region":{"startLine":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"8aeee527739ddf17114a8bd0b1c12abc708145f21559323fac9f3ae94b9143d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/zeroclaw-log/src/writer.rs:828-835 | crates/zeroclaw-log/src/writer.rs:857-864 | crates/zeroclaw-log/src/writer.rs:887-894 \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/zeroclaw-log/src/writer.rs:828\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/zeroclaw-log/src/writer.rs"},"region":{"startLine":828}}}],"partialFingerprints":{"codehealthFindingId/v1":"e96bb39dffe99c2aa216cb07cc839bd07018c8b3cf277551250f38ee8d74c45b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/zeroclaw-macros/src/lib.rs:664-671 | crates/zeroclaw-macros/src/lib.rs:700-707 | crates/zeroclaw-macros/src/lib.rs:751-759 \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/zeroclaw-macros/src/lib.rs:664\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/zeroclaw-macros/src/lib.rs"},"region":{"startLine":664}}}],"partialFingerprints":{"codehealthFindingId/v1":"f111eb6566f93387858483cdc889e573c43f90047138e4c4cec7585fec511771"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/zeroclaw-memory/src/knowledge_graph.rs:381-388 | crates/zeroclaw-memory/src/knowledge_graph.rs:411-418 | crates/zeroclaw-memory/src/knowledge_graph.rs:441-448 \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/zeroclaw-memory/src/knowledge_graph.rs:381\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/zeroclaw-memory/src/knowledge_graph.rs"},"region":{"startLine":381}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1a82cd77e6fcef07f6101127008f6cd22d6d7d03f9350b8f3c18b91dbc5e93d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 3): crates/zeroclaw-providers/src/auth/email_oauth2.rs:148-155 | crates/zeroclaw-providers/src/auth/openai_oauth.rs:193-200 | crates/zeroclaw-providers/src/auth/xai_oauth.rs:294-300 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/auth/email_oauth2.rs\u0060 and \u0060crates/zeroclaw-providers/src/auth/openai_oauth.rs\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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/auth/email_oauth2.rs:148\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/zeroclaw-providers/src/auth/email_oauth2.rs"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac3b078bb007e755def75e232c2a02b7bbdc7c63db4c12da25fb6b7320dc4c4c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20138 lines \u00D7 3): crates/zeroclaw-providers/src/auth/mod.rs:1210-1215 | crates/zeroclaw-providers/src/auth/mod.rs:1456-1461 | crates/zeroclaw-providers/src/auth/mod.rs:1719-1726 \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/zeroclaw-providers/src/auth/mod.rs:1210\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/zeroclaw-providers/src/auth/mod.rs"},"region":{"startLine":1210}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3c94a10a78e5bbf54752b1b07cccf07eee6a8123cd91621f9bcef43bd108e33"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 3): crates/zeroclaw-providers/src/auth/mod.rs:1339-1345 | crates/zeroclaw-providers/src/auth/mod.rs:1361-1368 | crates/zeroclaw-providers/src/auth/mod.rs:1382-1389 \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/zeroclaw-providers/src/auth/mod.rs:1339\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/zeroclaw-providers/src/auth/mod.rs"},"region":{"startLine":1339}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bb3816d0e52fda71479670676ebb2f6a386ca0276ccc171e60d790bb45e9de1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/zeroclaw-providers/src/gemini_cli.rs:229-236 | crates/zeroclaw-providers/src/kilocli.rs:226-233 | crates/zeroclaw-providers/src/openai_codex.rs:1066-1073 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/gemini_cli.rs\u0060 and \u0060crates/zeroclaw-providers/src/kilocli.rs\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 164 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/zeroclaw-providers/src/gemini_cli.rs:229\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/zeroclaw-providers/src/gemini_cli.rs"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"168cadf0f99290911eeada6764ba0bab0c20d9d41290fc6cdc896fa659c9526b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/zeroclaw-runtime/src/agent/agent.rs:4386-4393 | crates/zeroclaw-runtime/src/agent/agent.rs:4840-4847 | crates/zeroclaw-runtime/src/agent/agent.rs:4922-4929 \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/zeroclaw-runtime/src/agent/agent.rs:4386\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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":4386}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffe9021997d8359ec3f42ae90bf2ee73b027a1a57e53c0a0f95c9bf54f98f496"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/zeroclaw-runtime/src/agent/turn/protocol_detect.rs:182-189 | crates/zeroclaw-tool-call-parser/src/lib.rs:501-508 | crates/zeroclaw-tool-call-parser/src/lib.rs:706-713 \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/zeroclaw-runtime/src/agent/turn/protocol_detect.rs"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ccf9c4012288a537e2109a5cc929526ade69dfd5be9ad0b59aece92aa25619e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/zeroclaw-runtime/src/observability/broadcast.rs:102-109 | crates/zeroclaw-runtime/src/observability/broadcast.rs:126-133 | crates/zeroclaw-runtime/src/observability/broadcast.rs:146-153 \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/zeroclaw-runtime/src/observability/broadcast.rs:102\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/zeroclaw-runtime/src/observability/broadcast.rs:124\u0060 calls \u0060as_millis\u0060 and \u0060crates/zeroclaw-runtime/src/observability/broadcast.rs:144\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/zeroclaw-runtime/src/observability/broadcast.rs"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a14e7bae194cc7de1349e036fb0dfb22613ead0970c145c4ee7ecd35a467949"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/zeroclaw-runtime/src/service/mod.rs:3147-3155 | crates/zeroclaw-runtime/src/service/mod.rs:3238-3245 | crates/zeroclaw-runtime/src/service/mod.rs:3266-3273 \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/zeroclaw-runtime/src/service/mod.rs:3147\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/zeroclaw-runtime/src/service/mod.rs"},"region":{"startLine":3147}}}],"partialFingerprints":{"codehealthFindingId/v1":"c243ecbe1729e6e61f9ab33b78a94aaa221d3ec6391e20c74c0bb60e2d575716"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/zeroclaw-runtime/src/skills/mod.rs:1280-1287 | crates/zeroclaw-runtime/src/skills/mod.rs:1318-1325 | crates/zeroclaw-runtime/src/skills/mod.rs:3066-3073 \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/zeroclaw-runtime/src/skills/mod.rs:1280\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/zeroclaw-runtime/src/skills/mod.rs"},"region":{"startLine":1280}}}],"partialFingerprints":{"codehealthFindingId/v1":"188f5b80213fc0e3520fe383586fb35a3ed82286040cb1a4568c65acb9b738ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/zeroclaw-tools/src/ask_user.rs:103-110 | crates/zeroclaw-tools/src/escalate.rs:189-196 | crates/zeroclaw-tools/src/poll.rs:199-206 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/ask_user.rs\u0060 and \u0060crates/zeroclaw-tools/src/escalate.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 96 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/zeroclaw-tools/src/ask_user.rs:103\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/zeroclaw-tools/src/ask_user.rs"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"69b4aedac0732dc39aff6c433aa1700d4c282cd40a9eeb43034208d1d8a77cf5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/zeroclaw-tools/src/hardware_board_info.rs:163-170 | crates/zeroclaw-tools/src/hardware_memory_map.rs:148-155 | crates/zeroclaw-tools/src/hardware_memory_read.rs:151-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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/hardware_board_info.rs: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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/hardware_board_info.rs"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a540349ea8e73209932865c92b16c312b4cd5e9048a21e9a2da83279dbfa70e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): apps/tauri/src/macos/permissions.rs:94-102 | apps/tauri/src/macos/permissions.rs:118-126 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/tauri/src/macos/permissions.rs:94\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":"apps/tauri/src/macos/permissions.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"759f3bc71e92d9bad1dd1059277a63e046166889c571994431d7d0f875deeeea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): apps/zerocode/src/chat.rs:1657-1664 | apps/zerocode/src/chat.rs:5272-5279 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/chat.rs:1657\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":"apps/zerocode/src/chat.rs"},"region":{"startLine":1657}}}],"partialFingerprints":{"codehealthFindingId/v1":"23c512e45edcd277f923e1f3e17a820a77fdf9cf6a48f729c18a25e44fe281e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): apps/zerocode/src/chat.rs:4660-4666 | apps/zerocode/src/chat.rs:4679-4686 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/chat.rs:4660\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":"apps/zerocode/src/chat.rs"},"region":{"startLine":4660}}}],"partialFingerprints":{"codehealthFindingId/v1":"663cc2571d64d70d1ea3189840e411cdc2e36e312226afc3a167635ce0179f5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): apps/zerocode/src/chat.rs:5669-5677 | apps/zerocode/src/chat.rs:5753-5761 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/chat.rs:5669\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":"apps/zerocode/src/chat.rs"},"region":{"startLine":5669}}}],"partialFingerprints":{"codehealthFindingId/v1":"0503476632fe310e1856b1ac56059c4b1107dab7b3dcb911e323ac75fb8c33b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u20138 lines \u00D7 4): apps/zerocode/src/config_manager.rs:1889-1891 | apps/zerocode/src/config_manager.rs:1968-1970 | apps/zerocode/src/config_manager.rs:3499-3506 | apps/zerocode/src/config_manager.rs:5416-5423 \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 \u0060apps/zerocode/src/config_manager.rs:3499\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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":1889}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bea3ae05dbca5a4ae581393909170509d0a99ae3235aab75798f8857255ab26"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): apps/zerocode/src/doctor.rs:368-375 | apps/zerocode/src/logs.rs:1896-1903 \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 \u0060apps/zerocode/src/doctor.rs:368\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":"apps/zerocode/src/doctor.rs"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddabc12abd2134f181d33f8b1a1f7136a097d23ad1812a5239786ed32af33cc1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): apps/zerocode/src/quickstart_pane.rs:318-325 | apps/zerocode/src/quickstart_pane.rs:2936-2943 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/quickstart_pane.rs:318\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":"apps/zerocode/src/quickstart_pane.rs"},"region":{"startLine":318}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e57327b658f3ebc56df3e6b184b0bbd6538d67354341f544e150e5d7bd66529"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): apps/zerocode/src/quickstart_pane.rs:1811-1819 | apps/zerocode/src/quickstart_pane.rs:1829-1837 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/quickstart_pane.rs:1811\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":"apps/zerocode/src/quickstart_pane.rs"},"region":{"startLine":1811}}}],"partialFingerprints":{"codehealthFindingId/v1":"914bc817cc1b544bb8b8be66876e23d583022918d154a429327613913a6e938b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): apps/zerocode/src/quickstart_pane.rs:2001-2008 | apps/zerocode/src/quickstart_pane.rs:2038-2045 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/quickstart_pane.rs:2001\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, \u0060apps/zerocode/src/quickstart_pane.rs:2009\u0060 calls \u0060advance_agent_modal_after_file\u0060 and \u0060apps/zerocode/src/quickstart_pane.rs:2046\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":"apps/zerocode/src/quickstart_pane.rs"},"region":{"startLine":2001}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc2a097f89e596b3738e73d90380d2d22ddff568196cc37b1c240bdd1187b9c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): apps/zerocode/src/widgets.rs:206-215 | crates/zeroclaw-runtime/src/agent/loop_.rs:8-17 \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":"apps/zerocode/src/widgets.rs"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd410e56d04ab83403b24231aac981b962b47262a8aa1d60af5e843a99b9b2ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/bluesky.rs:413-420 | crates/zeroclaw-channels/src/reddit.rs:216-223 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/bluesky.rs\u0060 and \u0060crates/zeroclaw-channels/src/reddit.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 58 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/zeroclaw-channels/src/bluesky.rs:413\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/zeroclaw-channels/src/bluesky.rs"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"918d04ea00583cf0cec6d61a2b65e954f1fd2fb026bb03e61fc21f29d15e35aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/discord/markers.rs:858-865 | crates/zeroclaw-channels/src/matrix.rs:3364-3371 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/discord/markers.rs\u0060 and \u0060crates/zeroclaw-channels/src/matrix.rs\u0060 as WHOLE FILES: this scan already matched 8 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/zeroclaw-channels/src/discord/markers.rs:858\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/zeroclaw-channels/src/discord/markers.rs"},"region":{"startLine":858}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a8172000e6188d64eede4527b29fcb2ec9638ce2ae8a506732e9a73c5a681be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20138 lines \u00D7 2): crates/zeroclaw-channels/src/discord/mod.rs:1254-1261 | crates/zeroclaw-channels/src/discord/mod.rs:1400-1405 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/discord/mod.rs:1254\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":1254}}}],"partialFingerprints":{"codehealthFindingId/v1":"6165f9d2b5de55dfda64fd062444156d429e766b93900adca0249f7154dd73f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/discord/slash.rs:590-597 | crates/zeroclaw-channels/src/discord/slash.rs:665-672 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/discord/slash.rs:590\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/zeroclaw-channels/src/discord/slash.rs"},"region":{"startLine":590}}}],"partialFingerprints":{"codehealthFindingId/v1":"48a72a466561bfc107cc574dcdf3fbdf72be5fe6d718b98bd1826be53ced4b9d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): crates/zeroclaw-channels/src/email_channel.rs:309-316 | crates/zeroclaw-channels/src/email_channel.rs:327-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/zeroclaw-channels/src/email_channel.rs:309\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/zeroclaw-channels/src/email_channel.rs"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"6605d95786be720f9d6b8623964799afa179b0d921bac534cde3766b85739f3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/imessage.rs:268-275 | crates/zeroclaw-channels/src/matrix.rs:3761-3768 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/imessage.rs\u0060 and \u0060crates/zeroclaw-channels/src/matrix.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. 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/zeroclaw-channels/src/imessage.rs:268\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/zeroclaw-channels/src/imessage.rs"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e559e2270a9cd2c1dd29e6258cd4684e09ff68eb308b70779f5260415b4e147"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (1\u20138 lines \u00D7 4): crates/zeroclaw-channels/src/linq.rs:351-351 | crates/zeroclaw-channels/src/linq.rs:355-362 | crates/zeroclaw-channels/src/nextcloud_talk.rs:537-544 | crates/zeroclaw-channels/src/whatsapp.rs:813-813 \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/zeroclaw-channels/src/linq.rs:351\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/zeroclaw-channels/src/linq.rs:355\u0060 calls \u0060Ok\u0060 and \u0060crates/zeroclaw-channels/src/linq.rs:351\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/zeroclaw-channels/src/linq.rs"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"94cf92c90fe2c7cf80fb70bfb5b322dcaf83f26432c1f0d50149ad9a73407818"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/linq.rs:407-414 | crates/zeroclaw-channels/src/linq.rs:428-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/linq.rs:407\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/zeroclaw-channels/src/linq.rs"},"region":{"startLine":407}}}],"partialFingerprints":{"codehealthFindingId/v1":"0dd10b59a33cb4ee3b1c5b54723c8a755e965a971af402e2ac6d3789798394ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): crates/zeroclaw-channels/src/matrix.rs:5097-5103 | crates/zeroclaw-channels/src/matrix.rs:5362-5369 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/matrix.rs:5097\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":5097}}}],"partialFingerprints":{"codehealthFindingId/v1":"515d867a072c4e4f766dd8fe55fa68bc566c7b0eb1cb01f88cd53058a2cffa35"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): crates/zeroclaw-channels/src/mattermost.rs:845-851 | crates/zeroclaw-channels/src/mattermost.rs:920-927 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/mattermost.rs:845\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/zeroclaw-channels/src/mattermost.rs"},"region":{"startLine":845}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e79c8d582a0d7a039a732341b268242a0c3aeef9f41d0fec251ab4486da71b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/mattermost.rs:997-1004 | crates/zeroclaw-channels/src/slack.rs:3767-3774 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/mattermost.rs\u0060 and \u0060crates/zeroclaw-channels/src/slack.rs\u0060 as WHOLE FILES: this scan already matched 9 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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/mattermost.rs:997\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/zeroclaw-channels/src/mattermost.rs"},"region":{"startLine":997}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ce56715e09acbb268bc71c6e905b0681e02b15833976958d870b559a0eb24d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/mattermost.rs:1905-1912 | crates/zeroclaw-channels/src/whatsapp_web.rs:3081-3088 \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/zeroclaw-channels/src/mattermost.rs:1905\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/zeroclaw-channels/src/mattermost.rs"},"region":{"startLine":1905}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d8a957e8c9fc31fa34630c9da771397737bfa67587b484d1334012eb1cc3ffb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/nextcloud_talk.rs:750-758 | crates/zeroclaw-channels/src/telegram.rs:8432-8439 \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/zeroclaw-channels/src/nextcloud_talk.rs:750\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/zeroclaw-channels/src/nextcloud_talk.rs"},"region":{"startLine":750}}}],"partialFingerprints":{"codehealthFindingId/v1":"c62761f1349805977931a1310f5c8f66db0295d49298635ef6437d606f93df69"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/notion.rs:65-72 | crates/zeroclaw-tools/src/notion_tool.rs:34-41 \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/zeroclaw-channels/src/notion.rs:65\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/zeroclaw-channels/src/notion.rs"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a3c96eee599c4a3aa18577a36aac317208f2ea030d93acffb1da6508516ba84"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1124-1131 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1741-1748 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":1124}}}],"partialFingerprints":{"codehealthFindingId/v1":"464de5e66951efaae8559f2699d20b4f5f1fc70216ea57eeac044ab0a7dd1102"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:1377-1383 | crates/zeroclaw-runtime/src/sop/approval/timeout.rs:46-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/zeroclaw-channels/src/orchestrator/mod.rs:1377\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":1377}}}],"partialFingerprints":{"codehealthFindingId/v1":"9222409ee9e5286ca55993c00e38ef6b91e8ef05277b19284d0ac045047cddc8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:6770-6777 | crates/zeroclaw-channels/src/orchestrator/mod.rs:10843-10853 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:6770\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":6770}}}],"partialFingerprints":{"codehealthFindingId/v1":"06ba362fe0ac83b5eaf46c06174f16f8b66c0567ceeddecb54908159503a03dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:12211-12218 | crates/zeroclaw-runtime/src/sop/engine.rs:1481-1488 \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/zeroclaw-channels/src/orchestrator/mod.rs:12211\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":12211}}}],"partialFingerprints":{"codehealthFindingId/v1":"42854ca6b70217b0221f53cb2a08a51efaa224cfbda7cb5c2d8b6973fe0f19a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:15557-15564 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15856-15863 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:15557\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":15557}}}],"partialFingerprints":{"codehealthFindingId/v1":"6248543f4ddcfc2d48daa015fa0bc8aee7fb8c877572d8f3a99ec54eea79c7bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/signal.rs:1385-1394 | crates/zeroclaw-channels/src/signal.rs:1432-1439 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/signal.rs:1385\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/zeroclaw-channels/src/signal.rs"},"region":{"startLine":1385}}}],"partialFingerprints":{"codehealthFindingId/v1":"0680fbab489e3bd8e663e14865b5f85975afedf765dfe1e0f9e817288d3f9edb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/slack.rs:676-683 | crates/zeroclaw-channels/src/slack.rs:5680-5687 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/slack.rs:676\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":676}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3554a4f32c9246c27c2682365c930f5f46937932402049566fb18655f48d6a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/telegram.rs:2362-2369 | crates/zeroclaw-channels/src/telegram.rs:2431-2438 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/telegram.rs:2362\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":2362}}}],"partialFingerprints":{"codehealthFindingId/v1":"57dd5dcf3e542c4cb81b179503e7806ba18a0f662fd1a87a825784b09c48f98c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/transcription.rs:215-222 | crates/zeroclaw-channels/src/transcription.rs:322-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/transcription.rs"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9e9b69554b23d75afb803dea1c4e1920c0774ee107cc5c47217e3e72f08bbd2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/wechat.rs:2836-2843 | crates/zeroclaw-channels/src/wechat.rs:2945-2952 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/wechat.rs:2836\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/zeroclaw-channels/src/wechat.rs"},"region":{"startLine":2836}}}],"partialFingerprints":{"codehealthFindingId/v1":"64d0ff67e483c17e0e28520707809ca84ef2c1caf065cdebc02770e9dffe04cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): crates/zeroclaw-channels/src/whatsapp_web.rs:1931-1937 | crates/zeroclaw-channels/src/whatsapp_web.rs:2056-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/zeroclaw-channels/src/whatsapp_web.rs:1931\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/zeroclaw-channels/src/whatsapp_web.rs"},"region":{"startLine":1931}}}],"partialFingerprints":{"codehealthFindingId/v1":"431096b47cccd9e6074c9fa6c771c18fd0d5b08e7405e28c8b06942570c9d0e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-config/src/policy.rs:3844-3851 | crates/zeroclaw-config/src/policy.rs:3856-3863 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-config/src/policy.rs"},"region":{"startLine":3844}}}],"partialFingerprints":{"codehealthFindingId/v1":"f639423cd3368a44ecd40402409cabea93c3229ed634dbbe88e0f2691c6623ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-config/src/schema.rs:23484-23491 | crates/zeroclaw-config/src/schema.rs:23498-23505 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-config/src/schema.rs:23484\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/zeroclaw-config/src/schema.rs"},"region":{"startLine":23484}}}],"partialFingerprints":{"codehealthFindingId/v1":"c201e0be842b04b08efa1d0df5d2fe5ff0f65dca7d6362edeca3e600102af327"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-config/src/schema/v2.rs:137-144 | crates/zeroclaw-config/src/schema/v2.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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-config/src/schema/v2.rs:137\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/zeroclaw-config/src/schema/v2.rs:176\u0060 calls \u0060insert\u0060, \u0060to_string\u0060 and \u0060crates/zeroclaw-config/src/schema/v2.rs:136\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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a6608cc4e1e486e2f349d74213e3d1b1c1233faf62d933bd0de79295341a379"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-config/src/schema/v2.rs:2239-2246 | crates/zeroclaw-config/src/schema/v2.rs:2841-2848 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-config/src/schema/v2.rs:2239\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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":2239}}}],"partialFingerprints":{"codehealthFindingId/v1":"00a8a7cedad9f29543f5d9ba77eefe6a3b3b03f5b3e75d388ddfac1d9c212612"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-config/src/schema/v2.rs:3142-3149 | crates/zeroclaw-config/src/schema/v2.rs:3376-3383 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-config/src/schema/v2.rs:3142\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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":3142}}}],"partialFingerprints":{"codehealthFindingId/v1":"f22b5b1eebc0826f83178bcb93aeb9eab10eaaa6e17e1f70a340815ce46074c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-config/src/schema/v2.rs:3475-3482 | crates/zeroclaw-plugins/src/host.rs:3391-3398 \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/zeroclaw-config/src/schema/v2.rs:3475\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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":3475}}}],"partialFingerprints":{"codehealthFindingId/v1":"8aa0b101da50c6554a04847d692d77b93f302d1dc8a7fba43fe8022c6b0cedbf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-gateway/src/api.rs:1821-1830 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:8745-8752 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/zeroclaw-runtime/src/rpc/dispatch.rs:8754\u0060 calls \u0060or_else\u0060, \u0060strip_prefix\u0060 and \u0060crates/zeroclaw-gateway/src/api.rs:1832\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/zeroclaw-gateway/src/api.rs"},"region":{"startLine":1821}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa77223b7157030fda4c01c9523705dc60e0ec8a9b61c9168910e81b89be503e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-gateway/src/api_config.rs:1246-1253 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:10723-10730 \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/zeroclaw-gateway/src/api_config.rs:1246\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/zeroclaw-gateway/src/api_config.rs"},"region":{"startLine":1246}}}],"partialFingerprints":{"codehealthFindingId/v1":"296ef7a732c30a4e98c9e619d4b30a358eeb2fafe3afc092c47914ddd2d0dba1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-gateway/src/api_config.rs:1716-1725 | crates/zeroclaw-gateway/src/api_config.rs:2181-2188 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/api_config.rs:1716\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/zeroclaw-gateway/src/api_config.rs"},"region":{"startLine":1716}}}],"partialFingerprints":{"codehealthFindingId/v1":"dea78731fab817ed9c186ed60ca14f20a22bd24a2051ea0c6e1eb8f7cb770856"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-gateway/src/api_config.rs:2221-2228 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:651-658 \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/zeroclaw-gateway/src/api_config.rs:2221\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/zeroclaw-gateway/src/api_config.rs"},"region":{"startLine":2221}}}],"partialFingerprints":{"codehealthFindingId/v1":"a44eae2a59158f5d5867c22eb77913e17df3fd72987fad29008eebff3ce06fe9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-gateway/src/api_pairing.rs:413-420 | crates/zeroclaw-gateway/src/lib.rs:3388-3395 \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/zeroclaw-gateway/src/api_pairing.rs:413\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/zeroclaw-gateway/src/api_pairing.rs"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf7cb3cabf054cb212170260addc7a75bc5ccccf03c90b8271643b5556436b73"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-gateway/src/webhook_ingress.rs:644-651 | crates/zeroclaw-gateway/src/webhook_ingress.rs:669-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/zeroclaw-gateway/src/webhook_ingress.rs:644\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/zeroclaw-gateway/src/webhook_ingress.rs"},"region":{"startLine":644}}}],"partialFingerprints":{"codehealthFindingId/v1":"213e4d17064c2e6f98518670cadb6b2a4cbbb005df9b6b70b1dd91e004139e7e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-gateway/src/ws.rs:1412-1419 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:14665-14672 \u2014 before extracting anything, compare \u0060crates/zeroclaw-gateway/src/ws.rs\u0060 and \u0060crates/zeroclaw-runtime/src/rpc/dispatch.rs\u0060 as WHOLE FILES: this scan already matched 4 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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/ws.rs:1412\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/zeroclaw-gateway/src/ws.rs"},"region":{"startLine":1412}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ce01b78b0430a1fc69d20f293b052de620d53f10bdc1dbfdce011401ef6cdcd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-hardware/src/loader.rs:150-157 | crates/zeroclaw-hardware/src/loader.rs:164-171 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-hardware/src/loader.rs:150\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/zeroclaw-hardware/src/loader.rs"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"911b1ff7e3421b5f729bfb0527a87c8af207a881e003ced07ce25f1fecc067fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20138 lines \u00D7 2): crates/zeroclaw-hardware/src/loader.rs:189-194 | crates/zeroclaw-hardware/src/loader.rs:210-217 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-hardware/src/loader.rs:189\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/zeroclaw-hardware/src/loader.rs"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf4e408a1bbe119e272e3a155a903eeb429037021e2252d8797449ab55c08bd1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-hardware/src/loader.rs:255-262 | crates/zeroclaw-hardware/src/uf2.rs:44-52 \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/zeroclaw-hardware/src/loader.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":"crates/zeroclaw-hardware/src/loader.rs"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"109aca7b8eb9cdac970f5a8d63c6b61fd0ab6b6fcacf57d3be9c83fde30ba59d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-infra/src/acp_session_store.rs:439-446 | crates/zeroclaw-infra/src/acp_session_store.rs:557-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/zeroclaw-infra/src/acp_session_store.rs:439\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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":439}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0a295fff9c35eefbf3a0b7ce139a93e38c04f742a9e878abe13d7c1e1277e2f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-infra/src/acp_session_store.rs:3337-3344 | crates/zeroclaw-infra/src/acp_session_store.rs:3404-3411 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-infra/src/acp_session_store.rs:3337\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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":3337}}}],"partialFingerprints":{"codehealthFindingId/v1":"6367d53bf7de1566dd75a36ba5b1ecf03c8a02ac0fee74f83f460f89efee6f52"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-infra/src/session_sqlite.rs:986-993 | crates/zeroclaw-infra/src/session_sqlite.rs:1692-1699 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-infra/src/session_sqlite.rs:986\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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":986}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b2be60ee546c99eebc8a233a6224fb4e904fa4169660380f6711a5fe0b532f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-macros/src/lib.rs:1787-1794 | crates/zeroclaw-macros/src/lib.rs:1838-1845 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-macros/src/lib.rs:1787\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/zeroclaw-macros/src/lib.rs:1784\u0060 calls \u0060push\u0060 and \u0060crates/zeroclaw-macros/src/lib.rs:1834\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/zeroclaw-macros/src/lib.rs"},"region":{"startLine":1787}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bfc13d39fdbda602edf24f1d60ef118f42307e40190d15b09bb9b573eec5fc0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-memory/src/consolidation.rs:160-167 | crates/zeroclaw-memory/src/consolidation.rs:298-305 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-memory/src/consolidation.rs:160\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/zeroclaw-memory/src/consolidation.rs"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"6669fe69dea8065f8778a6b4d769bf598911f824a4419b9f40ea43cdff50ff37"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-memory/src/hygiene.rs:174-181 | crates/zeroclaw-memory/src/hygiene.rs:218-225 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-memory/src/hygiene.rs"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"2eaf9f6ea9f59ae44b6f74966a912d59eb1e17c7e145eb7d532f8d5f7c67c2de"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u20138 lines \u00D7 3): crates/zeroclaw-memory/src/sqlite.rs:948-950 | crates/zeroclaw-memory/src/sqlite.rs:1018-1025 | crates/zeroclaw-memory/src/sqlite.rs:2507-2514 \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/zeroclaw-memory/src/sqlite.rs:1018\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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":948}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dcbf16ea3c41dc635def9dec242dab69b36620c2366006ad74a4a00b91b7b89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-memory/src/sqlite.rs:2221-2228 | crates/zeroclaw-memory/src/sqlite.rs:2243-2250 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-memory/src/sqlite.rs:2221\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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":2221}}}],"partialFingerprints":{"codehealthFindingId/v1":"355e277a60c61a8b0b828587f340b784f85be3928e2e5e8b0eaafe5aa7cc656b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-plugins/src/host.rs:1053-1066 | crates/zeroclaw-plugins/src/host.rs:1702-1715 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-plugins/src/host.rs:1053\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/zeroclaw-plugins/src/host.rs"},"region":{"startLine":1053}}}],"partialFingerprints":{"codehealthFindingId/v1":"de4a46056d084d381bffa29b8d4e5af5ef1eb0f5ed27b8c03e983e18e67086fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-providers/src/anthropic.rs:964-971 | crates/zeroclaw-providers/src/bedrock.rs:1357-1364 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/anthropic.rs\u0060 and \u0060crates/zeroclaw-providers/src/bedrock.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. 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/zeroclaw-providers/src/anthropic.rs:964\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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":964}}}],"partialFingerprints":{"codehealthFindingId/v1":"79bc9442c11f32a77548e7bd8c9f1317b49afb9aab7e3c8fb99e3aca5fc40f8e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): crates/zeroclaw-providers/src/bedrock.rs:158-164 | crates/zeroclaw-providers/src/bedrock.rs:250-257 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/bedrock.rs:158\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/zeroclaw-providers/src/bedrock.rs"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"f84b5599ab6193e01539f867bf8adc7564206c2ecfc8b8859599bcae0e92c269"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-providers/src/bedrock.rs:251-258 | crates/zeroclaw-providers/src/bedrock.rs:267-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/zeroclaw-providers/src/bedrock.rs:251\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/zeroclaw-providers/src/bedrock.rs"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"1815ac6fb4451ff897fe2617d755351a538b904c1c26e55c347f02ca2f5d7adf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-providers/src/compatible.rs:3027-3034 | crates/zeroclaw-providers/src/openrouter.rs:485-492 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/compatible.rs\u0060 and \u0060crates/zeroclaw-providers/src/openrouter.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 81 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/zeroclaw-providers/src/compatible.rs:3027\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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":3027}}}],"partialFingerprints":{"codehealthFindingId/v1":"27e9bc10928e7ec4c539945f5d072101006160a7eb8a04fcc182905387cd9ff9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-providers/src/factory.rs:359-366 | crates/zeroclaw-providers/src/factory.rs:375-382 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/factory.rs:359\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/zeroclaw-providers/src/factory.rs"},"region":{"startLine":359}}}],"partialFingerprints":{"codehealthFindingId/v1":"4da747f6785b7d53fb54b9cfd39918193ac7557d8e83d2c7c26e55506f2d1e53"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-providers/src/gemini_cli.rs:182-189 | crates/zeroclaw-providers/src/kilocli.rs:179-186 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/gemini_cli.rs\u0060 and \u0060crates/zeroclaw-providers/src/kilocli.rs\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 164 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/zeroclaw-providers/src/gemini_cli.rs:182\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/zeroclaw-providers/src/gemini_cli.rs"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"4251a07ee6b1961c204ac7634a6500d6197442e6adb644781b23d22ebe778d40"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-providers/src/openai_codex.rs:1208-1215 | crates/zeroclaw-providers/src/openai_codex.rs:1227-1234 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/openai_codex.rs:1208\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/zeroclaw-providers/src/openai_codex.rs"},"region":{"startLine":1208}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e6c29940a41783799eb618bbed218177536f53be3b933b0470a882067e409b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/tool_execution.rs:502-509 | crates/zeroclaw-runtime/src/agent/tool_execution.rs:603-610 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/agent/tool_execution.rs:502\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/zeroclaw-runtime/src/agent/tool_execution.rs"},"region":{"startLine":502}}}],"partialFingerprints":{"codehealthFindingId/v1":"9284ff59c670e3e5f41dd9f8d2c58ca390164beab60cb86bca642a3bc1bea13d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/tool_execution.rs:575-582 | crates/zeroclaw-runtime/src/agent/tool_execution.rs:621-628 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/agent/tool_execution.rs:575\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/zeroclaw-runtime/src/agent/tool_execution.rs"},"region":{"startLine":575}}}],"partialFingerprints":{"codehealthFindingId/v1":"89f4aaf305b9af81cb3895e3730a1b03dc4a3ae0438d61ca88241e85dcdc65fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/tool_receipts.rs:83-90 | crates/zeroclaw-runtime/src/agent/tool_receipts.rs:101-108 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-runtime/src/agent/tool_receipts.rs"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c631eb229d87f80a41906eb3f620cdee551a8b67bdbb8c74a7c44bbe1b0e9bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/turn/approval_gate.rs:196-203 | crates/zeroclaw-runtime/src/agent/turn/call_prep.rs:62-69 \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/zeroclaw-runtime/src/agent/turn/approval_gate.rs:196\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/zeroclaw-runtime/src/agent/turn/approval_gate.rs"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"24ce51e4ef529169bef178f7adf31351a58a8e1ac67176d3e363a2c9b4517fa9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/turn/mod.rs:4154-4161 | crates/zeroclaw-runtime/src/tools/delegate.rs:1812-1819 \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/zeroclaw-runtime/src/agent/turn/mod.rs:4154\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/zeroclaw-runtime/src/agent/turn/mod.rs"},"region":{"startLine":4154}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ed150330a2c6d8c91ba8dedf56cbc280e6c5f591160a523b0d3e667e5978192"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/browse.rs:72-79 | crates/zeroclaw-runtime/src/browse.rs:146-153 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/browse.rs:72\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/zeroclaw-runtime/src/browse.rs"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"87ae0bf64194bac613567ebad4a1ccc211dca22ef8dd2fc8a9996c416d1fe907"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/control_plane/task_store_sqlite.rs:259-266 | crates/zeroclaw-runtime/src/control_plane/task_store_sqlite.rs:311-318 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/control_plane/task_store_sqlite.rs:259\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/zeroclaw-runtime/src/control_plane/task_store_sqlite.rs"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fc34b059a8e795e3523601a5385462d32eb9da8d6f5355aac12fed567e02a27"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/cron/scheduler.rs:668-675 | crates/zeroclaw-runtime/src/cron/scheduler.rs:717-724 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/cron/scheduler.rs:668\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/zeroclaw-runtime/src/cron/scheduler.rs"},"region":{"startLine":668}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2efa08077b07bc87cc31913ad4ed1e0d7fd8cf856e077a2f8d47231b8d315da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/enroll/mod.rs:534-541 | crates/zeroclaw-runtime/src/enroll/mod.rs:579-586 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/enroll/mod.rs:534\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/zeroclaw-runtime/src/enroll/mod.rs"},"region":{"startLine":534}}}],"partialFingerprints":{"codehealthFindingId/v1":"86df249a1b41a6dcc6272439425b0c932edbb298230f1a23a023274a84aa517b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (1\u20138 lines \u00D7 4): crates/zeroclaw-runtime/src/hooks/runner.rs:302-309 | crates/zeroclaw-runtime/src/hooks/runner.rs:370-370 | crates/zeroclaw-runtime/src/hooks/runner.rs:410-418 | crates/zeroclaw-runtime/src/hooks/runner.rs:483-486 \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/zeroclaw-runtime/src/hooks/runner.rs:302\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/zeroclaw-runtime/src/hooks/runner.rs"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcf871005ac4223743b9ba33b66e6dd0142b4b774e2bcd55e49c4f3bc0823c96"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20138 lines \u00D7 2): crates/zeroclaw-runtime/src/relay.rs:477-482 | crates/zeroclaw-runtime/src/relay.rs:493-500 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/relay.rs:477\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/zeroclaw-runtime/src/relay.rs"},"region":{"startLine":477}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4c23613f216c846f50fd1399d26938da218353decaa67e0ab73c9b51c6813ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): crates/zeroclaw-runtime/src/rpc/dispatch.rs:5517-5524 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:5743-5749 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/rpc/dispatch.rs:5517\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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":5517}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1fdc911db9cf42bf29c9fa1e658151d50170a439c4cbdebe4d99027f3866b88"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/rpc/dispatch.rs:11844-11852 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:11883-11890 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":11844}}}],"partialFingerprints":{"codehealthFindingId/v1":"978165d85514bcf84a9bf197b90e397e7e6f7f29c3f0f652f876c77d0b71d3bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/rpc/fs.rs:165-172 | crates/zeroclaw-runtime/src/rpc/fs.rs:186-193 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/rpc/fs.rs:165\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/zeroclaw-runtime/src/rpc/fs.rs"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"13f927eb50644de5ed430564443fb8fd4526302d141f3c541e4cc44614e05103"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/security/audit.rs:410-417 | crates/zeroclaw-runtime/src/security/audit.rs:774-781 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/security/audit.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/zeroclaw-runtime/src/security/audit.rs"},"region":{"startLine":410}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bc1b74870cae65ef803a8da4a196d328b44e1209388c143d17f297c8e35bb2b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-runtime/src/skills/improver.rs:155-163 | crates/zeroclaw-runtime/src/tools/skill_manage.rs:756-764 \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/zeroclaw-runtime/src/skills/improver.rs"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bed25e5c2e9947e590f9572331bc725aa210a614d74d172d344502e4225c99f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/audit.rs:78-85 | crates/zeroclaw-runtime/src/sop/audit.rs:221-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/audit.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/zeroclaw-runtime/src/sop/audit.rs"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a5e13a8c860beb85cc81e3ac42e52b5c26486d5d4b673d8e15b311a7c2d206d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/capability/bridge.rs:28-35 | crates/zeroclaw-runtime/src/sop/capability/bridge.rs:96-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/zeroclaw-runtime/src/sop/capability/bridge.rs:28\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/zeroclaw-runtime/src/sop/capability/bridge.rs"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"27cc229a43685b64548adaeda1d4c62e16ecd8d143cba0a00d97e94a264b1e90"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/engine.rs:1567-1574 | crates/zeroclaw-runtime/src/sop/engine.rs:1593-1600 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/engine.rs:1567\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":1567}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ba66f99a37844d56ce55baabd4b3f98c3900fe94ac120d92e7a3460d2b89f08"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/engine.rs:1778-1785 | crates/zeroclaw-runtime/src/sop/engine.rs:2309-2316 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/engine.rs:1778\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":1778}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcfb80838a117115f0711320530a6f1479bd2a0d2c0d4813fdd27627fe20fa57"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/engine.rs:1800-1806 | crates/zeroclaw-runtime/src/sop/engine.rs:1826-1833 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/engine.rs:1800\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":1800}}}],"partialFingerprints":{"codehealthFindingId/v1":"12980e910cd958203c9779e77d9d9ab4e5da10b2df62130ca42d336da1e1e35e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/engine.rs:2852-2859 | crates/zeroclaw-runtime/src/sop/engine.rs:3511-3518 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/engine.rs:2852\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":2852}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdb04a2324f73df892100e7460a42751308d720469ee615489187d293d9eb3a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/engine.rs:3164-3171 | crates/zeroclaw-runtime/src/sop/engine.rs:3347-3354 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/engine.rs:3164\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":3164}}}],"partialFingerprints":{"codehealthFindingId/v1":"764df04acccab7f0be0e4eb7b1c2961749aa27d99b077bfe63bf6898c890a7fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/engine.rs:3181-3188 | crates/zeroclaw-runtime/src/sop/engine.rs:4963-4970 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/engine.rs:3181\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":3181}}}],"partialFingerprints":{"codehealthFindingId/v1":"563fb7364d97712416e6bc07f484b5fd084c4c452fc00daa5fa0ba5953792d4e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/engine.rs:3803-3810 | crates/zeroclaw-runtime/src/sop/engine.rs:3898-3905 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/engine.rs:3803\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":3803}}}],"partialFingerprints":{"codehealthFindingId/v1":"af35c3bef91007e2752bd44e792d1efd42d7057c9295c38667155bbff9bed30f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/engine.rs:4396-4403 | crates/zeroclaw-runtime/src/sop/engine.rs:4666-4673 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/engine.rs:4396\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":4396}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8e9ee7bcdd4faeb9e74a2d31e62d0f18eae762fb3e83cb2b75875df321c86b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/store/mod.rs:539-546 | crates/zeroclaw-runtime/src/sop/store/mod.rs:558-565 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-runtime/src/sop/store/mod.rs"},"region":{"startLine":539}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdfc1a1f9a12e8d292a3e1e0498ce98f8eafdc8d9dba080a58bb9dcfee9fcc0d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/types.rs:943-950 | crates/zeroclaw-runtime/src/sop/types.rs:1028-1035 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/types.rs:943\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/zeroclaw-runtime/src/sop/types.rs"},"region":{"startLine":943}}}],"partialFingerprints":{"codehealthFindingId/v1":"84fea36b68370021143d51c3b5af05e086291c3c7b91c4718a95e99ed1642fb6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/delegate.rs:3205-3212 | crates/zeroclaw-runtime/src/tools/delegate.rs:3539-3548 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/tools/delegate.rs:3205\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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":3205}}}],"partialFingerprints":{"codehealthFindingId/v1":"020c8abd696fa738d2305716f47c0a1e4ffa2b6467fc1cf8455cfd2072fc8372"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/model_switch.rs:181-188 | crates/zeroclaw-runtime/src/tools/model_switch.rs:331-339 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/tools/model_switch.rs:181\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/zeroclaw-runtime/src/tools/model_switch.rs"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"cffbdc6da61e043dccddd6e1ee4eaf8cce996109afa0ea82257f7a8a8e3bff2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/schedule.rs:349-356 | crates/zeroclaw-runtime/src/tools/shell.rs:217-224 \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/zeroclaw-runtime/src/tools/schedule.rs:349\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/zeroclaw-runtime/src/tools/schedule.rs:348\u0060 calls \u0060filter\u0060, \u0060trim\u0060, \u0060is_empty\u0060 and \u0060crates/zeroclaw-runtime/src/tools/shell.rs:216\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/zeroclaw-runtime/src/tools/schedule.rs"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"725c4cf8a13b94901f5a0ae146124bfaaf4a3b9705bd44a0c5fca3865672a0be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/skill_manage.rs:710-717 | crates/zeroclaw-runtime/src/tools/skill_manage.rs:727-734 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/tools/skill_manage.rs:710\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 \u0060snapshot\u0060 to \u0060Option\u003C\u0026str\u003E\u0060 in one and \u0060Option\u003C\u0026[u8]\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/zeroclaw-runtime/src/tools/skill_manage.rs"},"region":{"startLine":710}}}],"partialFingerprints":{"codehealthFindingId/v1":"51530723b87084121102244fbeefa482a087bc9ef0af8498c128083f2d254d7e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-tools/src/browser.rs:1004-1011 | crates/zeroclaw-tools/src/browser.rs:2372-2379 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/browser.rs:1004\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/zeroclaw-tools/src/browser.rs"},"region":{"startLine":1004}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1aae3e4183e70ea6e81f594883af76b64e076fcca9b5b5db1564ad05ac43e41"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-tools/src/git_operations.rs:443-450 | crates/zeroclaw-tools/src/git_operations.rs:530-537 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-tools/src/git_operations.rs"},"region":{"startLine":443}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc820271fcf9480f1b326899bf87e31a87537375ac0ee370eec32724df069116"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-tools/src/git_operations.rs:1558-1565 | crates/zeroclaw-tools/src/sessions.rs:667-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/zeroclaw-tools/src/git_operations.rs:1558\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/zeroclaw-tools/src/git_operations.rs"},"region":{"startLine":1558}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d299793acf5afd36977b71a938d4b7cf987c39b80c8c4e1e73daa8cf534ac10"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): crates/zeroclaw-tools/src/image_gen.rs:423-429 | crates/zeroclaw-tools/src/linkedin_client.rs:1150-1157 \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/zeroclaw-tools/src/image_gen.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. 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/zeroclaw-tools/src/image_gen.rs"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"24457cc9fba3079195b2f9c4eb506206801d03e0a0c90163174e2c01776eabf5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-tools/src/image_info.rs:191-198 | crates/zeroclaw-tools/src/image_info.rs:217-224 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/image_info.rs:191\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/zeroclaw-tools/src/image_info.rs"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bbd4187b3add8bb299882674059bf24ddb546d9a85e71071e5e6b46e31265d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-tools/src/linkedin_client.rs:380-387 | crates/zeroclaw-tools/src/linkedin_client.rs:414-421 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/linkedin_client.rs:380\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/zeroclaw-tools/src/linkedin_client.rs"},"region":{"startLine":380}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a703deba8ecd7c57901a887c0ff03b12fb16058756d92cd08f3d75503378e95"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-tools/src/mcp_prompts_tool.rs:70-77 | crates/zeroclaw-tools/src/mcp_resources_tool.rs:69-76 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/mcp_prompts_tool.rs\u0060 and \u0060crates/zeroclaw-tools/src/mcp_resources_tool.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. 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/zeroclaw-tools/src/mcp_prompts_tool.rs:70\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/zeroclaw-tools/src/mcp_prompts_tool.rs"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d77e9b7f6db36fa0cd388219019ac8cc5efb9ecda03fd037277f90fc01d2d9c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-tools/src/model_routing_config.rs:1094-1101 | crates/zeroclaw-tools/src/model_routing_config.rs:1138-1145 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/model_routing_config.rs:1094\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/zeroclaw-tools/src/model_routing_config.rs"},"region":{"startLine":1094}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ee473be0d63f4a0babea441b55211b35336e775d96ea2fa298cab3a92be4a31"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-tools/src/web_search_tool.rs:390-397 | crates/zeroclaw-tools/src/web_search_tool.rs:408-415 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-tools/src/web_search_tool.rs"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"b775c04d0fe1a7606e3e2b1b74e4168cd75f5137be1af7f3516d53a756a8662e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-tools/src/web_search_tool.rs:612-619 | crates/zeroclaw-tools/src/web_search_tool.rs:630-637 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-tools/src/web_search_tool.rs"},"region":{"startLine":612}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c14e7401279cfa4b472b0c76d9938fc500c2a735bdfb38befd3245fa6e9a082"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-tools/src/web_search_tool.rs:788-795 | crates/zeroclaw-tools/src/web_search_tool.rs:806-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/web_search_tool.rs"},"region":{"startLine":788}}}],"partialFingerprints":{"codehealthFindingId/v1":"e170171b47477d926e57615c8015419d99b0ccaf9b65c551ce27d1d3d7decf2f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-tools/src/web_search_tool.rs:927-934 | crates/zeroclaw-tools/src/web_search_tool.rs:945-952 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-tools/src/web_search_tool.rs"},"region":{"startLine":927}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a5dbecd67fe8100671adadf7148197cd8bbddb7204501d7c942b1c875c81d2f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-tools/src/web_search_tool.rs:1767-1774 | crates/zeroclaw-tools/src/web_search_tool.rs:1785-1792 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-tools/src/web_search_tool.rs"},"region":{"startLine":1767}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3881d219cbc256d89f255e0beaeea18178e99860e095ffb70bf61ddae55c78a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): firmware/nucleo/src/main.rs:66-73 | firmware/pico/src/main.rs:67-74 \u2014 before extracting anything, compare \u0060firmware/nucleo/src/main.rs\u0060 and \u0060firmware/pico/src/main.rs\u0060 as WHOLE FILES: this scan already matched 3 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 \u0060firmware/nucleo/src/main.rs:66\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":"firmware/nucleo/src/main.rs"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"20219e4e886f49edc455eadf23fc5ecd203981903897489f30f8ff6d6059d504"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): xtask/src/cmd/mdbook/peer_groups.rs:764-773 | xtask/src/cmd/mdbook/peer_groups.rs:971-980 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060xtask/src/cmd/mdbook/peer_groups.rs:764\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, \u0060xtask/src/cmd/mdbook/peer_groups.rs:969\u0060 calls \u0060push\u0060 and \u0060xtask/src/cmd/mdbook/peer_groups.rs:763\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":"xtask/src/cmd/mdbook/peer_groups.rs"},"region":{"startLine":764}}}],"partialFingerprints":{"codehealthFindingId/v1":"21b2070eeb229bcb54e674149e99dc74f667ee4b5846422ebc176d7bf8644afc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 8): crates/zeroclaw-channels/src/lark.rs:2316-2323 | crates/zeroclaw-channels/src/orchestrator/mod.rs:17090-17096 | crates/zeroclaw-channels/src/telegram.rs:4532-4538 | crates/zeroclaw-channels/src/whatsapp_web.rs:1513-1519 | crates/zeroclaw-config/src/cost/tracker.rs:971-977 | crates/zeroclaw-gateway/src/lib.rs:2089-2095 | crates/zeroclaw-memory/src/lib.rs:1176-1182 | crates/zeroclaw-runtime/src/restart.rs:213-219 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/lark.rs\u0060 and \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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/zeroclaw-channels/src/lark.rs:2316\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":2316}}}],"partialFingerprints":{"codehealthFindingId/v1":"e536dc15db42594e3c9840ad1ed04e391da57bb080ecaefaf1909647d26c9a0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 8): crates/zeroclaw-providers/src/auth/mod.rs:1360-1366 | crates/zeroclaw-providers/src/auth/mod.rs:1381-1387 | crates/zeroclaw-providers/src/bedrock.rs:359-364 | crates/zeroclaw-tools/src/web_search_tool.rs:427-432 | crates/zeroclaw-tools/src/web_search_tool.rs:649-654 | crates/zeroclaw-tools/src/web_search_tool.rs:825-830 | crates/zeroclaw-tools/src/web_search_tool.rs:964-969 | crates/zeroclaw-tools/src/web_search_tool.rs:1804-1809 \u2014 there are 8 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 8 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/zeroclaw-providers/src/auth/mod.rs:1360\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/zeroclaw-providers/src/auth/mod.rs"},"region":{"startLine":1360}}}],"partialFingerprints":{"codehealthFindingId/v1":"1919a96dd896f9433f0bea77ab66082bed91dff28b9f829b794e46d5e58e5031"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 6): crates/zeroclaw-providers/src/auth/gemini_oauth.rs:485-491 | crates/zeroclaw-runtime/src/tools/schedule.rs:348-353 | crates/zeroclaw-tools/src/project_intel.rs:56-62 | crates/zeroclaw-tools/src/project_intel.rs:73-79 | crates/zeroclaw-tools/src/project_intel.rs:229-235 | crates/zeroclaw-tools/src/project_intel.rs:254-260 \u2014 there are 6 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 6 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/zeroclaw-providers/src/auth/gemini_oauth.rs:485\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/zeroclaw-runtime/src/tools/schedule.rs:347\u0060 calls \u0060and_then\u0060, \u0060as_str\u0060 and \u0060crates/zeroclaw-providers/src/auth/gemini_oauth.rs:484\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/zeroclaw-providers/src/auth/gemini_oauth.rs"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ee880fb07c21cd3a3c6a884fdd9110023ad8686547e8189ee93ba5beac92d5b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 6): crates/zeroclaw-providers/src/dispatch.rs:734-740 | crates/zeroclaw-providers/src/dispatch.rs:772-778 | crates/zeroclaw-providers/src/dispatch.rs:804-810 | crates/zeroclaw-providers/src/dispatch.rs:1114-1120 | crates/zeroclaw-providers/src/dispatch.rs:1150-1156 | crates/zeroclaw-providers/src/dispatch.rs:1182-1188 \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/zeroclaw-providers/src/dispatch.rs:734\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/zeroclaw-providers/src/dispatch.rs:733\u0060 calls \u0060enter\u0060 and \u0060crates/zeroclaw-providers/src/dispatch.rs:771\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/zeroclaw-providers/src/dispatch.rs"},"region":{"startLine":734}}}],"partialFingerprints":{"codehealthFindingId/v1":"88c9177c35684651c229ab18137e0084b1fb9b613ce2475fba2ffecd5f91e20c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 6): crates/zeroclaw-runtime/src/rpc/dispatch.rs:5485-5491 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:6024-6030 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:6041-6047 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:6248-6254 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:6521-6527 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:8637-8643 \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/zeroclaw-runtime/src/rpc/dispatch.rs:5485\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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":5485}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a0bc0bfda335643b1411fbe88fde77c83f2f14e0a523eff23bf167fd86a3087"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): crates/zeroclaw-channels/src/mattermost.rs:923-929 | crates/zeroclaw-channels/src/mattermost.rs:944-950 | crates/zeroclaw-channels/src/mattermost.rs:973-979 | crates/zeroclaw-channels/src/slack.rs:2655-2661 | crates/zeroclaw-channels/src/slack.rs:2685-2691 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/mattermost.rs\u0060 and \u0060crates/zeroclaw-channels/src/slack.rs\u0060 as WHOLE FILES: this scan already matched 9 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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/mattermost.rs:923\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/zeroclaw-channels/src/mattermost.rs:920\u0060 calls \u0060token\u0060, \u0060Ok\u0060, \u0060to_string\u0060 and \u0060crates/zeroclaw-channels/src/slack.rs:2684\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/zeroclaw-channels/src/mattermost.rs"},"region":{"startLine":923}}}],"partialFingerprints":{"codehealthFindingId/v1":"978944dc6aaa94182d0a39470d871021afffdd819f7a2251ab2d871697ff8cc6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): crates/zeroclaw-runtime/src/plugin_runtime.rs:974-980 | crates/zeroclaw-runtime/src/plugin_runtime.rs:996-1002 | crates/zeroclaw-runtime/src/plugin_runtime.rs:1012-1018 | crates/zeroclaw-runtime/src/plugin_runtime.rs:1027-1033 | crates/zeroclaw-runtime/src/plugin_runtime.rs:1057-1063 \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/zeroclaw-runtime/src/plugin_runtime.rs:974\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/zeroclaw-runtime/src/plugin_runtime.rs:1003\u0060 calls \u0060bounded_plugin_log_value\u0060 and \u0060crates/zeroclaw-runtime/src/plugin_runtime.rs:981\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/zeroclaw-runtime/src/plugin_runtime.rs"},"region":{"startLine":974}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b32cf6c8919598a757b2998db67e3be4aa81f4f809af6346833cff2271d8fd4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 5): crates/zeroclaw-runtime/src/sop/store/sqlite.rs:179-187 | crates/zeroclaw-runtime/src/sop/store/sqlite.rs:237-245 | crates/zeroclaw-runtime/src/sop/store/sqlite.rs:274-282 | crates/zeroclaw-runtime/src/sop/store/sqlite.rs:312-320 | crates/zeroclaw-runtime/src/sop/store/sqlite.rs:356-364 \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/zeroclaw-runtime/src/sop/store/sqlite.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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/zeroclaw-runtime/src/sop/store/sqlite.rs:272\u0060 calls \u0060to_string\u0060 and \u0060crates/zeroclaw-runtime/src/sop/store/sqlite.rs:177\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/zeroclaw-runtime/src/sop/store/sqlite.rs"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"cccce4bbcbf054415a2b19bd5eee97ace0c3e749d624c0502b0c608ec16c451e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): crates/zeroclaw-tools/src/web_search_tool.rs:404-410 | crates/zeroclaw-tools/src/web_search_tool.rs:626-632 | crates/zeroclaw-tools/src/web_search_tool.rs:802-808 | crates/zeroclaw-tools/src/web_search_tool.rs:941-947 | crates/zeroclaw-tools/src/web_search_tool.rs:1781-1787 \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/zeroclaw-tools/src/web_search_tool.rs:404\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/zeroclaw-tools/src/web_search_tool.rs"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"e34bef6b96b35a0728139aff765046ba59efcd2c47a2061e82a54edeb118d299"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): crates/zeroclaw-channels/src/matrix.rs:2404-2410 | crates/zeroclaw-channels/src/wechat.rs:1227-1233 | crates/zeroclaw-channels/src/wechat.rs:1266-1272 | crates/zeroclaw-runtime/src/cron/scheduler.rs:529-535 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/matrix.rs\u0060 and \u0060crates/zeroclaw-channels/src/wechat.rs\u0060 as WHOLE FILES: this scan already matched 9 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 \u0060crates/zeroclaw-channels/src/matrix.rs:2404\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":2404}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bfe45425d214b9f4db2e374db5f87b261c9d0984f173756ae3db0d05c4f7b79"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): crates/zeroclaw-channels/src/nextcloud_talk.rs:195-201 | crates/zeroclaw-channels/src/nextcloud_talk.rs:228-234 | crates/zeroclaw-channels/src/nextcloud_talk.rs:336-342 | crates/zeroclaw-channels/src/nextcloud_talk.rs:372-378 \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/zeroclaw-channels/src/nextcloud_talk.rs: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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/zeroclaw-channels/src/nextcloud_talk.rs:334\u0060 calls \u0060or_else\u0060, \u0060get\u0060, \u0060and_then\u0060 and \u0060crates/zeroclaw-channels/src/nextcloud_talk.rs:193\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/zeroclaw-channels/src/nextcloud_talk.rs"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"b373f11311762a8e70b756356112ce07735e08677c0f2e4dafb5d12acd74e873"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): crates/zeroclaw-gateway/src/api_oidc.rs:624-630 | crates/zeroclaw-gateway/src/api_oidc.rs:845-854 | crates/zeroclaw-gateway/src/api_oidc.rs:1010-1016 | crates/zeroclaw-gateway/src/api_oidc.rs:1128-1134 \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. 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/zeroclaw-gateway/src/api_oidc.rs:844\u0060 calls \u0060as_deref\u0060 and \u0060crates/zeroclaw-gateway/src/api_oidc.rs:1127\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/zeroclaw-gateway/src/api_oidc.rs"},"region":{"startLine":624}}}],"partialFingerprints":{"codehealthFindingId/v1":"77bece4559c9bedf7bb206ee098b3ae2fb6dc54bfbc0451f4bc0c2eeba5d0726"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): crates/zeroclaw-runtime/src/agent/turn/max_iter.rs:495-501 | crates/zeroclaw-runtime/src/agent/turn/parse_response.rs:284-290 | crates/zeroclaw-runtime/src/agent/turn/results_collect.rs:119-125 | crates/zeroclaw-runtime/src/agent/turn/results_collect.rs:232-238 \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/zeroclaw-runtime/src/agent/turn/max_iter.rs:495\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/zeroclaw-runtime/src/agent/turn/max_iter.rs"},"region":{"startLine":495}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb062cc0d18425d4fb5c1773588fc64d704fe588dc75e71c20b78a45df018c3a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): crates/zeroclaw-runtime/src/browse.rs:70-76 | crates/zeroclaw-runtime/src/browse.rs:144-150 | crates/zeroclaw-runtime/src/browse.rs:258-264 | crates/zeroclaw-runtime/src/browse.rs:308-314 \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/zeroclaw-runtime/src/browse.rs"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"bffbd205faa7433c57b1b2ab5e1ae73befe40a01b09bda604d398a236917cdc6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): crates/zeroclaw-runtime/src/plugin_runtime.rs:168-174 | crates/zeroclaw-runtime/src/plugin_runtime.rs:182-188 | crates/zeroclaw-runtime/src/plugin_runtime.rs:198-204 | crates/zeroclaw-runtime/src/plugin_runtime.rs:218-224 \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/zeroclaw-runtime/src/plugin_runtime.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/zeroclaw-runtime/src/plugin_runtime.rs"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"823af4e4d297740b8d77ee97af0c42efe925ec956da3bde6a03e75a7d63875fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 4): crates/zeroclaw-tools/src/linkedin.rs:333-338 | crates/zeroclaw-tools/src/linkedin.rs:365-370 | crates/zeroclaw-tools/src/linkedin.rs:399-405 | crates/zeroclaw-tools/src/linkedin.rs:422-428 \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/zeroclaw-tools/src/linkedin.rs:333\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/zeroclaw-tools/src/linkedin.rs"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a861203e3285afc2bda2f2e1b2ef0514785fe4c18e3044264e5ad074c1bb8fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): crates/zeroclaw-tools/src/linkedin_client.rs:288-294 | crates/zeroclaw-tools/src/linkedin_client.rs:382-388 | crates/zeroclaw-tools/src/linkedin_client.rs:416-422 | crates/zeroclaw-tools/src/linkedin_client.rs:724-730 \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/zeroclaw-tools/src/linkedin_client.rs:288\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/zeroclaw-tools/src/linkedin_client.rs"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5249237f261d5ba4cbd101e36d3c61ef4c82d4cd5b67690e399c26efe80fee8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/zeroclaw-channels/src/gmail_push.rs:207-215 | crates/zeroclaw-channels/src/gmail_push.rs:593-601 | crates/zeroclaw-channels/src/linq.rs:344-350 \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/zeroclaw-channels/src/gmail_push.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. 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/zeroclaw-channels/src/gmail_push.rs"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a5ddd35905ba1b576d3d145168256a411b477553c258cd46631c2f200c8ddd2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/zeroclaw-channels/src/line.rs:568-577 | crates/zeroclaw-channels/src/telegram.rs:4882-4888 | crates/zeroclaw-channels/src/wechat.rs:2584-2590 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/line.rs\u0060 and \u0060crates/zeroclaw-channels/src/telegram.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/zeroclaw-channels/src/line.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/zeroclaw-channels/src/line.rs"},"region":{"startLine":568}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c0dd174c4a21ec31a66738fe90838cd9a7293e36a203da84ab727ddd2569ead"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/zeroclaw-channels/src/nextcloud_talk.rs:751-758 | crates/zeroclaw-channels/src/telegram.rs:8433-8439 | src/commands/update.rs:394-400 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/nextcloud_talk.rs:751\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/zeroclaw-channels/src/nextcloud_talk.rs"},"region":{"startLine":751}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c8cdb385aadbefae98bb0497da2d54f105e16b377903321054a83ff4f65cd8a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1132-1138 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1481-1487 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1763-1769 \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/zeroclaw-channels/src/orchestrator/acp_server.rs:1132\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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":1132}}}],"partialFingerprints":{"codehealthFindingId/v1":"594ba7a17903453b374b2949a75d58c0f323e1c9174eef7c22b7162ec2f25057"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/zeroclaw-channels/src/slack.rs:2185-2191 | crates/zeroclaw-channels/src/slack.rs:4819-4825 | crates/zeroclaw-channels/src/slack.rs:5052-5058 \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/zeroclaw-channels/src/slack.rs:2185\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":2185}}}],"partialFingerprints":{"codehealthFindingId/v1":"2adbc700d228ca8de88c711a46f39846419a231f35fe89534ff95d0bf2dcc181"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/zeroclaw-channels/src/telegram.rs:2335-2341 | crates/zeroclaw-channels/src/telegram.rs:2397-2403 | crates/zeroclaw-channels/src/telegram.rs:2475-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/zeroclaw-channels/src/telegram.rs:2335\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":2335}}}],"partialFingerprints":{"codehealthFindingId/v1":"30130b6fc19423028a0bf5c30211c7a2b833fb72d8b12c243473a12183a2a131"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/zeroclaw-channels/src/telegram.rs:2347-2353 | crates/zeroclaw-channels/src/telegram.rs:2410-2416 | crates/zeroclaw-channels/src/telegram.rs:2489-2495 \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/zeroclaw-channels/src/telegram.rs:2347\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":2347}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff5390a562b87ff0bacaff19c48cdeff4a780d4be6d9906bd2ad1944451538f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/zeroclaw-channels/src/wechat.rs:1894-1900 | crates/zeroclaw-channels/src/wechat.rs:1917-1923 | crates/zeroclaw-channels/src/wechat.rs:1933-1939 \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/zeroclaw-channels/src/wechat.rs"},"region":{"startLine":1894}}}],"partialFingerprints":{"codehealthFindingId/v1":"da7e1d4dc6f84217b2e16256e8833b8ab14628273897eda633154ed516aa5cca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (1\u20137 lines \u00D7 5): crates/zeroclaw-config/src/schema.rs:12125-12131 | crates/zeroclaw-config/src/schema.rs:12157-12163 | crates/zeroclaw-config/src/schema.rs:12193-12199 | crates/zeroclaw-config/src/schema.rs:12286-12286 | crates/zeroclaw-config/src/schema.rs:12287-12287 \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/zeroclaw-config/src/schema.rs:12125\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/zeroclaw-config/src/schema.rs"},"region":{"startLine":12125}}}],"partialFingerprints":{"codehealthFindingId/v1":"20878d352560c88400d46d101f3db4442dabdb86e975e130719971860078b4c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/zeroclaw-gateway/src/api_oidc.rs:541-547 | crates/zeroclaw-gateway/src/api_oidc.rs:624-630 | crates/zeroclaw-gateway/src/api_oidc.rs:1128-1134 \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/zeroclaw-gateway/src/api_oidc.rs"},"region":{"startLine":541}}}],"partialFingerprints":{"codehealthFindingId/v1":"61ac646904057aaad13c6dcf6e60f8989ddb2f2160de556af3359cade87cd80d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 3): crates/zeroclaw-gateway/src/lib.rs:4953-4958 | crates/zeroclaw-gateway/src/lib.rs:5083-5088 | crates/zeroclaw-gateway/src/lib.rs:5223-5229 \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/zeroclaw-gateway/src/lib.rs:5223\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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":4953}}}],"partialFingerprints":{"codehealthFindingId/v1":"1279d55f6c3f74ce9599ebd261e3ad03486b5f9647d64e36f1e9810a4bc08ae9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/zeroclaw-hardware/src/datasheet.rs:514-520 | crates/zeroclaw-hardware/src/datasheet.rs:566-572 | crates/zeroclaw-hardware/src/datasheet.rs:639-645 \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/zeroclaw-hardware/src/datasheet.rs:514\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/zeroclaw-hardware/src/datasheet.rs"},"region":{"startLine":514}}}],"partialFingerprints":{"codehealthFindingId/v1":"56d33a5959f8adbd7eeb7587716e825351e78c046bcc55f28f501176122ff0ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/zeroclaw-macros/src/lib.rs:1788-1794 | crates/zeroclaw-macros/src/lib.rs:1819-1826 | crates/zeroclaw-macros/src/lib.rs:1839-1845 \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/zeroclaw-macros/src/lib.rs:1788\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/zeroclaw-macros/src/lib.rs"},"region":{"startLine":1788}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb8208e0edd59d6eed671e9f37c73abf788313e5aef28231f8c3b1f4153f7e33"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 3): crates/zeroclaw-providers/src/compatible.rs:1068-1074 | crates/zeroclaw-providers/src/compatible.rs:1142-1148 | crates/zeroclaw-providers/src/compatible.rs:1161-1166 \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/zeroclaw-providers/src/compatible.rs:1068\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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":1068}}}],"partialFingerprints":{"codehealthFindingId/v1":"c842021bf7a4a6c41ff7502d4571d8a5f449d27d35729adebf451c8bdf2d19d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/zeroclaw-providers/src/gemini.rs:370-376 | crates/zeroclaw-providers/src/lib.rs:417-423 | crates/zeroclaw-providers/src/lib.rs:562-568 \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/zeroclaw-providers/src/gemini.rs:370\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/zeroclaw-providers/src/gemini.rs"},"region":{"startLine":370}}}],"partialFingerprints":{"codehealthFindingId/v1":"034838582a697b1270ef44b95f909b67492b041ef20e20a95ede453d59bb1891"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/zeroclaw-providers/src/gemini_cli.rs:134-140 | crates/zeroclaw-providers/src/grok_cli.rs:885-891 | crates/zeroclaw-providers/src/kilocli.rs:131-137 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/gemini_cli.rs\u0060 and \u0060crates/zeroclaw-providers/src/kilocli.rs\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 164 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/zeroclaw-providers/src/gemini_cli.rs:134\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/zeroclaw-providers/src/gemini_cli.rs"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"c01938d6a37a05c6f836a0f6136ea8c9efd357a68780ff031f333f02be66b594"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 3): crates/zeroclaw-runtime/src/agent/tool_execution.rs:67-73 | crates/zeroclaw-runtime/src/agent/turn/mod.rs:3826-3831 | crates/zeroclaw-runtime/src/agent/turn/mod.rs:3871-3877 \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/zeroclaw-runtime/src/agent/tool_execution.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/zeroclaw-runtime/src/agent/tool_execution.rs"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"e26be19f38f33839cd92369ad2f2ca0f471d53bc7562669d993eda8430bcea87"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/zeroclaw-runtime/src/agent/turn/mod.rs:5015-5021 | crates/zeroclaw-runtime/src/agent/turn/mod.rs:5055-5061 | crates/zeroclaw-runtime/src/sop/executor.rs:1318-1324 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/agent/turn/mod.rs\u0060 and \u0060crates/zeroclaw-runtime/src/sop/executor.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/zeroclaw-runtime/src/agent/turn/mod.rs:5015\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/zeroclaw-runtime/src/agent/turn/mod.rs"},"region":{"startLine":5015}}}],"partialFingerprints":{"codehealthFindingId/v1":"13682d64eac852739740f4b3243f297d8aae19b12a4b0072f6227ce6ede1be61"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/zeroclaw-runtime/src/observability/log.rs:117-130 | crates/zeroclaw-runtime/src/observability/log.rs:141-150 | crates/zeroclaw-runtime/src/observability/log.rs:216-222 \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/zeroclaw-runtime/src/observability/log.rs:117\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/zeroclaw-runtime/src/observability/log.rs"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"de8b4a0e5439e7210118071ca5d0b51ddbbd1cdc7aa39677525c3ef0465dc225"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/zeroclaw-runtime/src/skills/mod.rs:1272-1278 | crates/zeroclaw-runtime/src/skills/mod.rs:1310-1316 | crates/zeroclaw-runtime/src/skills/mod.rs:3058-3064 \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/zeroclaw-runtime/src/skills/mod.rs:1272\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/zeroclaw-runtime/src/skills/mod.rs"},"region":{"startLine":1272}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e71df636eb3dc083d66d8544372943d343807b16a39e371dd2dded44f8200f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/zeroclaw-runtime/src/sop/engine.rs:4184-4190 | crates/zeroclaw-runtime/src/sop/engine.rs:4773-4779 | crates/zeroclaw-runtime/src/sop/engine.rs:5219-5225 \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 \u0060crate) fn fail_headless_step_budget(\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":4184}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce79fa0a22df8a4ba1dd303f6572401fe098caa314efa03e995d7f385657bdbb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/zeroclaw-runtime/src/tools/delegate.rs:3015-3021 | crates/zeroclaw-runtime/src/tools/delegate.rs:3039-3045 | crates/zeroclaw-runtime/src/tools/delegate.rs:4089-4095 \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/zeroclaw-runtime/src/tools/delegate.rs:3015\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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":3015}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4b112ea88f80a363f8a0bbd7d4a6b156c16080c96194147a7449bd09d243ac3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/zeroclaw-tools/src/linkedin_client.rs:315-323 | crates/zeroclaw-tools/src/linkedin_client.rs:450-456 | crates/zeroclaw-tools/src/linkedin_client.rs:494-500 \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/zeroclaw-tools/src/linkedin_client.rs:315\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/zeroclaw-tools/src/linkedin_client.rs"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cab0abf3c1f9f43184e3f76693e8aa841b959bf3176f4675fea8964865fbe00"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/zeroclaw-tools/src/microsoft365/auth.rs:165-171 | crates/zeroclaw-tools/src/microsoft365/auth.rs:206-212 | crates/zeroclaw-tools/src/microsoft365/auth.rs:320-326 \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/zeroclaw-tools/src/microsoft365/auth.rs:165\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/zeroclaw-tools/src/microsoft365/auth.rs"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"e82f6930972cd514a63b4f7446754c4409b672490c557d115e788433a3cbc21c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): apps/zerocode/src/chat.rs:5434-5440 | apps/zerocode/src/chat.rs:5471-5477 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/chat.rs:5434\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":"apps/zerocode/src/chat.rs"},"region":{"startLine":5434}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc570673b948b34c4265b4a269eb8a39b68321ad397fc62be2cfeca04374ae21"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): apps/zerocode/src/chat.rs:6365-6371 | apps/zerocode/src/chat.rs:6449-6455 \u2014 both copies are in the same file, so extract the block 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":"apps/zerocode/src/chat.rs"},"region":{"startLine":6365}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c3c25af19067c540915579e7da623e64a2bd81843cde281de7658c54689a5b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): apps/zerocode/src/client.rs:1748-1754 | apps/zerocode/src/client.rs:2032-2038 \u2014 both copies are in the same file, so extract the block 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":"apps/zerocode/src/client.rs"},"region":{"startLine":1748}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd3bf31c7ab129f88ba68ad24e194e4c659ea4a4c159104722e2f5d77a8a3000"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): apps/zerocode/src/config_manager.rs:1616-1622 | apps/zerocode/src/config_manager.rs:1628-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 \u0060apps/zerocode/src/config_manager.rs:1616\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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":1616}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1ee4f5374f506585e1b84af2e21b32a9a56c3f0dc73947587c24927205c54ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): apps/zerocode/src/config_manager.rs:6233-6239 | apps/zerocode/src/config_manager.rs:6262-6268 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/config_manager.rs:6233\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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":6233}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c2fc89d46ca312d77437863ac06c1fca63a0907617f69c02d86f87eaf30a088"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): apps/zerocode/src/dashboard.rs:1574-1580 | apps/zerocode/src/dashboard.rs:1602-1608 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/dashboard.rs:1574\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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":1574}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fd3babdceff9bb3c31cb4aa0d7f5a10c4e36a008445515ef76c81c571377d54"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): apps/zerocode/src/secure_file.rs:147-153 | crates/zeroclaw-config/src/migration.rs:2315-2321 \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":"apps/zerocode/src/secure_file.rs"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"86edefde07238ec7407be9d88dd0ec25665c2890f230383f0ad06a5e42c8411f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-api/src/channel.rs:1107-1113 | crates/zeroclaw-plugins/src/wasm_channel.rs:1270-1276 \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/zeroclaw-api/src/channel.rs"},"region":{"startLine":1107}}}],"partialFingerprints":{"codehealthFindingId/v1":"39b6a554e4dbf46c4b375c9d5dc05aebe9626ae4d52b214ff0b204bd0b2dacfd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-channels/src/dingtalk.rs:265-271 | crates/zeroclaw-channels/src/slack.rs:4366-4372 \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/zeroclaw-channels/src/dingtalk.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/dingtalk.rs"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"817309914e7b92a9cbe9394829165db750ff9a17b481b8a9603a52a634abb3c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-channels/src/discord/mod.rs:401-407 | crates/zeroclaw-channels/src/discord/mod.rs:736-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/zeroclaw-channels/src/discord/mod.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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"d64f931234ecb3103a16a48e695697febb2d833574f164690b07d46d6eada6df"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): crates/zeroclaw-channels/src/discord/mod.rs:576-584 | crates/zeroclaw-channels/src/discord/mod.rs:704-711 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":576}}}],"partialFingerprints":{"codehealthFindingId/v1":"198c8b66dc3f325e8fd37861ca9a1f50018d645bfdbd897aa984dfca628f16d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-channels/src/discord/mod.rs:2067-2073 | crates/zeroclaw-channels/src/qq.rs:1439-1445 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/discord/mod.rs\u0060 and \u0060crates/zeroclaw-channels/src/qq.rs\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. 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/zeroclaw-channels/src/discord/mod.rs:2067\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":2067}}}],"partialFingerprints":{"codehealthFindingId/v1":"3881f511436e28f07fb95b152a485c3d1b27fa8b55a21a734940b5208db72838"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-channels/src/discord/mod.rs:3579-3586 | crates/zeroclaw-channels/src/nextcloud_talk.rs:700-706 \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/zeroclaw-channels/src/discord/mod.rs:3579\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":3579}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ae1bacf81614593f17f63c90416c5113835c6d776832662000d45b4dd6baf42"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-channels/src/git/events.rs:270-276 | crates/zeroclaw-channels/src/git/events.rs:280-286 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/git/events.rs:270\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/zeroclaw-channels/src/git/events.rs"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8c94e9c6d1855af8ca2cd70a929c8ca8fb95807fbb70fa4e00119eb6d3a6922"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-channels/src/lark.rs:1860-1866 | crates/zeroclaw-channels/src/lark.rs:1996-2002 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/lark.rs:1860\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":1860}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc38e7726e9742af3489dfac55e998906a1bd13d1378ed76b770d2fd647419f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-channels/src/lark.rs:1883-1889 | crates/zeroclaw-channels/src/lark.rs:1945-1951 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/lark.rs:1883\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":1883}}}],"partialFingerprints":{"codehealthFindingId/v1":"53609ae173544af3af878aef35004bffa8648d22a1db4a95bb540dbdf4914064"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-channels/src/lark.rs:2020-2026 | crates/zeroclaw-channels/src/lark.rs:2071-2077 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/lark.rs:2020\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":2020}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c00e00628c03212b7d4e4453e02583b6692264f0c4ed0991c72d5f4f9d6371c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-channels/src/lark.rs:2295-2301 | crates/zeroclaw-channels/src/lark.rs:2319-2325 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/lark.rs:2295\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":2295}}}],"partialFingerprints":{"codehealthFindingId/v1":"917bac84d529ae96f4d58fa3a4ddc3ad2f09f056ca0f44dba556624e7a4fbe98"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 2): crates/zeroclaw-channels/src/lark.rs:2293-2299 | crates/zeroclaw-channels/src/telegram.rs:5780-5785 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/lark.rs\u0060 and \u0060crates/zeroclaw-channels/src/telegram.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 54 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/zeroclaw-channels/src/lark.rs:2293\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":2293}}}],"partialFingerprints":{"codehealthFindingId/v1":"a88c305330409219a7fb44dece08e8f38e30585f5a52152bcf363a6c9a52d102"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/line.rs:130-137 | crates/zeroclaw-channels/src/line.rs:174-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/line.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/zeroclaw-channels/src/line.rs"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fcc120cdc24263d3ed86eb66bed3e3dab5f034f287412ea0a19838838be3040"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-channels/src/line.rs:494-505 | crates/zeroclaw-channels/src/signal.rs:1285-1291 \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/zeroclaw-channels/src/line.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. 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/zeroclaw-channels/src/line.rs"},"region":{"startLine":494}}}],"partialFingerprints":{"codehealthFindingId/v1":"e70340de411efdb91dfeba4e5ca4be6353a3aa140d1f1cb35a8a263721a31d2d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-channels/src/matrix.rs:3287-3293 | crates/zeroclaw-channels/src/matrix.rs:3428-3434 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/matrix.rs:3287\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":3287}}}],"partialFingerprints":{"codehealthFindingId/v1":"831082e836944a4d65881665c8dd8221ef35b53f7a893e69045549076a406ce1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-channels/src/matrix.rs:4616-4622 | crates/zeroclaw-channels/src/matrix.rs:4684-4690 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/matrix.rs:4616\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":4616}}}],"partialFingerprints":{"codehealthFindingId/v1":"d505b3bc1e4755b4726b82abb5280a05b0546f8793f5890968bfae775f28ac7d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-channels/src/matrix.rs:4838-4844 | crates/zeroclaw-channels/src/matrix.rs:4849-4855 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/matrix.rs:4838\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":4838}}}],"partialFingerprints":{"codehealthFindingId/v1":"a61304d89f77c80d4317d8739d1921d73f047b3891e944520bc62624525c83d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-channels/src/mattermost.rs:1907-1913 | crates/zeroclaw-channels/src/mattermost.rs:2032-2038 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/mattermost.rs:1907\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/zeroclaw-channels/src/mattermost.rs"},"region":{"startLine":1907}}}],"partialFingerprints":{"codehealthFindingId/v1":"7047c78691e3b3eeea956c6bbaf24b48ff774e911c9c7c6b6ac3e23eb7b8e6d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5\u20137 lines \u00D7 2): crates/zeroclaw-channels/src/mattermost.rs:1919-1925 | crates/zeroclaw-channels/src/mattermost.rs:2103-2107 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/mattermost.rs:1919\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/zeroclaw-channels/src/mattermost.rs"},"region":{"startLine":1919}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0315b9744eb5748c653913f244bf5a6a3ef1ec90efc0f2afc46e1f80b5d2d0a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:5927-5933 | crates/zeroclaw-channels/src/orchestrator/mod.rs:5946-5952 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:5927\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":5927}}}],"partialFingerprints":{"codehealthFindingId/v1":"7776ca78e45e11fc595c33d40b501cec9868732cbd1bc128c3d3bcb61fac1871"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:11290-11296 | crates/zeroclaw-runtime/src/sop/dispatch.rs:729-735 \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/zeroclaw-channels/src/orchestrator/mod.rs:11290\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":11290}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a21787651dbb6a7eb499a089d315d6d023cfdac2b7c8c9f40ba4806b8bcab98"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:11351-11357 | crates/zeroclaw-channels/src/orchestrator/mod.rs:11435-11441 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:11351\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":11351}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc5aef881aa7bd011bc49563cd546959bcc292c5ca491d2dd4b8031ecb9eecfe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:15852-15858 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15986-15992 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:15852\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":15852}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7a8a4272cb121b1c1f97952604fe9802913aa8592d57872f06c1fef9e998126"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-channels/src/slack.rs:1570-1576 | crates/zeroclaw-channels/src/slack.rs:1601-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/zeroclaw-channels/src/slack.rs:1570\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":1570}}}],"partialFingerprints":{"codehealthFindingId/v1":"b14ac40576054d9feea99bcc12ad00cd03d61d1650c1e9b65de08a647bf32e7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-channels/src/telegram.rs:5253-5259 | crates/zeroclaw-channels/src/telegram.rs:5733-5739 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":5253}}}],"partialFingerprints":{"codehealthFindingId/v1":"96ac784d3b4c94a436950fc8a2b5ad891d3d82ffec30876c1fa81191dfb3a675"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-channels/src/telegram.rs:5271-5277 | crates/zeroclaw-channels/src/telegram.rs:5765-5771 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/telegram.rs:5271\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":5271}}}],"partialFingerprints":{"codehealthFindingId/v1":"71145a9a934a6c76dd75f491a6b07a9bc69af2e8a3aac27bd7fcce856d8a17e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-channels/src/transcription.rs:1138-1144 | crates/zeroclaw-channels/src/tts.rs:1132-1138 \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/zeroclaw-channels/src/transcription.rs:1138\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/zeroclaw-channels/src/transcription.rs"},"region":{"startLine":1138}}}],"partialFingerprints":{"codehealthFindingId/v1":"4629d18ae4dbf692d9841736a225db3b616ca45cfb021e0102269b25845438fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-config/src/migration.rs:1883-1889 | crates/zeroclaw-config/src/migration.rs:1895-1901 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-config/src/migration.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-config/src/migration.rs"},"region":{"startLine":1883}}}],"partialFingerprints":{"codehealthFindingId/v1":"be53369024bec406cd32c106a77f4c517184f4ffb5da3a62faccc4c51a10f0d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-config/src/migration.rs:2315-2321 | crates/zeroclaw-config/src/pairing.rs:1252-1258 \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/zeroclaw-config/src/migration.rs"},"region":{"startLine":2315}}}],"partialFingerprints":{"codehealthFindingId/v1":"63ab92dc8f2c2dbf252d5dd284e01852addb3d2d5af4286b048e34ab5c52d5f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-config/src/schema.rs:26949-26955 | crates/zeroclaw-config/src/schema.rs:27092-27098 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-config/src/schema.rs:26949\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/zeroclaw-config/src/schema.rs"},"region":{"startLine":26949}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4edf448bf01092de08e105cc38f034fffb82f2909a1eada62873822b909ecc8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-config/src/schema/v2.rs:1426-1432 | crates/zeroclaw-config/src/schema/v2.rs:1433-1439 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":1426}}}],"partialFingerprints":{"codehealthFindingId/v1":"f102139dc54f62657b11d3297b7650907d000b73da3272d49b5c816871d58ac2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-config/src/schema/v2.rs:2091-2097 | crates/zeroclaw-config/src/schema/v2.rs:2123-2129 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-config/src/schema/v2.rs:2091\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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":2091}}}],"partialFingerprints":{"codehealthFindingId/v1":"e130195006620bb8480a77ed58a76a9bc522ae08db682e80e984b88b7a036766"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-config/src/schema/v2.rs:2900-2907 | crates/zeroclaw-config/src/schema/v2.rs:2954-2960 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-config/src/schema/v2.rs:2900\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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":2900}}}],"partialFingerprints":{"codehealthFindingId/v1":"c581e58a841b0412336ae0b3f62b815c3d7161ed0c2d717f2a6c354d21a755ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u20137 lines \u00D7 6): crates/zeroclaw-gateway/src/api_pairing.rs:84-90 | crates/zeroclaw-gateway/src/api_pairing.rs:214-220 | crates/zeroclaw-infra/src/session_sqlite.rs:1248-1252 | crates/zeroclaw-infra/src/session_sqlite.rs:1558-1562 | crates/zeroclaw-infra/src/session_sqlite.rs:1655-1658 | crates/zeroclaw-infra/src/session_sqlite.rs:1707-1710 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/api_pairing.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. 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/zeroclaw-gateway/src/api_pairing.rs:82\u0060 calls \u0060parse_from_rfc3339\u0060, \u0060with_timezone\u0060, \u0060unwrap_or_else\u0060 and \u0060crates/zeroclaw-infra/src/session_sqlite.rs:1248\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/zeroclaw-gateway/src/api_pairing.rs"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"2380b438dda00310433b874e997bdf761c658ee775fc3e49ab37d99b9c524428"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-gateway/src/api_sop_author.rs:119-125 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:13524-13530 \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/zeroclaw-gateway/src/api_sop_author.rs:119\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/zeroclaw-gateway/src/api_sop_author.rs"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"6eb2424a4e66f1bb4add43058e7fa789552482e76cfe50b23c916241ebb7a2ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-gateway/src/lib.rs:1560-1566 | crates/zeroclaw-gateway/src/lib.rs:1578-1584 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/lib.rs:1560\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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":1560}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb06f448ba6d65a48fbcae09dfc3b20a1b7f4efb778624b5d4afadfb7cb1b6b0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-gateway/src/lib.rs:1918-1924 | crates/zeroclaw-gateway/src/lib.rs:1960-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/lib.rs:1918\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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":1918}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1420ccde91fb20655116d0bd6df24c37cfc3912e7fc30e67355b6452f1c10da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-log/src/migrate.rs:89-95 | crates/zeroclaw-runtime/src/security/otp.rs:149-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/zeroclaw-log/src/migrate.rs:89\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/zeroclaw-log/src/migrate.rs:97\u0060 calls \u0060display\u0060 and \u0060crates/zeroclaw-runtime/src/security/otp.rs:158\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/zeroclaw-log/src/migrate.rs"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"54e4c01fbcda43774443d121ed7c706841e40bb40841282c4efdbf97e0b9a611"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-memory/src/lib.rs:917-923 | crates/zeroclaw-runtime/src/enroll/mod.rs:576-583 \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/zeroclaw-memory/src/lib.rs:917\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/zeroclaw-memory/src/lib.rs"},"region":{"startLine":917}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1b46a95236ba86225b0ecb1ded6965ca7840734c96ebbe79ebe05f04be06d80"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-memory/src/postgres.rs:410-416 | crates/zeroclaw-memory/src/postgres.rs:773-779 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-memory/src/postgres.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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/zeroclaw-memory/src/postgres.rs:770\u0060 calls \u0060iter\u0060, \u0060to_string\u0060, \u0060collect\u0060 and \u0060crates/zeroclaw-memory/src/postgres.rs:407\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/zeroclaw-memory/src/postgres.rs"},"region":{"startLine":410}}}],"partialFingerprints":{"codehealthFindingId/v1":"9000bd41e7ff60ff1f2af42786c9fddaf1e4959a722ddbe5708b20f3343b7c84"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-plugins/src/wasm_channel.rs:471-477 | crates/zeroclaw-plugins/src/wasm_channel.rs:519-525 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-plugins/src/wasm_channel.rs:471\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/zeroclaw-plugins/src/wasm_channel.rs"},"region":{"startLine":471}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d7e8276e4745cdc67248cefa6ae1f33dcb35aa795e1a378650009927f687f5c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-plugins/src/wasm_channel.rs:824-830 | crates/zeroclaw-plugins/src/wasm_channel.rs:902-908 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-plugins/src/wasm_channel.rs:824\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/zeroclaw-plugins/src/wasm_channel.rs"},"region":{"startLine":824}}}],"partialFingerprints":{"codehealthFindingId/v1":"a61e3a27267017d723fecd4dfb4849c2f15aff9508e43ff9883db558e94130cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-providers/src/anthropic.rs:3433-3439 | crates/zeroclaw-providers/src/router.rs:144-150 \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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":3433}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd4980a5482ab50ab0282eb12d4b2cb80cb4e9dd35ebd903c7e5993e8a6af2c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-providers/src/compatible.rs:184-190 | crates/zeroclaw-providers/src/compatible.rs:199-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/zeroclaw-providers/src/compatible.rs:184\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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"d11302ed382bd8bfa31c1c8d18274a224938b54c087dfa7d28380fc6331865df"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-providers/src/compatible.rs:5050-5057 | crates/zeroclaw-providers/src/compatible.rs:5227-5233 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/compatible.rs:5050\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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":5050}}}],"partialFingerprints":{"codehealthFindingId/v1":"e95def51edaf607f5216ee677ac539980fccf36c70e172bffb31259755a3da4b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-providers/src/factory.rs:1033-1039 | crates/zeroclaw-providers/src/factory.rs:1480-1486 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-providers/src/factory.rs"},"region":{"startLine":1033}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bf52649e5e5a1202f346c2ff96f013a9e36eafba8430e4362cb2b8e19fd57c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-providers/src/factory.rs:1537-1543 | crates/zeroclaw-providers/src/factory.rs:1554-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 \u0060crates/zeroclaw-providers/src/factory.rs:1537\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/zeroclaw-providers/src/factory.rs"},"region":{"startLine":1537}}}],"partialFingerprints":{"codehealthFindingId/v1":"cef37e5b2b0b9ba8e64320cdd677a192832c66271cfe0d62f50d11eec0f28db5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-providers/src/gemini.rs:371-377 | crates/zeroclaw-providers/src/gemini.rs:504-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/zeroclaw-providers/src/gemini.rs:371\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/zeroclaw-providers/src/gemini.rs"},"region":{"startLine":371}}}],"partialFingerprints":{"codehealthFindingId/v1":"56c7568f6c7a809f05ea5ce9325411c1bfbafaf909afb5aef3cfab6e6d8b4a1a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-providers/src/hailo_ollama.rs:1022-1028 | crates/zeroclaw-providers/src/hailo_ollama.rs:1045-1051 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/hailo_ollama.rs:1022\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/zeroclaw-providers/src/hailo_ollama.rs"},"region":{"startLine":1022}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ce8f4c515fcad71ad6b89fbbbb9a59e90c10a8a2906183ace8cbd09f2db8703"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-providers/src/ollama.rs:632-638 | crates/zeroclaw-providers/src/ollama.rs:653-659 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/ollama.rs:632\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/zeroclaw-providers/src/ollama.rs"},"region":{"startLine":632}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e91358f252fc10eb0e3e525eab8b82322d801e9ffa110598f1bf3a8f645c021"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 2): crates/zeroclaw-providers/src/openai_codex.rs:1094-1099 | crates/zeroclaw-providers/src/openai_codex.rs:1125-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/zeroclaw-providers/src/openai_codex.rs:1094\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/zeroclaw-providers/src/openai_codex.rs"},"region":{"startLine":1094}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ba27dc90922e23a9fcefe5450d464d9bafd9aae2ec986d23a87286a016eac1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-providers/src/openai_codex.rs:1389-1395 | crates/zeroclaw-providers/src/openai_codex.rs:1640-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/zeroclaw-providers/src/openai_codex.rs:1389\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/zeroclaw-providers/src/openai_codex.rs"},"region":{"startLine":1389}}}],"partialFingerprints":{"codehealthFindingId/v1":"7eacef3c903269946261d4a09a80ef6621762737680542eaf58b6d58b5eb9091"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/agent.rs:4108-4114 | crates/zeroclaw-runtime/src/daemon/mod.rs:1836-1843 \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/zeroclaw-runtime/src/agent/agent.rs:4108\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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":4108}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f6f1a5498fdbb2bac6400d0717f88a8b15d52fab161aab6d8d5ead4d4d9b3fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-runtime/src/cron/scheduler.rs:438-444 | crates/zeroclaw-runtime/src/cron/scheduler.rs:1461-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/zeroclaw-runtime/src/cron/scheduler.rs:438\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/zeroclaw-runtime/src/cron/scheduler.rs"},"region":{"startLine":438}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce6d8d5df76d6c9a1deeeed6bdab5cc57516973eb873cf4b8cef34bad67023a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-runtime/src/hooks/builtin/webhook_audit.rs:144-150 | crates/zeroclaw-runtime/src/tools/skill_http.rs:143-149 \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 \u0060target\u0060 to \u0060\u0026ValidatedWebhookTarget\u0060 in one and \u0060\u0026ValidatedTarget\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/zeroclaw-runtime/src/hooks/builtin/webhook_audit.rs"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9fd397c8422c5f59778992070c43ef1b64a51daff5420d244e54fb2f633d42b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-runtime/src/observability/broadcast.rs:175-181 | crates/zeroclaw-runtime/src/observability/broadcast.rs:212-218 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/observability/broadcast.rs:175\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/zeroclaw-runtime/src/observability/broadcast.rs"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7b390d437fa57cb32fe9f0c425a057b213ba07aa619c118a2f71e228498f4fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-runtime/src/quickstart/mod.rs:1077-1083 | crates/zeroclaw-runtime/src/quickstart/mod.rs:1110-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/quickstart/mod.rs:1077\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/zeroclaw-runtime/src/quickstart/mod.rs"},"region":{"startLine":1077}}}],"partialFingerprints":{"codehealthFindingId/v1":"32c7cb1d603d891ec155503321c478e393831fd9d9e0f2aafadf32eea5ff0d9d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): crates/zeroclaw-runtime/src/rpc/dispatch.rs:13176-13182 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:13206-13213 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":13176}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b42d84262aa19386cf700c6823cacb9c648cc3a21e9cebdd17f3dca4736e670"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-runtime/src/rpc/local.rs:801-807 | crates/zeroclaw-runtime/src/rpc/wss.rs:1250-1256 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/rpc/local.rs\u0060 and \u0060crates/zeroclaw-runtime/src/rpc/wss.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 81 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/zeroclaw-runtime/src/rpc/local.rs:801\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/zeroclaw-runtime/src/rpc/local.rs"},"region":{"startLine":801}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5f753ae033f8ddd23ad61939191fa0ab6efeca70cb858a6a26f5b52c78323fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-runtime/src/security/auth_provider/enrollment.rs:493-499 | crates/zeroclaw-runtime/src/verifiable_intent/crypto.rs:154-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/zeroclaw-runtime/src/security/auth_provider/enrollment.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/security/auth_provider/enrollment.rs"},"region":{"startLine":493}}}],"partialFingerprints":{"codehealthFindingId/v1":"eec3a91fd64502130dbb63c913f557701325080d55e6c1822a832614f0677254"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-runtime/src/security/auth_provider/oidc.rs:703-709 | crates/zeroclaw-runtime/src/security/auth_provider/oidc.rs:747-753 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/security/auth_provider/oidc.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. 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/zeroclaw-runtime/src/security/auth_provider/oidc.rs"},"region":{"startLine":703}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfd0c69c4bcbcf561056bdbf3928703afa8fd7e5759bb44a5d503b7550ddfa55"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/approval/broker.rs:244-250 | crates/zeroclaw-runtime/src/sop/approval/broker.rs:306-312 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/approval/broker.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/zeroclaw-runtime/src/sop/approval/broker.rs"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"7dc91a268bbbffba58b9e1a23ad4e5422e6fab9699695500f40fff8de7dd68b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/approval/channel_route.rs:405-411 | crates/zeroclaw-runtime/src/sop/approval/channel_route.rs:418-424 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/approval/channel_route.rs:405\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/zeroclaw-runtime/src/sop/approval/channel_route.rs"},"region":{"startLine":405}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d471d9240f10dfeba0dd94761ea729fbef1428cae2a93beedc9a0999383f5df"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/approval/timeout.rs:48-54 | crates/zeroclaw-runtime/src/sop/executor.rs:1078-1088 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/sop/approval/timeout.rs\u0060 and \u0060crates/zeroclaw-runtime/src/sop/executor.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. 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/zeroclaw-runtime/src/sop/approval/timeout.rs:48\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/zeroclaw-runtime/src/sop/approval/timeout.rs"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb4f662719dc17b7b191d3509346569e3c6d54463a2a6396daf6e75356f609e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/engine.rs:2669-2675 | crates/zeroclaw-runtime/src/sop/engine.rs:3371-3377 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/engine.rs:2669\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":2669}}}],"partialFingerprints":{"codehealthFindingId/v1":"84dfe4e498ba0eabe0771c0b02d525fc59909c021926947b855972c353c5208f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/store/sqlite.rs:404-410 | crates/zeroclaw-runtime/src/sop/store/sqlite.rs:656-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/zeroclaw-runtime/src/sop/store/sqlite.rs:404\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/zeroclaw-runtime/src/sop/store/sqlite.rs"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e2117fafa4d12c7631fb932f2ad584e3c9b61f560f04b1baab7e8674d2adb1c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/store/sqlite.rs:413-419 | crates/zeroclaw-runtime/src/sop/store/sqlite.rs:448-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/sop/store/sqlite.rs"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"4daa7843f428d4258d575361e7a79dc83382bf62a700d06ced66f2e11733ff08"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/delegate.rs:1077-1083 | crates/zeroclaw-runtime/src/tools/delegate.rs:1110-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/tools/delegate.rs:1077\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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":1077}}}],"partialFingerprints":{"codehealthFindingId/v1":"5922cb1d678c0fa0c88382b7f63656c134e66408266263f0cf65e3f858c34ec3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/schedule.rs:116-122 | crates/zeroclaw-runtime/src/tools/security_ops.rs:470-476 \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/zeroclaw-runtime/src/tools/schedule.rs:116\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/zeroclaw-runtime/src/tools/schedule.rs"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb0bc00778dc33ba76a00e04f9fc60dc240912f02fc40c5188a2fcaec54a226c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 2): crates/zeroclaw-sop-graph/src/lib.rs:339-344 | crates/zeroclaw-sop-graph/src/lib.rs:347-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-sop-graph/src/lib.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. 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/zeroclaw-sop-graph/src/lib.rs"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9367c39ab9e3f6a21aa25a112e77c437fc88f7a9b391fb395223399e21458a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): crates/zeroclaw-tool-call-parser/src/lib.rs:1455-1462 | crates/zeroclaw-tool-call-parser/src/lib.rs:1571-1579 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-tool-call-parser/src/lib.rs"},"region":{"startLine":1455}}}],"partialFingerprints":{"codehealthFindingId/v1":"7caaa0be1cf3d57aed15c6315c6131952976b902d734380f7031f2203b5cef70"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-tools/src/ask_user.rs:134-140 | crates/zeroclaw-tools/src/poll.rs:239-245 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/ask_user.rs\u0060 and \u0060crates/zeroclaw-tools/src/poll.rs\u0060 as WHOLE FILES: this scan already matched 7 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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/ask_user.rs:134\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/zeroclaw-tools/src/ask_user.rs"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"07dd99f33894b587256d2e82720ad1a7090e7faec057cc21df2c560868c93c33"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-tools/src/git_operations.rs:602-608 | crates/zeroclaw-tools/src/git_operations.rs:738-744 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-tools/src/git_operations.rs"},"region":{"startLine":602}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4ddff0ad5a1ff7538ea006dbc937a8b2a703ff312f7ac5466ec1dea89fdde3f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-tools/src/git_operations.rs:1402-1408 | crates/zeroclaw-tools/src/git_operations.rs:1416-1422 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/git_operations.rs:1402\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/zeroclaw-tools/src/git_operations.rs"},"region":{"startLine":1402}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4cccd79609e24bb0d491347bd9508ea26ca7c9fd6ebf9e6da5fa4a021647bde"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-tools/src/http_request.rs:784-790 | crates/zeroclaw-tools/src/text_browser.rs:232-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 both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/http_request.rs"},"region":{"startLine":784}}}],"partialFingerprints":{"codehealthFindingId/v1":"1becdc8dbbe0cd99b0bbef5d0860f0aa2ea38650852bc1958c0d09b0148f5b4a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-tools/src/jira_tool.rs:1372-1379 | crates/zeroclaw-tools/src/jira_tool.rs:1387-1394 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/jira_tool.rs:1372\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/zeroclaw-tools/src/jira_tool.rs:1380\u0060 calls \u0060as_str\u0060, \u0060unwrap_or\u0060 and \u0060crates/zeroclaw-tools/src/jira_tool.rs:1395\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/zeroclaw-tools/src/jira_tool.rs"},"region":{"startLine":1372}}}],"partialFingerprints":{"codehealthFindingId/v1":"a47c46381c666da43e5b23cded31a41998060b202e316ae6d4eed344c2e42056"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-tools/src/knowledge_tool.rs:222-228 | crates/zeroclaw-tools/src/knowledge_tool.rs:256-264 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/knowledge_tool.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. 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/zeroclaw-tools/src/knowledge_tool.rs:255\u0060 calls \u0060and_then\u0060, \u0060get\u0060 and \u0060crates/zeroclaw-tools/src/knowledge_tool.rs:221\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/zeroclaw-tools/src/knowledge_tool.rs"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"6472fc6a3f2ae6541d5b39fb0028ebd7521155c3b41904bcb8818c0a4c46650b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-tools/src/tool_search.rs:264-270 | crates/zeroclaw-tools/src/tool_search.rs:356-362 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/tool_search.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/zeroclaw-tools/src/tool_search.rs"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"e77ddb913172e9b5c149187acd2613e9c9faf7bafbfadfed354b643ad8362f0d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-tools/src/web_search_tool.rs:1122-1128 | crates/zeroclaw-tools/src/web_search_tool.rs:1761-1768 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/web_search_tool.rs:1122\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/zeroclaw-tools/src/web_search_tool.rs"},"region":{"startLine":1122}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fbb3e70860685967bd24e799b28d1aceaae779db0645dd6263f75c39959240e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-tools/src/web_search_tool.rs:1460-1466 | crates/zeroclaw-tools/src/web_search_tool.rs:1740-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/zeroclaw-tools/src/web_search_tool.rs:1460\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/zeroclaw-tools/src/web_search_tool.rs"},"region":{"startLine":1460}}}],"partialFingerprints":{"codehealthFindingId/v1":"8da3db99bf9c6833a56b65ab04cf6a752baac909c7cf5267517282a25d5b3cfe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): xtask/src/bin/web.rs:244-250 | xtask/src/bin/web.rs:288-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 \u0060xtask/src/bin/web.rs:244\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":"xtask/src/bin/web.rs"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"674d77953a25ebcb1071823cd0062869d38442944ade17dad108b721fa06d251"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 13): crates/zeroclaw-tools/src/web_search_tool.rs:389-394 | crates/zeroclaw-tools/src/web_search_tool.rs:407-412 | crates/zeroclaw-tools/src/web_search_tool.rs:611-616 | crates/zeroclaw-tools/src/web_search_tool.rs:629-634 | crates/zeroclaw-tools/src/web_search_tool.rs:787-792 | crates/zeroclaw-tools/src/web_search_tool.rs:805-810 | crates/zeroclaw-tools/src/web_search_tool.rs:926-931 | crates/zeroclaw-tools/src/web_search_tool.rs:944-949 | crates/zeroclaw-tools/src/web_search_tool.rs:1126-1131 | crates/zeroclaw-tools/src/web_search_tool.rs:1323-1328 | crates/zeroclaw-tools/src/web_search_tool.rs:1500-1505 | crates/zeroclaw-tools/src/web_search_tool.rs:1766-1771 | crates/zeroclaw-tools/src/web_search_tool.rs:1784-1789 \u2014 all 13 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/zeroclaw-tools/src/web_search_tool.rs:389\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/zeroclaw-tools/src/web_search_tool.rs"},"region":{"startLine":389}}}],"partialFingerprints":{"codehealthFindingId/v1":"c966486118c565813b7c5d2c649c5e571fc471e581a9736fdad1f9de50cc8856"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 12): crates/zeroclaw-providers/src/anthropic.rs:2904-2909 | crates/zeroclaw-providers/src/anthropic.rs:3016-3021 | crates/zeroclaw-providers/src/azure_openai.rs:543-548 | crates/zeroclaw-providers/src/azure_openai.rs:614-619 | crates/zeroclaw-providers/src/azure_openai.rs:679-684 | crates/zeroclaw-providers/src/openai.rs:495-500 | crates/zeroclaw-providers/src/openai.rs:583-588 | crates/zeroclaw-providers/src/openai.rs:679-684 | crates/zeroclaw-providers/src/openrouter.rs:652-657 | crates/zeroclaw-providers/src/openrouter.rs:718-723 | crates/zeroclaw-providers/src/openrouter.rs:791-796 | crates/zeroclaw-providers/src/openrouter.rs:996-1001 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/azure_openai.rs\u0060 and \u0060crates/zeroclaw-providers/src/openai.rs\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 226 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/zeroclaw-providers/src/anthropic.rs:2904\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/zeroclaw-providers/src/anthropic.rs:2903\u0060 calls \u0060commit_safeguard_fallback\u0060 and \u0060crates/zeroclaw-providers/src/azure_openai.rs:542\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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":2904}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd19ca696efa3c5f98f8256007d09de76446a28d4215b5910726fb99d32d8ba6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 11): crates/zeroclaw-channels/src/discord/rest.rs:104-109 | crates/zeroclaw-channels/src/matrix.rs:1205-1210 | crates/zeroclaw-channels/src/matrix.rs:1236-1241 | crates/zeroclaw-channels/src/matrix.rs:1254-1259 | crates/zeroclaw-channels/src/matrix.rs:1354-1359 | crates/zeroclaw-channels/src/matrix.rs:1374-1379 | crates/zeroclaw-channels/src/matrix.rs:2795-2800 | crates/zeroclaw-channels/src/matrix.rs:2837-2842 | crates/zeroclaw-channels/src/matrix.rs:2956-2961 | crates/zeroclaw-tools/src/pushover.rs:47-52 | src/main.rs:10030-10035 \u2014 there are 11 copies across 4 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 11 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/zeroclaw-channels/src/discord/rest.rs:104\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/zeroclaw-channels/src/discord/rest.rs"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ced74c683853e2ed134326a5da2330637b3c8eef7d4e6f353171ea0286f9d64"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 9): crates/zeroclaw-channels/src/line.rs:333-338 | crates/zeroclaw-channels/src/slack.rs:4978-4986 | crates/zeroclaw-channels/src/webhook.rs:356-361 | crates/zeroclaw-gateway/src/lib.rs:5318-5324 | crates/zeroclaw-gateway/src/ws.rs:649-654 | crates/zeroclaw-hardware/src/loader.rs:77-82 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:5316-5324 | crates/zeroclaw-runtime/src/sop/engine.rs:6316-6321 | crates/zeroclaw-runtime/src/sop/engine.rs:6352-6357 \u2014 before extracting anything, compare \u0060crates/zeroclaw-gateway/src/lib.rs\u0060 and \u0060crates/zeroclaw-gateway/src/ws.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \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/zeroclaw-channels/src/line.rs:333\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/zeroclaw-channels/src/line.rs"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fe4a777d2c290ae1bc49cba5c6d57bad421e84d3c2e6ed2823c1841ed7147d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 8): crates/zeroclaw-channels/src/discord/mod.rs:400-405 | crates/zeroclaw-channels/src/lark.rs:2293-2299 | crates/zeroclaw-channels/src/telegram.rs:5272-5277 | crates/zeroclaw-channels/src/telegram.rs:5730-5735 | crates/zeroclaw-channels/src/telegram.rs:5766-5771 | crates/zeroclaw-channels/src/telegram.rs:5780-5785 | crates/zeroclaw-channels/src/wechat.rs:2044-2049 | crates/zeroclaw-channels/src/whatsapp_web.rs:1610-1615 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/discord/mod.rs\u0060 and \u0060crates/zeroclaw-channels/src/telegram.rs\u0060 as WHOLE FILES: this scan already matched 4 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/zeroclaw-channels/src/discord/mod.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. 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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"500063f17bd15d67bfa2ea3812d5db5f2013a9f44c82b1477cd4c6224dd0c24e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 7): crates/zeroclaw-gateway/src/api_skills.rs:81-86 | crates/zeroclaw-gateway/src/api_skills.rs:111-116 | crates/zeroclaw-gateway/src/api_skills.rs:140-145 | crates/zeroclaw-gateway/src/api_skills.rs:217-222 | crates/zeroclaw-gateway/src/api_skills.rs:255-260 | crates/zeroclaw-gateway/src/api_skills.rs:285-290 | crates/zeroclaw-gateway/src/api_skills.rs:313-318 \u2014 all 7 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/zeroclaw-gateway/src/api_skills.rs:215\u0060 calls \u0060Json\u0060 and \u0060crates/zeroclaw-gateway/src/api_skills.rs:109\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/zeroclaw-gateway/src/api_skills.rs"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8a70c8060a4fea3302dbeda1a67774c813a61f980f5cfb34cec7607ed9f9566"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 7): crates/zeroclaw-providers/src/azure_openai.rs:396-402 | crates/zeroclaw-providers/src/compatible.rs:3502-3507 | crates/zeroclaw-providers/src/copilot.rs:373-379 | crates/zeroclaw-providers/src/hailo_ollama.rs:555-561 | crates/zeroclaw-providers/src/ollama.rs:409-415 | crates/zeroclaw-providers/src/openai.rs:374-380 | crates/zeroclaw-providers/src/openrouter.rs:312-318 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/azure_openai.rs\u0060 and \u0060crates/zeroclaw-providers/src/compatible.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/zeroclaw-providers/src/azure_openai.rs:396\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/zeroclaw-providers/src/azure_openai.rs"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"958d469ef2893f064b3e3b95e1d934e0bc8497accdb712622e37009c3f0f9e30"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 6): crates/zeroclaw-tools/src/linkedin_client.rs:625-630 | crates/zeroclaw-tools/src/linkedin_client.rs:640-645 | crates/zeroclaw-tools/src/linkedin_client.rs:975-980 | crates/zeroclaw-tools/src/linkedin_client.rs:1038-1043 | crates/zeroclaw-tools/src/linkedin_client.rs:1096-1101 | crates/zeroclaw-tools/src/linkedin_client.rs:1152-1157 \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/zeroclaw-tools/src/linkedin_client.rs:625\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/zeroclaw-tools/src/linkedin_client.rs"},"region":{"startLine":625}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0ca1fc40a04f65590888d98e1a7a591649441b70c966d595750400b638fa0fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 6): crates/zeroclaw-tools/src/web_search_tool.rs:762-767 | crates/zeroclaw-tools/src/web_search_tool.rs:914-919 | crates/zeroclaw-tools/src/web_search_tool.rs:1465-1470 | crates/zeroclaw-tools/src/web_search_tool.rs:1702-1707 | crates/zeroclaw-tools/src/web_search_tool.rs:1745-1750 | crates/zeroclaw-tools/src/web_search_tool.rs:1882-1887 \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/zeroclaw-tools/src/web_search_tool.rs:762\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/zeroclaw-tools/src/web_search_tool.rs:757\u0060 calls \u0060get\u0060, \u0060and_then\u0060, \u0060as_str\u0060 and \u0060crates/zeroclaw-tools/src/web_search_tool.rs:1463\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/zeroclaw-tools/src/web_search_tool.rs"},"region":{"startLine":762}}}],"partialFingerprints":{"codehealthFindingId/v1":"03a95a807cabd7af6961ede3a6cbbfedb44fd006b310c1e7382b51e272a0d7ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5): crates/zeroclaw-channels/src/bluesky.rs:591-599 | crates/zeroclaw-channels/src/matrix.rs:1947-1952 | crates/zeroclaw-channels/src/telegram.rs:8284-8290 | crates/zeroclaw-channels/src/whatsapp.rs:374-383 | crates/zeroclaw-providers/src/compatible.rs:849-858 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/bluesky.rs\u0060 and \u0060crates/zeroclaw-channels/src/matrix.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 58 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/zeroclaw-channels/src/bluesky.rs:591\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/zeroclaw-channels/src/bluesky.rs"},"region":{"startLine":591}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cf92cc3ade9db3d1ccc50daaf906f39247097a3d9920a60967e2b92818d098b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5): crates/zeroclaw-channels/src/matrix.rs:3821-3826 | crates/zeroclaw-channels/src/voice_call.rs:457-462 | crates/zeroclaw-channels/src/whatsapp_web.rs:1898-1903 | crates/zeroclaw-channels/src/whatsapp_web.rs:1948-1953 | crates/zeroclaw-hardware/src/uf2.rs:116-121 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/matrix.rs\u0060 and \u0060crates/zeroclaw-channels/src/whatsapp_web.rs\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 68 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/zeroclaw-channels/src/matrix.rs:3821\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":3821}}}],"partialFingerprints":{"codehealthFindingId/v1":"70cd37463c2c22942eedaba9995bc5ee22680c1ad4d28954016f300fc1badce9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5): crates/zeroclaw-channels/src/telegram.rs:8108-8114 | crates/zeroclaw-hardware/src/loader.rs:22-27 | crates/zeroclaw-runtime/src/sop/dispatch.rs:1676-1681 | crates/zeroclaw-tools/src/tool_search.rs:265-270 | crates/zeroclaw-tools/src/tool_search.rs:357-362 \u2014 there are 5 copies across 4 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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/telegram.rs:8108\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":8108}}}],"partialFingerprints":{"codehealthFindingId/v1":"7472e96fcea9e1fe5a4b6745ead3c69d6187988f260ec5891f0b7f745ef41c72"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5): crates/zeroclaw-runtime/src/observability/log.rs:60-65 | crates/zeroclaw-runtime/src/observability/log.rs:118-130 | crates/zeroclaw-runtime/src/observability/log.rs:142-150 | crates/zeroclaw-runtime/src/observability/log.rs:184-192 | crates/zeroclaw-runtime/src/observability/log.rs:217-222 \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/zeroclaw-runtime/src/observability/log.rs:60\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/zeroclaw-runtime/src/observability/log.rs"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3786bcd4666c7a618de89691ba35f42ba34b53d60fc9f7d285b3287d1e2d168"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): apps/zerocode/src/config_manager.rs:2761-2766 | apps/zerocode/src/config_manager.rs:2873-2878 | apps/zerocode/src/config_manager.rs:3510-3515 | apps/zerocode/src/config_manager.rs:4702-4707 \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 \u0060apps/zerocode/src/config_manager.rs:2761\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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":2761}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c730c263eee9b21b90379a82b826ebd19d838f0402917509de0f8211b26ca91"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): crates/zeroclaw-channels/src/discord/mod.rs:431-439 | crates/zeroclaw-channels/src/discord/mod.rs:611-616 | crates/zeroclaw-channels/src/discord/mod.rs:659-667 | crates/zeroclaw-channels/src/discord/mod.rs:757-762 \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/zeroclaw-channels/src/discord/mod.rs:431\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8295a6001a13ac3f35514a5fa243e5fc27c0c49439fb938522955c8520a85f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): crates/zeroclaw-channels/src/orchestrator/mod.rs:1964-1970 | crates/zeroclaw-channels/src/orchestrator/mod.rs:7577-7584 | crates/zeroclaw-channels/src/util.rs:224-230 | crates/zeroclaw-tool-call-parser/src/lib.rs:1075-1080 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs\u0060 and \u0060crates/zeroclaw-channels/src/util.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 143 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/zeroclaw-channels/src/orchestrator/mod.rs:1964\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":1964}}}],"partialFingerprints":{"codehealthFindingId/v1":"4669f0ddbf411edcb801de3b28654c4b91c32e65d0d30945bd0e022d9f8a9437"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): crates/zeroclaw-channels/src/orchestrator/mod.rs:15556-15562 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15855-15861 | crates/zeroclaw-gateway/src/api_oidc.rs:1595-1601 | crates/zeroclaw-runtime/src/sop/decision.rs:421-426 \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/zeroclaw-channels/src/orchestrator/mod.rs:15556\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":15556}}}],"partialFingerprints":{"codehealthFindingId/v1":"02214f4800c761b35baf15b3f8eac1975dc25a95a5801ff81c59400143f68e7a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): crates/zeroclaw-channels/src/signal.rs:692-697 | crates/zeroclaw-channels/src/telegram.rs:2347-2352 | crates/zeroclaw-channels/src/telegram.rs:2410-2415 | crates/zeroclaw-channels/src/telegram.rs:2489-2494 \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/zeroclaw-channels/src/signal.rs:692\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/zeroclaw-channels/src/signal.rs"},"region":{"startLine":692}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c6f264d3284aa77ed228d323982152ccc093048d6ce3da924fb97a652ea03c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): crates/zeroclaw-channels/src/telegram.rs:8484-8489 | crates/zeroclaw-tools/src/microsoft365/auth.rs:165-170 | crates/zeroclaw-tools/src/microsoft365/auth.rs:206-211 | crates/zeroclaw-tools/src/microsoft365/auth.rs:320-325 \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/zeroclaw-channels/src/telegram.rs:8484\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":8484}}}],"partialFingerprints":{"codehealthFindingId/v1":"b73ef5cdc7d2a55a1e938b5c36661fd6d9f8fff81e5c0851f3fd08c012e613ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): crates/zeroclaw-providers/src/reliable.rs:2603-2608 | crates/zeroclaw-providers/src/reliable.rs:2900-2905 | crates/zeroclaw-providers/src/reliable.rs:3351-3356 | crates/zeroclaw-providers/src/reliable.rs:3728-3733 \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/zeroclaw-providers/src/reliable.rs:2603\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/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":2603}}}],"partialFingerprints":{"codehealthFindingId/v1":"b364ebd99f101e0ed59b0129a9476f4d9d60cd3b8a38858eac30d50e91deac4e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): crates/zeroclaw-runtime/src/agent/system_prompt.rs:717-722 | crates/zeroclaw-runtime/src/agent/turn/mod.rs:2397-2402 | crates/zeroclaw-runtime/src/live_config_authority.rs:256-261 | crates/zeroclaw-runtime/src/live_config_authority.rs:291-296 \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/zeroclaw-runtime/src/agent/system_prompt.rs:717\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/zeroclaw-runtime/src/agent/system_prompt.rs"},"region":{"startLine":717}}}],"partialFingerprints":{"codehealthFindingId/v1":"7aba93dbf7b155d9c25d7524d1d07ae26757c14c33245fe58bfb9f1169d4245b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): crates/zeroclaw-runtime/src/rpc/dispatch.rs:6071-6076 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:6132-6137 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:6146-6151 | crates/zeroclaw-runtime/src/rpc/orphans.rs:227-232 \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/zeroclaw-runtime/src/rpc/dispatch.rs:6071\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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":6071}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3181b605043ac345b1626eb7f45a1bbac6679da2762a1a31b1049a7ad06c6da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): crates/zeroclaw-runtime/src/tools/send_message_to_peer.rs:185-190 | crates/zeroclaw-tools/src/git_operations.rs:1561-1566 | crates/zeroclaw-tools/src/pushover.rs:163-168 | crates/zeroclaw-tools/src/sessions.rs:670-675 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/tools/send_message_to_peer.rs:185\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/zeroclaw-runtime/src/tools/send_message_to_peer.rs:184\u0060 calls \u0060filter\u0060, \u0060is_empty\u0060 and \u0060crates/zeroclaw-tools/src/git_operations.rs:1560\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/zeroclaw-runtime/src/tools/send_message_to_peer.rs"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0523a038dd468ba25278e01f1d0c0f04d23d627df9e17e44da972f19b41f762"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): crates/zeroclaw-tools/src/linkedin_client.rs:118-123 | crates/zeroclaw-tools/src/linkedin_client.rs:128-133 | crates/zeroclaw-tools/src/linkedin_client.rs:138-143 | crates/zeroclaw-tools/src/pushover.rs:90-95 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/linkedin_client.rs\u0060 and \u0060crates/zeroclaw-tools/src/pushover.rs\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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/linkedin_client.rs:118\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/zeroclaw-tools/src/linkedin_client.rs"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"872eaf74aa884da4fa8ec35ac1280a62c88bd6b8049af906be9b8e471a83625e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): crates/zeroclaw-tools/src/web_search_tool.rs:437-443 | crates/zeroclaw-tools/src/web_search_tool.rs:659-664 | crates/zeroclaw-tools/src/web_search_tool.rs:835-840 | crates/zeroclaw-tools/src/web_search_tool.rs:976-982 \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/zeroclaw-tools/src/web_search_tool.rs:437\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/zeroclaw-tools/src/web_search_tool.rs"},"region":{"startLine":437}}}],"partialFingerprints":{"codehealthFindingId/v1":"258c8b337574e8b221db1227ca21195d8ea752db5696be07ad6b5b6b5c4cd0d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/zeroclaw-channels/src/discord/markers.rs:856-861 | crates/zeroclaw-channels/src/matrix.rs:3362-3367 | crates/zeroclaw-channels/src/whatsapp_web.rs:3119-3124 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/discord/markers.rs\u0060 and \u0060crates/zeroclaw-channels/src/matrix.rs\u0060 as WHOLE FILES: this scan already matched 8 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/zeroclaw-channels/src/discord/markers.rs:856\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/zeroclaw-channels/src/discord/markers.rs"},"region":{"startLine":856}}}],"partialFingerprints":{"codehealthFindingId/v1":"860617dc317b4347013aafc67d7f11dda5e7b39094b527b301163c94fd43271c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/zeroclaw-channels/src/matrix.rs:2266-2271 | crates/zeroclaw-channels/src/matrix.rs:3725-3730 | crates/zeroclaw-channels/src/voice_wake.rs:474-482 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/matrix.rs\u0060 and \u0060crates/zeroclaw-channels/src/voice_wake.rs\u0060 as WHOLE FILES: this scan already matched 5 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. 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/zeroclaw-channels/src/matrix.rs:2266\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":2266}}}],"partialFingerprints":{"codehealthFindingId/v1":"212432b30f782401c3bf5378f90b05ec6ef883ba231bf1cd1ddb74bcec3e9797"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5\u20136 lines \u00D7 3): crates/zeroclaw-channels/src/orchestrator/acp_server.rs:632-636 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:2815-2820 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:2874-2879 \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/zeroclaw-channels/src/orchestrator/acp_server.rs:632\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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":632}}}],"partialFingerprints":{"codehealthFindingId/v1":"48ec14744c2bee5af6e085ae1bd874f75c84e302c6d60454d76b722f8313b1fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1210-1215 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1550-1555 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:2430-2435 \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/zeroclaw-channels/src/orchestrator/acp_server.rs:1210\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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":1210}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dcdb889643617cb15fba3c4013f69ca8f9338170f483bfc13d674354d203962"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/zeroclaw-channels/src/orchestrator/mod.rs:6534-6539 | crates/zeroclaw-channels/src/orchestrator/mod.rs:6553-6561 | crates/zeroclaw-channels/src/orchestrator/mod.rs:6584-6589 \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/zeroclaw-channels/src/orchestrator/mod.rs:6534\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":6534}}}],"partialFingerprints":{"codehealthFindingId/v1":"a88cae1f091c0567afa1477482a22a72256498f0096b42e006179f307c5e0b55"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/zeroclaw-channels/src/orchestrator/mod.rs:16796-16801 | crates/zeroclaw-channels/src/orchestrator/mod.rs:16822-16827 | crates/zeroclaw-config/src/cost/tracker.rs:939-944 \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/zeroclaw-channels/src/orchestrator/mod.rs:16796\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":16796}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2adb2509628e0014b178f319f906b231b8d6f58b07bb9be5d3a72c34c8e8fd8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/zeroclaw-gateway/src/api_plugins.rs:168-173 | crates/zeroclaw-gateway/src/api_plugins.rs:237-242 | crates/zeroclaw-gateway/src/api_plugins.rs:258-263 \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/zeroclaw-gateway/src/api_plugins.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/zeroclaw-gateway/src/api_plugins.rs"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"04eab6a4c7e1eb76bf51d9192fc3ed3e9ef159e9a74eeffe34600a6169d156fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/zeroclaw-gateway/src/lib.rs:1453-1458 | crates/zeroclaw-runtime/src/cron/scheduler.rs:670-675 | crates/zeroclaw-runtime/src/cron/scheduler.rs:719-724 \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/zeroclaw-gateway/src/lib.rs:1453\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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":1453}}}],"partialFingerprints":{"codehealthFindingId/v1":"db9f9bba65d690ce8b26b70b779e975bc54d7b2d372a4cd2a2d1a71a056bacd5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/zeroclaw-infra/src/acp_session_store.rs:1381-1386 | crates/zeroclaw-infra/src/acp_session_store.rs:1463-1468 | crates/zeroclaw-infra/src/acp_session_store.rs:3017-3022 \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/zeroclaw-infra/src/acp_session_store.rs:1381\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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":1381}}}],"partialFingerprints":{"codehealthFindingId/v1":"78a1da04ab28a3b12e14eaafb21006059eaaf507719834f6edee956de0edcf23"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/zeroclaw-memory/src/sqlite.rs:1034-1039 | crates/zeroclaw-memory/src/sqlite.rs:1697-1702 | crates/zeroclaw-memory/src/sqlite.rs:2523-2528 \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/zeroclaw-memory/src/sqlite.rs:1034\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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":1034}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d882eba132b037129abc36de1191d2a07eff20b14cc43305af6e9be4228f4bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/zeroclaw-providers/src/auth/mod.rs:1361-1366 | crates/zeroclaw-providers/src/auth/mod.rs:1382-1387 | crates/zeroclaw-providers/src/gemini.rs:415-420 \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/zeroclaw-providers/src/auth/mod.rs:1361\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/zeroclaw-providers/src/auth/mod.rs"},"region":{"startLine":1361}}}],"partialFingerprints":{"codehealthFindingId/v1":"20cc4ca2483988420cc4bb567d5b1a4cce9d5b3d4853b34d7e57e889ce804e23"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/zeroclaw-runtime/src/rpc/dispatch.rs:3420-3425 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:3456-3461 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:3478-3483 \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/zeroclaw-runtime/src/rpc/dispatch.rs:3420\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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":3420}}}],"partialFingerprints":{"codehealthFindingId/v1":"b30e5d0da69049c6185c34883bb8f78adbb650f86becce7051d4e4fabf56d608"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/zeroclaw-runtime/src/sop/dispatch.rs:708-713 | crates/zeroclaw-runtime/src/sop/dispatch.rs:770-775 | crates/zeroclaw-runtime/src/sop/dispatch.rs:820-825 \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/zeroclaw-runtime/src/sop/dispatch.rs:708\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/zeroclaw-runtime/src/sop/dispatch.rs"},"region":{"startLine":708}}}],"partialFingerprints":{"codehealthFindingId/v1":"e41dd4492f83252efc9f19533bf77d348988c7359d95036e7b724cc61554e1dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/zeroclaw-runtime/src/sop/engine.rs:1191-1196 | crates/zeroclaw-runtime/src/sop/engine.rs:6488-6495 | crates/zeroclaw-runtime/src/sop/engine.rs:6544-6550 \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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":1191}}}],"partialFingerprints":{"codehealthFindingId/v1":"2feb044e58d6ee9258c0f6539df56f7d86dba9f72652b774359a5015bb15a4b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/zeroclaw-runtime/src/tunnel/cloudflare.rs:70-75 | crates/zeroclaw-runtime/src/tunnel/openvpn.rs:71-76 | crates/zeroclaw-runtime/src/tunnel/pinggy.rs:81-86 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/tunnel/cloudflare.rs\u0060 and \u0060crates/zeroclaw-runtime/src/tunnel/openvpn.rs\u0060 as WHOLE FILES: this scan already matched 4 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. 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/zeroclaw-runtime/src/tunnel/cloudflare.rs:70\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/zeroclaw-runtime/src/tunnel/cloudflare.rs"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb3182a7483d911489d22a571ee0b0187b22a8c3bf01849822c418039d0b347d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/zeroclaw-runtime/src/tunnel/ngrok.rs:57-62 | crates/zeroclaw-runtime/src/tunnel/pinggy.rs:69-74 | crates/zeroclaw-tools/src/mcp_transport.rs:642-647 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/tunnel/ngrok.rs\u0060 and \u0060crates/zeroclaw-runtime/src/tunnel/pinggy.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 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/zeroclaw-runtime/src/tunnel/ngrok.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. 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/zeroclaw-runtime/src/tunnel/ngrok.rs"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"c248a84115f5e3795c6b92c7725a0396befd8493df10530696080d9670c26267"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/zeroclaw-tools/src/backup_tool.rs:1148-1153 | crates/zeroclaw-tools/src/backup_tool.rs:1189-1194 | crates/zeroclaw-tools/src/backup_tool.rs:1289-1294 \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/zeroclaw-tools/src/backup_tool.rs:1148\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/zeroclaw-tools/src/backup_tool.rs"},"region":{"startLine":1148}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1a13637ec21eb852794718256f21980cd33e62cc2f317ac65507d3aeb486037"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/zeroclaw-tools/src/cloud_ops.rs:57-62 | crates/zeroclaw-tools/src/cloud_ops.rs:79-84 | crates/zeroclaw-tools/src/cloud_ops.rs:95-100 \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/zeroclaw-tools/src/cloud_ops.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/cloud_ops.rs"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6c51e675e3cc3387dfc0f8d767f1f35c53edde35bad02e411064948a4a6ef19"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/zeroclaw-tools/src/knowledge_tool.rs:163-169 | crates/zeroclaw-tools/src/knowledge_tool.rs:177-182 | crates/zeroclaw-tools/src/knowledge_tool.rs:192-198 \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/zeroclaw-tools/src/knowledge_tool.rs: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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/knowledge_tool.rs"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"44451150f619ad801f4cb2554fe21e29b04328c39131032f5634d668ec6f4f44"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/zeroclaw-tools/src/knowledge_tool.rs:334-340 | crates/zeroclaw-tools/src/knowledge_tool.rs:348-353 | crates/zeroclaw-tools/src/knowledge_tool.rs:363-369 \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/zeroclaw-tools/src/knowledge_tool.rs:334\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/zeroclaw-tools/src/knowledge_tool.rs"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"40ef0a8e4509747834c5575a74c81d80dd0ac27dc943569b961143f659919f75"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/zeroclaw-tools/src/linkedin_client.rs:88-93 | crates/zeroclaw-tools/src/linkedin_client.rs:903-908 | crates/zeroclaw-tools/src/pushover.rs:63-68 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/linkedin_client.rs\u0060 and \u0060crates/zeroclaw-tools/src/pushover.rs\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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/linkedin_client.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/zeroclaw-tools/src/linkedin_client.rs"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b0791688a2d7cbfac29b706d513d62f38a4875d0eebd973bdaec23bf60290b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): src/main.rs:14590-14595 | src/main.rs:14657-14662 | src/main.rs:14789-14794 \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/main.rs:14590\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, \u0060src/main.rs:14656\u0060 calls \u0060query\u0060, \u0060as_str\u0060, \u0060to_string\u0060 and \u0060src/main.rs:14589\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":"src/main.rs"},"region":{"startLine":14590}}}],"partialFingerprints":{"codehealthFindingId/v1":"346dde5de6ae24b30fbcd266426b4aadd2fed734a0b6fcbe42f0d7ca5fa20990"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u20136 lines \u00D7 4): apps/zerocode/src/app.rs:3534-3540 | apps/zerocode/src/app.rs:3670-3675 | apps/zerocode/src/app.rs:3730-3732 | apps/zerocode/src/quickstart_pane.rs:3382-3384 \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. 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, \u0060apps/zerocode/src/app.rs:3669\u0060 calls \u0060saturating_sub\u0060 and \u0060apps/zerocode/src/app.rs:3729\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":"apps/zerocode/src/app.rs"},"region":{"startLine":3534}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cbb86a959a6ea2817a15a19d8bc4b721c43d77266cbcdbf417e38a4e391f8b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): apps/zerocode/src/chat.rs:5085-5091 | apps/zerocode/src/chat.rs:5098-5104 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/chat.rs:5085\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":"apps/zerocode/src/chat.rs"},"region":{"startLine":5085}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d9ed0b34a3c02626ffd63630701448a810832d5acb4b8f0ce95468b82f20983"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): apps/zerocode/src/config/mod.rs:1330-1335 | apps/zerocode/src/enroll.rs:725-730 \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 \u0060apps/zerocode/src/config/mod.rs:1330\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":"apps/zerocode/src/config/mod.rs"},"region":{"startLine":1330}}}],"partialFingerprints":{"codehealthFindingId/v1":"d98120114355d1a55d9621709af7af09f4702c3a2d45a20808a56ba88e8acf2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): apps/zerocode/src/diff.rs:122-128 | apps/zerocode/src/diff.rs:199-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 \u0060apps/zerocode/src/diff.rs:122\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":"apps/zerocode/src/diff.rs"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dcfca295fcf9656a29f09c35f53a9c1221091d02f1e6bfee1b786a541cb75a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): apps/zerocode/src/quickstart_pane.rs:3108-3113 | apps/zerocode/src/quickstart_pane.rs:3171-3176 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/quickstart_pane.rs:3108\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":"apps/zerocode/src/quickstart_pane.rs"},"region":{"startLine":3108}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cb19c04fde23965ddfc7bb9e0c6cf7b73640f79d11b345a223f30845c5e734d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): apps/zerocode/src/sop_pane.rs:661-666 | apps/zerocode/src/sop_pane.rs:732-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 \u0060apps/zerocode/src/sop_pane.rs:661\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":"apps/zerocode/src/sop_pane.rs"},"region":{"startLine":661}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b535f1acde8a29dc7b7ca8c700875cde06363fc6f7068dc8eec92df35916007"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-channels/src/lark.rs:1810-1815 | crates/zeroclaw-channels/src/lark.rs:3018-3023 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/lark.rs:1810\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":1810}}}],"partialFingerprints":{"codehealthFindingId/v1":"5aa39201c3aba2bbb3599507b0d8fa957bafc72800c494444a0186bc53c0934b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-channels/src/lark.rs:2206-2211 | crates/zeroclaw-channels/src/telegram.rs:8435-8440 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/lark.rs\u0060 and \u0060crates/zeroclaw-channels/src/telegram.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 54 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/zeroclaw-channels/src/lark.rs:2206\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/zeroclaw-channels/src/telegram.rs:8443\u0060 calls \u0060Ok\u0060 and \u0060crates/zeroclaw-channels/src/lark.rs:2214\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":2206}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6cb00ae16beb972de2881e17d1ccd5b2df9699a937f76afa4a6881253e46538"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-channels/src/lark.rs:2367-2372 | crates/zeroclaw-channels/src/lark.rs:2653-2658 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/lark.rs:2367\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/zeroclaw-channels/src/lark.rs:2648\u0060 calls \u0060is_empty\u0060 and \u0060crates/zeroclaw-channels/src/lark.rs:2366\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":2367}}}],"partialFingerprints":{"codehealthFindingId/v1":"119e534136feba33d42374220b9496eb8133a88ee63cc3b8275ea9e8a8f27d68"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-channels/src/lark.rs:3101-3106 | crates/zeroclaw-channels/src/nextcloud_talk.rs:560-565 \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/zeroclaw-channels/src/lark.rs:3101\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":3101}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1ef6d192f63ffc2bcbe478147e66459db09911b6fb444d0291f297ceccead8b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-channels/src/matrix.rs:4567-4573 | crates/zeroclaw-runtime/src/sop/dispatch.rs:1355-1360 \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/zeroclaw-channels/src/matrix.rs:4567\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":4567}}}],"partialFingerprints":{"codehealthFindingId/v1":"83a84ed0cde36c375c670da3901e799549b8b739e6a97e3da23474291ec933bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:4858-4863 | crates/zeroclaw-channels/src/orchestrator/mod.rs:17156-17161 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:4858\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":4858}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ab9d7557bea55ec673e948b7b03d27f0262f90345ba210fe2a6fd5943d11176"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:6891-6896 | crates/zeroclaw-channels/src/orchestrator/mod.rs:6908-6913 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:6891\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":6891}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8238339725f82d20adb6880451122f4e97ae51ed6022c5935834234ff98fd77"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:13429-13434 | crates/zeroclaw-channels/src/orchestrator/mod.rs:14683-14688 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:13429\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/zeroclaw-channels/src/orchestrator/mod.rs:13428\u0060 calls \u0060one_shot_channel_workspace_dir\u0060 and \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:14682\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":13429}}}],"partialFingerprints":{"codehealthFindingId/v1":"d29d75023aa31ab5a195e5697183b3fc452786dce5f9114ff4777e75554e316c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (1\u20136 lines \u00D7 7): crates/zeroclaw-channels/src/mochat.rs:265-267 | crates/zeroclaw-channels/src/mochat.rs:268-268 | crates/zeroclaw-channels/src/signal.rs:1271-1276 | crates/zeroclaw-channels/src/telegram.rs:4172-4177 | crates/zeroclaw-channels/src/telegram.rs:9123-9128 | crates/zeroclaw-channels/src/twitter.rs:404-404 | crates/zeroclaw-channels/src/twitter.rs:405-405 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/mochat.rs\u0060 and \u0060crates/zeroclaw-channels/src/twitter.rs\u0060 as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 115 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/zeroclaw-channels/src/mochat.rs:265\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/zeroclaw-channels/src/mochat.rs:267\u0060 calls \u0060text\u0060, \u0060unwrap_or_default\u0060 and \u0060crates/zeroclaw-channels/src/twitter.rs:405\u0060 does not \u2014 after which the two agree again for 5 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/zeroclaw-channels/src/mochat.rs"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"1923cb306d732cf1081cede67e1c7c33d33cbb499f26d84c49a6492d9214538a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-channels/src/slack.rs:4568-4573 | crates/zeroclaw-channels/src/slack.rs:6014-6021 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":4568}}}],"partialFingerprints":{"codehealthFindingId/v1":"e86fefe95188ff7e95efa32615ad7907189aac9cf9d18c8d1a822f1b621b751e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-channels/src/telegram.rs:2148-2153 | crates/zeroclaw-channels/src/telegram.rs:7894-7899 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":2148}}}],"partialFingerprints":{"codehealthFindingId/v1":"45f5c1c74156ab391ace194e73f8625b2f6b656aeffc987f8c333e925c743421"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-channels/src/telegram.rs:5306-5311 | crates/zeroclaw-gateway/src/api_upload.rs:165-170 \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/zeroclaw-channels/src/telegram.rs:5306\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":5306}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fcf6ba27e43f28c230bad165d1c4cdbac9d7f5b874e7b2a73a84148b7a3d89f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/telegram.rs:8111-8118 | crates/zeroclaw-channels/src/telegram.rs:8287-8294 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/telegram.rs:8111\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":8111}}}],"partialFingerprints":{"codehealthFindingId/v1":"66461ed8de198e02ca5387a31cc48744671fe7c27c14261d54b16e6252dd1b49"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-channels/src/wechat.rs:1219-1224 | crates/zeroclaw-channels/src/wechat.rs:1258-1263 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/wechat.rs:1219\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/zeroclaw-channels/src/wechat.rs"},"region":{"startLine":1219}}}],"partialFingerprints":{"codehealthFindingId/v1":"948102c993a3fa80daf474b4aaac75f4eb4e9c6eb00ae2c3ed2f42f28f080505"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-config/src/schema.rs:8790-8795 | crates/zeroclaw-tools/src/microsoft365/types.rs:21-26 \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/zeroclaw-config/src/schema.rs:8790\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/zeroclaw-config/src/schema.rs"},"region":{"startLine":8790}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ebec865d00e190fd03d2338184f7cb857740d6c4b97a19ae0b6355c7d6df588"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-config/src/schema.rs:25097-25105 | crates/zeroclaw-runtime/src/sop/engine.rs:1826-1831 \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/zeroclaw-config/src/schema.rs:25097\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/zeroclaw-config/src/schema.rs"},"region":{"startLine":25097}}}],"partialFingerprints":{"codehealthFindingId/v1":"d40a26261d43fc13d4b4134bbd77d1d3252e564aebaa4831c072406cf69a40e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-config/src/schema/v2.rs:3642-3647 | crates/zeroclaw-config/src/schema/v2.rs:3681-3686 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-config/src/schema/v2.rs:3642\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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":3642}}}],"partialFingerprints":{"codehealthFindingId/v1":"297aa150c572b9749427453a5332afc0d4a3abe71c7ff9c03ce0bcc028388590"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-gateway/src/api_config.rs:495-500 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:3135-3141 \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/zeroclaw-gateway/src/api_config.rs:495\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/zeroclaw-gateway/src/api_config.rs"},"region":{"startLine":495}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5cd94a2815860845e6a3a1f0f29ec41c9f910b0b3fc78a7beeace90bc6091db"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-gateway/src/lib.rs:2042-2047 | crates/zeroclaw-runtime/src/daemon/mod.rs:1279-1284 \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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":2042}}}],"partialFingerprints":{"codehealthFindingId/v1":"90095d66a7e525bb55b59e26b0dbb1b66766bd0647082d288b949930b4b1e7e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-gateway/src/lib.rs:2307-2312 | crates/zeroclaw-runtime/src/tools/file_read.rs:269-274 \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/zeroclaw-gateway/src/lib.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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":2307}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d05b2bf95a956a3ed03f4e55020867c34d2e31378ec27ad06b2d950be0f9701"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-gateway/src/lib.rs:4073-4078 | crates/zeroclaw-hardware/src/loader.rs:92-97 \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/zeroclaw-gateway/src/lib.rs:4073\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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":4073}}}],"partialFingerprints":{"codehealthFindingId/v1":"912fe3cd5a02d860b7c47839383dd8e6eeb67d2d160c457cf31e914c49c7593d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-gateway/src/plugin_webhook.rs:159-164 | crates/zeroclaw-gateway/src/plugin_webhook.rs:172-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/zeroclaw-gateway/src/plugin_webhook.rs:159\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/zeroclaw-gateway/src/plugin_webhook.rs"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"56fa8a57876740b91e5673d07d484a466e1046977b00f81335464245e813e5b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-hardware/src/subprocess.rs:146-151 | crates/zeroclaw-hardware/src/subprocess.rs:160-165 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-hardware/src/subprocess.rs:146\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/zeroclaw-hardware/src/subprocess.rs:166\u0060 calls \u0060display\u0060, \u0060to_string\u0060 and \u0060crates/zeroclaw-hardware/src/subprocess.rs:152\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/zeroclaw-hardware/src/subprocess.rs"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"9994cb3376df0f5ef9f68376e7ae9e74f8300d1f467a8c6e254f5f036bf54428"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-hardware/src/subprocess.rs:146-151 | crates/zeroclaw-hardware/src/subprocess.rs:243-248 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-hardware/src/subprocess.rs:146\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/zeroclaw-hardware/src/subprocess.rs"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"d38a01b9a5606654a69de9dc65f0bd236553e7a42e6c102c629ceeca1805fe03"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-infra/src/acp_session_store.rs:367-372 | crates/zeroclaw-infra/src/acp_session_store.rs:403-408 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":367}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e35d55d3ad6b9b12a4cf0cb18fccb0b224389289b5fed2298f62b8b7d533ad0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-infra/src/acp_session_store.rs:847-852 | crates/zeroclaw-infra/src/acp_session_store.rs:1223-1228 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-infra/src/acp_session_store.rs:847\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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":847}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce65d96252004a72770b575ac3972faad7272fbf3fbc8fed6226f83fa1c7f374"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5\u20136 lines \u00D7 2): crates/zeroclaw-infra/src/acp_session_store.rs:856-860 | crates/zeroclaw-infra/src/acp_session_store.rs:1110-1115 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-infra/src/acp_session_store.rs:856\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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":856}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a48afbf5b619bc61517817f93bcb181325af1edec15a7cb841b96c2dc5ebd23"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-log/src/reader.rs:572-577 | crates/zeroclaw-log/src/writer.rs:1015-1020 \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/zeroclaw-log/src/reader.rs"},"region":{"startLine":572}}}],"partialFingerprints":{"codehealthFindingId/v1":"f54fa3d99dc7c993f11d343dd568a51d791dc621ce9b77b116fd77f1f8ca46bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-memory/src/sqlite.rs:981-986 | crates/zeroclaw-memory/src/sqlite.rs:1959-1964 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-memory/src/sqlite.rs:981\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/zeroclaw-memory/src/sqlite.rs:1957\u0060 calls \u0060clone\u0060, \u0060to_string\u0060 and \u0060crates/zeroclaw-memory/src/sqlite.rs:980\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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":981}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f6d2d8cfbbc58854652976f0eac7fcd5bb95fa86cee249579712ee945f4b2ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-providers/src/anthropic.rs:2236-2241 | crates/zeroclaw-runtime/src/agent/turn/stream_consume.rs:468-473 \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/zeroclaw-providers/src/anthropic.rs:2236\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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":2236}}}],"partialFingerprints":{"codehealthFindingId/v1":"a207f6755505a6c4b6150863a73ebe52458986b084417f1110cdaa6e950d38ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-providers/src/auth/gemini_oauth.rs:460-465 | crates/zeroclaw-providers/src/auth/gemini_oauth.rs:486-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/zeroclaw-providers/src/auth/gemini_oauth.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/zeroclaw-providers/src/auth/gemini_oauth.rs"},"region":{"startLine":460}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e2137ff38febc950d5e39afc61220b9bca4aee4d77b7ef7e0a72b1fb248a5cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-providers/src/bedrock.rs:159-164 | crates/zeroclaw-providers/src/bedrock.rs:172-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/zeroclaw-providers/src/bedrock.rs:159\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/zeroclaw-providers/src/bedrock.rs"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5a55becc834f4ddf0fd70fa4e4fa45c9b6ef5a617693ade0dd7af450e362442"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-providers/src/grok_cli/acp.rs:587-593 | crates/zeroclaw-providers/src/grok_cli/acp.rs:623-628 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/grok_cli/acp.rs:587\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/zeroclaw-providers/src/grok_cli/acp.rs:594\u0060 calls \u0060permission_outcome\u0060 and \u0060crates/zeroclaw-providers/src/grok_cli/acp.rs:629\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/zeroclaw-providers/src/grok_cli/acp.rs"},"region":{"startLine":587}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccd01bf19a1ed21e300cc33cdba4dc00676511a1843cc6ac7364f0586789f1a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u20136 lines \u00D7 3): crates/zeroclaw-providers/src/gemini.rs:357-360 | crates/zeroclaw-providers/src/lib.rs:403-408 | crates/zeroclaw-providers/src/lib.rs:548-553 \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/zeroclaw-providers/src/lib.rs:403\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/zeroclaw-providers/src/lib.rs:403\u0060 calls \u0060timeout\u0060, \u0060from_secs\u0060 and \u0060crates/zeroclaw-providers/src/gemini.rs:357\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/zeroclaw-providers/src/gemini.rs"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"301d6a20928820947e73127b14a34068117dd509e0b9d455425feedb142ba477"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-providers/src/openai_codex.rs:936-941 | crates/zeroclaw-providers/src/openai_codex.rs:1109-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/openai_codex.rs:936\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/zeroclaw-providers/src/openai_codex.rs"},"region":{"startLine":936}}}],"partialFingerprints":{"codehealthFindingId/v1":"230222173255f0efd7ee8a3e2bb3145052441c9cba91605fb4ceb2bd747940c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-providers/src/reliable.rs:3270-3277 | crates/zeroclaw-providers/src/reliable.rs:3622-3629 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/reliable.rs:3270\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/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":3270}}}],"partialFingerprints":{"codehealthFindingId/v1":"738c46b7fecc6ca8df7523c99630ac801f8322e6e9fb1a855ff2d49e3dffd803"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/agent.rs:4519-4529 | crates/zeroclaw-runtime/src/agent/agent.rs:5070-5080 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/agent/agent.rs:4519\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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":4519}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b8114ad6cc612573aced7e9334874864bffba2b2bdceab632f1d687345b3d92"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/loop_.rs:2003-2008 | crates/zeroclaw-runtime/src/agent/loop_.rs:4038-4043 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":2003}}}],"partialFingerprints":{"codehealthFindingId/v1":"a40d692736b3d73111cd77996332061e0bd7e975ff2e1dbed338fc4c9cac3479"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/turn/approval_gate.rs:98-105 | crates/zeroclaw-runtime/src/agent/turn/results_collect.rs:119-124 \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/zeroclaw-runtime/src/agent/turn/approval_gate.rs:98\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/zeroclaw-runtime/src/agent/turn/approval_gate.rs"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1178023bfe2a38fa560c40ca011a07075c0417ecddf728b70a84032aed8de84"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/turn/call_prep.rs:330-336 | crates/zeroclaw-runtime/src/agent/turn/call_prep.rs:435-440 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/agent/turn/call_prep.rs:330\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 after the matched lines, \u0060crates/zeroclaw-runtime/src/agent/turn/call_prep.rs:337\u0060 calls \u0060insert\u0060 and \u0060crates/zeroclaw-runtime/src/agent/turn/call_prep.rs:442\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/zeroclaw-runtime/src/agent/turn/call_prep.rs"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa3cd2bdac299a3714cd7cd2a18b29e4e550e5684cbae38d85bed9380c5fe7f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/turn/max_iter.rs:223-229 | crates/zeroclaw-runtime/src/agent/turn/mod.rs:2256-2261 \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/zeroclaw-runtime/src/agent/turn/max_iter.rs:223\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/zeroclaw-runtime/src/agent/turn/max_iter.rs"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5fc9d3684d0f63161b34f97eb29689479e4c3add33ab168ff2571aea579e96b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5\u20136 lines \u00D7 2): crates/zeroclaw-runtime/src/cron/outbox.rs:332-336 | crates/zeroclaw-runtime/src/cron/outbox.rs:430-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/cron/outbox.rs:332\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/zeroclaw-runtime/src/cron/outbox.rs"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"94e926f16c34c3175480dfe53627a9c85a445e9a3ea1056b331d15d3bfdc3681"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/cron/scheduler.rs:354-362 | crates/zeroclaw-runtime/src/cron/scheduler.rs:439-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/cron/scheduler.rs:354\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/zeroclaw-runtime/src/cron/scheduler.rs"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"be0a4314a5bf351cc2c94d57e4e254adfc7ca4df7096ea5f0e3d0af59efb82e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/cron/scheduler.rs:754-760 | crates/zeroclaw-runtime/src/cron/scheduler.rs:968-973 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/cron/scheduler.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. 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/zeroclaw-runtime/src/cron/scheduler.rs"},"region":{"startLine":754}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d2547a182f672dba378117ff0b03a6a677320627929ebfee2373b553b21eb38"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/plugin_state.rs:103-108 | crates/zeroclaw-runtime/src/plugin_state.rs:140-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/zeroclaw-runtime/src/plugin_state.rs"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"516c1d116a61201b5da5383873b0bfac5f6ce4caa6162812a0135f39e1257beb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/restart.rs:215-220 | crates/zeroclaw-runtime/src/skills/review.rs:237-242 \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/zeroclaw-runtime/src/restart.rs:215\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/zeroclaw-runtime/src/restart.rs"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"79f4e5f7917b573c26b7440acc2e95fcb72e0e44827807955cc81eab5f203272"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/rpc/dispatch.rs:5520-5525 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:5535-5540 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/rpc/dispatch.rs:5520\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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":5520}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1e1bcfe617c3a0da5ea9d7697bfe3cd2253158c3eb7c4ab9c89115ff2e6426f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/rpc/dispatch.rs:5590-5595 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:9254-9259 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/rpc/dispatch.rs:5590\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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":5590}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9691500255a38c65142fdd05eb83ccb17ff54479e1cc99f63deff6f27f4cccb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/rpc/dispatch.rs:6439-6444 | crates/zeroclaw-runtime/src/rpc/orphans.rs:152-157 \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/zeroclaw-runtime/src/rpc/dispatch.rs:6439\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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":6439}}}],"partialFingerprints":{"codehealthFindingId/v1":"95712b413f9e78cd10bc03fcf3e0febe0e631c82e191ef2a8f0bddafb2861f6e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/rpc/dispatch.rs:10039-10044 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:10764-10769 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/rpc/dispatch.rs:10039\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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":10039}}}],"partialFingerprints":{"codehealthFindingId/v1":"16f16e3b038382e6d40b9ef7cd78ffab8f0ae93240896843bb4b50a667b3c0db"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/security/playbook.rs:93-101 | crates/zeroclaw-runtime/src/sop/mod.rs:997-1002 \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/zeroclaw-runtime/src/security/playbook.rs:93\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/zeroclaw-runtime/src/security/playbook.rs"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8dd3871ec670570447fb03de781a4501a42f864e1ae09235d47e7a5046a0cc1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5\u20136 lines \u00D7 2): crates/zeroclaw-runtime/src/skills/mod.rs:3220-3224 | crates/zeroclaw-runtime/src/skills/mod.rs:3271-3276 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/skills/mod.rs:3220\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/zeroclaw-runtime/src/skills/mod.rs"},"region":{"startLine":3220}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8826d861b1f0b5810295f209cc75480f6974b6d2430d4a8ec570bd348b6e7b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/executor.rs:1523-1528 | crates/zeroclaw-runtime/src/tools/sop_advance.rs:227-232 \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/zeroclaw-runtime/src/sop/executor.rs:1523\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/zeroclaw-runtime/src/sop/executor.rs"},"region":{"startLine":1523}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cf0ba02cc30a52d31a18c79251aaeadc3b1a85e47c5feecf475dcf50703b87e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/send_message_to_peer.rs:151-156 | crates/zeroclaw-tools/src/reaction.rs:87-92 \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/zeroclaw-runtime/src/tools/send_message_to_peer.rs:151\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/zeroclaw-runtime/src/tools/send_message_to_peer.rs:150\u0060 calls \u0060filter\u0060, \u0060is_empty\u0060 and \u0060crates/zeroclaw-tools/src/reaction.rs:86\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/zeroclaw-runtime/src/tools/send_message_to_peer.rs"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"10b549106ad82ab47b2c4ba1b44c715c2fb9aae899a8be1b91a18c90b9c88c8c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-tools/src/composio.rs:740-749 | crates/zeroclaw-tools/src/knowledge_tool.rs:409-414 \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/zeroclaw-tools/src/composio.rs:740\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/zeroclaw-tools/src/composio.rs"},"region":{"startLine":740}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c35174fdaa8151c4cd337cc4681677f4989a78914e72873f927b620b2fe9ad8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-tools/src/linkedin.rs:203-208 | crates/zeroclaw-tools/src/linkedin.rs:344-349 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/linkedin.rs:203\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/zeroclaw-tools/src/linkedin.rs"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"af5ce16984633dc6473047fedbcc9303ef09b856b508bd85648ea073dc82d8cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-tools/src/mcp_transport.rs:630-635 | crates/zeroclaw-tools/src/mcp_transport.rs:643-648 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/mcp_transport.rs:630\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/zeroclaw-tools/src/mcp_transport.rs"},"region":{"startLine":630}}}],"partialFingerprints":{"codehealthFindingId/v1":"83f0fddf541e5936218aa1c8493672858122b1cae88e69606a9c99cd653652c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-tools/src/web_search_tool.rs:1056-1061 | crates/zeroclaw-tools/src/web_search_tool.rs:1716-1721 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/web_search_tool.rs:1056\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/zeroclaw-tools/src/web_search_tool.rs:1054\u0060 calls \u0060and_then\u0060, \u0060get\u0060 and \u0060crates/zeroclaw-tools/src/web_search_tool.rs:1714\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/zeroclaw-tools/src/web_search_tool.rs"},"region":{"startLine":1056}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e8842b79713d7bf364306a75f3d124f945086e8d0fdf02c1182c02989a2e583"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src/commands/update.rs:1053-1058 | src/commands/update.rs:1076-1081 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/commands/update.rs:1053\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":"src/commands/update.rs"},"region":{"startLine":1053}}}],"partialFingerprints":{"codehealthFindingId/v1":"d88ddb84a123e683a6bbe479976608d84a2996b5d3047a931f2bed3fb5876c7c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 68): crates/zeroclaw-channels/src/discord/mod.rs:1637-1641 | crates/zeroclaw-channels/src/discord/mod.rs:1650-1654 | crates/zeroclaw-channels/src/imessage.rs:272-276 | crates/zeroclaw-channels/src/matrix.rs:2529-2533 | crates/zeroclaw-channels/src/matrix.rs:2822-2826 | crates/zeroclaw-channels/src/matrix.rs:3765-3769 | crates/zeroclaw-channels/src/matrix.rs:3823-3827 | crates/zeroclaw-channels/src/matrix.rs:3953-3957 | crates/zeroclaw-channels/src/notion.rs:391-395 | crates/zeroclaw-channels/src/notion.rs:448-455 | crates/zeroclaw-channels/src/notion.rs:499-503 | crates/zeroclaw-channels/src/orchestrator/mod.rs:7880-7884 | crates/zeroclaw-channels/src/orchestrator/mod.rs:11217-11224 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15087-15091 | crates/zeroclaw-channels/src/voice_call.rs:329-333 | crates/zeroclaw-channels/src/voice_call.rs:459-463 | crates/zeroclaw-channels/src/voice_call.rs:470-474 | crates/zeroclaw-channels/src/webhook.rs:154-158 | crates/zeroclaw-channels/src/wechat.rs:450-454 | crates/zeroclaw-channels/src/wechat.rs:468-472 | crates/zeroclaw-channels/src/wechat.rs:876-880 | crates/zeroclaw-channels/src/wechat.rs:2837-2844 | crates/zeroclaw-channels/src/wechat.rs:2946-2953 | crates/zeroclaw-channels/src/whatsapp_web.rs:1297-1301 | crates/zeroclaw-channels/src/whatsapp_web.rs:1864-1868 | crates/zeroclaw-channels/src/whatsapp_web.rs:1900-1904 | crates/zeroclaw-channels/src/whatsapp_web.rs:1950-1954 | crates/zeroclaw-channels/src/whatsapp_web.rs:4441-4445 | crates/zeroclaw-channels/src/whatsapp_web.rs:4481-4485 | crates/zeroclaw-config/src/secrets.rs:262-266 | crates/zeroclaw-gateway/src/lib.rs:3409-3413 | crates/zeroclaw-gateway/src/ws.rs:841-845 | crates/zeroclaw-hardware/src/uf2.rs:118-122 | crates/zeroclaw-providers/src/bedrock.rs:131-135 | crates/zeroclaw-providers/src/bedrock.rs:148-152 | crates/zeroclaw-providers/src/openai_codex.rs:1179-1183 | crates/zeroclaw-runtime/src/observability/mod.rs:399-406 | crates/zeroclaw-runtime/src/tools/mod.rs:3733-3737 | crates/zeroclaw-runtime/src/tools/shell.rs:295-299 | crates/zeroclaw-runtime/src/tools/sop_advance.rs:155-159 | crates/zeroclaw-runtime/src/tools/sop_approve.rs:119-123 | crates/zeroclaw-runtime/src/tools/sop_execute.rs:123-127 | crates/zeroclaw-runtime/src/tools/sop_list.rs:48-52 | crates/zeroclaw-runtime/src/tools/sop_status.rs:102-106 | crates/zeroclaw-tools/src/jira_tool.rs:114-118 | crates/zeroclaw-tools/src/jira_tool.rs:134-138 | crates/zeroclaw-tools/src/jira_tool.rs:211-215 | crates/zeroclaw-tools/src/jira_tool.rs:231-235 | crates/zeroclaw-tools/src/jira_tool.rs:283-287 | crates/zeroclaw-tools/src/jira_tool.rs:303-307 | crates/zeroclaw-tools/src/jira_tool.rs:362-366 | crates/zeroclaw-tools/src/jira_tool.rs:382-386 | crates/zeroclaw-tools/src/jira_tool.rs:411-415 | crates/zeroclaw-tools/src/jira_tool.rs:431-435 | crates/zeroclaw-tools/src/jira_tool.rs:462-466 | crates/zeroclaw-tools/src/jira_tool.rs:474-478 | crates/zeroclaw-tools/src/jira_tool.rs:504-508 | crates/zeroclaw-tools/src/jira_tool.rs:531-538 | crates/zeroclaw-tools/src/jira_tool.rs:549-556 | crates/zeroclaw-tools/src/jira_tool.rs:569-573 | crates/zeroclaw-tools/src/jira_tool.rs:609-613 | crates/zeroclaw-tools/src/jira_tool.rs:629-633 | crates/zeroclaw-tools/src/jira_tool.rs:700-704 | crates/zeroclaw-tools/src/jira_tool.rs:720-724 | crates/zeroclaw-tools/src/jira_tool.rs:801-805 | crates/zeroclaw-tools/src/jira_tool.rs:899-903 | crates/zeroclaw-tools/src/jira_tool.rs:919-923 | crates/zeroclaw-tools/src/web_fetch.rs:250-254 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/imessage.rs\u0060 and \u0060crates/zeroclaw-channels/src/matrix.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. 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/zeroclaw-channels/src/discord/mod.rs:1637\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/zeroclaw-channels/src/orchestrator/mod.rs:11227\u0060 calls \u0060Err\u0060 and \u0060crates/zeroclaw-channels/src/notion.rs:506\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":1637}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a4f194757890b3f1a9d1fd73511b4ad0acb448436f85ac05128f28e32236deb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 14): crates/zeroclaw-channels/src/lark.rs:2318-2323 | crates/zeroclaw-channels/src/nostr.rs:242-250 | crates/zeroclaw-channels/src/nostr.rs:295-303 | crates/zeroclaw-channels/src/orchestrator/mod.rs:11182-11189 | crates/zeroclaw-channels/src/orchestrator/mod.rs:17092-17096 | crates/zeroclaw-channels/src/whatsapp_web.rs:1515-1519 | crates/zeroclaw-config/src/cost/tracker.rs:973-977 | crates/zeroclaw-gateway/src/lib.rs:2091-2095 | crates/zeroclaw-memory/src/lib.rs:1178-1182 | crates/zeroclaw-providers/src/anthropic.rs:1576-1584 | crates/zeroclaw-providers/src/pricing.rs:488-492 | crates/zeroclaw-runtime/src/daemon/mod.rs:2682-2686 | crates/zeroclaw-runtime/src/restart.rs:215-219 | src/commands/update.rs:396-400 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/lark.rs\u0060 and \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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/zeroclaw-channels/src/lark.rs:2318\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":2318}}}],"partialFingerprints":{"codehealthFindingId/v1":"09d4483a931411093384b10e878998ba00c1c8aedf8dfa2bf6f8f7f20dd77c65"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 13): crates/zeroclaw-channels/src/bluesky.rs:592-599 | crates/zeroclaw-channels/src/clawdtalk.rs:339-343 | crates/zeroclaw-channels/src/matrix.rs:1948-1952 | crates/zeroclaw-channels/src/mattermost.rs:847-851 | crates/zeroclaw-channels/src/mattermost.rs:922-927 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15989-15993 | crates/zeroclaw-channels/src/qq.rs:1126-1134 | crates/zeroclaw-channels/src/slack.rs:3721-3725 | crates/zeroclaw-channels/src/wechat.rs:2186-2190 | crates/zeroclaw-channels/src/wechat.rs:2611-2615 | crates/zeroclaw-runtime/src/security/playbook.rs:94-101 | crates/zeroclaw-runtime/src/sop/mod.rs:998-1002 | crates/zeroclaw-runtime/src/tools/mod.rs:3399-3403 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/bluesky.rs\u0060 and \u0060crates/zeroclaw-channels/src/matrix.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 58 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/zeroclaw-channels/src/bluesky.rs:592\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/zeroclaw-channels/src/qq.rs:1138\u0060 calls \u0060clone\u0060 and \u0060crates/zeroclaw-runtime/src/tools/mod.rs:3407\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/zeroclaw-channels/src/bluesky.rs"},"region":{"startLine":592}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9829bdbc6d33d3b7407eb13684a855e9a5933ae54841fc3fde1447726529ab4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 13): crates/zeroclaw-channels/src/telegram.rs:4185-4189 | crates/zeroclaw-channels/src/telegram.rs:4534-4538 | crates/zeroclaw-channels/src/telegram.rs:5251-5256 | crates/zeroclaw-channels/src/telegram.rs:5273-5277 | crates/zeroclaw-channels/src/telegram.rs:5731-5736 | crates/zeroclaw-channels/src/telegram.rs:5767-5771 | crates/zeroclaw-channels/src/telegram.rs:5781-5785 | crates/zeroclaw-channels/src/telegram.rs:7347-7351 | crates/zeroclaw-channels/src/telegram.rs:8109-8114 | crates/zeroclaw-channels/src/telegram.rs:8285-8290 | crates/zeroclaw-channels/src/telegram.rs:8591-8596 | crates/zeroclaw-channels/src/telegram.rs:8721-8726 | crates/zeroclaw-channels/src/telegram.rs:8739-8744 \u2014 all 13 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/zeroclaw-channels/src/telegram.rs:4185\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":4185}}}],"partialFingerprints":{"codehealthFindingId/v1":"0044e2b7c298d7c788d19e7890e29544dda937915198f91167fe70b75362180d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 12): crates/zeroclaw-channels/src/gmail_push.rs:699-703 | crates/zeroclaw-channels/src/gmail_push.rs:709-713 | crates/zeroclaw-channels/src/notion.rs:69-73 | crates/zeroclaw-channels/src/wechat.rs:483-487 | crates/zeroclaw-channels/src/wechat.rs:507-511 | crates/zeroclaw-channels/src/wechat.rs:532-536 | crates/zeroclaw-channels/src/wechat.rs:542-546 | crates/zeroclaw-providers/src/azure_openai.rs:120-124 | crates/zeroclaw-providers/src/openai.rs:151-155 | crates/zeroclaw-runtime/src/security/vulnerability.rs:73-77 | crates/zeroclaw-tools/src/notion_tool.rs:38-42 | crates/zeroclaw-tools/src/pipeline.rs:354-358 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/azure_openai.rs\u0060 and \u0060crates/zeroclaw-providers/src/openai.rs\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 226 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/zeroclaw-channels/src/gmail_push.rs:699\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/zeroclaw-channels/src/gmail_push.rs"},"region":{"startLine":699}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f574759b704212a8c466c0ca0ffba19dc6ba357910952656d653ce1b92f05c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 11): crates/zeroclaw-runtime/src/live_config_authority.rs:1514-1518 | crates/zeroclaw-tools/src/microsoft365/mod.rs:81-85 | crates/zeroclaw-tools/src/microsoft365/mod.rs:113-117 | crates/zeroclaw-tools/src/microsoft365/mod.rs:163-167 | crates/zeroclaw-tools/src/microsoft365/mod.rs:216-220 | crates/zeroclaw-tools/src/microsoft365/mod.rs:246-250 | crates/zeroclaw-tools/src/microsoft365/mod.rs:303-307 | crates/zeroclaw-tools/src/microsoft365/mod.rs:341-345 | crates/zeroclaw-tools/src/microsoft365/mod.rs:414-418 | crates/zeroclaw-tools/src/microsoft365/mod.rs:470-474 | crates/zeroclaw-tools/src/microsoft365/mod.rs:544-548 \u2014 there are 11 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 11 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/zeroclaw-runtime/src/live_config_authority.rs:1514\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/zeroclaw-runtime/src/live_config_authority.rs"},"region":{"startLine":1514}}}],"partialFingerprints":{"codehealthFindingId/v1":"c91329a0c358a75366a4b9f30337768c61cada950774d5bc7c8120f70791707d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 11): crates/zeroclaw-runtime/src/tools/read_skill.rs:54-58 | crates/zeroclaw-runtime/src/tools/schedule.rs:349-353 | crates/zeroclaw-runtime/src/tools/send_message_to_peer.rs:151-155 | crates/zeroclaw-runtime/src/tools/send_message_to_peer.rs:168-172 | crates/zeroclaw-runtime/src/tools/send_message_to_peer.rs:185-189 | crates/zeroclaw-tools/src/ask_user.rs:106-110 | crates/zeroclaw-tools/src/escalate.rs:192-196 | crates/zeroclaw-tools/src/file_download.rs:487-491 | crates/zeroclaw-tools/src/file_download.rs:505-509 | crates/zeroclaw-tools/src/poll.rs:202-206 | crates/zeroclaw-tools/src/pushover.rs:163-167 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/ask_user.rs\u0060 and \u0060crates/zeroclaw-tools/src/escalate.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 96 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/zeroclaw-runtime/src/tools/read_skill.rs:54\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/zeroclaw-runtime/src/tools/read_skill.rs"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"d12200395992e6e77bed5d6dfcbae4d38fa227170c8b59a029750b45a0647012"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 10): crates/zeroclaw-channels/src/nextcloud_talk.rs:716-722 | crates/zeroclaw-channels/src/orchestrator/mod.rs:14880-14884 | crates/zeroclaw-channels/src/transcription.rs:1083-1087 | crates/zeroclaw-runtime/src/tools/mod.rs:2608-2614 | crates/zeroclaw-runtime/src/tools/mod.rs:2719-2723 | crates/zeroclaw-runtime/src/tools/mod.rs:2759-2763 | crates/zeroclaw-runtime/src/tools/mod.rs:2807-2811 | crates/zeroclaw-runtime/src/tools/mod.rs:2884-2890 | crates/zeroclaw-runtime/src/tools/mod.rs:2912-2916 | crates/zeroclaw-tools/src/web_fetch.rs:572-580 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/nextcloud_talk.rs\u0060 and \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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/zeroclaw-channels/src/nextcloud_talk.rs:716\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/zeroclaw-channels/src/nextcloud_talk.rs"},"region":{"startLine":716}}}],"partialFingerprints":{"codehealthFindingId/v1":"05afc56ca2e0d082a84f6a994a85268b4ed1471d95908597fbbee1dadf9a1436"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 10): crates/zeroclaw-channels/src/slack.rs:1289-1294 | crates/zeroclaw-channels/src/slack.rs:1345-1350 | crates/zeroclaw-channels/src/slack.rs:1595-1600 | crates/zeroclaw-channels/src/slack.rs:2199-2204 | crates/zeroclaw-channels/src/slack.rs:2679-2684 | crates/zeroclaw-channels/src/slack.rs:3970-3975 | crates/zeroclaw-channels/src/slack.rs:4202-4207 | crates/zeroclaw-channels/src/slack.rs:5398-5403 | crates/zeroclaw-channels/src/slack.rs:5749-5754 | crates/zeroclaw-channels/src/slack.rs:5794-5799 \u2014 all 10 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/zeroclaw-channels/src/slack.rs:1289\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":1289}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8036a676b7b941543389b006c82134a7322f3e5d5b3d0785fcbb0d708b687eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 10): crates/zeroclaw-tools/src/model_routing_config.rs:95-99 | crates/zeroclaw-tools/src/proxy_config.rs:24-28 | crates/zeroclaw-tools/src/web_search_tool.rs:389-393 | crates/zeroclaw-tools/src/web_search_tool.rs:611-615 | crates/zeroclaw-tools/src/web_search_tool.rs:787-791 | crates/zeroclaw-tools/src/web_search_tool.rs:926-930 | crates/zeroclaw-tools/src/web_search_tool.rs:1126-1130 | crates/zeroclaw-tools/src/web_search_tool.rs:1323-1327 | crates/zeroclaw-tools/src/web_search_tool.rs:1500-1504 | crates/zeroclaw-tools/src/web_search_tool.rs:1766-1770 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/model_routing_config.rs\u0060 and \u0060crates/zeroclaw-tools/src/proxy_config.rs\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 143 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/zeroclaw-tools/src/model_routing_config.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/zeroclaw-tools/src/model_routing_config.rs"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b97ad8bc0587cab8501b5c5652260733490da0e0229e547b4699061378a49ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 9): crates/zeroclaw-channels/src/imessage.rs:322-326 | crates/zeroclaw-channels/src/mattermost.rs:1000-1004 | crates/zeroclaw-channels/src/qq.rs:1285-1289 | crates/zeroclaw-channels/src/slack.rs:3770-3774 | crates/zeroclaw-channels/src/voice_wake.rs:405-412 | crates/zeroclaw-channels/src/voice_wake.rs:490-497 | crates/zeroclaw-memory/src/lib.rs:627-631 | crates/zeroclaw-providers/src/pricing.rs:534-538 | crates/zeroclaw-runtime/src/skills/review.rs:237-241 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/imessage.rs\u0060 and \u0060crates/zeroclaw-channels/src/qq.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \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/zeroclaw-channels/src/imessage.rs:322\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/zeroclaw-channels/src/slack.rs:3767\u0060 calls \u0060Some\u0060 and \u0060crates/zeroclaw-runtime/src/skills/review.rs:234\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/zeroclaw-channels/src/imessage.rs"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"c14124189a1970b4fb8dd2b55b7ee512a9e3fa762113f345e87451abd733f316"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 9): crates/zeroclaw-channels/src/matrix.rs:1205-1209 | crates/zeroclaw-channels/src/matrix.rs:2795-2799 | crates/zeroclaw-tools/src/model_routing_config.rs:113-117 | crates/zeroclaw-tools/src/proxy_config.rs:41-45 | crates/zeroclaw-tools/src/web_search_tool.rs:407-411 | crates/zeroclaw-tools/src/web_search_tool.rs:629-633 | crates/zeroclaw-tools/src/web_search_tool.rs:805-809 | crates/zeroclaw-tools/src/web_search_tool.rs:944-948 | crates/zeroclaw-tools/src/web_search_tool.rs:1784-1788 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/model_routing_config.rs\u0060 and \u0060crates/zeroclaw-tools/src/proxy_config.rs\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 143 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/zeroclaw-channels/src/matrix.rs:1205\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":1205}}}],"partialFingerprints":{"codehealthFindingId/v1":"e87a99d501368dc9bc62a3af6706316465c84c0c099c027dc26b90ba8a736550"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 9): crates/zeroclaw-tools/src/knowledge_tool.rs:163-168 | crates/zeroclaw-tools/src/knowledge_tool.rs:177-181 | crates/zeroclaw-tools/src/knowledge_tool.rs:192-197 | crates/zeroclaw-tools/src/knowledge_tool.rs:334-339 | crates/zeroclaw-tools/src/knowledge_tool.rs:348-352 | crates/zeroclaw-tools/src/knowledge_tool.rs:363-368 | crates/zeroclaw-tools/src/knowledge_tool.rs:410-415 | crates/zeroclaw-tools/src/knowledge_tool.rs:493-498 | crates/zeroclaw-tools/src/knowledge_tool.rs:753-758 \u2014 all 9 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/zeroclaw-tools/src/knowledge_tool.rs: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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/zeroclaw-tools/src/knowledge_tool.rs:408\u0060 calls \u0060or_else\u0060, \u0060get\u0060 and \u0060crates/zeroclaw-tools/src/knowledge_tool.rs:161\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/zeroclaw-tools/src/knowledge_tool.rs"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"90d4fc450357f7c3105423656ce726693fbdef61c878ffaf6d250de16d07c528"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 9): crates/zeroclaw-tools/src/model_routing_config.rs:205-209 | crates/zeroclaw-tools/src/model_routing_config.rs:345-350 | crates/zeroclaw-tools/src/model_routing_config.rs:376-380 | crates/zeroclaw-tools/src/model_routing_config.rs:398-402 | crates/zeroclaw-tools/src/model_routing_config.rs:430-434 | crates/zeroclaw-tools/src/model_routing_config.rs:462-466 | crates/zeroclaw-tools/src/model_routing_config.rs:490-494 | crates/zeroclaw-tools/src/proxy_config.rs:107-111 | crates/zeroclaw-tools/src/proxy_config.rs:138-143 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/model_routing_config.rs\u0060 and \u0060crates/zeroclaw-tools/src/proxy_config.rs\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 143 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/zeroclaw-tools/src/model_routing_config.rs:205\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/zeroclaw-tools/src/model_routing_config.rs"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"11398d1beb97d55b46ed16db6be916336bac1489b6301d6dcc690ee857e8bf95"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 8): crates/zeroclaw-providers/src/anthropic.rs:3589-3593 | crates/zeroclaw-providers/src/compatible.rs:3016-3020 | crates/zeroclaw-providers/src/compatible.rs:5029-5033 | crates/zeroclaw-providers/src/compatible.rs:5208-5212 | crates/zeroclaw-providers/src/compatible.rs:5352-5356 | crates/zeroclaw-providers/src/openai.rs:1586-1590 | crates/zeroclaw-providers/src/openai_codex.rs:1679-1683 | crates/zeroclaw-providers/src/openrouter.rs:983-987 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/compatible.rs\u0060 and \u0060crates/zeroclaw-providers/src/openai.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \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/zeroclaw-providers/src/anthropic.rs:3589\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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":3589}}}],"partialFingerprints":{"codehealthFindingId/v1":"01a1a63372a063d6f0356a0f142829d239686746316111d78686c59b85dd334e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 7): crates/zeroclaw-channels/src/notion.rs:498-502 | crates/zeroclaw-channels/src/orchestrator/mod.rs:11216-11223 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15086-15090 | crates/zeroclaw-gateway/src/ws.rs:840-844 | crates/zeroclaw-runtime/src/observability/mod.rs:398-405 | crates/zeroclaw-runtime/src/tools/mod.rs:3732-3736 | crates/zeroclaw-runtime/src/tools/mod.rs:3764-3769 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs\u0060 and \u0060crates/zeroclaw-gateway/src/ws.rs\u0060 as WHOLE FILES: this scan already matched 7 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/zeroclaw-channels/src/notion.rs:498\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/zeroclaw-channels/src/orchestrator/mod.rs:11227\u0060 calls \u0060Err\u0060 and \u0060crates/zeroclaw-channels/src/notion.rs:506\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/zeroclaw-channels/src/notion.rs"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"21f21818b26f13edb4299319c220bdffa3f872dd166caebad6cacbcc5e779269"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 7): crates/zeroclaw-runtime/src/tools/delegate.rs:3041-3046 | crates/zeroclaw-runtime/src/tools/delegate.rs:4091-4096 | crates/zeroclaw-tools/src/claude_code.rs:105-109 | crates/zeroclaw-tools/src/claude_code_runner.rs:127-131 | crates/zeroclaw-tools/src/codex_cli.rs:108-112 | crates/zeroclaw-tools/src/gemini_cli.rs:88-92 | crates/zeroclaw-tools/src/opencode_cli.rs:88-92 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/claude_code.rs\u0060 and \u0060crates/zeroclaw-tools/src/claude_code_runner.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 68 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/zeroclaw-runtime/src/tools/delegate.rs:3041\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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":3041}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9a0384136183c89e9eaed5ceb80d7e5e4f268c32b779f776415903c55769e5c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 6): crates/zeroclaw-channels/src/gmail_push.rs:208-215 | crates/zeroclaw-channels/src/gmail_push.rs:286-290 | crates/zeroclaw-channels/src/gmail_push.rs:340-344 | crates/zeroclaw-channels/src/gmail_push.rs:594-601 | crates/zeroclaw-channels/src/linq.rs:345-350 | crates/zeroclaw-channels/src/whatsapp.rs:808-812 \u2014 there are 6 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 6 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/zeroclaw-channels/src/gmail_push.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. 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/zeroclaw-channels/src/gmail_push.rs"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"49f852f3310f0895dda3e3e1e06ee1266252a153a2db431346db213072031cd4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 6): crates/zeroclaw-runtime/src/sop/engine.rs:2580-2584 | crates/zeroclaw-runtime/src/sop/engine.rs:2891-2895 | crates/zeroclaw-runtime/src/sop/engine.rs:4083-4088 | crates/zeroclaw-runtime/src/sop/engine.rs:4751-4756 | crates/zeroclaw-runtime/src/sop/engine.rs:5657-5661 | crates/zeroclaw-runtime/src/sop/engine.rs:6063-6067 \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/zeroclaw-runtime/src/sop/engine.rs:2580\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":2580}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7f57d12ae04159ec11c4590a1caebe5b4bc480f66f2a015ecdccc2adabbc3c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 6): crates/zeroclaw-runtime/src/tools/schedule.rs:115-120 | crates/zeroclaw-runtime/src/tools/security_ops.rs:470-474 | crates/zeroclaw-tools/src/composio.rs:616-620 | crates/zeroclaw-tools/src/knowledge_tool.rs:128-132 | crates/zeroclaw-tools/src/linkedin.rs:163-167 | crates/zeroclaw-tools/src/project_intel.rs:544-548 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 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 6 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/tools/schedule.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/zeroclaw-runtime/src/tools/schedule.rs"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f3c5cac9d254d0c94b4d2f577afaf188e280d782970081db56adb717da5d7f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 5): crates/zeroclaw-channels/src/discord/markers.rs:837-842 | crates/zeroclaw-channels/src/matrix.rs:3336-3341 | crates/zeroclaw-channels/src/whatsapp_web.rs:3097-3101 | crates/zeroclaw-providers/src/auth/mod.rs:1278-1284 | crates/zeroclaw-providers/src/auth/mod.rs:1533-1539 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/discord/markers.rs\u0060 and \u0060crates/zeroclaw-channels/src/matrix.rs\u0060 as WHOLE FILES: this scan already matched 8 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/zeroclaw-channels/src/discord/markers.rs:837\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/zeroclaw-channels/src/discord/markers.rs"},"region":{"startLine":837}}}],"partialFingerprints":{"codehealthFindingId/v1":"02cbd1b5515a28a92793f5b205123080e99dd3e983812276d3fa52042e0bfa0e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5): crates/zeroclaw-channels/src/matrix.rs:1207-1212 | crates/zeroclaw-channels/src/matrix.rs:1238-1243 | crates/zeroclaw-channels/src/matrix.rs:1256-1261 | crates/zeroclaw-runtime/src/tools/file_read.rs:271-276 | crates/zeroclaw-tools/src/pushover.rs:49-54 \u2014 there are 5 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 5 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/zeroclaw-channels/src/matrix.rs:1207\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":1207}}}],"partialFingerprints":{"codehealthFindingId/v1":"273caeb3f3c406ca46a30e11d7ad8d3c10612d698ea731d574f33ead2f87fadb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 5): crates/zeroclaw-channels/src/notion.rs:115-122 | crates/zeroclaw-providers/src/gemini_cli.rs:167-171 | crates/zeroclaw-providers/src/kilocli.rs:164-168 | crates/zeroclaw-tools/src/web_fetch.rs:271-277 | crates/zeroclaw-tools/src/web_fetch.rs:301-305 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/gemini_cli.rs\u0060 and \u0060crates/zeroclaw-providers/src/kilocli.rs\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 164 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/zeroclaw-channels/src/notion.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/zeroclaw-channels/src/notion.rs"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfd39737ea3675671c44f3c079e2d7d9143f71f1520704b0bb8f9486747683fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 5): crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1187-1192 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1210-1214 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1527-1532 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1550-1554 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:2430-2434 \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/zeroclaw-channels/src/orchestrator/acp_server.rs:1187\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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":1187}}}],"partialFingerprints":{"codehealthFindingId/v1":"226c719af74c1186c8bd483dd283d807c8acc29e662bc65bc9ee75674ba4c903"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 5): crates/zeroclaw-channels/src/orchestrator/acp_server.rs:2353-2357 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:3252-3256 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:3272-3276 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:3283-3287 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:3294-3298 \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/zeroclaw-channels/src/orchestrator/acp_server.rs:2353\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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":2353}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca5a4ae01669df97fa46d74a7e5bc9df453e1a706806a4685a7959fec7e77afb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 5): crates/zeroclaw-gateway/src/api_plugins.rs:167-172 | crates/zeroclaw-gateway/src/api_plugins.rs:236-241 | crates/zeroclaw-gateway/src/api_plugins.rs:257-262 | crates/zeroclaw-runtime/src/daemon/mod.rs:844-848 | crates/zeroclaw-runtime/src/tools/skill_http.rs:194-198 \u2014 there are 5 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 5 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/zeroclaw-gateway/src/api_plugins.rs:167\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/zeroclaw-gateway/src/api_plugins.rs"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a1c54259fd3ffe92132d8a582e254595e3840f7d24faa86f422bd77a56061e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 5): crates/zeroclaw-memory/src/lib.rs:829-833 | crates/zeroclaw-memory/src/lib.rs:844-848 | crates/zeroclaw-memory/src/lib.rs:919-923 | crates/zeroclaw-runtime/src/enroll/mod.rs:533-538 | crates/zeroclaw-runtime/src/enroll/mod.rs:578-583 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-memory/src/lib.rs:829\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/zeroclaw-memory/src/lib.rs"},"region":{"startLine":829}}}],"partialFingerprints":{"codehealthFindingId/v1":"38bca9c165a0199641c9019e27011271e6196453c92743990f2dab27712287e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 5): crates/zeroclaw-memory/src/sqlite.rs:1034-1038 | crates/zeroclaw-memory/src/sqlite.rs:1610-1615 | crates/zeroclaw-memory/src/sqlite.rs:1697-1701 | crates/zeroclaw-memory/src/sqlite.rs:1788-1792 | crates/zeroclaw-memory/src/sqlite.rs:2523-2527 \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/zeroclaw-memory/src/sqlite.rs:1034\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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":1034}}}],"partialFingerprints":{"codehealthFindingId/v1":"88907942e482f963b86a169eb3731117952c7c0a309419da7d89e6829fcd0aa2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): crates/zeroclaw-tools/src/microsoft365/graph_client.rs:88-94 | crates/zeroclaw-tools/src/microsoft365/graph_client.rs:157-163 | crates/zeroclaw-tools/src/microsoft365/graph_client.rs:277-283 | crates/zeroclaw-tools/src/microsoft365/graph_client.rs:340-346 | crates/zeroclaw-tools/src/microsoft365/graph_client.rs:417-423 \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/zeroclaw-tools/src/microsoft365/graph_client.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/zeroclaw-tools/src/microsoft365/graph_client.rs"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"65dba0dc5acc11cb3877043f3a9a9d8b912cdabe34847a1f26211398d61d3a7b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 5): crates/zeroclaw-tools/src/model_routing_config.rs:204-208 | crates/zeroclaw-tools/src/model_routing_config.rs:343-349 | crates/zeroclaw-tools/src/proxy_config.rs:106-110 | crates/zeroclaw-tools/src/proxy_config.rs:136-142 | crates/zeroclaw-tools/src/proxy_config.rs:267-271 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/model_routing_config.rs\u0060 and \u0060crates/zeroclaw-tools/src/proxy_config.rs\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 143 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/zeroclaw-tools/src/model_routing_config.rs:204\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/zeroclaw-tools/src/model_routing_config.rs"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"7709263297528433863549d7c5f46d0b1099de806072d045bf19122ba3288465"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5): crates/zeroclaw-tools/src/web_search_tool.rs:440-445 | crates/zeroclaw-tools/src/web_search_tool.rs:661-666 | crates/zeroclaw-tools/src/web_search_tool.rs:837-842 | crates/zeroclaw-tools/src/web_search_tool.rs:979-984 | crates/zeroclaw-tools/src/web_search_tool.rs:1358-1363 \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/zeroclaw-tools/src/web_search_tool.rs:440\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/zeroclaw-tools/src/web_search_tool.rs"},"region":{"startLine":440}}}],"partialFingerprints":{"codehealthFindingId/v1":"66e7b21fa79001d2755051e28008813296fd2a70613d222ca2eba3adab250a2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): crates/zeroclaw-channels/src/discord/mod.rs:401-406 | crates/zeroclaw-channels/src/discord/mod.rs:736-741 | crates/zeroclaw-runtime/src/restart.rs:215-219 | crates/zeroclaw-runtime/src/skills/review.rs:237-241 \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/zeroclaw-channels/src/discord/mod.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. 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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"591dbdd62de0ea26bd7e43892173da8ba80b803f662385dacd0d015b236ad05f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): crates/zeroclaw-channels/src/discord/mod.rs:1252-1257 | crates/zeroclaw-channels/src/discord/mod.rs:1298-1303 | crates/zeroclaw-channels/src/discord/mod.rs:1375-1379 | crates/zeroclaw-channels/src/discord/mod.rs:1398-1402 \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/zeroclaw-channels/src/discord/mod.rs:1252\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":1252}}}],"partialFingerprints":{"codehealthFindingId/v1":"91dd999b8f575467f1f6851a85e3aeca498e32abead66c17eb9e51c60ca072ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): crates/zeroclaw-channels/src/discord/rest.rs:104-108 | crates/zeroclaw-tools/src/image_info.rs:191-195 | crates/zeroclaw-tools/src/image_info.rs:217-221 | crates/zeroclaw-tools/src/pushover.rs:47-51 \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/zeroclaw-channels/src/discord/rest.rs:104\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/zeroclaw-channels/src/discord/rest.rs"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"96b5d84d19b8260344eceaa7ddd5bb171e3375fb4423dc384b4c92be50271be3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): crates/zeroclaw-channels/src/orchestrator/acp_server.rs:632-636 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:2392-2396 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:2815-2820 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:2874-2879 \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/zeroclaw-channels/src/orchestrator/acp_server.rs:632\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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":632}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d2ca64436d8a3a5a4b09f63806b092f2e32f8b6886bb4cdec53075c7c83a44c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 5): crates/zeroclaw-channels/src/orchestrator/mod.rs:11170-11177 | crates/zeroclaw-hardware/src/discover.rs:70-74 | crates/zeroclaw-tools/src/weather_tool.rs:178-182 | src/main.rs:14913-14917 | src/main.rs:14925-14929 \u2014 there are 5 copies across 4 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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:11170\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":11170}}}],"partialFingerprints":{"codehealthFindingId/v1":"74dac7686985113d15cea9f98733e28fdaef26e1f01ed8d0860c5d658d90ea5f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): crates/zeroclaw-channels/src/slack.rs:1596-1602 | crates/zeroclaw-channels/src/slack.rs:2680-2686 | crates/zeroclaw-channels/src/slack.rs:4833-4837 | crates/zeroclaw-channels/src/slack.rs:5066-5072 \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/zeroclaw-channels/src/slack.rs:1596\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/zeroclaw-channels/src/slack.rs:1595\u0060 calls \u0060from_str\u0060, \u0060unwrap_or_default\u0060 and \u0060crates/zeroclaw-channels/src/slack.rs:4831\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":1596}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac5cda1ae4707638d88f9e864a4e0d39dfbf908caa9bbba142a2a57da90701b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): crates/zeroclaw-channels/src/wechat.rs:2045-2050 | crates/zeroclaw-runtime/src/skills/suggestions.rs:270-274 | crates/zeroclaw-runtime/src/sop/engine.rs:6317-6321 | crates/zeroclaw-runtime/src/sop/engine.rs:6353-6357 \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/zeroclaw-channels/src/wechat.rs:2045\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/zeroclaw-channels/src/wechat.rs"},"region":{"startLine":2045}}}],"partialFingerprints":{"codehealthFindingId/v1":"aaa30c6e07c026320dd6243159d2d913c6bd0bb8bde26d9f5ce8fbea5a348105"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): crates/zeroclaw-gateway/src/acp.rs:75-79 | crates/zeroclaw-runtime/src/sop/mod.rs:189-193 | crates/zeroclaw-tools/src/file_download.rs:281-285 | src/main.rs:10352-10359 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/acp.rs:75\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/zeroclaw-gateway/src/acp.rs"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c319dea4fb1b810e00ce67f49d63549cee7148d861cff2b6e64c01c49180bad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): crates/zeroclaw-runtime/src/agent/loop_.rs:2237-2244 | crates/zeroclaw-runtime/src/agent/loop_.rs:2829-2836 | crates/zeroclaw-runtime/src/agent/loop_.rs:4226-4230 | crates/zeroclaw-runtime/src/agent/thinking.rs:172-176 \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/zeroclaw-runtime/src/agent/loop_.rs:2237\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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":2237}}}],"partialFingerprints":{"codehealthFindingId/v1":"2da7c9268595425a0ecaf3a4438fdc22af4e17fa76c2e0ad028f32b1c98b4e63"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): crates/zeroclaw-runtime/src/tools/file_read.rs:102-107 | crates/zeroclaw-tools/src/file_edit.rs:78-83 | crates/zeroclaw-tools/src/file_write.rs:74-79 | crates/zeroclaw-tools/src/image_info.rs:152-157 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/tools/file_read.rs:102\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/zeroclaw-runtime/src/tools/file_read.rs"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"3102f126a84c7ca3e8d859adc31d8886722f212ba3ca9ef9617439a53d755ea6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): crates/zeroclaw-tools/src/browser_open.rs:110-114 | crates/zeroclaw-tools/src/http_request.rs:566-570 | crates/zeroclaw-tools/src/text_browser.rs:298-302 | crates/zeroclaw-tools/src/web_fetch.rs:449-453 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/http_request.rs\u0060 and \u0060crates/zeroclaw-tools/src/web_fetch.rs\u0060 as WHOLE FILES: this scan already matched 9 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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/browser_open.rs:110\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/zeroclaw-tools/src/browser_open.rs"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"54fed4e2e7cdd0b6d95cd0e07eea25fa9ad6a0114421b6571fbe5cb07bb6a5fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/zeroclaw-channels/src/discord/mod.rs:3894-3898 | crates/zeroclaw-channels/src/mattermost.rs:847-851 | crates/zeroclaw-channels/src/mattermost.rs:922-927 \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/zeroclaw-channels/src/discord/mod.rs:3894\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":3894}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7e9b2fae954fcc3acae3a4b28a88bd062b159ae32894261e132d2703c387d24"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/zeroclaw-channels/src/lark.rs:3430-3434 | crates/zeroclaw-channels/src/lark.rs:3452-3459 | crates/zeroclaw-channels/src/lark.rs:3586-3590 \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/zeroclaw-channels/src/lark.rs:3430\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":3430}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0f1dddb06abc1892c719b1420d3b15325b37991133cb35b12f26bba03e9d543"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/zeroclaw-channels/src/line.rs:1209-1213 | crates/zeroclaw-channels/src/voice_call.rs:469-473 | crates/zeroclaw-channels/src/webhook.rs:153-157 \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/zeroclaw-channels/src/line.rs:1209\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/zeroclaw-channels/src/line.rs"},"region":{"startLine":1209}}}],"partialFingerprints":{"codehealthFindingId/v1":"3032c36d2df5299d7f530f8a70cbb031d3abe5f41b636051928d262b0d5badb0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/zeroclaw-channels/src/matrix.rs:4799-4803 | crates/zeroclaw-channels/src/matrix.rs:5182-5189 | crates/zeroclaw-channels/src/matrix.rs:5266-5273 \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/zeroclaw-channels/src/matrix.rs:4799\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":4799}}}],"partialFingerprints":{"codehealthFindingId/v1":"16744e9d946dce21f703f49f33438d7cacab53cf3867cada6db93c4e49a8904e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/zeroclaw-channels/src/orchestrator/mod.rs:6774-6778 | crates/zeroclaw-channels/src/orchestrator/mod.rs:8240-8244 | crates/zeroclaw-channels/src/orchestrator/mod.rs:10847-10854 \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/zeroclaw-channels/src/orchestrator/mod.rs:6774\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":6774}}}],"partialFingerprints":{"codehealthFindingId/v1":"336ec441411eddd46473d4ffb118e1e9e08f08798ded1cff4788681298ef6ac2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/zeroclaw-config/src/schema.rs:23771-23775 | crates/zeroclaw-config/src/schema.rs:23815-23819 | crates/zeroclaw-runtime/src/daemon/mod.rs:929-933 \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/zeroclaw-config/src/schema.rs:23771\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/zeroclaw-config/src/schema.rs"},"region":{"startLine":23771}}}],"partialFingerprints":{"codehealthFindingId/v1":"b54f980ba144f252dcf96dba312a97bdd33ee523fa64438b0f0da31d2960cce6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): crates/zeroclaw-infra/src/acp_session_store.rs:1316-1326 | crates/zeroclaw-infra/src/acp_session_store.rs:1383-1393 | crates/zeroclaw-infra/src/acp_session_store.rs:3019-3029 \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/zeroclaw-infra/src/acp_session_store.rs:1316\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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":1316}}}],"partialFingerprints":{"codehealthFindingId/v1":"c408db0412cd64453370bd53b90a705a6bf3730cfb5b5041d7a9eea30c35ff52"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/zeroclaw-memory/src/sqlite.rs:1021-1025 | crates/zeroclaw-memory/src/sqlite.rs:2510-2514 | crates/zeroclaw-memory/src/sqlite.rs:2553-2557 \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/zeroclaw-memory/src/sqlite.rs:1021\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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":1021}}}],"partialFingerprints":{"codehealthFindingId/v1":"97cd9b824be8eaedcf776b50f958926665847ee3ff88bdc129b6657fd89aec7a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/zeroclaw-providers/src/auth/mod.rs:1281-1285 | crates/zeroclaw-providers/src/auth/openai_oauth.rs:258-262 | crates/zeroclaw-providers/src/auth/openai_oauth.rs:269-273 \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/zeroclaw-providers/src/auth/mod.rs:1281\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/zeroclaw-providers/src/auth/mod.rs"},"region":{"startLine":1281}}}],"partialFingerprints":{"codehealthFindingId/v1":"82c50fb29eed0754b1d59606186a8936d8469e407f49bb6e60c448a8230b043c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/zeroclaw-providers/src/openai_codex.rs:1094-1098 | crates/zeroclaw-providers/src/openai_codex.rs:1109-1114 | crates/zeroclaw-providers/src/openai_codex.rs:1126-1130 \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/zeroclaw-providers/src/openai_codex.rs:1094\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/zeroclaw-providers/src/openai_codex.rs"},"region":{"startLine":1094}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e9890714383af193887ea836b7ae8c54fa19acf4e675b5a812d3d6284174271"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (1\u20135 lines \u00D7 4): crates/zeroclaw-runtime/src/agent/dispatcher.rs:193-193 | crates/zeroclaw-runtime/src/agent/tool_execution.rs:69-73 | crates/zeroclaw-runtime/src/agent/turn/mod.rs:3873-3877 | crates/zeroclaw-runtime/src/agent/turn/results_collect.rs:88-93 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/agent/dispatcher.rs:193\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/zeroclaw-runtime/src/agent/dispatcher.rs"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"67b1435a896803187f3a4da81cd88ca2f84bf89aa93f800d5342744b59c10e6a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/zeroclaw-runtime/src/agent/tool_execution.rs:533-537 | crates/zeroclaw-runtime/src/agent/tool_execution.rs:584-588 | crates/zeroclaw-runtime/src/agent/tool_execution.rs:630-634 \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/zeroclaw-runtime/src/agent/tool_execution.rs:533\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/zeroclaw-runtime/src/agent/tool_execution.rs"},"region":{"startLine":533}}}],"partialFingerprints":{"codehealthFindingId/v1":"9def3ae7430957ca7f96d51640f990353dcc7eae770fecf106c2cfdd3bbcfe5e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/zeroclaw-runtime/src/plugin_state.rs:104-108 | crates/zeroclaw-runtime/src/plugin_state.rs:141-145 | crates/zeroclaw-runtime/src/plugin_state.rs:217-221 \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/zeroclaw-runtime/src/plugin_state.rs:104\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/zeroclaw-runtime/src/plugin_state.rs"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e6f73c41d1b5210ca453740fa1df6438ff9255194c3b6dbd4639f7f7d6730e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/zeroclaw-runtime/src/rpc/dispatch.rs:3138-3142 | crates/zeroclaw-runtime/src/sop/executor.rs:1514-1518 | crates/zeroclaw-runtime/src/sop/executor.rs:1525-1529 \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/zeroclaw-runtime/src/rpc/dispatch.rs:3138\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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":3138}}}],"partialFingerprints":{"codehealthFindingId/v1":"70ce84433c91ca91a0ef856dd4c4faed14c8d23ba8dcc8a03444a223ff82358a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/zeroclaw-runtime/src/security/audit.rs:306-310 | crates/zeroclaw-runtime/src/security/audit.rs:414-418 | crates/zeroclaw-runtime/src/security/audit.rs:778-782 \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/zeroclaw-runtime/src/security/audit.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/zeroclaw-runtime/src/security/audit.rs"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"c517ce67a8e34df183da0939d8ad7e6c2882d400801d0ce7c13840b70e118cac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/zeroclaw-runtime/src/tools/skill_manage.rs:713-719 | crates/zeroclaw-runtime/src/tools/skill_manage.rs:730-736 | crates/zeroclaw-runtime/src/tools/skill_manage.rs:741-747 \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/zeroclaw-runtime/src/tools/skill_manage.rs:713\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/zeroclaw-runtime/src/tools/skill_manage.rs"},"region":{"startLine":713}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c72bb61c79880224f37f285731257ffd094cd36c07d3349cf943a2d3e1f361f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/zeroclaw-tools/src/model_routing_config.rs:408-412 | crates/zeroclaw-tools/src/model_routing_config.rs:440-444 | crates/zeroclaw-tools/src/model_routing_config.rs:472-476 \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/zeroclaw-tools/src/model_routing_config.rs:408\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/zeroclaw-tools/src/model_routing_config.rs"},"region":{"startLine":408}}}],"partialFingerprints":{"codehealthFindingId/v1":"05f07a90cca81bca3a307f5eac73510550a056cda499bffb764e1821c5763eeb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): apps/tauri/src/macos/permissions.rs:203-207 | apps/tauri/src/macos/permissions.rs:223-227 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/tauri/src/macos/permissions.rs:203\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":"apps/tauri/src/macos/permissions.rs"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"e237d5f4815c2876f4b4902fff0a370bf9498c683fec0edd8063efd5afe7e379"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): apps/zerocode/src/app.rs:2197-2204 | apps/zerocode/src/app.rs:2281-2285 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/app.rs:2197\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":"apps/zerocode/src/app.rs"},"region":{"startLine":2197}}}],"partialFingerprints":{"codehealthFindingId/v1":"85ab5ed7f8518973e66e99beb26e0cca4ad88798a1a22fecf945e88eac8edd81"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): apps/zerocode/src/client_crypto.rs:26-34 | crates/zeroclaw-tls/src/lib.rs:280-288 \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":"apps/zerocode/src/client_crypto.rs"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"7dcf7112ee796d943bfbb011d2bd2c4e63ff48f33d0e5f8445e72f66c2b06567"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-channels/src/discord/markers.rs:807-811 | crates/zeroclaw-channels/src/matrix.rs:3321-3325 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/discord/markers.rs\u0060 and \u0060crates/zeroclaw-channels/src/matrix.rs\u0060 as WHOLE FILES: this scan already matched 8 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/zeroclaw-channels/src/discord/markers.rs:807\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/zeroclaw-channels/src/discord/markers.rs"},"region":{"startLine":807}}}],"partialFingerprints":{"codehealthFindingId/v1":"7067db5497472959043517d8cbc619d9df27a5850114300d76c7cdd093cb9457"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-channels/src/discord/mod.rs:1649-1653 | crates/zeroclaw-tools/src/web_fetch.rs:300-304 \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/zeroclaw-channels/src/discord/mod.rs:1649\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":1649}}}],"partialFingerprints":{"codehealthFindingId/v1":"86ebf854e91399895e92a77ed4d5e6a0e6f0799d01852687e838218b238375d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-channels/src/discord/mod.rs:2085-2089 | crates/zeroclaw-channels/src/discord/mod.rs:2120-2126 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/discord/mod.rs:2085\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":2085}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5ef08e8a4e5670f951c87f97c44308334aeb819e0e1f463077c5eb3a0912f86"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (1\u20135 lines \u00D7 4): crates/zeroclaw-channels/src/discord/mod.rs:2304-2308 | crates/zeroclaw-channels/src/discord/mod.rs:2377-2377 | crates/zeroclaw-channels/src/discord/mod.rs:2575-2579 | crates/zeroclaw-channels/src/discord/mod.rs:3107-3108 \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/zeroclaw-channels/src/discord/mod.rs:2304\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":2304}}}],"partialFingerprints":{"codehealthFindingId/v1":"da2cac495169d6ffae51a378823b12870cdcde3af4addad915f18256c77a61c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u20135 lines \u00D7 3): crates/zeroclaw-channels/src/discord/mod.rs:2187-2188 | crates/zeroclaw-channels/src/discord/mod.rs:2405-2409 | crates/zeroclaw-channels/src/qq.rs:1588-1593 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/discord/mod.rs\u0060 and \u0060crates/zeroclaw-channels/src/qq.rs\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. 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/zeroclaw-channels/src/discord/mod.rs:2405\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":2187}}}],"partialFingerprints":{"codehealthFindingId/v1":"14cced56967680c1d2616c86fd7d068acdc8dcc2fb76dd4614a9f263a5ca1e93"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-channels/src/gmail_push.rs:642-646 | crates/zeroclaw-channels/src/gmail_push.rs:663-667 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/gmail_push.rs:642\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/zeroclaw-channels/src/gmail_push.rs"},"region":{"startLine":642}}}],"partialFingerprints":{"codehealthFindingId/v1":"5228cb29413da751c6a06eab1a7297610b9bfca066566b93f75fdb84cf70446d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-channels/src/line.rs:1210-1214 | crates/zeroclaw-channels/src/matrix.rs:2223-2227 \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/zeroclaw-channels/src/line.rs:1210\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/zeroclaw-channels/src/line.rs"},"region":{"startLine":1210}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdd19eca407e20078e899ec90cb8e0dd3e17de391c0346b9c1b3881a7877537e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:5982-5986 | crates/zeroclaw-tools/src/model_routing_config.rs:807-812 \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/zeroclaw-channels/src/orchestrator/mod.rs:5982\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":5982}}}],"partialFingerprints":{"codehealthFindingId/v1":"f26a8c962bd7e2bf13a055f3b2e8518de0f479a95a2f2e0910cf501110ee97dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201320 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:7905-7914 | crates/zeroclaw-channels/src/orchestrator/mod.rs:8000-8019 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":7905}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb726c350e368b9c55c602b0f33d14bc0dded9afe8c0a686975c9533a4f0725d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:10179-10183 | crates/zeroclaw-runtime/src/routines/engine.rs:206-210 \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/zeroclaw-channels/src/orchestrator/mod.rs:10179\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":10179}}}],"partialFingerprints":{"codehealthFindingId/v1":"17570fb2d87a47b74347838b769cacc8aff4abb6eca55b3afb7cb7301fcfeb6f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:10393-10397 | crates/zeroclaw-channels/src/orchestrator/mod.rs:10779-10783 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:10393\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":10393}}}],"partialFingerprints":{"codehealthFindingId/v1":"901683ee8c52ece6280102b53f2fb3f4235d67c7ad99c42e7693b58ffc0ffceb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:11424-11431 | crates/zeroclaw-runtime/src/cron/scheduler.rs:1323-1330 \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/zeroclaw-channels/src/orchestrator/mod.rs:11424\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":11424}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfd473877b74b7f7b743fc704b0c8ac0c087bb0acc9935f6fee49e35ed371a07"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:13303-13308 | crates/zeroclaw-channels/src/orchestrator/mod.rs:14917-14922 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":13303}}}],"partialFingerprints":{"codehealthFindingId/v1":"e88bc9f618d63ad12dbf315859e6c64a18e47171b74ae684a41ef4dc15d9f887"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:14552-14557 | crates/zeroclaw-runtime/src/tools/mod.rs:3399-3403 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs\u0060 and \u0060crates/zeroclaw-runtime/src/tools/mod.rs\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 79 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/zeroclaw-channels/src/orchestrator/mod.rs:14552\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":14552}}}],"partialFingerprints":{"codehealthFindingId/v1":"04abeb010f291baa8da6d052fc59ab95c5c4f30a6836ac8d9e3c4f34e16aaa32"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:17157-17161 | crates/zeroclaw-providers/src/router.rs:702-706 \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/zeroclaw-channels/src/orchestrator/mod.rs:17157\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":17157}}}],"partialFingerprints":{"codehealthFindingId/v1":"51f216e9d3960afa7cc384187a4aafd599b2ceaa6a8351f3990fdd9bd27cae36"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-channels/src/qq.rs:476-481 | crates/zeroclaw-channels/src/wechat.rs:1811-1815 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/qq.rs\u0060 and \u0060crates/zeroclaw-channels/src/wechat.rs\u0060 as WHOLE FILES: this scan already matched 5 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. 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/zeroclaw-channels/src/qq.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. 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/zeroclaw-channels/src/qq.rs"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0ab7bc7f5091f6806fbcdcb8f887254da9e37ef7a4f8bd294a23ee61331c36e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u20135 lines \u00D7 3): crates/zeroclaw-channels/src/wechat.rs:491-495 | crates/zeroclaw-channels/src/wechat.rs:518-521 | crates/zeroclaw-channels/src/wechat.rs:550-554 \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/zeroclaw-channels/src/wechat.rs:491\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, \u0060crates/zeroclaw-channels/src/wechat.rs:518\u0060 calls \u0060try_from\u0060, \u0060as_slice\u0060, \u0060map_err\u0060 and \u0060crates/zeroclaw-channels/src/wechat.rs:491\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/zeroclaw-channels/src/wechat.rs"},"region":{"startLine":491}}}],"partialFingerprints":{"codehealthFindingId/v1":"2efadece9fe6db31ab760861201d5e18f7195e3db7d036d295935a5a4376ea29"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-config/src/schema_markdown.rs:682-687 | crates/zeroclaw-config/src/schema_markdown.rs:695-700 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-config/src/schema_markdown.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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/zeroclaw-config/src/schema_markdown.rs:694\u0060 calls \u0060type_label\u0060 and \u0060crates/zeroclaw-config/src/schema_markdown.rs:681\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/zeroclaw-config/src/schema_markdown.rs"},"region":{"startLine":682}}}],"partialFingerprints":{"codehealthFindingId/v1":"3197651a50f206d8b850e97ef6de06540509e61742eb5894d6bc2d23ead6b673"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-gateway/src/api_config.rs:497-501 | crates/zeroclaw-runtime/src/control_plane/reaper.rs:242-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/api_config.rs:497\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/zeroclaw-gateway/src/api_config.rs"},"region":{"startLine":497}}}],"partialFingerprints":{"codehealthFindingId/v1":"42c6699a1180dbcc6cfda1cd60f8f1c2e8f3f22e90bcd88f0531d7522d2861ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u20135 lines \u00D7 3): crates/zeroclaw-gateway/src/api_sections.rs:346-350 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:12012-12014 | xtask/src/cmd/mdbook/versions.rs:273-277 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/api_sections.rs:346\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/zeroclaw-gateway/src/api_sections.rs"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f29912564d0c15684da920a1f512ed974618521470f6c7555be75e169a3dfd5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-gateway/src/lib.rs:1713-1717 | crates/zeroclaw-gateway/src/lib.rs:1810-1815 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/lib.rs:1713\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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":1713}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef1a5eb86232055c297b287a9d82375a39088d1c32ff9553c3041cbecaa7338b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-gateway/src/lib.rs:3351-3355 | crates/zeroclaw-gateway/src/lib.rs:3888-3892 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/lib.rs:3351\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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":3351}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbdfa4e944d54b3ab4294b9a16e9df43c3c3eeb6e84760389c9e4aeb15f3db9e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-gateway/src/ws.rs:1142-1146 | crates/zeroclaw-gateway/src/ws.rs:2309-2313 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/ws.rs:1142\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/zeroclaw-gateway/src/ws.rs"},"region":{"startLine":1142}}}],"partialFingerprints":{"codehealthFindingId/v1":"54b24525011b7f48e41260debf960a4be58c55dcfabd081bd4bd54a98ac55fec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-hardware/src/device.rs:471-475 | crates/zeroclaw-hardware/src/device.rs:491-495 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-hardware/src/device.rs:471\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/zeroclaw-hardware/src/device.rs"},"region":{"startLine":471}}}],"partialFingerprints":{"codehealthFindingId/v1":"13fdbe191d9a5a09fa0645e0cef46153bbb1307e0bda481b480adda9a72e3ef0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-infra/src/acp_session_store.rs:1000-1004 | crates/zeroclaw-infra/src/acp_session_store.rs:1102-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-infra/src/acp_session_store.rs:1000\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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":1000}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec82af114d6e96c3032803a0e723540febf41e446f805d34e59be1fa8932e58f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-infra/src/acp_session_store.rs:1438-1442 | crates/zeroclaw-runtime/src/sop/store/sqlite.rs:685-689 \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/zeroclaw-infra/src/acp_session_store.rs:1438\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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":1438}}}],"partialFingerprints":{"codehealthFindingId/v1":"5088148323d9d78a0199dd147319d88ed8e6614a225a3ce8d2bc31736457f6fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-infra/src/acp_session_store.rs:1465-1469 | crates/zeroclaw-memory/src/sqlite.rs:1216-1220 \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/zeroclaw-infra/src/acp_session_store.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":1465}}}],"partialFingerprints":{"codehealthFindingId/v1":"3138716841882b47f3a37db8a472afbc6d34079aa1553e7b01786a130740449f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-infra/src/net_guard.rs:583-587 | crates/zeroclaw-infra/src/net_guard.rs:608-615 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-infra/src/net_guard.rs:583\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/zeroclaw-infra/src/net_guard.rs"},"region":{"startLine":583}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2190910a022e68e0f536a3ba20e1dc598268067bcdecb5940690af51f9969b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-memory/src/sqlite.rs:427-433 | crates/zeroclaw-memory/src/sqlite.rs:1880-1886 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-memory/src/sqlite.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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"12cf106c267fa76d73628fdeb72ca37bb7d01b4961402881985c5ae3e96b7944"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-memory/src/sqlite.rs:1684-1688 | crates/zeroclaw-memory/src/sqlite.rs:1730-1734 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-memory/src/sqlite.rs:1684\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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":1684}}}],"partialFingerprints":{"codehealthFindingId/v1":"145f042bc218a0795ffcfd8ee33355629d0a8bfc536aa80acaa2de2ad983b267"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-providers/src/anthropic.rs:2527-2532 | crates/zeroclaw-runtime/src/agent/turn/stream_consume.rs:242-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/anthropic.rs:2527\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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":2527}}}],"partialFingerprints":{"codehealthFindingId/v1":"5715c0b2e0b72254a3e4d94fe2a804534a7bdc3464d844e3291aafebd9dcb192"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-runtime/src/cron/store.rs:177-181 | crates/zeroclaw-runtime/src/cron/store.rs:240-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/cron/store.rs"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbdd5d2942306969ab54d724f3659dc258d2df729596b87f6ceb306edf5d8014"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-runtime/src/daemon/mod.rs:1839-1843 | crates/zeroclaw-runtime/src/observability/mod.rs:398-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/daemon/mod.rs:1839\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/zeroclaw-runtime/src/daemon/mod.rs"},"region":{"startLine":1839}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bc6164694346df5f9aab08f3cf097dd950a9fbd539ba82c4bb384641d684bc0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-runtime/src/enroll/mod.rs:430-434 | crates/zeroclaw-runtime/src/security/cert_ledger.rs:905-909 \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/zeroclaw-runtime/src/enroll/mod.rs:430\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/zeroclaw-runtime/src/enroll/mod.rs"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"db87811d7c14b7a03d5599e5ce7c9edb89015b0fd3e66cb32c28a2691fee343f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-runtime/src/hooks/builtin/webhook_audit.rs:108-112 | crates/zeroclaw-tools/src/http_request.rs:208-212 \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/zeroclaw-runtime/src/hooks/builtin/webhook_audit.rs"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"112ac980139c26f7b9fc2f0f8430a9184487f824935c578d0064fd64113cd3a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-runtime/src/hooks/runner.rs:102-107 | crates/zeroclaw-runtime/src/tools/mod.rs:3732-3736 \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/zeroclaw-runtime/src/hooks/runner.rs:102\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/zeroclaw-runtime/src/hooks/runner.rs"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"713505dd3136ecf8622ddfb3887bcf093e4996a88d63f8925f58737a5387cc46"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-runtime/src/hooks/runner.rs:331-335 | crates/zeroclaw-runtime/src/hooks/runner.rs:443-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/hooks/runner.rs:331\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/zeroclaw-runtime/src/hooks/runner.rs"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5079ff29997de86ac0cc8c7aae77c7a564313c0cd90a777acdfccb904818ee2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/rpc/dispatch.rs:10003-10008 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:10741-10746 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":10003}}}],"partialFingerprints":{"codehealthFindingId/v1":"db39ab145f49a83e31bc53dc747e71398925bf53f11ff2e7787504fb3b9d5c43"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-runtime/src/rpc/session.rs:1853-1864 | crates/zeroclaw-runtime/src/rpc/session.rs:2636-2647 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/rpc/session.rs:1853\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/zeroclaw-runtime/src/rpc/session.rs"},"region":{"startLine":1853}}}],"partialFingerprints":{"codehealthFindingId/v1":"065d9e2789df3dafc02d06855d4b51cc77d7cfd619d36f8a03039b1aa6fe2d7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-runtime/src/rpc/turn.rs:331-335 | crates/zeroclaw-runtime/src/rpc/turn.rs:344-348 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/rpc/turn.rs:331\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/zeroclaw-runtime/src/rpc/turn.rs"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdd441e5cc41e032c1dbafcfa801026f4634de444584c5f4d02b7f016ecc8ba3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-runtime/src/security/landlock.rs:314-318 | crates/zeroclaw-tools/src/microsoft365/auth.rs:114-121 \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/zeroclaw-runtime/src/security/landlock.rs:314\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/zeroclaw-runtime/src/security/landlock.rs"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"c57d30a1c27d2600f4d50b8b8fee0fc5741951d4c404b992083109662e8cff83"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/approval/channel_route.rs:132-136 | crates/zeroclaw-runtime/src/sop/binding.rs:186-190 \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/zeroclaw-runtime/src/sop/approval/channel_route.rs:132\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/zeroclaw-runtime/src/sop/approval/channel_route.rs"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ff5eb0c9e116c80f3daae51482f48c7e88f7b87c819599ea73ea0fca07ef6a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/engine.rs:1350-1354 | crates/zeroclaw-runtime/src/sop/engine.rs:1826-1831 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/engine.rs:1350\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":1350}}}],"partialFingerprints":{"codehealthFindingId/v1":"590d4153f434f3a0578128af28bbb2a41b389c664385bbff63fefce1465c25f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/metrics.rs:147-151 | crates/zeroclaw-runtime/src/sop/metrics.rs:305-309 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/metrics.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/zeroclaw-runtime/src/sop/metrics.rs"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cec5e11c1d13abbab1c8286aab1288e610429e41a7ccf5c8fd2ad59cbd9f9b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-runtime/src/tunnel/pinggy.rs:70-74 | crates/zeroclaw-runtime/src/tunnel/pinggy.rs:82-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/zeroclaw-runtime/src/tunnel/pinggy.rs:70\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/zeroclaw-runtime/src/tunnel/pinggy.rs"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b07f61ffdca58fae641d1b19c5a0a4a9af538ead3b7912a90eb1fdd561d3fe6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-tools/src/browser.rs:2425-2430 | crates/zeroclaw-tools/src/browser.rs:2609-2614 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/browser.rs:2425\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/zeroclaw-tools/src/browser.rs"},"region":{"startLine":2425}}}],"partialFingerprints":{"codehealthFindingId/v1":"c04427e271dcd8c2f97e2c6bcc38148fe9f9b4d92a1105a80b0d5080ebf90af8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-tools/src/browser_open.rs:278-283 | crates/zeroclaw-tools/src/browser_open.rs:290-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/zeroclaw-tools/src/browser_open.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/zeroclaw-tools/src/browser_open.rs"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"e648007e8a6cba26f31eed35bd4eb18387a76f307ebc9507b3d626f888f61021"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-tools/src/git_operations.rs:871-875 | crates/zeroclaw-tools/src/git_operations.rs:899-905 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/git_operations.rs:871\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/zeroclaw-tools/src/git_operations.rs"},"region":{"startLine":871}}}],"partialFingerprints":{"codehealthFindingId/v1":"f04220b970b12731d0024901336e3308907704a495a5940844110825af6f0784"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-tools/src/git_operations.rs:1770-1774 | crates/zeroclaw-tools/src/model_routing_config.rs:471-475 \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/zeroclaw-tools/src/git_operations.rs:1770\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/zeroclaw-tools/src/git_operations.rs"},"region":{"startLine":1770}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc0d2f31195495cab6e0856e1873fb1d18ca61264318c80e08423cdb538b0c6d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-tools/src/http_request.rs:773-777 | crates/zeroclaw-tools/src/web_fetch.rs:781-785 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/http_request.rs\u0060 and \u0060crates/zeroclaw-tools/src/web_fetch.rs\u0060 as WHOLE FILES: this scan already matched 9 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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/http_request.rs:773\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/zeroclaw-tools/src/http_request.rs"},"region":{"startLine":773}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bc317a0f70caee7c05d2e247ec2fb338098e5b2c66a6a72c7f9e2a10041773d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-tools/src/image_gen.rs:309-313 | crates/zeroclaw-tools/src/weather_tool.rs:405-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/zeroclaw-tools/src/image_gen.rs:309\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/zeroclaw-tools/src/image_gen.rs"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"460e8f8689db33bf784410a54b43c8d76a5d89880725841028951693decee7fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-tools/src/linkedin_client.rs:109-113 | crates/zeroclaw-tools/src/pushover.rs:81-85 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/linkedin_client.rs\u0060 and \u0060crates/zeroclaw-tools/src/pushover.rs\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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/linkedin_client.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/zeroclaw-tools/src/linkedin_client.rs"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"87d18b0fb5a9f0139632fd765c42d18f98509f07cd6c522ddc3d7a1d164d559e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-tools/src/mcp_client.rs:755-765 | crates/zeroclaw-tools/src/mcp_client.rs:791-795 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/mcp_client.rs:755\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/zeroclaw-tools/src/mcp_client.rs"},"region":{"startLine":755}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb20f5855fbb3e61a8f820dd6422bc3b3799f3a6eb0e7d77e9adac27e1505a84"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-tools/src/mcp_transport.rs:1088-1093 | crates/zeroclaw-tools/src/mcp_transport.rs:1114-1119 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-tools/src/mcp_transport.rs"},"region":{"startLine":1088}}}],"partialFingerprints":{"codehealthFindingId/v1":"48577a98f4ddec2e9c96e2d29468e4c864c587bdf293ed099564cafecd7cb382"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-tools/src/memory_forget.rs:46-50 | crates/zeroclaw-tools/src/memory_store.rs:54-58 \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/zeroclaw-tools/src/memory_forget.rs:46\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/zeroclaw-tools/src/memory_forget.rs"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff9e5bf949cc6def4122440494fe8bb883e9a2b9b768098cf06c0c5e0e7f7470"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-tools/src/pipeline.rs:187-191 | crates/zeroclaw-tools/src/pipeline.rs:237-241 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/pipeline.rs:187\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/zeroclaw-tools/src/pipeline.rs"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"23a9591544054f266c8a060c3626f4d6418af05095d80530ceb13c3e6e223f89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src/main.rs:12941-12945 | src/main.rs:13138-13142 \u2014 both copies are in the same file, so extract the block 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/main.rs"},"region":{"startLine":12941}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7ee06c8b3b9146d7975864dcadda1e812fbb785986ef02795b461c4e08170bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): apps/tauri/src/commands/channels.rs:6-11 | apps/tauri/src/commands/gateway.rs:6-11 \u2014 before extracting anything, compare \u0060apps/tauri/src/commands/channels.rs\u0060 and \u0060apps/tauri/src/commands/gateway.rs\u0060 as WHOLE FILES: 88% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. 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":"apps/tauri/src/commands/channels.rs"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4b6476ee29acbc41404d06d4a8888449887f335e7d1a309d18ff5a2cf6c71e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): apps/zerocode/src/chat.rs:6987-6996 | crates/zeroclaw-tools/src/content_search.rs:1089-1098 | crates/zeroclaw-tools/src/file_upload_bundle.rs:39-49 \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":"apps/zerocode/src/chat.rs"},"region":{"startLine":6987}}}],"partialFingerprints":{"codehealthFindingId/v1":"39c102f37b6eff0fc8bd4ba0ebbf3802c7e0e8928bb1d113c6bf020ef689b093"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): apps/zerocode/src/editor.rs:19-24 | src/skills/mod.rs:1288-1293 \u2014 before extracting anything, compare \u0060apps/zerocode/src/editor.rs\u0060 and \u0060src/skills/mod.rs\u0060 as WHOLE FILES: 95% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. 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":"apps/zerocode/src/editor.rs"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"610c17b4baf1dc3fd10592d013cb2b56af21c9482ce186c12039db5283883b7c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): apps/zerocode/src/editor.rs:26-32 | src/skills/mod.rs:1295-1301 \u2014 before extracting anything, compare \u0060apps/zerocode/src/editor.rs\u0060 and \u0060src/skills/mod.rs\u0060 as WHOLE FILES: 95% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. 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":"apps/zerocode/src/editor.rs"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7e2638c14bce4241a8d3f39748362d9a4f33a51f2c2b9fe80acb30563191301"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): apps/zerocode/src/enroll.rs:220-225 | crates/zeroclaw-runtime/src/enroll/mod.rs:631-636 | crates/zeroclaw-runtime/src/security/cert_ledger.rs:1483-1488 \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":"apps/zerocode/src/enroll.rs"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"e62859613a825bd4af2cbf25609d45df255ddcb7f207ac8984de10f465d9ccdd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): apps/zerocode/src/enroll.rs:454-461 | apps/zerorelay/src/enroll_proxy.rs:345-352 \u2014 before extracting anything, compare \u0060apps/zerocode/src/enroll.rs\u0060 and \u0060apps/zerorelay/src/enroll_proxy.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 49 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":"apps/zerocode/src/enroll.rs"},"region":{"startLine":454}}}],"partialFingerprints":{"codehealthFindingId/v1":"576f84ca9f59613a7ef1d5dbc250b1264889c4b06360fb6e7ffe06ec7167de78"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): apps/zerocode/src/jsonrpc.rs:45-52 | crates/zeroclaw-api/src/jsonrpc.rs:207-214 \u2014 before extracting anything, compare \u0060apps/zerocode/src/jsonrpc.rs\u0060 and \u0060crates/zeroclaw-api/src/jsonrpc.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/jsonrpc.rs"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d48f3ad7b223c2f57e4d3c7f707a1461d3dc28edd3d0c1ab1b9766e2e01b8f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): apps/zerocode/src/relay_proto.rs:62-71 | crates/zeroclaw-relay-proto/src/lib.rs:220-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":"apps/zerocode/src/relay_proto.rs"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"173d640966bb56cf983e63bc790428e41b54f3dc4849a22ee243188cc5c889e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): apps/zerocode/src/relay_proto.rs:74-79 | crates/zeroclaw-relay-proto/src/lib.rs:241-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/relay_proto.rs"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"512905bd8f44e9e5827c7719b18330b626bffd439c273168aa6d85888e1d17ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): apps/zerocode/src/relay_proto.rs:81-87 | crates/zeroclaw-relay-proto/src/lib.rs:250-256 \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":"apps/zerocode/src/relay_proto.rs"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe5d7362328fd432f65aa320af278e3f70aadb24fd2bc5ac9ff0b7a2e75f4731"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 6): crates/zeroclaw-channels/src/discord/mod.rs:297-303 | crates/zeroclaw-channels/src/lark.rs:1267-1273 | crates/zeroclaw-channels/src/mattermost.rs:682-688 | crates/zeroclaw-channels/src/slack.rs:636-642 | crates/zeroclaw-channels/src/telegram.rs:3380-3386 | crates/zeroclaw-channels/src/whatsapp_web.rs:657-663 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/discord/mod.rs\u0060 and \u0060crates/zeroclaw-channels/src/slack.rs\u0060 as WHOLE FILES: this scan already matched 4 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/zeroclaw-channels/src/discord/mod.rs:297\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"453c7df228601f3bde1b9e868038b67665e89e7b91a7f0d43c0b2967e78607a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/discord/mod.rs:1475-1482 | crates/zeroclaw-channels/src/signal.rs:1007-1014 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/discord/mod.rs\u0060 and \u0060crates/zeroclaw-channels/src/signal.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 53 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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":1475}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8b6fd5fe8edf45cc7ad87a30e8251a957888cb80bbac3f1a1ae56e4ee585f18"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-channels/src/git/providers/gitea/api.rs:71-77 | crates/zeroclaw-channels/src/git/providers/github/api.rs:105-111 \u2014 \u0060crates/zeroclaw-channels/src/git/providers/gitea/api.rs\u0060 and \u0060crates/zeroclaw-channels/src/git/providers/github/api.rs\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 6 separate duplicated blocks between them, totalling at least 61 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/git/providers/gitea/api.rs:71\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/zeroclaw-channels/src/git/providers/gitea/api.rs"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cdfd9e7841e7c93ef4bc591a842dbc35a17e0b847644d30a446138c22b68b8b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-channels/src/git/providers/gitea/api.rs:209-217 | crates/zeroclaw-channels/src/git/providers/github/api.rs:455-463 \u2014 \u0060crates/zeroclaw-channels/src/git/providers/gitea/api.rs\u0060 and \u0060crates/zeroclaw-channels/src/git/providers/github/api.rs\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 6 separate duplicated blocks between them, totalling at least 61 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/git/providers/gitea/api.rs:209\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/zeroclaw-channels/src/git/providers/gitea/api.rs"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"c87fb2f4018be5db8a131d6e47712d170e77805d7979ad2abe0b8fb135867620"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/git/providers/gitea/api.rs:224-231 | crates/zeroclaw-channels/src/git/providers/github/api.rs:471-478 \u2014 \u0060crates/zeroclaw-channels/src/git/providers/gitea/api.rs\u0060 and \u0060crates/zeroclaw-channels/src/git/providers/github/api.rs\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 6 separate duplicated blocks between them, totalling at least 61 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/git/providers/gitea/api.rs:224\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/zeroclaw-channels/src/git/providers/gitea/api.rs"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"fac31a1698d2ce5aa1d6949e6cc71bb53dce52a3ca953297928aa5c1b3939fbf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-channels/src/git/providers/gitea/api.rs:239-250 | crates/zeroclaw-channels/src/git/providers/github/api.rs:487-498 \u2014 \u0060crates/zeroclaw-channels/src/git/providers/gitea/api.rs\u0060 and \u0060crates/zeroclaw-channels/src/git/providers/github/api.rs\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 6 separate duplicated blocks between them, totalling at least 61 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/git/providers/gitea/api.rs:239\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/zeroclaw-channels/src/git/providers/gitea/api.rs"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffa293d309207c5ecc4fcf49239e9ac19f1480c75cb044f183e2032afa86f7ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-channels/src/mattermost.rs:486-491 | crates/zeroclaw-channels/src/slack.rs:1444-1449 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/mattermost.rs\u0060 and \u0060crates/zeroclaw-channels/src/slack.rs\u0060 as WHOLE FILES: this scan already matched 9 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":"crates/zeroclaw-channels/src/mattermost.rs"},"region":{"startLine":486}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2c3933a0706d333b9396530173981c02322fefcfad54958768099711a4dc2c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/zeroclaw-channels/src/mattermost.rs:1215-1221 | crates/zeroclaw-channels/src/telegram.rs:8899-8905 | crates/zeroclaw-channels/src/wechat.rs:3467-3473 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/mattermost.rs\u0060 and \u0060crates/zeroclaw-channels/src/telegram.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 36 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/zeroclaw-channels/src/mattermost.rs"},"region":{"startLine":1215}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9777ccb05b5b570a0451f62692bb18130299f39729ff5b2e3f4f218e26197e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): crates/zeroclaw-channels/src/qq.rs:135-150 | crates/zeroclaw-channels/src/telegram.rs:1031-1046 | crates/zeroclaw-channels/src/wechat.rs:329-344 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/qq.rs\u0060 and \u0060crates/zeroclaw-channels/src/telegram.rs\u0060 as WHOLE FILES: this scan already matched 3 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. 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/zeroclaw-channels/src/qq.rs"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d9a61afaefd3b38e8be5a9dc232181eae0dcf270b02b5112d14e4587703c1be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/slack.rs:1487-1494 | crates/zeroclaw-providers/src/gemini.rs:673-680 \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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":1487}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b80d07c7d82f4e9b4ba5b83140ab572b94a91a20d7e979a77be9da9446d5240"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-channels/src/util.rs:114-122 | crates/zeroclaw-runtime/src/util.rs:24-33 \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/zeroclaw-channels/src/util.rs"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a341e015ff4a577503bfbe239d44fb64ae9a7818b37f28ae91cd1b23a8ff082"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-config/src/platform/native.rs:344-349 | crates/zeroclaw-providers/src/openai_codex.rs:163-168 \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/zeroclaw-config/src/platform/native.rs"},"region":{"startLine":344}}}],"partialFingerprints":{"codehealthFindingId/v1":"cffb5ec204f4efbf1ebd94755dac7a77a391360dfe6125db153da049facc5baa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-config/src/schema.rs:14209-14216 | crates/zeroclaw-runtime/src/tools/shell.rs:145-152 \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/zeroclaw-config/src/schema.rs"},"region":{"startLine":14209}}}],"partialFingerprints":{"codehealthFindingId/v1":"59326dd076aca5264b1f91d2f8e57081d9dc02010ff4c37a85748d03ac557973"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-gateway/src/api_oidc.rs:385-389 | crates/zeroclaw-gateway/src/principal_gate.rs:278-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-gateway/src/api_oidc.rs"},"region":{"startLine":385}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b660f9a76412ed47764e65331d17ab354d24177267b083857e7a87f0001ef26"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/zeroclaw-gateway/src/dashboard_session.rs:1478-1482 | crates/zeroclaw-gateway/src/lib.rs:1285-1289 | crates/zeroclaw-gateway/src/ws.rs:416-420 \u2014 before extracting anything, compare \u0060crates/zeroclaw-gateway/src/lib.rs\u0060 and \u0060crates/zeroclaw-gateway/src/ws.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-gateway/src/dashboard_session.rs"},"region":{"startLine":1478}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef1b2594d444829ad38c64c1386b964766248d97b4606dd292746be743c73939"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/zeroclaw-hardware/src/peripherals/serial.rs:295-310 | crates/zeroclaw-hardware/src/peripherals/uno_q_bridge.rs:142-157 \u2014 before extracting anything, compare \u0060crates/zeroclaw-hardware/src/peripherals/serial.rs\u0060 and \u0060crates/zeroclaw-hardware/src/peripherals/uno_q_bridge.rs\u0060 as WHOLE FILES: this scan already matched 3 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-hardware/src/peripherals/serial.rs"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9efb90dc11c7b859e0bd3250fcddc38fb46a8b6432f76c50449cb65a818268d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-log/src/migrate.rs:190-198 | crates/zeroclaw-providers/src/grok_cli/acp.rs:422-430 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/zeroclaw-log/src/migrate.rs:187\u0060 calls \u0060Ok\u0060 and \u0060crates/zeroclaw-providers/src/grok_cli/acp.rs:419\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/zeroclaw-log/src/migrate.rs"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2dd85107e88e0ae752763a855785989bc046cf8dcbf911def767fd94443de94"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-memory/src/postgres.rs:240-247 | crates/zeroclaw-memory/src/qdrant.rs:536-543 \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/zeroclaw-memory/src/postgres.rs"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce6e9709bc2d9acda4190987a61efbce5f9e9a5fe1c328033716606d00d59cb5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): crates/zeroclaw-memory/src/postgres.rs:249-256 | crates/zeroclaw-memory/src/qdrant.rs:545-552 | crates/zeroclaw-memory/src/sqlite.rs:505-512 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:9491-9498 \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/zeroclaw-memory/src/postgres.rs"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b2a30ace00ebad0e921584e01bfb7a7245136c723ab3558e7bcbede195be1e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-memory/src/qdrant.rs:707-720 | crates/zeroclaw-memory/src/sqlite.rs:1630-1642 \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/zeroclaw-memory/src/qdrant.rs:707\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/zeroclaw-memory/src/qdrant.rs"},"region":{"startLine":707}}}],"partialFingerprints":{"codehealthFindingId/v1":"94ec70ced9a63c05812b29e8aa384251c7796d48585fb9fad90e77889e53fd9c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 6): crates/zeroclaw-providers/src/anthropic.rs:686-692 | crates/zeroclaw-providers/src/azure_openai.rs:229-235 | crates/zeroclaw-providers/src/compatible.rs:610-616 | crates/zeroclaw-providers/src/openai.rs:258-264 | crates/zeroclaw-providers/src/openai.rs:1070-1076 | crates/zeroclaw-providers/src/openrouter.rs:225-231 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/azure_openai.rs\u0060 and \u0060crates/zeroclaw-providers/src/compatible.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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":686}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a15def87988b3806a92f0e321518cca0462589d658a1c3b60de2fe84c9f7a03"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-providers/src/azure_openai.rs:65-72 | crates/zeroclaw-providers/src/openai.rs:79-86 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/azure_openai.rs\u0060 and \u0060crates/zeroclaw-providers/src/openai.rs\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 226 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/zeroclaw-providers/src/azure_openai.rs"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"56ba5ee433880ced831c8671582857ae78720c0e5594f269b4dd690aa30eb3bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/zeroclaw-providers/src/gemini_cli.rs:45-51 | crates/zeroclaw-providers/src/grok_cli.rs:351-357 | crates/zeroclaw-providers/src/kilocli.rs:45-51 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/gemini_cli.rs\u0060 and \u0060crates/zeroclaw-providers/src/kilocli.rs\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 164 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/zeroclaw-providers/src/gemini_cli.rs"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"4afde8272c402c7fcf660430a1043d5ac78be4a0c2434fb2a480bfaecddfaffc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-providers/src/gemini_cli.rs:274-285 | crates/zeroclaw-providers/src/kilocli.rs:271-282 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/gemini_cli.rs\u0060 and \u0060crates/zeroclaw-providers/src/kilocli.rs\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 164 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/zeroclaw-providers/src/gemini_cli.rs:274\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/zeroclaw-providers/src/gemini_cli.rs"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4e00110dd425b7f0ecd5e457b507336710053f6d5b0f731d15a8ced55985966"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-providers/src/lib.rs:1339-1344 | crates/zeroclaw-providers/src/telnyx.rs:97-102 \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/zeroclaw-providers/src/lib.rs:1339\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/zeroclaw-providers/src/lib.rs"},"region":{"startLine":1339}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4b403a53d19dff35fd3c207d9146f5ad4f5ac00d124b3b772072e1a7a2941fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-rpc-client/src/endpoint.rs:32-38 | crates/zeroclaw-runtime/src/rpc/local.rs:1234-1240 \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/zeroclaw-rpc-client/src/endpoint.rs"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4a4c496ec0694b7b3f832ae3453d4a15a11a219da3ef354c38a840698ff0ad5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-runtime/src/i18n.rs:327-336 | crates/zeroclaw-tools/src/i18n.rs:214-223 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/i18n.rs\u0060 and \u0060crates/zeroclaw-tools/src/i18n.rs\u0060 as WHOLE FILES: this scan already matched 5 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/zeroclaw-runtime/src/i18n.rs"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"65bcf0773e7fd5d6965cea0d0188fa2f208c49ebc63ffa70d899087ce1c93cfb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/security/bubblewrap.rs:192-197 | crates/zeroclaw-runtime/src/security/firejail.rs:291-296 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/security/bubblewrap.rs\u0060 and \u0060crates/zeroclaw-runtime/src/security/firejail.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 53 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/zeroclaw-runtime/src/security/bubblewrap.rs:192\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/zeroclaw-runtime/src/security/bubblewrap.rs"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e6e304a1b4340a910bb7b9c1162d40a890e0922094b34a4de88e06bbc50bcd8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-runtime/src/security/bubblewrap.rs:199-203 | crates/zeroclaw-runtime/src/security/firejail.rs:298-302 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/security/bubblewrap.rs\u0060 and \u0060crates/zeroclaw-runtime/src/security/firejail.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 53 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/zeroclaw-runtime/src/security/bubblewrap.rs"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e306353260c4c3be9e20ab6a3edabe375650bae8ef72fbc3ae98b91a00fa798"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-runtime/src/service/mod.rs:3385-3391 | crates/zeroclaw-tools/src/linkedin_client.rs:1277-1283 \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/zeroclaw-runtime/src/service/mod.rs"},"region":{"startLine":3385}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcd8152ca17e71a5fdbe02e683ad773baee29b044588a7215af97ef0adcadcfe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/shell.rs:177-183 | crates/zeroclaw-runtime/src/tools/skill_tool.rs:67-73 \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/zeroclaw-runtime/src/tools/shell.rs"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ab2d8224e4f2da9c18bdbcb507511d85a5d5109a969140a6c303ad67f852cbd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5): crates/zeroclaw-runtime/src/tunnel/cloudflare.rs:134-140 | crates/zeroclaw-runtime/src/tunnel/custom.rs:132-137 | crates/zeroclaw-runtime/src/tunnel/ngrok.rs:127-132 | crates/zeroclaw-runtime/src/tunnel/openvpn.rs:165-170 | crates/zeroclaw-runtime/src/tunnel/pinggy.rs:182-187 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/tunnel/cloudflare.rs\u0060 and \u0060crates/zeroclaw-runtime/src/tunnel/ngrok.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 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/zeroclaw-runtime/src/tunnel/cloudflare.rs"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"08b6fb59dd07ac99d2da1533a059b19be8f6e8218fc8115e89173d342e350737"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/zeroclaw-tools/src/backup_tool.rs:803-810 | crates/zeroclaw-tools/src/data_management.rs:252-259 | crates/zeroclaw-tools/src/file_write.rs:342-349 \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/zeroclaw-tools/src/backup_tool.rs"},"region":{"startLine":803}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2cc8afdc42811b9eaf604d7e702116d1927ae8b3db91ee4b6d2548dc96db715"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): src/alias_cli/export.rs:733-737 | src/bin/zeroclaw-acp-bridge.rs:280-284 \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 \u0060contents\u0060 to \u0060\u0026str\u0060 in one and \u0060\u0026[u8]\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":"src/alias_cli/export.rs"},"region":{"startLine":733}}}],"partialFingerprints":{"codehealthFindingId/v1":"f19565bcaafc4db3323709a3a8c63175edcf7964d117650d481de6df60be4431"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): src/alias_cli/mod.rs:17-26 | src/main.rs:189-198 | src/skills/mod.rs:13-22 \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":"src/alias_cli/mod.rs"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf3a0e86f7fa5be687cbe4cf4f11744e2a2385aef2f13ed97ccd1d6630b6654d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src/alias_cli/mod.rs:30-39 | src/skills/mod.rs:26-35 \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/alias_cli/mod.rs"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"97d4d43efcda975864ec7739e5dff1e74d48fde8c5ea9254f89f2cc3365cd2a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): xtask/src/generate/mod.rs:178-183 | xtask/src/generate/review_docs.rs:80-85 | xtask/src/generate/sop_syntax.rs:16-21 \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":"xtask/src/generate/mod.rs"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"96bd41bdd1256cfa7ae21443679026fe9f500f15b02489a75da8482950425fa1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): apps/tauri/src/capabilities/screenshot.rs:88-94 | crates/zeroclaw-runtime/src/security/auth_provider/enrollment.rs:476-481 \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":"apps/tauri/src/capabilities/screenshot.rs"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"046bf923fe61ee6ca2caf0338d43a58b375f9ebae62878f613f0f2217bc8aecc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 5): apps/zerocode/src/dashboard.rs:946-950 | apps/zerocode/src/dashboard.rs:1119-1123 | apps/zerocode/src/dashboard.rs:1279-1283 | apps/zerocode/src/dashboard.rs:1901-1905 | apps/zerocode/src/logs.rs:868-872 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":946}}}],"partialFingerprints":{"codehealthFindingId/v1":"81a9648d75f4015b6ec178865791b9538c4db38e58b4e52d1adb6aefe6dc661e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): apps/zerocode/src/i18n.rs:206-213 | crates/zeroclaw-tools/src/i18n.rs:56-63 \u2014 before extracting anything, compare \u0060apps/zerocode/src/i18n.rs\u0060 and \u0060crates/zeroclaw-tools/src/i18n.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. 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":"apps/zerocode/src/i18n.rs"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"982c525c574c15c2fb6646dc7af97754faf818c92def70958338c1626191ef9e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-api/src/session_keys.rs:16-26 | crates/zeroclaw-channels/src/wecom_ws.rs:2122-2132 \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/zeroclaw-api/src/session_keys.rs"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a3afcd9966fd80960fbdbe2b146d4921fa2af85806eddb1c8f821762c252411"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-providers/src/gemini_cli.rs:53-62 | crates/zeroclaw-providers/src/kilocli.rs:53-62 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/gemini_cli.rs\u0060 and \u0060crates/zeroclaw-providers/src/kilocli.rs\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 164 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/zeroclaw-providers/src/gemini_cli.rs"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"067f2d0370afb2e61668723954003589b259eaab3d3ffc7a11a78224382c6d2d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-providers/src/reliable.rs:85-93 | crates/zeroclaw-runtime/src/agent/turn/outcome.rs:49-57 \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/zeroclaw-providers/src/reliable.rs"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5e907286412062cba636f44e0d0b0dea04f1646d0293d297a90a22ebd86d7f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-memory/src/sqlite.rs:2332-2351 | crates/zeroclaw-memory/src/sqlite.rs:2373-2383 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-memory/src/sqlite.rs:2332\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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":2332}}}],"partialFingerprints":{"codehealthFindingId/v1":"92ec4991bde1702345d42a105a41f6ed7e0b30fb42cdd635261efa145982705a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/cron_add.rs:287-305 | crates/zeroclaw-runtime/src/tools/cron_update.rs:191-210 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/tools/cron_add.rs\u0060 and \u0060crates/zeroclaw-runtime/src/tools/cron_update.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 114 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/zeroclaw-runtime/src/tools/cron_add.rs:287\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/zeroclaw-runtime/src/tools/cron_add.rs"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"a58fe55d1370461f4163539195069e7f0925c92dc09041eeee97f44df23448e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/zeroclaw-tools/src/a2a_client.rs:1158-1176 | crates/zeroclaw-tools/src/a2a_client.rs:1200-1217 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/a2a_client.rs:1158\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/zeroclaw-tools/src/a2a_client.rs"},"region":{"startLine":1158}}}],"partialFingerprints":{"codehealthFindingId/v1":"09c9d31ea8b8c8907c1ada76f5e23a0908640260104c6fadd1321203af771766"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:16856-16867 | crates/zeroclaw-channels/src/orchestrator/mod.rs:16904-16922 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:16856\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":16856}}}],"partialFingerprints":{"codehealthFindingId/v1":"679ded3a5ca87b880119b1eb3f48d113429077b5c606b379a2345373728eb7b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): src/alias_cli/mod.rs:452-468 | src/alias_cli/mod.rs:546-562 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/alias_cli/mod.rs:452\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/alias_cli/mod.rs"},"region":{"startLine":452}}}],"partialFingerprints":{"codehealthFindingId/v1":"dfd5c1120f11e57edb61f9e4cd033c99ce0d74bad93ab31fb0cfbbccbe498b22"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/sop_advance.rs:290-306 | crates/zeroclaw-runtime/src/tools/sop_execute.rs:205-221 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/tools/sop_advance.rs\u0060 and \u0060crates/zeroclaw-runtime/src/tools/sop_execute.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 73 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/zeroclaw-runtime/src/tools/sop_advance.rs:290\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/zeroclaw-runtime/src/tools/sop_advance.rs"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"e001b13788300f8e1ea4148167ce574ed05623ee33ce20d99667a559eb667be7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-tools/src/microsoft365/auth.rs:148-163 | crates/zeroclaw-tools/src/microsoft365/auth.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/zeroclaw-tools/src/microsoft365/auth.rs:148\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/zeroclaw-tools/src/microsoft365/auth.rs"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"7980e2d62e7033b95170ba6a1beea0536ebdc233bc374526c80320ad6bdaaadf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-tools/src/mcp_transport.rs:885-892 | crates/zeroclaw-tools/src/mcp_transport.rs:1850-1864 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-tools/src/mcp_transport.rs"},"region":{"startLine":885}}}],"partialFingerprints":{"codehealthFindingId/v1":"b87a5e3437011cefb379486124237b43547974177d07444b9418e188bd120f77"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-runtime/src/security/webauthn.rs:283-297 | crates/zeroclaw-runtime/src/security/webauthn.rs:431-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. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060response\u0060 to \u0060\u0026RegisterCredentialResponse\u0060 in one and \u0060\u0026AuthenticateCredentialResponse\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/zeroclaw-runtime/src/security/webauthn.rs"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"897ef5cc2d59c7b5702f9bdbca47402dd53ca96671a42d8c712b0e485aaa35e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): src/main.rs:9852-9866 | src/main.rs:9899-9913 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/main.rs:9852\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/main.rs"},"region":{"startLine":9852}}}],"partialFingerprints":{"codehealthFindingId/v1":"324cc7ad26de25b2bdf94fc5eaba753e36435ee7931d2b1e34ddbbe1cbacd7a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-tools/src/discord_search.rs:69-83 | crates/zeroclaw-tools/src/memory_recall.rs:73-85 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/discord_search.rs\u0060 and \u0060crates/zeroclaw-tools/src/memory_recall.rs\u0060 as WHOLE FILES: this scan already matched 4 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/zeroclaw-tools/src/discord_search.rs:69\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/zeroclaw-tools/src/discord_search.rs"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"f38c11ad557628f1536fb06630c7d9281c1ffae09597e245e64f7f428fa0e708"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-infra/src/acp_session_store.rs:2246-2260 | crates/zeroclaw-infra/src/acp_session_store.rs:2408-2419 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-infra/src/acp_session_store.rs:2246\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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":2246}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d142edf203b05a7d7f7e4b22455087a917d4394de13c9b80998b323283d4c04"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/zeroclaw-tools/src/poll.rs:292-306 | crates/zeroclaw-tools/src/poll.rs:324-338 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/poll.rs:292\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/zeroclaw-tools/src/poll.rs"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"e94cf70d49dd2dff95946433b3f0e43e5b66a52f7cf5d009f29b05b1b66be6f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-runtime/src/security/bubblewrap.rs:51-65 | crates/zeroclaw-runtime/src/security/firejail.rs:150-161 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/security/bubblewrap.rs\u0060 and \u0060crates/zeroclaw-runtime/src/security/firejail.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 53 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/zeroclaw-runtime/src/security/bubblewrap.rs:51\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/zeroclaw-runtime/src/security/bubblewrap.rs"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"00dec78c5f076667707651dbb27ee02be102e5956cbca41a49ab92e21d271862"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-providers/src/grok_cli/acp.rs:599-613 | crates/zeroclaw-providers/src/grok_cli/acp.rs:633-646 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/grok_cli/acp.rs:599\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/zeroclaw-providers/src/grok_cli/acp.rs"},"region":{"startLine":599}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d4d8eb89deaf18b5a373a58b8628a01f79ea13ad777e0ba87c4fc5c1ce9e42f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): crates/zeroclaw-memory/src/knowledge_graph.rs:396-414 | crates/zeroclaw-memory/src/knowledge_graph.rs:426-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-memory/src/knowledge_graph.rs:396\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/zeroclaw-memory/src/knowledge_graph.rs"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"62918f303ec398237750a50825278b79d2b161b3bb8c124fc29a5ca987d1cbb8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): xtask/src/bin/web.rs:253-266 | xtask/src/bin/web.rs:298-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 \u0060xtask/src/bin/web.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":"xtask/src/bin/web.rs"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0b78185d78a3b60a4b2b4dd284c62b751281888fe39f6a148c987791b1bd654"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-providers/src/auth/openai_oauth.rs:173-186 | crates/zeroclaw-providers/src/auth/xai_oauth.rs:274-287 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/auth/openai_oauth.rs\u0060 and \u0060crates/zeroclaw-providers/src/auth/xai_oauth.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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/zeroclaw-providers/src/auth/openai_oauth.rs:173\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/zeroclaw-providers/src/auth/xai_oauth.rs:270\u0060 calls \u0060require_trusted_endpoint\u0060 and \u0060crates/zeroclaw-providers/src/auth/openai_oauth.rs:169\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/zeroclaw-providers/src/auth/openai_oauth.rs"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"34c1d3076fad421676c1dec01bec8a0e30f2ea0b38976b2ad45be27236e5ff6f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-tools/src/channel_room.rs:196-209 | crates/zeroclaw-tools/src/channel_room.rs:231-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/zeroclaw-tools/src/channel_room.rs:196\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/zeroclaw-tools/src/channel_room.rs"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"158293aee681c2efde5d061877d0517de74d3fa6752923bf5aa3d11e25752f13"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-tools/src/file_upload.rs:366-375 | crates/zeroclaw-tools/src/file_upload_bundle.rs:524-537 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/file_upload.rs\u0060 and \u0060crates/zeroclaw-tools/src/file_upload_bundle.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 126 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/zeroclaw-tools/src/file_upload.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. 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/zeroclaw-tools/src/file_upload.rs"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5ba338e6f225177fdd2d7dd358162b6f49c283902cd802bf085d59a5c501731"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): crates/zeroclaw-memory/src/knowledge_graph.rs:337-350 | crates/zeroclaw-memory/src/knowledge_graph.rs:399-412 | crates/zeroclaw-memory/src/knowledge_graph.rs:429-442 \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/zeroclaw-memory/src/knowledge_graph.rs:337\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/zeroclaw-memory/src/knowledge_graph.rs"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"673a986822cf62ef1225b901de0755feacee976e470f4766a5f66c32c517d626"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-tools/src/mcp_client.rs:963-976 | crates/zeroclaw-tools/src/mcp_client.rs:1116-1129 \u2014 both copies are in the same file, so extract the block 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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/zeroclaw-tools/src/mcp_client.rs:978\u0060 calls \u0060stub_server\u0060 and \u0060crates/zeroclaw-tools/src/mcp_client.rs:1131\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/zeroclaw-tools/src/mcp_client.rs"},"region":{"startLine":963}}}],"partialFingerprints":{"codehealthFindingId/v1":"d863a1417d6e5d360815d119c603a9f7751866a365abfb504095d2a038eb34a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 22): crates/zeroclaw-channels/src/bluesky.rs:628-636 | crates/zeroclaw-channels/src/imessage.rs:324-332 | crates/zeroclaw-channels/src/matrix.rs:2164-2174 | crates/zeroclaw-channels/src/orchestrator/mod.rs:11294-11302 | crates/zeroclaw-channels/src/orchestrator/mod.rs:14882-14890 | crates/zeroclaw-channels/src/orchestrator/mqtt.rs:92-101 | crates/zeroclaw-channels/src/reddit.rs:428-436 | crates/zeroclaw-channels/src/transcription.rs:1085-1093 | crates/zeroclaw-channels/src/voice_wake.rs:476-489 | crates/zeroclaw-memory/src/lib.rs:629-637 | crates/zeroclaw-providers/src/lib.rs:656-664 | crates/zeroclaw-runtime/src/daemon/mod.rs:2915-2923 | crates/zeroclaw-runtime/src/tools/mod.rs:2612-2620 | crates/zeroclaw-runtime/src/tools/mod.rs:2721-2729 | crates/zeroclaw-runtime/src/tools/mod.rs:2761-2769 | crates/zeroclaw-runtime/src/tools/mod.rs:2809-2817 | crates/zeroclaw-runtime/src/tools/mod.rs:2888-2896 | crates/zeroclaw-runtime/src/tools/mod.rs:2914-2922 | crates/zeroclaw-runtime/src/tools/mod.rs:3401-3409 | crates/zeroclaw-runtime/src/tools/mod.rs:3902-3910 | crates/zeroclaw-tools/src/linkedin.rs:287-298 | crates/zeroclaw-tools/src/web_fetch.rs:578-586 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/bluesky.rs\u0060 and \u0060crates/zeroclaw-channels/src/imessage.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/zeroclaw-channels/src/bluesky.rs:628\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/zeroclaw-channels/src/orchestrator/mqtt.rs:90\u0060 calls \u0060mark_component_error\u0060, \u0060to_string\u0060 and \u0060crates/zeroclaw-channels/src/imessage.rs:322\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/zeroclaw-channels/src/bluesky.rs"},"region":{"startLine":628}}}],"partialFingerprints":{"codehealthFindingId/v1":"94027f910c9382f39043bb6af384d9f783a81829f79d0b34f7ea94a769a87948"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:10973-10986 | crates/zeroclaw-gateway/src/ws.rs:2616-2628 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs\u0060 and \u0060crates/zeroclaw-gateway/src/ws.rs\u0060 as WHOLE FILES: this scan already matched 7 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/zeroclaw-channels/src/orchestrator/mod.rs:10973\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":10973}}}],"partialFingerprints":{"codehealthFindingId/v1":"89a218affa8922a74638da0579b3ae69a6d1250eed13cf99ac65691ad25dfa88"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/zeroclaw-providers/src/factory.rs:1995-2008 | crates/zeroclaw-providers/src/factory.rs:2041-2054 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/factory.rs:1995\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/zeroclaw-providers/src/factory.rs:2009\u0060 calls \u0060Some\u0060, \u0060without_native_tools\u0060 and \u0060crates/zeroclaw-providers/src/factory.rs:2055\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/zeroclaw-providers/src/factory.rs"},"region":{"startLine":1995}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae718927152139df445debe9b7b1bb3a31301a93c62c64befd472502d6d70c6f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/scoped.rs:1247-1259 | crates/zeroclaw-runtime/src/tools/scoped.rs:1548-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/tools/scoped.rs"},"region":{"startLine":1247}}}],"partialFingerprints":{"codehealthFindingId/v1":"527e06847230a93e6918e791621b5cb4ad84e41eea64b5460d560c1f93accfe7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-gateway/src/api_quickstart.rs:184-196 | crates/zeroclaw-gateway/src/api_quickstart.rs:225-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/zeroclaw-gateway/src/api_quickstart.rs:184\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/zeroclaw-gateway/src/api_quickstart.rs"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"50fb590a400c8a9eda8d7bffecd0676ad4278208b1190e8bce9d46e5eb5a2827"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): crates/zeroclaw-infra/src/acp_session_store.rs:1330-1342 | crates/zeroclaw-infra/src/acp_session_store.rs:1397-1409 | crates/zeroclaw-infra/src/acp_session_store.rs:3033-3045 \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/zeroclaw-infra/src/acp_session_store.rs:1330\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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":1330}}}],"partialFingerprints":{"codehealthFindingId/v1":"204299962a58e026163b43f36ac390e98c73a8ca60dc7097037e9b4978dd48c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/dispatch.rs:905-917 | crates/zeroclaw-runtime/src/sop/dispatch.rs:1194-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/sop/dispatch.rs:905\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/zeroclaw-runtime/src/sop/dispatch.rs"},"region":{"startLine":905}}}],"partialFingerprints":{"codehealthFindingId/v1":"4630c6a5dac262442745be71cac052c1cb68e95a80b6e0ed86e9deae4046c060"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/zeroclaw-channels/src/discord/mod.rs:2779-2791 | crates/zeroclaw-channels/src/discord/mod.rs:2826-2836 | crates/zeroclaw-channels/src/discord/mod.rs:2880-2888 \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/zeroclaw-channels/src/discord/mod.rs:2779\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":2779}}}],"partialFingerprints":{"codehealthFindingId/v1":"d29327f1b6922e0529ac581520a09aea54f83cdfbba198f56331aedea24ae55d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-runtime/src/cron/store.rs:903-915 | crates/zeroclaw-runtime/src/cron/store.rs:929-941 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/cron/store.rs:903\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/zeroclaw-runtime/src/cron/store.rs"},"region":{"startLine":903}}}],"partialFingerprints":{"codehealthFindingId/v1":"70a9481dc743c3dd682ebecfce9e2e6fe047b943cec583b6258aaec3a80b1fe0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 6): crates/zeroclaw-channels/src/orchestrator/mod.rs:6498-6507 | crates/zeroclaw-channels/src/orchestrator/mod.rs:6534-6543 | crates/zeroclaw-channels/src/orchestrator/mod.rs:6553-6565 | crates/zeroclaw-channels/src/orchestrator/mod.rs:6584-6593 | crates/zeroclaw-channels/src/orchestrator/mod.rs:6891-6900 | crates/zeroclaw-channels/src/orchestrator/mod.rs:6908-6917 \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/zeroclaw-channels/src/orchestrator/mod.rs:6498\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":6498}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6f8db5d8aabf516fe5029619143bb375877cefe607f9be64ece71d1fd4893bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 36): crates/zeroclaw-channels/src/bluesky.rs:628-635 | crates/zeroclaw-channels/src/imessage.rs:324-331 | crates/zeroclaw-channels/src/matrix.rs:1571-1578 | crates/zeroclaw-channels/src/matrix.rs:2164-2174 | crates/zeroclaw-channels/src/matrix.rs:4571-4578 | crates/zeroclaw-channels/src/mochat.rs:272-279 | crates/zeroclaw-channels/src/nextcloud_talk.rs:720-727 | crates/zeroclaw-channels/src/orchestrator/mod.rs:4494-4503 | crates/zeroclaw-channels/src/orchestrator/mod.rs:11294-11301 | crates/zeroclaw-channels/src/orchestrator/mod.rs:14882-14889 | crates/zeroclaw-channels/src/orchestrator/mqtt.rs:92-100 | crates/zeroclaw-channels/src/reddit.rs:428-435 | crates/zeroclaw-channels/src/slack.rs:5890-5900 | crates/zeroclaw-channels/src/transcription.rs:1085-1092 | crates/zeroclaw-channels/src/twitter.rs:409-416 | crates/zeroclaw-channels/src/voice_wake.rs:476-488 | crates/zeroclaw-channels/src/voice_wake.rs:492-502 | crates/zeroclaw-channels/src/wechat.rs:1222-1229 | crates/zeroclaw-channels/src/wechat.rs:1261-1268 | crates/zeroclaw-memory/src/consolidation.rs:256-263 | crates/zeroclaw-memory/src/consolidation.rs:389-396 | crates/zeroclaw-memory/src/lib.rs:629-636 | crates/zeroclaw-providers/src/lib.rs:656-663 | crates/zeroclaw-runtime/src/daemon/mod.rs:2915-2922 | crates/zeroclaw-runtime/src/tools/mod.rs:2612-2619 | crates/zeroclaw-runtime/src/tools/mod.rs:2721-2728 | crates/zeroclaw-runtime/src/tools/mod.rs:2761-2768 | crates/zeroclaw-runtime/src/tools/mod.rs:2809-2816 | crates/zeroclaw-runtime/src/tools/mod.rs:2888-2895 | crates/zeroclaw-runtime/src/tools/mod.rs:2914-2921 | crates/zeroclaw-runtime/src/tools/mod.rs:3401-3408 | crates/zeroclaw-runtime/src/tools/mod.rs:3902-3909 | crates/zeroclaw-runtime/src/tools/sop_advance.rs:230-237 | crates/zeroclaw-tools/src/linkedin.rs:287-297 | crates/zeroclaw-tools/src/microsoft365/auth.rs:356-363 | crates/zeroclaw-tools/src/web_fetch.rs:578-585 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/bluesky.rs\u0060 and \u0060crates/zeroclaw-channels/src/imessage.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/zeroclaw-channels/src/bluesky.rs:628\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/zeroclaw-channels/src/mochat.rs:281\u0060 calls \u0060sleep\u0060 and \u0060crates/zeroclaw-channels/src/bluesky.rs:636\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/zeroclaw-channels/src/bluesky.rs"},"region":{"startLine":628}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb5232a75ec3c0f220a9d2b57e4aa355a15aac58878f8a85f1194a5e7da7dc50"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-providers/src/anthropic.rs:1591-1603 | crates/zeroclaw-providers/src/bedrock.rs:1285-1294 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/anthropic.rs\u0060 and \u0060crates/zeroclaw-providers/src/bedrock.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. 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/zeroclaw-providers/src/anthropic.rs:1591\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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":1591}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac60774b11cf752426ba9d83ea7116a6aec16816f87217a73530ccf422b9a887"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-channels/src/bluesky.rs:500-512 | crates/zeroclaw-channels/src/mattermost.rs:1094-1105 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/bluesky.rs\u0060 and \u0060crates/zeroclaw-channels/src/mattermost.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/zeroclaw-channels/src/bluesky.rs:500\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/zeroclaw-channels/src/bluesky.rs"},"region":{"startLine":500}}}],"partialFingerprints":{"codehealthFindingId/v1":"006568f067013976b009292d4e744a96b07633992287966ecce782fd878c56db"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-infra/src/session_sqlite.rs:1810-1822 | crates/zeroclaw-infra/src/session_sqlite.rs:1828-1840 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-infra/src/session_sqlite.rs:1810\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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":1810}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d2da8717f902a940b714d9c89116ad0933c465c64524fecfd4a6913b4ea5d01"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-channels/src/line.rs:1126-1138 | crates/zeroclaw-channels/src/line.rs:1162-1174 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/line.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/zeroclaw-channels/src/line.rs"},"region":{"startLine":1126}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6626b24733e7550696f69cf6afadff324a083206f3f942601aa5c67f72ba72f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/cron_add.rs:239-251 | crates/zeroclaw-runtime/src/tools/cron_update.rs:170-182 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/tools/cron_add.rs\u0060 and \u0060crates/zeroclaw-runtime/src/tools/cron_update.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 114 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/zeroclaw-runtime/src/tools/cron_add.rs:239\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/zeroclaw-runtime/src/tools/cron_add.rs"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"7191f19e4090fd263c2eef639d64285b8c3a7aff45e0c762cc1a5ea07bed2133"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): crates/zeroclaw-channels/src/discord/mod.rs:3618-3628 | crates/zeroclaw-channels/src/signal.rs:1385-1397 | crates/zeroclaw-channels/src/signal.rs:1432-1442 | crates/zeroclaw-tools/src/microsoft365/auth.rs:114-124 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/discord/mod.rs\u0060 and \u0060crates/zeroclaw-channels/src/signal.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 53 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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":3618}}}],"partialFingerprints":{"codehealthFindingId/v1":"ededfdf8a261a6bafe142b3f67b50ddc99ec97ff5dd6860cfe20f4f50c0758e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): crates/zeroclaw-tools/src/composio.rs:661-673 | crates/zeroclaw-tools/src/composio.rs:711-723 | crates/zeroclaw-tools/src/composio.rs:832-844 \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/zeroclaw-tools/src/composio.rs:661\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/zeroclaw-tools/src/composio.rs"},"region":{"startLine":661}}}],"partialFingerprints":{"codehealthFindingId/v1":"89d635fa704c4a83d77d6aac78c36caff61e3e64c18f7a659aa995d174f7cbc7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-tools/src/model_routing_config.rs:1787-1799 | crates/zeroclaw-tools/src/proxy_config.rs:538-550 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/model_routing_config.rs\u0060 and \u0060crates/zeroclaw-tools/src/proxy_config.rs\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 143 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/zeroclaw-tools/src/model_routing_config.rs:1787\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/zeroclaw-tools/src/model_routing_config.rs"},"region":{"startLine":1787}}}],"partialFingerprints":{"codehealthFindingId/v1":"51c0d0894da2d9c33036c790b90de98e5fcc137049b60228a81fb9bd2d1748ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-channels/src/telegram.rs:6657-6667 | crates/zeroclaw-config/src/schema.rs:27548-27560 \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/zeroclaw-channels/src/telegram.rs:6657\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":6657}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f0c4f7456021ee955a57f664c26ec19b20941b150681a1ad6757dfed5a882eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): crates/zeroclaw-channels/src/matrix.rs:3551-3563 | crates/zeroclaw-channels/src/matrix.rs:3570-3582 | crates/zeroclaw-channels/src/matrix.rs:3598-3607 \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/zeroclaw-channels/src/matrix.rs:3551\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":3551}}}],"partialFingerprints":{"codehealthFindingId/v1":"c845278b4b707ffc4aa2850e7e7868f619ea2da1ee248c1f481efc1d493b391d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): crates/zeroclaw-tools/src/ask_user.rs:89-101 | crates/zeroclaw-tools/src/escalate.rs:175-187 | crates/zeroclaw-tools/src/poll.rs:185-197 | crates/zeroclaw-tools/src/send_via.rs:299-310 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/ask_user.rs\u0060 and \u0060crates/zeroclaw-tools/src/escalate.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 96 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/zeroclaw-tools/src/ask_user.rs"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"a26ccb96165a72eefaabf87d7c7005eb1768ec2a09c14d30d195abf56a722d71"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-runtime/src/cron/store.rs:1542-1550 | crates/zeroclaw-runtime/src/cron/store.rs:1579-1591 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/cron/store.rs:1542\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/zeroclaw-runtime/src/cron/store.rs"},"region":{"startLine":1542}}}],"partialFingerprints":{"codehealthFindingId/v1":"b26c2b93acc95516f40696a8d3673cfd38a6944aebdc76cbc4692dc7e36a29d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:4926-4938 | crates/zeroclaw-channels/src/orchestrator/mod.rs:5016-5028 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:4926\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":4926}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb6cc4173b114ccfd3ead9ecb91ce768450ce42688fff4d98bd842eb1aac3f47"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 4): crates/zeroclaw-runtime/src/tools/sop_advance.rs:299-311 | crates/zeroclaw-runtime/src/tools/sop_execute.rs:214-226 | crates/zeroclaw-tools/src/discord_search.rs:133-145 | crates/zeroclaw-tools/src/memory_recall.rs:124-136 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/tools/sop_advance.rs\u0060 and \u0060crates/zeroclaw-runtime/src/tools/sop_execute.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 73 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/zeroclaw-runtime/src/tools/sop_advance.rs:299\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/zeroclaw-runtime/src/tools/sop_advance.rs"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8128d54d326739b945e17d2cd13a6bec34a452387efbc3fd76607b9cb9304db"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): crates/zeroclaw-hardware/src/datasheet.rs:515-526 | crates/zeroclaw-hardware/src/datasheet.rs:580-590 | crates/zeroclaw-hardware/src/datasheet.rs:640-651 \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. 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/zeroclaw-hardware/src/datasheet.rs"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4a61cb95f8b174f6a16804a61ff92db123a3f2ababb6504d43ad482d5fa5080"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): crates/zeroclaw-runtime/src/security/bubblewrap.rs:43-54 | crates/zeroclaw-runtime/src/security/docker.rs:67-78 | crates/zeroclaw-runtime/src/security/firejail.rs:142-153 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/security/bubblewrap.rs\u0060 and \u0060crates/zeroclaw-runtime/src/security/firejail.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 53 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/zeroclaw-runtime/src/security/bubblewrap.rs:43\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/zeroclaw-runtime/src/security/bubblewrap.rs"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"eea38912249ae0cf4f40166ad69817f3bff02537e3bdc3dfc8225b195d1e3e36"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): src/main.rs:13482-13493 | src/main.rs:13495-13506 \u2014 both copies are in the same file, so extract the block 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/main.rs"},"region":{"startLine":13482}}}],"partialFingerprints":{"codehealthFindingId/v1":"2090b511523be350ceb4573fd2cef35e73607234422cb134a10168d127884a2f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-config/src/schema.rs:23750-23761 | crates/zeroclaw-config/src/schema.rs:23870-23877 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-config/src/schema.rs:23750\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/zeroclaw-config/src/schema.rs"},"region":{"startLine":23750}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fdb9076a2d8ed7f2b4e5c05d63756af094cf9765447a9a34aa3e4ac56fe733f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): crates/zeroclaw-tools/src/claude_code.rs:286-297 | crates/zeroclaw-tools/src/codex_cli.rs:212-223 | crates/zeroclaw-tools/src/gemini_cli.rs:192-203 | crates/zeroclaw-tools/src/opencode_cli.rs:192-203 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/claude_code.rs\u0060 and \u0060crates/zeroclaw-tools/src/codex_cli.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 94 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/zeroclaw-tools/src/claude_code.rs:286\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/zeroclaw-tools/src/claude_code.rs"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecf600af374406aa118a6e8374eb81946c238be0f71552d72e59603d5f6f16f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-gateway/src/api_config.rs:1761-1770 | crates/zeroclaw-gateway/src/api_sections.rs:1005-1016 \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/zeroclaw-gateway/src/api_config.rs:1761\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/zeroclaw-gateway/src/api_config.rs"},"region":{"startLine":1761}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e91a63425c8d876af298c00f6280645e884bd4c82790bb501be365b4a32b9c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): crates/zeroclaw-channels/src/matrix.rs:3535-3543 | crates/zeroclaw-channels/src/matrix.rs:3552-3563 | crates/zeroclaw-channels/src/matrix.rs:3571-3582 | crates/zeroclaw-channels/src/matrix.rs:3599-3607 \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/zeroclaw-channels/src/matrix.rs:3535\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":3535}}}],"partialFingerprints":{"codehealthFindingId/v1":"39983db3de1423db5861d6bd5bdfed22a6bca3b61cfa632a26281c911d757153"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-tools/src/file_upload.rs:165-174 | crates/zeroclaw-tools/src/file_upload_bundle.rs:217-228 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/file_upload.rs\u0060 and \u0060crates/zeroclaw-tools/src/file_upload_bundle.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 126 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/zeroclaw-tools/src/file_upload.rs:165\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/zeroclaw-tools/src/file_upload.rs"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"24730b1db0b3db1bd05f61eb8b711b511307fbeca17ecf83b219bccea3b39f55"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-channels/src/whatsapp_storage.rs:588-599 | crates/zeroclaw-channels/src/whatsapp_storage.rs:1040-1051 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/whatsapp_storage.rs:588\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/zeroclaw-channels/src/whatsapp_storage.rs"},"region":{"startLine":588}}}],"partialFingerprints":{"codehealthFindingId/v1":"c32184a6b37a92846f4ebdfb3e5b574513b5b1b14e3b6fb28304f5a86e1956c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-runtime/src/tunnel/cloudflare.rs:107-118 | crates/zeroclaw-runtime/src/tunnel/ngrok.rs:100-111 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/tunnel/cloudflare.rs\u0060 and \u0060crates/zeroclaw-runtime/src/tunnel/ngrok.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 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/zeroclaw-runtime/src/tunnel/cloudflare.rs:107\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/zeroclaw-runtime/src/tunnel/cloudflare.rs"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2c1faa58026c0f28ebd11e0263682eb7afcf85b662a90df6a1cbe4e158d61f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): apps/zerorelay/src/lib.rs:1721-1732 | apps/zerorelay/src/lib.rs:1924-1935 \u2014 both copies are in the same file, so extract the block 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":"apps/zerorelay/src/lib.rs"},"region":{"startLine":1721}}}],"partialFingerprints":{"codehealthFindingId/v1":"f57141bc424d06921fc57397149abbe799f806a1bca4ad09511eac94ecf9720b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-tools/src/content_search.rs:199-205 | crates/zeroclaw-tools/src/glob_search.rs:76-87 \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. 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/zeroclaw-tools/src/content_search.rs"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb1943e7934503804e40224a1f02110d60182efd0b51d118362dae7c445bfc0b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src/main.rs:13470-13480 | src/main.rs:13482-13493 \u2014 both copies are in the same file, so extract the block 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/main.rs"},"region":{"startLine":13470}}}],"partialFingerprints":{"codehealthFindingId/v1":"237acbfebc67653f07c1db301ef77a62405c7c64c2372f788c201aa4966f0c0e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-tools/src/image_gen.rs:398-409 | crates/zeroclaw-tools/src/linkedin_client.rs:1132-1143 \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/zeroclaw-tools/src/image_gen.rs:398\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/zeroclaw-tools/src/image_gen.rs"},"region":{"startLine":398}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b2d192c828482f6ac55d05c5174c5065d0a8cfdc96681dca489eb4b49f2b135"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-runtime/src/service/mod.rs:2136-2147 | crates/zeroclaw-runtime/src/service/mod.rs:2167-2178 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-runtime/src/service/mod.rs"},"region":{"startLine":2136}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8e4ca17133a34fa019db808e6ad4e4e0407a320f9bcd2bff6b70c63cc03e82c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-channels/src/mattermost.rs:987-996 | crates/zeroclaw-channels/src/slack.rs:3746-3757 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/mattermost.rs\u0060 and \u0060crates/zeroclaw-channels/src/slack.rs\u0060 as WHOLE FILES: this scan already matched 9 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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/mattermost.rs:987\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/zeroclaw-channels/src/mattermost.rs"},"region":{"startLine":987}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3ef1c40e3a1b2a2b70e281aaa037f263387abf3b2229c298061d1f8f1fcffbd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-gateway/src/api_config.rs:3227-3238 | crates/zeroclaw-gateway/src/api_config.rs:3249-3260 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/api_config.rs:3227\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/zeroclaw-gateway/src/api_config.rs"},"region":{"startLine":3227}}}],"partialFingerprints":{"codehealthFindingId/v1":"97af89109585972c659cc3ccf25782f01ae8e525a33401f17d60e3ab1fd1c9e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-channels/src/slack.rs:3185-3196 | crates/zeroclaw-channels/src/slack.rs:3199-3208 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/slack.rs:3185\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":3185}}}],"partialFingerprints":{"codehealthFindingId/v1":"984eaa6f22f95064d60bd1e7f79b6febdae3fc6f5df15d419d93ee18c0b2b517"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): crates/zeroclaw-providers/src/auth/mod.rs:241-252 | crates/zeroclaw-providers/src/auth/mod.rs:329-338 | crates/zeroclaw-providers/src/auth/mod.rs:423-433 | crates/zeroclaw-providers/src/auth/mod.rs:542-551 \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/zeroclaw-providers/src/auth/mod.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. 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/zeroclaw-providers/src/auth/mod.rs"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2ad9d3fde1f27e8b8a959a5676e8edd9cb0fc441a00e57cba373023e5e3ecc8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/zeroclaw-channels/src/qq.rs:964-975 | crates/zeroclaw-channels/src/qq.rs:1313-1324 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/qq.rs:964\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/zeroclaw-channels/src/qq.rs"},"region":{"startLine":964}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e1edb577b0297c4427ddc5325ea3b570f4e6f58ac10abef91ead9d7c9268ec8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-channels/src/slack.rs:3008-3019 | crates/zeroclaw-channels/src/slack.rs:3098-3106 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":3008}}}],"partialFingerprints":{"codehealthFindingId/v1":"f32cbcc32e390c9c68be116aeaeda39f227efdbed87df1dfe526c0786b8f76c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-tools/src/file_upload_bundle.rs:281-292 | crates/zeroclaw-tools/src/send_via.rs:307-317 \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/zeroclaw-tools/src/file_upload_bundle.rs:281\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/zeroclaw-tools/src/file_upload_bundle.rs"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8224ad1d811d82c9d23ec8c6ede5ea3877484abd006953595342ef1da39816a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u20136 lines \u00D7 55): crates/zeroclaw-channels/src/bluesky.rs:628-634 | crates/zeroclaw-channels/src/imessage.rs:324-330 | crates/zeroclaw-channels/src/matrix.rs:1571-1577 | crates/zeroclaw-channels/src/matrix.rs:2164-2173 | crates/zeroclaw-channels/src/matrix.rs:4571-4577 | crates/zeroclaw-channels/src/mochat.rs:272-278 | crates/zeroclaw-channels/src/nextcloud_talk.rs:720-726 | crates/zeroclaw-channels/src/orchestrator/mod.rs:4129-4135 | crates/zeroclaw-channels/src/orchestrator/mod.rs:4460-4463 | crates/zeroclaw-channels/src/orchestrator/mod.rs:4494-4502 | crates/zeroclaw-channels/src/orchestrator/mod.rs:4693-4699 | crates/zeroclaw-channels/src/orchestrator/mod.rs:5587-5591 | crates/zeroclaw-channels/src/orchestrator/mod.rs:9499-9505 | crates/zeroclaw-channels/src/orchestrator/mod.rs:11294-11300 | crates/zeroclaw-channels/src/orchestrator/mod.rs:14882-14888 | crates/zeroclaw-channels/src/orchestrator/mqtt.rs:92-99 | crates/zeroclaw-channels/src/reddit.rs:428-434 | crates/zeroclaw-channels/src/slack.rs:5890-5899 | crates/zeroclaw-channels/src/transcription.rs:1085-1091 | crates/zeroclaw-channels/src/twitter.rs:409-415 | crates/zeroclaw-channels/src/voice_wake.rs:83-88 | crates/zeroclaw-channels/src/voice_wake.rs:476-487 | crates/zeroclaw-channels/src/voice_wake.rs:492-501 | crates/zeroclaw-channels/src/wechat.rs:1222-1228 | crates/zeroclaw-channels/src/wechat.rs:1261-1267 | crates/zeroclaw-gateway/src/acp.rs:157-163 | crates/zeroclaw-gateway/src/acp.rs:173-179 | crates/zeroclaw-hardware/src/rpi.rs:290-295 | crates/zeroclaw-memory/src/consolidation.rs:256-262 | crates/zeroclaw-memory/src/consolidation.rs:389-395 | crates/zeroclaw-memory/src/lib.rs:576-582 | crates/zeroclaw-memory/src/lib.rs:594-600 | crates/zeroclaw-memory/src/lib.rs:629-635 | crates/zeroclaw-providers/src/lib.rs:656-662 | crates/zeroclaw-runtime/src/daemon/mod.rs:2544-2553 | crates/zeroclaw-runtime/src/daemon/mod.rs:2868-2877 | crates/zeroclaw-runtime/src/daemon/mod.rs:2915-2921 | crates/zeroclaw-runtime/src/observability/otel.rs:900-906 | crates/zeroclaw-runtime/src/observability/otel.rs:909-915 | crates/zeroclaw-runtime/src/sop/dispatch.rs:733-739 | crates/zeroclaw-runtime/src/sop/dispatch.rs:748-754 | crates/zeroclaw-runtime/src/tools/mod.rs:2612-2618 | crates/zeroclaw-runtime/src/tools/mod.rs:2721-2727 | crates/zeroclaw-runtime/src/tools/mod.rs:2761-2767 | crates/zeroclaw-runtime/src/tools/mod.rs:2809-2815 | crates/zeroclaw-runtime/src/tools/mod.rs:2888-2894 | crates/zeroclaw-runtime/src/tools/mod.rs:2914-2920 | crates/zeroclaw-runtime/src/tools/mod.rs:3401-3407 | crates/zeroclaw-runtime/src/tools/mod.rs:3902-3908 | crates/zeroclaw-runtime/src/tools/sop_advance.rs:219-225 | crates/zeroclaw-runtime/src/tools/sop_advance.rs:230-236 | crates/zeroclaw-runtime/src/tools/sop_execute.rs:159-165 | crates/zeroclaw-tools/src/linkedin.rs:287-296 | crates/zeroclaw-tools/src/microsoft365/auth.rs:356-362 | crates/zeroclaw-tools/src/web_fetch.rs:578-584 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/bluesky.rs\u0060 and \u0060crates/zeroclaw-channels/src/imessage.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/zeroclaw-channels/src/bluesky.rs:628\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/zeroclaw-channels/src/mochat.rs:281\u0060 calls \u0060sleep\u0060 and \u0060crates/zeroclaw-channels/src/bluesky.rs:636\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/zeroclaw-channels/src/bluesky.rs"},"region":{"startLine":628}}}],"partialFingerprints":{"codehealthFindingId/v1":"867f5f5a6305a6487cf55a84573e1d7acc6eff44b4fac0201afb35c2be34f3fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): crates/zeroclaw-channels/src/orchestrator/mod.rs:1378-1384 | crates/zeroclaw-runtime/src/sop/approval/timeout.rs:48-54 | crates/zeroclaw-runtime/src/sop/executor.rs:1078-1088 | src/main.rs:813-817 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/sop/approval/timeout.rs\u0060 and \u0060crates/zeroclaw-runtime/src/sop/executor.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. 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/zeroclaw-channels/src/orchestrator/mod.rs:1378\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":1378}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e8f5af124bc90f479f7e58c8d6d16eede79150e08d2037fdff58ee5513dcf70"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): apps/zerorelay/src/lib.rs:1220-1230 | apps/zerorelay/src/lib.rs:1291-1298 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerorelay/src/lib.rs:1220\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":"apps/zerorelay/src/lib.rs"},"region":{"startLine":1220}}}],"partialFingerprints":{"codehealthFindingId/v1":"10a591d7ca1729d7be4406c936d8fc955ee596ba94644c1c17994c07372371e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/discord/slash.rs:716-723 | crates/zeroclaw-memory/src/qdrant.rs:516-526 \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/zeroclaw-channels/src/discord/slash.rs:716\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/zeroclaw-channels/src/discord/slash.rs"},"region":{"startLine":716}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7814eca2e71c35bab701c5803ce731bd85eee1fe1de957b25796cd21a30a415"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): apps/zerocode/src/dashboard.rs:1007-1017 | apps/zerocode/src/dashboard.rs:1179-1189 | apps/zerocode/src/dashboard.rs:1676-1686 \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 \u0060apps/zerocode/src/dashboard.rs:1007\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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":1007}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e6de93c94429d4b18052fda7cddfd5cf13b9b83085ea522ba4898864dd8db07"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): crates/zeroclaw-runtime/src/skills/mod.rs:520-530 | crates/zeroclaw-runtime/src/skills/mod.rs:1211-1221 | crates/zeroclaw-runtime/src/skills/mod.rs:3114-3124 | crates/zeroclaw-runtime/src/skills/mod.rs:3329-3339 \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/zeroclaw-runtime/src/skills/mod.rs:520\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/zeroclaw-runtime/src/skills/mod.rs"},"region":{"startLine":520}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa7391275aba58557364f2d86b15f081b9b2644658c3b724c682748d0afc29c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): crates/zeroclaw-runtime/src/tools/cron_run.rs:175-185 | crates/zeroclaw-tools/src/file_upload.rs:190-200 | crates/zeroclaw-tools/src/file_upload_bundle.rs:245-255 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/file_upload.rs\u0060 and \u0060crates/zeroclaw-tools/src/file_upload_bundle.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 126 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/zeroclaw-runtime/src/tools/cron_run.rs:175\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/zeroclaw-runtime/src/tools/cron_run.rs"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"4463027bacfbfd1b4cbf1714d2e006f7c125e1db9fa860af8e68b9ab3460248d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): src/main.rs:13581-13591 | src/main.rs:13607-13617 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/main.rs:13581\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/main.rs"},"region":{"startLine":13581}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bb1ec926c4b69153b1fa3795af6c5b1b6a5673f96d0fb184ac03ad45bcae08c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-memory/src/sqlite.rs:2032-2042 | crates/zeroclaw-memory/src/sqlite.rs:2157-2166 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":2032}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f1d54392ac6e075995e6dd7b5e5bd0c2ae6394beb6fa184b26552a62e7f1828"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-channels/src/discord/rest.rs:207-217 | crates/zeroclaw-channels/src/discord/rest.rs:245-255 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/discord/rest.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/zeroclaw-channels/src/discord/rest.rs"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"65232a213f1cce799d9fdd95f7f65acf890f3e9489662eb41078addef67a5278"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-tools/src/http_request.rs:398-408 | crates/zeroclaw-tools/src/web_fetch.rs:510-520 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/http_request.rs\u0060 and \u0060crates/zeroclaw-tools/src/web_fetch.rs\u0060 as WHOLE FILES: this scan already matched 9 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":"crates/zeroclaw-tools/src/http_request.rs"},"region":{"startLine":398}}}],"partialFingerprints":{"codehealthFindingId/v1":"a966a9be35776054dbb7421b580e8dcb6d5706791fb15abfd16001c27f173ecb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 8): crates/zeroclaw-channels/src/matrix.rs:2681-2691 | crates/zeroclaw-channels/src/wechat.rs:1231-1238 | crates/zeroclaw-channels/src/wechat.rs:1270-1277 | crates/zeroclaw-channels/src/whatsapp_web.rs:672-679 | crates/zeroclaw-hardware/src/uf2.rs:240-247 | crates/zeroclaw-providers/src/compatible.rs:954-961 | crates/zeroclaw-runtime/src/cron/store.rs:677-684 | crates/zeroclaw-runtime/src/cron/store.rs:741-748 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/matrix.rs\u0060 and \u0060crates/zeroclaw-channels/src/wechat.rs\u0060 as WHOLE FILES: this scan already matched 9 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 \u0060crates/zeroclaw-channels/src/matrix.rs:2681\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":2681}}}],"partialFingerprints":{"codehealthFindingId/v1":"942e72595f8733aa914d1c692455c6b946358e2ff5473b780492803a47784b9e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): crates/zeroclaw-channels/src/telegram.rs:6608-6618 | crates/zeroclaw-channels/src/telegram.rs:7076-7086 | crates/zeroclaw-channels/src/telegram.rs:7118-7128 \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/zeroclaw-channels/src/telegram.rs:6608\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":6608}}}],"partialFingerprints":{"codehealthFindingId/v1":"9777731548287e0814db0c08c0aa38a6cbbf0f357d8bf6b25b968c90cb20d16c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): crates/zeroclaw-tools/src/jira_tool.rs:1220-1230 | crates/zeroclaw-tools/src/jira_tool.rs:1232-1242 | crates/zeroclaw-tools/src/jira_tool.rs:1244-1254 \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. 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/zeroclaw-tools/src/jira_tool.rs"},"region":{"startLine":1220}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bcba84add01ff80921414d6e5c0f65a8695c00e0a09b08ac177595819b9e871"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-tools/src/git_operations.rs:1608-1618 | crates/zeroclaw-tools/src/git_operations.rs:1699-1709 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/git_operations.rs:1608\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/zeroclaw-tools/src/git_operations.rs"},"region":{"startLine":1608}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfa37174c8fe510065b28d1e26ba4e8dd3c80af81f678cb6d3515965fd50ffbe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/cron_add.rs:479-487 | crates/zeroclaw-runtime/src/tools/cron_update.rs:233-243 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/tools/cron_add.rs\u0060 and \u0060crates/zeroclaw-runtime/src/tools/cron_update.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 114 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/zeroclaw-runtime/src/tools/cron_update.rs:233\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/zeroclaw-runtime/src/tools/cron_add.rs"},"region":{"startLine":479}}}],"partialFingerprints":{"codehealthFindingId/v1":"12d763f20a65022af4a545e0c727f38589ca61e8d9a88cdc0e1413c79ea350a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-tools/src/microsoft365/graph_client.rs:78-88 | crates/zeroclaw-tools/src/microsoft365/graph_client.rs:147-157 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/microsoft365/graph_client.rs:78\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/zeroclaw-tools/src/microsoft365/graph_client.rs"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"23468b675543c39e4d90038b669eed1621651638dedf685d219e3a98506f8f45"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-runtime/src/service/mod.rs:3208-3218 | crates/zeroclaw-runtime/src/service/mod.rs:3219-3229 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-runtime/src/service/mod.rs"},"region":{"startLine":3208}}}],"partialFingerprints":{"codehealthFindingId/v1":"792deda39e2b4a566a737da21f8d57c81d8b6ca9ea53e94fcfb267aeb2120edf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-runtime/src/approval/mod.rs:426-436 | crates/zeroclaw-runtime/src/approval/mod.rs:444-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/approval/mod.rs:426\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/zeroclaw-runtime/src/approval/mod.rs"},"region":{"startLine":426}}}],"partialFingerprints":{"codehealthFindingId/v1":"91c2c8f8408be2866a99ebbbfd34eabb2142ce9c93737e428c1bce6e6f101cb3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 5): crates/zeroclaw-channels/src/transcription.rs:179-189 | crates/zeroclaw-channels/src/transcription.rs:286-296 | crates/zeroclaw-channels/src/transcription.rs:390-400 | crates/zeroclaw-channels/src/transcription.rs:508-518 | crates/zeroclaw-channels/src/transcription.rs:683-693 \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/zeroclaw-channels/src/transcription.rs:179\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/zeroclaw-channels/src/transcription.rs:298\u0060 calls \u0060to_string\u0060 and \u0060crates/zeroclaw-channels/src/transcription.rs:695\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/zeroclaw-channels/src/transcription.rs"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"69a2ef7e63a86c9d69d7798d64d19f4a789f432e430dca3c5f6d6515ee2085e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-channels/src/slack.rs:2888-2898 | crates/zeroclaw-channels/src/slack.rs:3124-3132 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/slack.rs:2888\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":2888}}}],"partialFingerprints":{"codehealthFindingId/v1":"0290b77a9d0016104d0c8e4376b9d5d70d9eccff808807ac17889c9703cdbf18"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-tools/src/browser_delegate.rs:173-182 | crates/zeroclaw-tools/src/text_browser.rs:309-319 \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/zeroclaw-tools/src/browser_delegate.rs:173\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/zeroclaw-tools/src/browser_delegate.rs"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"57e5dcd4247c98ac6b4e35f79c5bd2954d837b38ece3ba75dfa91a144a47e8a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-channels/src/slack.rs:3570-3580 | crates/zeroclaw-channels/src/slack.rs:3639-3649 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":3570}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1816316fbd89626362ca026df87cbe90982ed5bf1b291d90aedc4aa5ee22e8b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/whatsapp.rs:616-626 | crates/zeroclaw-channels/src/whatsapp_web.rs:1216-1223 \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/zeroclaw-channels/src/whatsapp.rs:616\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/zeroclaw-channels/src/whatsapp.rs"},"region":{"startLine":616}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cad7a47ec22c8b3948dfac93a724c01c578aa49d1d29a7129b2a7d1acf03fe8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 5): crates/zeroclaw-channels/src/bluesky.rs:532-539 | crates/zeroclaw-channels/src/reddit.rs:405-412 | crates/zeroclaw-channels/src/slack.rs:4351-4361 | crates/zeroclaw-hardware/src/loader.rs:96-103 | crates/zeroclaw-runtime/src/cron/scheduler.rs:589-596 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/bluesky.rs\u0060 and \u0060crates/zeroclaw-channels/src/reddit.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 58 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/zeroclaw-channels/src/bluesky.rs:532\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/zeroclaw-runtime/src/cron/scheduler.rs:586\u0060 calls \u0060mark_component_error\u0060, \u0060to_string\u0060 and \u0060crates/zeroclaw-channels/src/bluesky.rs:529\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/zeroclaw-channels/src/bluesky.rs"},"region":{"startLine":532}}}],"partialFingerprints":{"codehealthFindingId/v1":"e36c50e0b9deb419cd68bc56bc1cd3b8ae3636768768f6b30147787bda1c52d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 5): crates/zeroclaw-plugins/src/wasm_channel.rs:1347-1357 | crates/zeroclaw-plugins/src/wasm_channel.rs:1377-1387 | crates/zeroclaw-plugins/src/wasm_channel.rs:1408-1418 | crates/zeroclaw-plugins/src/wasm_channel.rs:1467-1477 | crates/zeroclaw-plugins/src/wasm_channel.rs:1492-1502 \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/zeroclaw-plugins/src/wasm_channel.rs:1347\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/zeroclaw-plugins/src/wasm_channel.rs"},"region":{"startLine":1347}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bd9c9a0742745d99fe03a5503cc6aa8dca8b6acf672406bd6e33ffd653f80a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-channels/src/email_channel.rs:1065-1074 | crates/zeroclaw-channels/src/orchestrator/mod.rs:16318-16328 \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/zeroclaw-channels/src/email_channel.rs:1065\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/zeroclaw-channels/src/email_channel.rs"},"region":{"startLine":1065}}}],"partialFingerprints":{"codehealthFindingId/v1":"47de63cd271d49bd9fcd044be8355cd020c4c5b1a61173018763401d89c98996"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): crates/zeroclaw-channels/src/matrix.rs:5130-5140 | crates/zeroclaw-channels/src/matrix.rs:5179-5188 | crates/zeroclaw-channels/src/matrix.rs:5263-5272 \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/zeroclaw-channels/src/matrix.rs:5130\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":5130}}}],"partialFingerprints":{"codehealthFindingId/v1":"abafea2db8134cc72cfee4d8684301d787ac2134878d64b37c8837829690b816"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): crates/zeroclaw-providers/src/auth/mod.rs:207-217 | crates/zeroclaw-providers/src/auth/mod.rs:296-305 | crates/zeroclaw-providers/src/auth/mod.rs:393-402 | crates/zeroclaw-providers/src/auth/mod.rs:509-518 \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/zeroclaw-providers/src/auth/mod.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/zeroclaw-providers/src/auth/mod.rs"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"c19b529a0695364333e927e0c98bb39f0817113cfdf3d6b14b163e31d26dc718"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5): crates/zeroclaw-channels/src/slack.rs:2165-2172 | crates/zeroclaw-channels/src/slack.rs:2860-2867 | crates/zeroclaw-channels/src/slack.rs:2932-2937 | crates/zeroclaw-channels/src/slack.rs:2952-2957 | crates/zeroclaw-runtime/src/sop/dispatch.rs:1694-1704 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/slack.rs:2165\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":2165}}}],"partialFingerprints":{"codehealthFindingId/v1":"65fa8fa1532c49d2be70b1745119a60bea1ca89953171f608eecaca3ca947d59"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-channels/src/lark.rs:1911-1921 | crates/zeroclaw-channels/src/lark.rs:2034-2044 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/lark.rs:1911\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":1911}}}],"partialFingerprints":{"codehealthFindingId/v1":"e45c98f19eccd6b85b8fdce08f5d605ed17db626d8a03d6168c56d829f3274aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-channels/src/lark.rs:367-377 | crates/zeroclaw-channels/src/lark.rs:381-389 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/lark.rs:367\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":367}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1b2e73fb9f12b2886edcd94ee152a8eff5cfbea9d0978c14801c38c925cdba1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 6): crates/zeroclaw-channels/src/matrix.rs:3550-3560 | crates/zeroclaw-channels/src/matrix.rs:3569-3579 | crates/zeroclaw-channels/src/slack.rs:2165-2172 | crates/zeroclaw-channels/src/slack.rs:2952-2957 | crates/zeroclaw-channels/src/slack.rs:3302-3310 | crates/zeroclaw-channels/src/slack.rs:3346-3353 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/matrix.rs\u0060 and \u0060crates/zeroclaw-channels/src/slack.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. 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/zeroclaw-channels/src/matrix.rs:3550\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":3550}}}],"partialFingerprints":{"codehealthFindingId/v1":"1eec8118bf443495e0a399e24a8ba07d556db307fd08ebed2653b05845245701"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-runtime/src/observability/otel.rs:434-444 | crates/zeroclaw-runtime/src/observability/otel.rs:485-495 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/observability/otel.rs:434\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/zeroclaw-runtime/src/observability/otel.rs"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba93d2f090d2e5b8b8aede654715282dad5f3c039b6561706da8ee728dbcf2e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 7): crates/zeroclaw-channels/src/telegram.rs:6750-6760 | crates/zeroclaw-channels/src/telegram.rs:6794-6804 | crates/zeroclaw-channels/src/telegram.rs:6843-6853 | crates/zeroclaw-channels/src/telegram.rs:6887-6897 | crates/zeroclaw-channels/src/telegram.rs:6936-6946 | crates/zeroclaw-channels/src/telegram.rs:6985-6995 | crates/zeroclaw-channels/src/telegram.rs:7034-7044 \u2014 all 7 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/zeroclaw-channels/src/telegram.rs:6750\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":6750}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce35473de0b788cc7e4c2b66d43e7b74a0b491a9b1ba7cd8a56881095ca83409"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-gateway/src/api_config.rs:1589-1599 | crates/zeroclaw-gateway/src/api_config.rs:1708-1718 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/api_config.rs:1589\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/zeroclaw-gateway/src/api_config.rs"},"region":{"startLine":1589}}}],"partialFingerprints":{"codehealthFindingId/v1":"05b03eebeaac0105efb3a9c505006266954b1781b10d17fab38254404895a6e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): crates/zeroclaw-channels/src/dingtalk.rs:267-277 | crates/zeroclaw-channels/src/slack.rs:4334-4343 | crates/zeroclaw-channels/src/slack.rs:4368-4378 \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/zeroclaw-channels/src/dingtalk.rs:267\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/zeroclaw-channels/src/dingtalk.rs"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"5da22d882495ee2112c2a5ba062f09de0e190d0998b5b6680dc325924899c96f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 5): crates/zeroclaw-channels/src/dingtalk.rs:227-234 | crates/zeroclaw-channels/src/dingtalk.rs:266-276 | crates/zeroclaw-channels/src/slack.rs:4305-4315 | crates/zeroclaw-channels/src/slack.rs:4333-4343 | crates/zeroclaw-channels/src/slack.rs:4367-4377 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/dingtalk.rs:227\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/zeroclaw-channels/src/dingtalk.rs"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"80e5aa54f01a835ff2d71a9672480cc3d2fc674af037e21b10a02e00e4bac674"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-channels/src/irc.rs:505-515 | crates/zeroclaw-channels/src/irc.rs:533-543 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/irc.rs:505\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/zeroclaw-channels/src/irc.rs"},"region":{"startLine":505}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d66d453c1f54ad9279f22f10cc90f8435a7e72cbe41548bb738789bd5596223"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-runtime/src/security/estop.rs:228-238 | crates/zeroclaw-runtime/src/security/otp.rs:143-153 \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/zeroclaw-runtime/src/security/estop.rs:228\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/zeroclaw-runtime/src/security/estop.rs"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"34dbfd16968bef86f98f684afca0e406afd8f0feb211967107ffd0f8e88cd177"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): crates/zeroclaw-channels/src/discord/rest.rs:49-59 | crates/zeroclaw-channels/src/discord/rest.rs:77-87 | crates/zeroclaw-channels/src/discord/rest.rs:138-148 \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/zeroclaw-channels/src/discord/rest.rs:49\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/zeroclaw-channels/src/discord/rest.rs"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"69b6fab9b218639d1f84aa35664dc488413a61e33b37747bb0f95a02f5248636"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): crates/zeroclaw-memory/src/sqlite.rs:2263-2272 | crates/zeroclaw-memory/src/sqlite.rs:2279-2288 | crates/zeroclaw-memory/src/sqlite.rs:2317-2327 \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/zeroclaw-memory/src/sqlite.rs:2263\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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":2263}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e38e9ac423c0d74318644e3bf9aac8e818af22acf50fcb34db3e67c9317ff03"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-tools/src/a2a_client.rs:2017-2027 | crates/zeroclaw-tools/src/a2a_client.rs:2130-2140 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-tools/src/a2a_client.rs"},"region":{"startLine":2017}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2d3176e712c4e4604290d874f57646d901a47b9d922a218ecc7b0d13721bccc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-tools/src/linkedin.rs:377-387 | crates/zeroclaw-tools/src/linkedin.rs:400-410 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-tools/src/linkedin.rs"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"80cf8980099e3247bfc30e85fa25f512d9f71dcfeced3ef7142413521370659b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/zeroclaw-runtime/src/tools/send_message_to_peer.rs:402-409 | crates/zeroclaw-tools/src/memory_store.rs:97-104 | crates/zeroclaw-tools/src/reaction.rs:188-198 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/tools/send_message_to_peer.rs:402\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/zeroclaw-runtime/src/tools/send_message_to_peer.rs"},"region":{"startLine":402}}}],"partialFingerprints":{"codehealthFindingId/v1":"c63f8a118f012d8e42b67152404cfa6733e45fc508795d5a279fa66b8453a2cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/zeroclaw-runtime/src/sop/engine.rs:2692-2698 | crates/zeroclaw-runtime/src/sop/executor.rs:1079-1089 | crates/zeroclaw-runtime/src/sop/executor.rs:1196-1205 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/sop/engine.rs\u0060 and \u0060crates/zeroclaw-runtime/src/sop/executor.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 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/zeroclaw-runtime/src/sop/engine.rs:2692\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":2692}}}],"partialFingerprints":{"codehealthFindingId/v1":"914b0e390b6006789621000ce4bffdae54660327b0ef22226d94fc543dc48926"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): crates/zeroclaw-tools/src/jira_tool.rs:1151-1161 | crates/zeroclaw-tools/src/jira_tool.rs:1220-1230 | crates/zeroclaw-tools/src/jira_tool.rs:1232-1242 | crates/zeroclaw-tools/src/jira_tool.rs:1244-1254 \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. 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/zeroclaw-tools/src/jira_tool.rs"},"region":{"startLine":1151}}}],"partialFingerprints":{"codehealthFindingId/v1":"38eb34e87f9d57de9d1cf32c7290b65f3a6c9532fe00b5df1034f607b237ac11"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-channels/src/dingtalk.rs:206-216 | crates/zeroclaw-channels/src/lark.rs:1438-1448 \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/zeroclaw-channels/src/dingtalk.rs:206\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/zeroclaw-channels/src/dingtalk.rs"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd0d172d4cd995bd39ed05672877474ab17f12475913eee99dc9d5476375813f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/zeroclaw-runtime/src/tools/cron_add.rs:479-487 | crates/zeroclaw-runtime/src/tools/cron_update.rs:233-243 | crates/zeroclaw-tools/src/llm_task.rs:161-169 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/tools/cron_add.rs\u0060 and \u0060crates/zeroclaw-runtime/src/tools/cron_update.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 114 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/zeroclaw-runtime/src/tools/cron_update.rs:233\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/zeroclaw-runtime/src/tools/cron_add.rs"},"region":{"startLine":479}}}],"partialFingerprints":{"codehealthFindingId/v1":"09ee8af14ac0cd65372fac10ba44854368cdfe63b66fd568acc29c961dbc76cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-channels/src/discord/mod.rs:3959-3969 | crates/zeroclaw-channels/src/discord/mod.rs:3990-4000 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/discord/mod.rs:3959\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":3959}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9aa17424d146fda4b64f82853a23784896533d686b7967908b730bf5cee496e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): src/alias_cli/export.rs:808-818 | src/alias_cli/export.rs:918-923 | src/alias_cli/export.rs:929-934 \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":"src/alias_cli/export.rs"},"region":{"startLine":808}}}],"partialFingerprints":{"codehealthFindingId/v1":"53385397b3b1606ff24fa5ed6a0d28fd797030ab919fbbc137a14b0afc70690c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/zeroclaw-tools/src/proxy_config.rs:358-368 | crates/zeroclaw-tools/src/proxy_config.rs:419-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/proxy_config.rs:358\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/zeroclaw-tools/src/proxy_config.rs"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"388d48f183ca6bb283557b22e9edab2ea2cb1cf9c1c0a8f4ce18f45ec686c868"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-channels/src/acp_channel.rs:390-400 | crates/zeroclaw-runtime/src/rpc/approval_channel.rs:278-287 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/acp_channel.rs\u0060 and \u0060crates/zeroclaw-runtime/src/rpc/approval_channel.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 49 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/zeroclaw-channels/src/acp_channel.rs:390\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/zeroclaw-channels/src/acp_channel.rs"},"region":{"startLine":390}}}],"partialFingerprints":{"codehealthFindingId/v1":"415820869c1c27268b9a25cd80446f4240c5b30732635b4e803cf9747a0e940c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/model_switch.rs:183-192 | crates/zeroclaw-runtime/src/tools/model_switch.rs:196-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/tools/model_switch.rs"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"a07b655b71d10a0be3ba389a6d2a50db10c7a3a6a2dcb0a92a3ac6abd7a715f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): apps/zerocode/src/config_manager.rs:6111-6120 | apps/zerocode/src/config_manager.rs:6132-6141 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/config_manager.rs:6111\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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":6111}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae33e11e00b2e8bf514cc07f7daa89ba1793d9542fb66346e29f8473b1ed5a94"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/zeroclaw-channels/src/lark.rs:3589-3595 | crates/zeroclaw-channels/src/lark.rs:3608-3617 | crates/zeroclaw-channels/src/lark.rs:3626-3632 \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/zeroclaw-channels/src/lark.rs:3589\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":3589}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae7b62cc16eec0f3677a3974fb8496bb3a1a856048c7d213fd6aadedfd4fdcf5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): crates/zeroclaw-channels/src/slack.rs:4247-4256 | crates/zeroclaw-channels/src/slack.rs:4276-4285 | crates/zeroclaw-channels/src/slack.rs:4634-4643 \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/zeroclaw-channels/src/slack.rs:4247\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":4247}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fe51f7578f2b7197de8639610fd167e29ee59b7a4f960a938fd33e888f3e23d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-config/src/schema/v2.rs:3193-3202 | crates/zeroclaw-config/src/schema/v2.rs:3768-3777 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-config/src/schema/v2.rs:3193\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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":3193}}}],"partialFingerprints":{"codehealthFindingId/v1":"45f6a97cbb0228ab48b52b4eb15db702d58f58995bd93110641851a65b7898b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-plugins/src/wasm_memory.rs:606-615 | crates/zeroclaw-plugins/src/wasm_memory.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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-plugins/src/wasm_memory.rs:606\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/zeroclaw-plugins/src/wasm_memory.rs"},"region":{"startLine":606}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dd772f126f949a191297e91d974192ab5cb61927c4c297f1bc8d792c2958951"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-gateway/src/lib.rs:5062-5071 | crates/zeroclaw-gateway/src/lib.rs:5200-5209 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/lib.rs:5062\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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":5062}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5620ab03979bf489af4535a443fe29275d6ec8909d2674f5c918c749bb1aad4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-channels/src/dingtalk.rs:310-319 | crates/zeroclaw-channels/src/lark.rs:2366-2371 \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/zeroclaw-channels/src/dingtalk.rs:310\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/zeroclaw-channels/src/dingtalk.rs"},"region":{"startLine":310}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d19cf6875c3d149bc54c27bd728b1a301cf87ddf8803dbc167f120c322ded7d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-runtime/src/observability/otel.rs:535-544 | crates/zeroclaw-runtime/src/observability/otel.rs:574-583 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/observability/otel.rs:535\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/zeroclaw-runtime/src/observability/otel.rs"},"region":{"startLine":535}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e15c89146a8547c45e6ef38f83dda18bf5934c8d186c2be265c96f4f26579e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 9): crates/zeroclaw-tools/src/jira_tool.rs:122-131 | crates/zeroclaw-tools/src/jira_tool.rs:219-228 | crates/zeroclaw-tools/src/jira_tool.rs:291-300 | crates/zeroclaw-tools/src/jira_tool.rs:370-379 | crates/zeroclaw-tools/src/jira_tool.rs:419-428 | crates/zeroclaw-tools/src/jira_tool.rs:617-626 | crates/zeroclaw-tools/src/jira_tool.rs:708-717 | crates/zeroclaw-tools/src/jira_tool.rs:809-818 | crates/zeroclaw-tools/src/jira_tool.rs:907-916 \u2014 all 9 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/zeroclaw-tools/src/jira_tool.rs:122\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/zeroclaw-tools/src/jira_tool.rs"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3c27984681c3d2cf2d8ab0339fda98d82728c99c195ba1c93f953a51ec11a66"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/zeroclaw-tools/src/jira_tool.rs:1122-1131 | crates/zeroclaw-tools/src/jira_tool.rs:1179-1188 | crates/zeroclaw-tools/src/notion_tool.rs:262-270 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/jira_tool.rs\u0060 and \u0060crates/zeroclaw-tools/src/notion_tool.rs\u0060 as WHOLE FILES: this scan already matched 4 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. 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/zeroclaw-tools/src/jira_tool.rs:1122\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/zeroclaw-tools/src/jira_tool.rs"},"region":{"startLine":1122}}}],"partialFingerprints":{"codehealthFindingId/v1":"251747209ea8b78304e5fb8c987a71f02e11fdb81c3f496266e87b1351dcfb08"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 5): crates/zeroclaw-runtime/src/daemon/mod.rs:1176-1185 | crates/zeroclaw-runtime/src/daemon/mod.rs:1210-1219 | crates/zeroclaw-runtime/src/daemon/mod.rs:1235-1244 | crates/zeroclaw-runtime/src/daemon/mod.rs:1260-1269 | crates/zeroclaw-runtime/src/daemon/mod.rs:1333-1342 \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/zeroclaw-runtime/src/daemon/mod.rs:1176\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/zeroclaw-runtime/src/daemon/mod.rs:1174\u0060 calls \u0060clone\u0060 and \u0060crates/zeroclaw-runtime/src/daemon/mod.rs:1209\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/zeroclaw-runtime/src/daemon/mod.rs"},"region":{"startLine":1176}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c7ee6993147832b852168830b74dca6d9a17f9cbb41305c4a1227a07a7301db"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-runtime/src/rpc/dispatch.rs:5268-5277 | crates/zeroclaw-runtime/src/rpc/local.rs:366-372 \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/zeroclaw-runtime/src/rpc/dispatch.rs:5268\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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":5268}}}],"partialFingerprints":{"codehealthFindingId/v1":"89a4226645dc171edd3086b6a3aa598b398aa9b2dd617d9723fae063f7a13282"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): crates/zeroclaw-plugins/src/wasm_memory.rs:228-237 | crates/zeroclaw-plugins/src/wasm_memory.rs:521-530 | crates/zeroclaw-plugins/src/wasm_memory.rs:684-693 \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/zeroclaw-plugins/src/wasm_memory.rs:228\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/zeroclaw-plugins/src/wasm_memory.rs"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"aabdef290d8a36d1278410f80fd31495757bc798043b1d16bd21a09a3222eee5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-gateway/src/api.rs:2110-2119 | crates/zeroclaw-gateway/src/api.rs:2239-2248 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/api.rs:2110\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/zeroclaw-gateway/src/api.rs"},"region":{"startLine":2110}}}],"partialFingerprints":{"codehealthFindingId/v1":"40a912b507891d4ac6a5c2564a49fe012412b690a9ff785d0dbcbed4d7f87207"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-gateway/src/lib.rs:5669-5678 | crates/zeroclaw-gateway/src/lib.rs:5730-5739 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/lib.rs:5669\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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":5669}}}],"partialFingerprints":{"codehealthFindingId/v1":"b80066a837c05fac5a1210c673285c82df02a1d65faaea0ed312ae04f5d64248"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-channels/src/git/providers/gitea/api.rs:259-268 | crates/zeroclaw-channels/src/git/providers/github/api.rs:509-518 \u2014 \u0060crates/zeroclaw-channels/src/git/providers/gitea/api.rs\u0060 and \u0060crates/zeroclaw-channels/src/git/providers/github/api.rs\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 6 separate duplicated blocks between them, totalling at least 61 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/git/providers/gitea/api.rs:259\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/zeroclaw-channels/src/git/providers/gitea/api.rs"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"36dc406b7687b5a3819ffc7875d425a1a8b6a22d3fc63bec006bfe668287a88b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-runtime/src/rpc/dispatch.rs:6947-6956 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:6978-6987 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/rpc/dispatch.rs:6947\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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":6947}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0b968c4d8b799b68d8227210c6876d790707048e678db7bb63416ca3aa6f443"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/transcription.rs:775-782 | crates/zeroclaw-channels/src/tts.rs:384-393 \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/zeroclaw-channels/src/transcription.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. 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/zeroclaw-channels/src/transcription.rs"},"region":{"startLine":775}}}],"partialFingerprints":{"codehealthFindingId/v1":"323a2f865c7c096695faef6bfb45d92da84544fefa8e8c3e121b5dcf0bb5fe5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-tools/src/browser.rs:1902-1911 | crates/zeroclaw-tools/src/composio.rs:429-433 \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/zeroclaw-tools/src/browser.rs:1902\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/zeroclaw-tools/src/browser.rs"},"region":{"startLine":1902}}}],"partialFingerprints":{"codehealthFindingId/v1":"542bd7da105a71dc5ebd2e63afa311457c06c829e3585ac5fe7a91415aa00b0d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-runtime/src/plugin_runtime.rs:1202-1211 | crates/zeroclaw-runtime/src/plugin_runtime.rs:1239-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/zeroclaw-runtime/src/plugin_runtime.rs:1202\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/zeroclaw-runtime/src/plugin_runtime.rs"},"region":{"startLine":1202}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2c9b05b057135e6c52bc5b7befc74898521449b6e29063d76ee5bfdf23f68ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-tools/src/knowledge_tool.rs:635-644 | crates/zeroclaw-tools/src/knowledge_tool.rs:709-718 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-tools/src/knowledge_tool.rs"},"region":{"startLine":635}}}],"partialFingerprints":{"codehealthFindingId/v1":"b36568546b8603a1516a85db069f999a8d5d63651d0a17b62e6f08e33747a4d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): crates/zeroclaw-tools/src/claude_code_runner.rs:132-138 | crates/zeroclaw-tools/src/codex_cli.rs:113-122 | crates/zeroclaw-tools/src/gemini_cli.rs:93-102 | crates/zeroclaw-tools/src/opencode_cli.rs:93-102 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/claude_code_runner.rs\u0060 and \u0060crates/zeroclaw-tools/src/codex_cli.rs\u0060 as WHOLE FILES: this scan already matched 4 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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/claude_code_runner.rs:132\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/zeroclaw-tools/src/claude_code_runner.rs"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c7268e8616adf31fa721f9e0cd383076db49c65b2c07dddb7b10de2a2eb4e04"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 8): crates/zeroclaw-channels/src/matrix.rs:4799-4803 | crates/zeroclaw-channels/src/matrix.rs:5133-5142 | crates/zeroclaw-channels/src/matrix.rs:5182-5189 | crates/zeroclaw-channels/src/matrix.rs:5266-5273 | crates/zeroclaw-channels/src/telegram.rs:7335-7342 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:3138-3142 | crates/zeroclaw-runtime/src/sop/executor.rs:1514-1518 | crates/zeroclaw-runtime/src/sop/executor.rs:1525-1529 \u2014 there are 8 copies across 4 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 8 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/zeroclaw-channels/src/matrix.rs:4799\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":4799}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8ce841bdbe928413a3b0c23631d8c0b539fb74392eb30d3d65485c9105166e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/zeroclaw-channels/src/wechat.rs:1792-1798 | crates/zeroclaw-runtime/src/sop/engine.rs:6293-6299 | crates/zeroclaw-runtime/src/sop/executor.rs:1256-1265 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/sop/engine.rs\u0060 and \u0060crates/zeroclaw-runtime/src/sop/executor.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 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/zeroclaw-channels/src/wechat.rs:1792\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/zeroclaw-channels/src/wechat.rs"},"region":{"startLine":1792}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1c026cf7ea20d7df23de36bf7a49f5f64572853da03c1d40d7a88788ad5d5db"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 9): crates/zeroclaw-channels/src/whatsapp_web.rs:1323-1329 | crates/zeroclaw-config/src/schema.rs:25099-25108 | crates/zeroclaw-runtime/src/tools/schedule.rs:500-506 | crates/zeroclaw-tools/src/browser_delegate.rs:75-81 | crates/zeroclaw-tools/src/git_operations.rs:872-878 | crates/zeroclaw-tools/src/knowledge_tool.rs:208-214 | crates/zeroclaw-tools/src/knowledge_tool.rs:379-385 | crates/zeroclaw-tools/src/model_routing_config.rs:248-257 | src/cron/mod.rs:27-33 \u2014 there are 9 copies across 8 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 9 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/whatsapp_web.rs"},"region":{"startLine":1323}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f6b8abab59463cba990cf32ff7c0db561fe2c8309a3642a90c9cc5b1c7708a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): src/main.rs:8342-8351 | src/main.rs:8353-8362 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/main.rs:8342\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":"src/main.rs"},"region":{"startLine":8342}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3ef5c629002ad1cb4f0fcbf1a39eb4754cf255ff24b5330cac7961f9ddbfcd9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 23): crates/zeroclaw-channels/src/lark.rs:3770-3779 | crates/zeroclaw-channels/src/lark.rs:3784-3792 | crates/zeroclaw-runtime/src/tools/sop_advance.rs:105-110 | crates/zeroclaw-runtime/src/tools/sop_advance.rs:117-122 | crates/zeroclaw-runtime/src/tools/verifiable_intent.rs:136-143 | crates/zeroclaw-tools/src/browser.rs:2425-2429 | crates/zeroclaw-tools/src/browser.rs:2452-2456 | crates/zeroclaw-tools/src/browser.rs:2609-2613 | crates/zeroclaw-tools/src/browser.rs:2618-2625 | crates/zeroclaw-tools/src/file_edit.rs:87-95 | crates/zeroclaw-tools/src/file_edit.rs:101-109 | crates/zeroclaw-tools/src/file_write.rs:83-91 | crates/zeroclaw-tools/src/google_workspace.rs:189-196 | crates/zeroclaw-tools/src/google_workspace.rs:200-207 | crates/zeroclaw-tools/src/google_workspace.rs:213-217 | crates/zeroclaw-tools/src/knowledge_tool.rs:175-179 | crates/zeroclaw-tools/src/knowledge_tool.rs:188-195 | crates/zeroclaw-tools/src/knowledge_tool.rs:346-350 | crates/zeroclaw-tools/src/knowledge_tool.rs:359-366 | crates/zeroclaw-tools/src/memory_store.rs:62-70 | crates/zeroclaw-tools/src/reaction.rs:96-104 | crates/zeroclaw-tools/src/reaction.rs:110-118 | crates/zeroclaw-tools/src/reaction.rs:124-129 \u2014 there are 23 copies across 10 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 23 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/zeroclaw-channels/src/lark.rs:3770\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 \u0060args\u0060 to \u0060serde_json::Value\u0060 in one and \u0060\u0026serde_json::Value\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/zeroclaw-runtime/src/tools/sop_advance.rs:111\u0060 calls \u0060with_outcome\u0060 and \u0060crates/zeroclaw-tools/src/google_workspace.rs:196\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":3770}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5469174844b284d8cc3d82473055b2fd78853e7c90eee3bf6f1874a57ce9779"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-runtime/src/daemon/mod.rs:884-893 | crates/zeroclaw-runtime/src/daemon/mod.rs:1178-1187 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/daemon/mod.rs:884\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/zeroclaw-runtime/src/daemon/mod.rs"},"region":{"startLine":884}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b5fdddf82ed6b24a0f9e27a719a827738383159d9f69451a8f030df1317b9d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-channels/src/transcription.rs:445-454 | crates/zeroclaw-channels/src/transcription.rs:542-551 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/transcription.rs: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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/transcription.rs"},"region":{"startLine":445}}}],"partialFingerprints":{"codehealthFindingId/v1":"168f620611be6239b6543acf4fcc445016292c73da3a5eb648034019f28418da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 12): crates/zeroclaw-channels/src/matrix.rs:2681-2690 | crates/zeroclaw-channels/src/matrix.rs:2695-2701 | crates/zeroclaw-channels/src/wechat.rs:1231-1237 | crates/zeroclaw-channels/src/wechat.rs:1270-1276 | crates/zeroclaw-channels/src/whatsapp_web.rs:672-678 | crates/zeroclaw-gateway/src/acp.rs:136-141 | crates/zeroclaw-hardware/src/uf2.rs:240-246 | crates/zeroclaw-providers/src/compatible.rs:954-960 | crates/zeroclaw-runtime/src/cron/scheduler.rs:533-539 | crates/zeroclaw-runtime/src/cron/scheduler.rs:553-559 | crates/zeroclaw-runtime/src/cron/store.rs:677-683 | crates/zeroclaw-runtime/src/cron/store.rs:741-747 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/matrix.rs\u0060 and \u0060crates/zeroclaw-channels/src/wechat.rs\u0060 as WHOLE FILES: this scan already matched 9 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 \u0060crates/zeroclaw-channels/src/matrix.rs:2681\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/zeroclaw-channels/src/matrix.rs:2693\u0060 calls \u0060Ok\u0060 and \u0060crates/zeroclaw-channels/src/wechat.rs:1229\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":2681}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae2947575a3fe195f01d5562d8a5cd042604bae57b818bb2abeb1976e2bb0f0e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/agent.rs:2266-2271 | crates/zeroclaw-runtime/src/agent/turn/mod.rs:4431-4440 \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/zeroclaw-runtime/src/agent/agent.rs:2266\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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":2266}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a8cd4aa9b74189cb53ac4079c8742f7b2351a9ff7c1857fc14ff4cad4c62e42"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-runtime/src/rpc/dispatch.rs:2284-2290 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:2491-2500 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/rpc/dispatch.rs:2284\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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":2284}}}],"partialFingerprints":{"codehealthFindingId/v1":"743e94ff7f7a99e23629e7d8c4b8f4a1316e3cbeef3e323f3a0176ff5ffbcc00"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-channels/src/discord/mod.rs:3927-3936 | crates/zeroclaw-channels/src/slack.rs:680-689 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/discord/mod.rs\u0060 and \u0060crates/zeroclaw-channels/src/slack.rs\u0060 as WHOLE FILES: this scan already matched 4 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/zeroclaw-channels/src/discord/mod.rs:3927\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":3927}}}],"partialFingerprints":{"codehealthFindingId/v1":"22343fa56e29a24c8947c4633da45d89aac2c5a0779ed7362e6ec85a403115c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/cron/store.rs:2225-2234 | crates/zeroclaw-runtime/src/heartbeat/store.rs:137-144 \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/zeroclaw-runtime/src/cron/store.rs"},"region":{"startLine":2225}}}],"partialFingerprints":{"codehealthFindingId/v1":"12d0ab0b2535c6440aa8e0f0f8521158314aba40d358c72a908190d132d8a7cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/observability/otel.rs:76-83 | crates/zeroclaw-runtime/src/observability/otel.rs:98-107 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/observability/otel.rs:76\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/zeroclaw-runtime/src/observability/otel.rs"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f0361623130a6d667d8edaa6d6207d15d7e8c9cffb7556210686331255fc52e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/zeroclaw-runtime/src/cron/scheduler.rs:358-367 | crates/zeroclaw-runtime/src/cron/scheduler.rs:444-448 | crates/zeroclaw-runtime/src/cron/scheduler.rs:1126-1130 \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/zeroclaw-runtime/src/cron/scheduler.rs:358\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/zeroclaw-runtime/src/cron/scheduler.rs"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a5fc407879791239416285dccfb70e383a7563c3bff7fa6790c1c82cf5c1086"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 10): crates/zeroclaw-channels/src/orchestrator/mod.rs:4061-4070 | crates/zeroclaw-channels/src/orchestrator/mod.rs:16799-16805 | crates/zeroclaw-channels/src/orchestrator/mod.rs:16825-16831 | crates/zeroclaw-channels/src/whatsapp_web.rs:1613-1619 | crates/zeroclaw-gateway/src/ws.rs:652-658 | crates/zeroclaw-gateway/src/ws.rs:1416-1422 | crates/zeroclaw-gateway/src/ws.rs:1507-1513 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:5319-5328 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:5383-5392 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:14669-14675 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs\u0060 and \u0060crates/zeroclaw-channels/src/whatsapp_web.rs\u0060 as WHOLE FILES: this scan already matched 4 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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:4058\u0060 calls \u0060Ok\u0060 and \u0060crates/zeroclaw-runtime/src/rpc/dispatch.rs:5380\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":4061}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b7f0faea139748a1c42cd145af81431cf94261c64d2c5517e7dd2b26bd437d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 7): crates/zeroclaw-channels/src/orchestrator/mod.rs:12212-12218 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15558-15564 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15857-15863 | crates/zeroclaw-plugins/src/host.rs:1157-1163 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:5270-5279 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:5289-5298 | crates/zeroclaw-runtime/src/sop/engine.rs:1482-1488 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs\u0060 and \u0060crates/zeroclaw-runtime/src/rpc/dispatch.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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 after the matched lines, \u0060crates/zeroclaw-plugins/src/host.rs:1167\u0060 calls \u0060Err\u0060 and \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:15867\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":12212}}}],"partialFingerprints":{"codehealthFindingId/v1":"603727c4b4620064be79e42c785a0e32b7adca301c845e6265b312b3a35ef047"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 19): crates/zeroclaw-channels/src/email_channel.rs:313-319 | crates/zeroclaw-channels/src/email_channel.rs:330-336 | crates/zeroclaw-channels/src/email_channel.rs:604-610 | crates/zeroclaw-channels/src/line.rs:1211-1217 | crates/zeroclaw-channels/src/matrix.rs:2208-2214 | crates/zeroclaw-channels/src/matrix.rs:2224-2230 | crates/zeroclaw-channels/src/notion.rs:116-125 | crates/zeroclaw-providers/src/gemini_cli.rs:155-161 | crates/zeroclaw-providers/src/gemini_cli.rs:168-174 | crates/zeroclaw-providers/src/gemini_cli.rs:202-208 | crates/zeroclaw-providers/src/gemini_cli.rs:230-236 | crates/zeroclaw-providers/src/kilocli.rs:152-158 | crates/zeroclaw-providers/src/kilocli.rs:165-171 | crates/zeroclaw-providers/src/kilocli.rs:199-205 | crates/zeroclaw-providers/src/kilocli.rs:227-233 | crates/zeroclaw-providers/src/openai_codex.rs:1067-1073 | crates/zeroclaw-providers/src/openai_codex.rs:1146-1152 | crates/zeroclaw-tools/src/web_fetch.rs:274-280 | crates/zeroclaw-tools/src/web_fetch.rs:302-308 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/matrix.rs\u0060 and \u0060crates/zeroclaw-tools/src/web_fetch.rs\u0060 as WHOLE FILES: this scan already matched 5 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/email_channel.rs"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"f28a138c7dfe1d6e2f0779c6302be1ef3a3b30c530dcf7c87fc8143cb89d4278"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-infra/src/acp_session_store.rs:497-506 | crates/zeroclaw-infra/src/acp_session_store.rs:510-519 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-infra/src/acp_session_store.rs:497\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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":497}}}],"partialFingerprints":{"codehealthFindingId/v1":"8643e3ce756691ae5c1f374c760043745dbd70c7160f1356563d1185a875c941"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): apps/zerocode/src/zerocode_pane.rs:854-863 | apps/zerocode/src/zerocode_pane.rs:934-943 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/zerocode_pane.rs:854\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":"apps/zerocode/src/zerocode_pane.rs"},"region":{"startLine":854}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5775719d1b81d1d7982c33a3f205ce11cce0ea3148956ec72274c3f7fcca4d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): crates/zeroclaw-runtime/src/sop/engine.rs:3800-3809 | crates/zeroclaw-runtime/src/sop/engine.rs:3854-3863 | crates/zeroclaw-runtime/src/sop/engine.rs:3895-3904 \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/zeroclaw-runtime/src/sop/engine.rs:3800\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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":3800}}}],"partialFingerprints":{"codehealthFindingId/v1":"e90b4791e81dfd28bfe40aab078a315094bf57fb0544f1e5d20d701dc68af9ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-tools/src/mcp_prompts_tool.rs:134-143 | crates/zeroclaw-tools/src/mcp_resources_tool.rs:132-141 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/mcp_prompts_tool.rs\u0060 and \u0060crates/zeroclaw-tools/src/mcp_resources_tool.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. 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/zeroclaw-tools/src/mcp_prompts_tool.rs:134\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/zeroclaw-tools/src/mcp_prompts_tool.rs"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"e21210f5ecfff13e6b031b5c7e816718cb08be14244fae306640550e7f19dbe0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/zeroclaw-runtime/src/sop/store/sqlite.rs:398-403 | crates/zeroclaw-runtime/src/sop/store/sqlite.rs:413-418 | crates/zeroclaw-runtime/src/sop/store/sqlite.rs:448-457 \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/zeroclaw-runtime/src/sop/store/sqlite.rs"},"region":{"startLine":398}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdd52aa78cb6f27f453a32f7d4357880a91e836ac0c7d250f88d2d436133d761"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/zeroclaw-tools/src/jira_tool.rs:1103-1111 | crates/zeroclaw-tools/src/jira_tool.rs:1141-1149 | crates/zeroclaw-tools/src/notion_tool.rs:303-311 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/jira_tool.rs\u0060 and \u0060crates/zeroclaw-tools/src/notion_tool.rs\u0060 as WHOLE FILES: this scan already matched 4 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. 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/zeroclaw-tools/src/jira_tool.rs"},"region":{"startLine":1103}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ba3b33cd4f46582f550ec9134532a739a9fb8bf3b563e971be135287cc220cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-providers/src/openai.rs:614-622 | crates/zeroclaw-providers/src/openai.rs:1438-1446 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/openai.rs:614\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/zeroclaw-providers/src/openai.rs"},"region":{"startLine":614}}}],"partialFingerprints":{"codehealthFindingId/v1":"d90b8fb04b243f38e5c1214b8403519edbcd4e310d45edb7d814234ee0ee3eff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-channels/src/slack.rs:4801-4809 | crates/zeroclaw-channels/src/slack.rs:5032-5040 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/slack.rs:4801\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":4801}}}],"partialFingerprints":{"codehealthFindingId/v1":"4133333318c16f524cf846d2cf3494c87dcb61aa2279aa7f19b16c0ef9bc6822"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24 lines \u00D7 2): crates/zeroclaw-hardware/src/peripherals/arduino_upload.rs:325-348 | crates/zeroclaw-hardware/src/peripherals/arduino_upload.rs:359-382 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-hardware/src/peripherals/arduino_upload.rs:325\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/zeroclaw-hardware/src/peripherals/arduino_upload.rs"},"region":{"startLine":325}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5c83441f35e26a5eb4cbd29975d8806d785e0b3efad64861260190398ec2382"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-channels/src/wechat.rs:2232-2240 | crates/zeroclaw-channels/src/wechat.rs:2253-2261 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/wechat.rs:2232\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/zeroclaw-channels/src/wechat.rs"},"region":{"startLine":2232}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3ddf1ad2001a0ce37c7fa9a4a602f5224cb96cb1fcc2c5dbf28c5606f18d9a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): crates/zeroclaw-channels/src/slack.rs:3365-3373 | crates/zeroclaw-channels/src/slack.rs:3378-3386 | crates/zeroclaw-channels/src/slack.rs:3397-3405 | crates/zeroclaw-channels/src/slack.rs:3413-3421 \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/zeroclaw-channels/src/slack.rs:3365\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":3365}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f7631a9d1876733370ce6caa6b0b02b1c3b35f0892f41f551a92157164347eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-memory/src/knowledge_graph_pg.rs:44-49 | crates/zeroclaw-memory/src/knowledge_graph_pg.rs:57-65 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-memory/src/knowledge_graph_pg.rs:44\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/zeroclaw-memory/src/knowledge_graph_pg.rs"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b498a8cbc394e7b3c555562fc49362468ac464acbf2a971d49eec3ce4b7cfa4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-gateway/src/api_pairing.rs:420-428 | crates/zeroclaw-gateway/src/api_pairing.rs:441-449 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/api_pairing.rs:420\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/zeroclaw-gateway/src/api_pairing.rs"},"region":{"startLine":420}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ecea8787f677ac621859457da9b1e233a4bbaa2cdf4e3b5eb1356f55851e480"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-gateway/src/api.rs:566-574 | crates/zeroclaw-gateway/src/api.rs:602-610 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-gateway/src/api.rs"},"region":{"startLine":566}}}],"partialFingerprints":{"codehealthFindingId/v1":"d284b53dab5608dbc11ce3c9fba8d7b08a3778b4441a86a2123ea4bdc22b4605"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-memory/src/postgres.rs:584-591 | crates/zeroclaw-memory/src/postgres.rs:662-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-memory/src/postgres.rs:584\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/zeroclaw-memory/src/postgres.rs"},"region":{"startLine":584}}}],"partialFingerprints":{"codehealthFindingId/v1":"e650aa294764ec21cb2d53afc33ef88e9ac5484e2e88a47f00554ff2c8137bf4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 7): crates/zeroclaw-channels/src/matrix.rs:1950-1956 | crates/zeroclaw-channels/src/orchestrator/mod.rs:17094-17100 | crates/zeroclaw-channels/src/voice_wake.rs:407-415 | crates/zeroclaw-channels/src/wechat.rs:2613-2619 | crates/zeroclaw-gateway/src/lib.rs:2093-2099 | crates/zeroclaw-providers/src/openai_codex.rs:1433-1438 | crates/zeroclaw-runtime/src/daemon/mod.rs:2684-2690 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/matrix.rs\u0060 and \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 76 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/zeroclaw-channels/src/matrix.rs:1950\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":1950}}}],"partialFingerprints":{"codehealthFindingId/v1":"47f58e8d7be9d9d34b45f604229b35a16d9fb24ad9f71d9d74a0e4fa2be4247b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-providers/src/compatible.rs:1059-1067 | crates/zeroclaw-providers/src/compatible.rs:1134-1141 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/compatible.rs:1059\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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":1059}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a3d8e8f27c74042aa8251508f6b29b3145b709985085b820673d741b2e2849f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-memory/src/sqlite.rs:1673-1681 | crates/zeroclaw-memory/src/sqlite.rs:1719-1727 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-memory/src/sqlite.rs:1673\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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":1673}}}],"partialFingerprints":{"codehealthFindingId/v1":"d60e5f06184b741174ac4258265d687be1c0471b442945b3e29517b9d875b59a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/turn/mod.rs:5085-5092 | crates/zeroclaw-runtime/src/sop/executor.rs:1347-1355 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/agent/turn/mod.rs\u0060 and \u0060crates/zeroclaw-runtime/src/sop/executor.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/zeroclaw-runtime/src/agent/turn/mod.rs:5085\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/zeroclaw-runtime/src/agent/turn/mod.rs"},"region":{"startLine":5085}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c6248dff721a83de49ece3cb675a02afddebb7d0a38f79e239bf65d2e103048"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-tools/src/git_operations.rs:2057-2065 | crates/zeroclaw-tools/src/knowledge_tool.rs:578-586 \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/zeroclaw-tools/src/git_operations.rs"},"region":{"startLine":2057}}}],"partialFingerprints":{"codehealthFindingId/v1":"aeec6faf7e3bca1adf519a0618ae50f3498dc366a764cc47e8df6899159184a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): src/main.rs:10629-10637 | src/main.rs:14511-14519 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/main.rs:10629\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/main.rs"},"region":{"startLine":10629}}}],"partialFingerprints":{"codehealthFindingId/v1":"da8c75d8d4415cf1971158b7659022118d1fce34edab346191fa93efd60a466b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/zeroclaw-providers/src/auth/email_oauth2.rs:96-104 | crates/zeroclaw-providers/src/auth/openai_oauth.rs:144-152 | crates/zeroclaw-providers/src/auth/xai_oauth.rs:241-249 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/auth/email_oauth2.rs\u0060 and \u0060crates/zeroclaw-providers/src/auth/openai_oauth.rs\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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-providers/src/auth/email_oauth2.rs"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8b70e9d0428a157e04efcb7e47710c9234d90f21d728dab003fdc1e32b3f1f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 5): crates/zeroclaw-memory/src/qdrant.rs:416-424 | crates/zeroclaw-memory/src/qdrant.rs:458-466 | crates/zeroclaw-memory/src/qdrant.rs:579-587 | crates/zeroclaw-memory/src/qdrant.rs:784-792 | crates/zeroclaw-memory/src/qdrant.rs:1176-1184 \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/zeroclaw-memory/src/qdrant.rs:416\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/zeroclaw-memory/src/qdrant.rs"},"region":{"startLine":416}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a6aa912ca4f9e1957ca8630b8b9cb3e3b2d038962f9de7c14e2074a054a3dd8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 11): crates/zeroclaw-config/src/schema/v2.rs:3923-3929 | crates/zeroclaw-config/src/schema/v2.rs:3966-3972 | crates/zeroclaw-memory/src/qdrant.rs:416-424 | crates/zeroclaw-memory/src/qdrant.rs:458-466 | crates/zeroclaw-memory/src/qdrant.rs:508-515 | crates/zeroclaw-memory/src/qdrant.rs:579-587 | crates/zeroclaw-memory/src/qdrant.rs:635-642 | crates/zeroclaw-memory/src/qdrant.rs:784-792 | crates/zeroclaw-memory/src/qdrant.rs:994-1000 | crates/zeroclaw-memory/src/qdrant.rs:1103-1110 | crates/zeroclaw-memory/src/qdrant.rs:1176-1184 \u2014 there are 11 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 11 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/zeroclaw-config/src/schema/v2.rs:3923\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/zeroclaw-config/src/schema/v2.rs:3965\u0060 calls \u0060query\u0060 and \u0060crates/zeroclaw-config/src/schema/v2.rs:3922\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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":3923}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a7a7a3dc843b737e879301914996845e64bc4dd524f4dd1de762297e6b46e0a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-channels/src/telegram.rs:1568-1576 | crates/zeroclaw-providers/src/multimodal.rs:2582-2590 \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/zeroclaw-channels/src/telegram.rs:1568\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":1568}}}],"partialFingerprints":{"codehealthFindingId/v1":"a272bb0f47d209f48abd72917c08e74a7c800d753e681ee115967b94a49eb663"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/cron/store.rs:1844-1849 | crates/zeroclaw-runtime/src/cron/store.rs:2042-2050 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/cron/store.rs:1844\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/zeroclaw-runtime/src/cron/store.rs"},"region":{"startLine":1844}}}],"partialFingerprints":{"codehealthFindingId/v1":"eac0febc72c29bb26711cf56264083c03d1533160d25d72cff0781c0d6fcdac8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/zeroclaw-channels/src/tts.rs:132-140 | crates/zeroclaw-channels/src/tts.rs:262-270 | crates/zeroclaw-channels/src/tts.rs:973-981 \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/zeroclaw-channels/src/tts.rs:132\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/zeroclaw-channels/src/tts.rs:273\u0060 calls \u0060or_else\u0060, \u0060as_str\u0060 and \u0060crates/zeroclaw-channels/src/tts.rs:143\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/zeroclaw-channels/src/tts.rs"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b51327f2379101857a0aca144e12d9e16d8345861f03ab4fe7f325105017505"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-hardware/src/peripherals/mod.rs:80-88 | crates/zeroclaw-hardware/src/peripherals/mod.rs:155-163 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-hardware/src/peripherals/mod.rs:80\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/zeroclaw-hardware/src/peripherals/mod.rs"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea5e81858a24b2ed34cfd1526efb87aa050d8949b80bf62ec1a51da99e1b4579"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-macros/src/lib.rs:2713-2721 | crates/zeroclaw-macros/src/lib.rs:2834-2842 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-macros/src/lib.rs:2713\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/zeroclaw-macros/src/lib.rs"},"region":{"startLine":2713}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee5a89a3a366ded4848c335cf1af50cd9956e58c3eb8cec1730020805d95b9a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/scoped.rs:233-241 | crates/zeroclaw-runtime/src/tools/scoped.rs:244-252 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/tools/scoped.rs:233\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/zeroclaw-runtime/src/tools/scoped.rs"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d8a250901f439f6df11bc5c954bb4ceb466c2e39c7e39faa5afc51a733f9ca0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/loop_.rs:3321-3329 | crates/zeroclaw-runtime/src/agent/turn/max_iter.rs:101-106 \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/zeroclaw-runtime/src/agent/loop_.rs:3321\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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":3321}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fe065a9d397b22f7bbfb12b47e6122d264165afefdd44b1091c52dd4d8f0b97"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 5): crates/zeroclaw-tools/src/linkedin_client.rs:321-329 | crates/zeroclaw-tools/src/linkedin_client.rs:386-394 | crates/zeroclaw-tools/src/linkedin_client.rs:454-462 | crates/zeroclaw-tools/src/linkedin_client.rs:498-506 | crates/zeroclaw-tools/src/linkedin_client.rs:564-572 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/linkedin_client.rs"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"70b94aa677de302e5f20fe34bfcf8fa45d9183f05e6b3dcb1ddc48e6cf944362"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-tools/src/web_search_tool.rs:715-723 | crates/zeroclaw-tools/src/web_search_tool.rs:869-877 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/web_search_tool.rs:715\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/zeroclaw-tools/src/web_search_tool.rs"},"region":{"startLine":715}}}],"partialFingerprints":{"codehealthFindingId/v1":"6243e5f1a9d1f5e4f43c7954d1513b7f6f1e7dfef57c8c163300907950804d5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): crates/zeroclaw-plugins/src/wasm_channel.rs:1431-1439 | crates/zeroclaw-plugins/src/wasm_channel.rs:1512-1520 | crates/zeroclaw-plugins/src/wasm_channel.rs:1533-1541 | crates/zeroclaw-plugins/src/wasm_channel.rs:1559-1567 \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/zeroclaw-plugins/src/wasm_channel.rs:1431\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/zeroclaw-plugins/src/wasm_channel.rs"},"region":{"startLine":1431}}}],"partialFingerprints":{"codehealthFindingId/v1":"785b20c0b957020f2bf10b6c1220654eafd08a033e31b8ac198f9eac0b08b2c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-providers/src/auth/openai_oauth.rs:250-256 | crates/zeroclaw-providers/src/auth/xai_oauth.rs:372-380 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/auth/openai_oauth.rs\u0060 and \u0060crates/zeroclaw-providers/src/auth/xai_oauth.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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. 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/zeroclaw-providers/src/auth/openai_oauth.rs"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5f9e12526cb4f9440a6f468bbfb65c58cd57b5bd54112ffeeb9099f8ac7723c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): crates/zeroclaw-config/src/env_overrides.rs:182-186 | crates/zeroclaw-config/src/schema.rs:25097-25105 | crates/zeroclaw-runtime/src/sop/engine.rs:1350-1354 | crates/zeroclaw-runtime/src/sop/engine.rs:1826-1831 \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/zeroclaw-config/src/env_overrides.rs:182\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/zeroclaw-config/src/env_overrides.rs"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ef7e8747ed1b327c4eedc6087d1eabcc6ec947d958b7b239fac6b499fe3cb9a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-gateway/src/api_config.rs:1655-1663 | crates/zeroclaw-gateway/src/api_config.rs:2416-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. 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/zeroclaw-gateway/src/api_config.rs"},"region":{"startLine":1655}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e8ab9c62851dbe76f73748972dd628ad0f07b484448020409baca0f074e08da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): crates/zeroclaw-channels/src/git/channel.rs:555-563 | crates/zeroclaw-memory/src/lib.rs:875-880 | crates/zeroclaw-runtime/src/daemon/mod.rs:1086-1090 | src/main.rs:16032-16039 \u2014 before extracting anything, compare \u0060crates/zeroclaw-memory/src/lib.rs\u0060 and \u0060crates/zeroclaw-runtime/src/daemon/mod.rs\u0060 as WHOLE FILES: this scan already matched 5 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/zeroclaw-channels/src/git/channel.rs:555\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/zeroclaw-channels/src/git/channel.rs"},"region":{"startLine":555}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7031ee3d0d485cdf2c10073429c3eda99c35081019c1d20ae798a889e91f94f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/zeroclaw-runtime/src/daemon/mod.rs:1088-1093 | crates/zeroclaw-runtime/src/live_config_authority.rs:912-917 | src/main.rs:16034-16042 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/daemon/mod.rs:1088\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/zeroclaw-runtime/src/daemon/mod.rs"},"region":{"startLine":1088}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fe7f579c6165065d6b630bb98c2c6a31fc131d0309c76882abb9c318f44c277"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): apps/zerocode/src/config_manager.rs:2931-2939 | apps/zerocode/src/config_manager.rs:3052-3060 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/config_manager.rs:2931\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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":2931}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e49cb783b40ab887b7472a74715a6894a0c130b2d807f96cd56d7f92b6ed10a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-providers/src/auth/profiles.rs:294-302 | crates/zeroclaw-providers/src/factory.rs:1976-1981 \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/zeroclaw-providers/src/auth/profiles.rs:294\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/zeroclaw-providers/src/auth/profiles.rs"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"6057170a78d811be285a90f455b08b5fbc2226a65f9166b03d7a51492398a689"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/turn/mod.rs:5097-5104 | crates/zeroclaw-runtime/src/sop/executor.rs:1359-1367 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/agent/turn/mod.rs\u0060 and \u0060crates/zeroclaw-runtime/src/sop/executor.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/zeroclaw-runtime/src/agent/turn/mod.rs:5097\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/zeroclaw-runtime/src/agent/turn/mod.rs"},"region":{"startLine":5097}}}],"partialFingerprints":{"codehealthFindingId/v1":"693854606cf8c523d1d39456a7a226361ee7be35b6c9737e1a7baf1e533f7250"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-providers/src/auth/gemini_oauth.rs:135-143 | crates/zeroclaw-providers/src/auth/gemini_oauth.rs:189-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/auth/gemini_oauth.rs: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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-providers/src/auth/gemini_oauth.rs"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8a84aa64a8a4d459ae3c2820ba1a5661cf93e7bdcbc5ae64ac8418997350bea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-tools/src/jira_tool.rs:1166-1174 | crates/zeroclaw-tools/src/notion_tool.rs:276-284 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/jira_tool.rs\u0060 and \u0060crates/zeroclaw-tools/src/notion_tool.rs\u0060 as WHOLE FILES: this scan already matched 4 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. 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/zeroclaw-tools/src/jira_tool.rs"},"region":{"startLine":1166}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff345ca9a708a95d645a2adac824ea35a5e8c32851045791af2e86075570fc15"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/zeroclaw-tools/src/linkedin_client.rs:1023-1031 | crates/zeroclaw-tools/src/linkedin_client.rs:1081-1089 | crates/zeroclaw-tools/src/linkedin_client.rs:1137-1145 \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/zeroclaw-tools/src/linkedin_client.rs:1023\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/zeroclaw-tools/src/linkedin_client.rs"},"region":{"startLine":1023}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fed75526bc6d4090e70867791a666443635cb268683034cc84bee9b626ae224"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-providers/src/auth/email_oauth2.rs:176-184 | crates/zeroclaw-providers/src/auth/openai_oauth.rs:422-430 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/auth/email_oauth2.rs\u0060 and \u0060crates/zeroclaw-providers/src/auth/openai_oauth.rs\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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-providers/src/auth/email_oauth2.rs"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a95de197e28d3d4261f87c22e92d37aa369318746307d49cb3f42aa051b4ba8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): crates/zeroclaw-channels/src/discord/mod.rs:3927-3933 | crates/zeroclaw-channels/src/nextcloud_talk.rs:770-776 | crates/zeroclaw-channels/src/orchestrator/mod.rs:6498-6506 | crates/zeroclaw-channels/src/orchestrator/mod.rs:6891-6899 | crates/zeroclaw-channels/src/orchestrator/mod.rs:6908-6916 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/nextcloud_talk.rs\u0060 and \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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/zeroclaw-channels/src/discord/mod.rs:3927\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/zeroclaw-channels/src/nextcloud_talk.rs:777\u0060 calls \u0060remove\u0060 and \u0060crates/zeroclaw-channels/src/discord/mod.rs:3935\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":3927}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a9437dfef2386e30442508d047638e4fd400ea5daf21a6291146f22fe908854"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-runtime/src/skills/mod.rs:3272-3280 | crates/zeroclaw-runtime/src/skills/mod.rs:3394-3402 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/skills/mod.rs:3272\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/zeroclaw-runtime/src/skills/mod.rs"},"region":{"startLine":3272}}}],"partialFingerprints":{"codehealthFindingId/v1":"842a11ae1f38d27341bfdb852e6bd7d14667011d15c108b75143268cd01d27f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): apps/zerocode/src/zerocode_pane.rs:636-644 | apps/zerocode/src/zerocode_pane.rs:671-679 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/zerocode_pane.rs:636\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":"apps/zerocode/src/zerocode_pane.rs"},"region":{"startLine":636}}}],"partialFingerprints":{"codehealthFindingId/v1":"4136fb6d18d0fc8dd9297964d180bbd5e6d2a3c8d35bcef07dff7ff75f643856"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-config/src/alias_refs.rs:1073-1081 | crates/zeroclaw-config/src/alias_refs.rs:1137-1145 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-config/src/alias_refs.rs:1073\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/zeroclaw-config/src/alias_refs.rs"},"region":{"startLine":1073}}}],"partialFingerprints":{"codehealthFindingId/v1":"639c38fccec29a492393e6ffc7db0f5d5fc34be1c2d7108a55eec4abeaa50aa4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-tools/src/mcp_client.rs:804-812 | crates/zeroclaw-tools/src/mcp_client.rs:840-848 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/mcp_client.rs:804\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/zeroclaw-tools/src/mcp_client.rs"},"region":{"startLine":804}}}],"partialFingerprints":{"codehealthFindingId/v1":"adeefd665b892b9f941adb9d6cd71128e013ec24fb446bb6218c592f29856f4e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 37): crates/zeroclaw-channels/src/slack.rs:3431-3435 | crates/zeroclaw-channels/src/transcription.rs:78-82 | crates/zeroclaw-config/src/env_overrides.rs:216-221 | crates/zeroclaw-config/src/schema.rs:12476-12481 | crates/zeroclaw-config/src/schema.rs:12563-12568 | crates/zeroclaw-hardware/src/device.rs:471-475 | crates/zeroclaw-hardware/src/device.rs:491-495 | crates/zeroclaw-providers/src/auth/profiles.rs:243-247 | crates/zeroclaw-providers/src/models_dev.rs:79-83 | crates/zeroclaw-providers/src/openrouter.rs:533-537 | crates/zeroclaw-runtime/src/sop/engine.rs:2408-2413 | crates/zeroclaw-runtime/src/sop/engine.rs:2580-2584 | crates/zeroclaw-runtime/src/sop/engine.rs:2891-2895 | crates/zeroclaw-runtime/src/sop/engine.rs:4083-4088 | crates/zeroclaw-runtime/src/sop/engine.rs:4751-4756 | crates/zeroclaw-runtime/src/sop/engine.rs:5085-5089 | crates/zeroclaw-runtime/src/sop/engine.rs:5657-5661 | crates/zeroclaw-runtime/src/sop/engine.rs:6063-6067 | crates/zeroclaw-runtime/src/tools/security_ops.rs:148-153 | crates/zeroclaw-tools/src/browser_open.rs:278-283 | crates/zeroclaw-tools/src/browser_open.rs:290-294 | crates/zeroclaw-tools/src/mcp_client.rs:1260-1264 | crates/zeroclaw-tools/src/model_routing_config.rs:205-209 | crates/zeroclaw-tools/src/model_routing_config.rs:301-306 | crates/zeroclaw-tools/src/model_routing_config.rs:345-350 | crates/zeroclaw-tools/src/model_routing_config.rs:376-380 | crates/zeroclaw-tools/src/model_routing_config.rs:398-402 | crates/zeroclaw-tools/src/model_routing_config.rs:430-434 | crates/zeroclaw-tools/src/model_routing_config.rs:462-466 | crates/zeroclaw-tools/src/model_routing_config.rs:490-494 | crates/zeroclaw-tools/src/proxy_config.rs:107-111 | crates/zeroclaw-tools/src/proxy_config.rs:138-143 | crates/zeroclaw-tools/src/proxy_config.rs:278-282 | src/main.rs:10113-10121 | src/main.rs:12956-12960 | src/skills/mod.rs:1187-1192 | src/sop/mod.rs:137-141 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/slack.rs\u0060 and \u0060crates/zeroclaw-channels/src/transcription.rs\u0060 as WHOLE FILES: this scan already matched 3 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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/slack.rs:3431\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 \u0060alias\u0060 to \u0060\u0026str\u0060 in one and \u0060String\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":3431}}}],"partialFingerprints":{"codehealthFindingId/v1":"d192dc27bb02a599624ae06d3a8a070099b1471d93113ddc6fe3a635a1747ab5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/zeroclaw-channels/src/discord/mod.rs:1375-1379 | crates/zeroclaw-channels/src/line.rs:1246-1250 | crates/zeroclaw-providers/src/bedrock.rs:1271-1279 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/discord/mod.rs:1375\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":1375}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b209b9f2119670c75c8b181ec1cbce6c5026d7a95f765e8850692a8662601a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/zeroclaw-channels/src/line.rs:652-660 | crates/zeroclaw-channels/src/matrix.rs:1959-1964 | crates/zeroclaw-channels/src/matrix.rs:2010-2015 \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/zeroclaw-channels/src/line.rs:652\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/zeroclaw-channels/src/line.rs"},"region":{"startLine":652}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee99a3ed333894dc548e4b57ed62f45a6bd2a350c8e701c1122cba506b925788"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/zeroclaw-tools/src/ask_user.rs:247-255 | crates/zeroclaw-tools/src/escalate.rs:374-382 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/ask_user.rs\u0060 and \u0060crates/zeroclaw-tools/src/escalate.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 96 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 before the matched lines, \u0060crates/zeroclaw-tools/src/ask_user.rs:245\u0060 calls \u0060format_question\u0060, \u0060as_deref\u0060 and \u0060crates/zeroclaw-tools/src/escalate.rs:370\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/zeroclaw-tools/src/ask_user.rs"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"94ded34cdfaf1fae6ec6c6386ae9cea5e41eb154bce707fae88d06358f90d9e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/zeroclaw-channels/src/matrix.rs:2016-2024 | crates/zeroclaw-channels/src/mochat.rs:270-274 | crates/zeroclaw-channels/src/twitter.rs:407-411 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/matrix.rs\u0060 and \u0060crates/zeroclaw-channels/src/mochat.rs\u0060 as WHOLE FILES: this scan already matched 3 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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/matrix.rs:2016\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":2016}}}],"partialFingerprints":{"codehealthFindingId/v1":"21087c41e51c3e2adf5bc068bd76e3daa2ad744c52ae42add9419507daaeb358"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/zeroclaw-channels/src/twitter.rs:110-114 | crates/zeroclaw-tools/src/composio.rs:740-748 | crates/zeroclaw-tools/src/knowledge_tool.rs:409-414 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/twitter.rs:110\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/zeroclaw-channels/src/twitter.rs"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b8a6687275fcc84052d7d1a513a0f027693fc4d473dade7bf1438a980bc05a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/zeroclaw-runtime/src/tools/cron_add.rs:433-441 | crates/zeroclaw-runtime/src/tools/cron_add.rs:479-487 | crates/zeroclaw-runtime/src/tools/cron_update.rs:233-241 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/tools/cron_add.rs\u0060 and \u0060crates/zeroclaw-runtime/src/tools/cron_update.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 114 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/zeroclaw-runtime/src/tools/cron_add.rs"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"62224963b8cb2d06a355acc963253b81ee18a1313438295a0cae339801476051"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/zeroclaw-channels/src/orchestrator/mod.rs:1272-1277 | crates/zeroclaw-channels/src/orchestrator/mod.rs:12653-12661 | crates/zeroclaw-gateway/src/lib.rs:3445-3450 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs\u0060 and \u0060crates/zeroclaw-gateway/src/lib.rs\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 96 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/zeroclaw-channels/src/orchestrator/mod.rs:1272\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":1272}}}],"partialFingerprints":{"codehealthFindingId/v1":"07437edfff22fc44946fce9343187549c25ed4df7fbea9e5f11e7429bf443e16"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/zeroclaw-providers/src/auth/gemini_oauth.rs:118-126 | crates/zeroclaw-providers/src/auth/gemini_oauth.rs:172-180 | crates/zeroclaw-providers/src/auth/gemini_oauth.rs:216-224 \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/zeroclaw-providers/src/auth/gemini_oauth.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/zeroclaw-providers/src/auth/gemini_oauth.rs"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e93e6350c45bda94babedd3ff620d58a8273fa985ec72f8a016a213aec2a9e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): crates/zeroclaw-config/src/pairing.rs:267-274 | crates/zeroclaw-providers/src/gemini.rs:958-962 | crates/zeroclaw-tools/src/http_request.rs:621-625 | crates/zeroclaw-tools/src/web_fetch.rs:487-491 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/http_request.rs\u0060 and \u0060crates/zeroclaw-tools/src/web_fetch.rs\u0060 as WHOLE FILES: this scan already matched 9 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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-config/src/pairing.rs:267\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/zeroclaw-config/src/pairing.rs"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"d12dab52d32d2c31c822ef4ef06b2566e5e098c9e479fb122352f5995d03e88b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/twitter.rs:101-108 | crates/zeroclaw-channels/src/twitter.rs:142-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/zeroclaw-channels/src/twitter.rs:101\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/zeroclaw-channels/src/twitter.rs"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"59f91ad658c149d042fc273b135c6161e840b9820f980f4b37c4a64876e3b8f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): crates/zeroclaw-runtime/src/tools/skill_tool.rs:263-270 | crates/zeroclaw-tools/src/browser_delegate.rs:287-294 | crates/zeroclaw-tools/src/screenshot.rs:134-141 | crates/zeroclaw-tools/src/text_browser.rs:395-402 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/tools/skill_tool.rs:263\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/zeroclaw-tools/src/text_browser.rs:405\u0060 calls \u0060as_secs\u0060 and \u0060crates/zeroclaw-tools/src/screenshot.rs:144\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/zeroclaw-runtime/src/tools/skill_tool.rs"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c351e05a9902fb0d3ae9bc348c755d981cde87b7dae1b212f341f4a38101460"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src/alias_cli/export.rs:167-172 | src/alias_cli/export.rs:902-909 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/alias_cli/export.rs:167\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/alias_cli/export.rs"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea16d89f6b04c7b83dea7c7f09f26024325a189947fcd3349e4d911c95ccb94e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/zeroclaw-runtime/src/sop/metrics.rs:158-165 | crates/zeroclaw-runtime/src/sop/metrics.rs:184-191 | crates/zeroclaw-runtime/src/sop/metrics.rs:206-213 \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/zeroclaw-runtime/src/sop/metrics.rs:158\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/zeroclaw-runtime/src/sop/metrics.rs"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bf356e3be7ee11ff26af38732a8958bcb113f7cf6bf67e6b17fb28cb028ee64"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/zeroclaw-channels/src/lark.rs:3010-3017 | crates/zeroclaw-memory/src/embeddings.rs:149-154 | crates/zeroclaw-memory/src/qdrant.rs:1029-1036 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/lark.rs:3010\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/zeroclaw-channels/src/lark.rs:3017\u0060 calls \u0060json\u0060, \u0060get\u0060, \u0060and_then\u0060 and \u0060crates/zeroclaw-memory/src/qdrant.rs:1036\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":3010}}}],"partialFingerprints":{"codehealthFindingId/v1":"54c75895154dde2942403d9f5c4ee4e96a579757eb5f06231cdf5beceb28131f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 6): crates/zeroclaw-channels/src/dingtalk.rs:313-320 | crates/zeroclaw-channels/src/lark.rs:2368-2372 | crates/zeroclaw-channels/src/lark.rs:2654-2658 | crates/zeroclaw-channels/src/mattermost.rs:2274-2278 | crates/zeroclaw-channels/src/nextcloud_talk.rs:267-271 | crates/zeroclaw-channels/src/nextcloud_talk.rs:396-400 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/lark.rs\u0060 and \u0060crates/zeroclaw-channels/src/mattermost.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. 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/zeroclaw-channels/src/dingtalk.rs:313\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/zeroclaw-channels/src/dingtalk.rs"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"222a4946298f0770bddaf2bf8d410e7dfb9b1a015c7cc1de23fa0dca831453a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/zeroclaw-gateway/src/lib.rs:2932-2939 | crates/zeroclaw-runtime/src/security/detect.rs:732-739 | crates/zeroclaw-runtime/src/tools/mod.rs:3049-3056 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/lib.rs:2932\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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":2932}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2d8f8fc97a94157e964d039a1f4b5029fb47b90a1c9bbf0b48d6cd01dce09d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-memory/src/embeddings.rs:156-161 | crates/zeroclaw-memory/src/embeddings.rs:169-176 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-memory/src/embeddings.rs:156\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/zeroclaw-memory/src/embeddings.rs"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e579f1f11eea7233b44d78ed39835f419ea7b2f0c5d239e6d3df9c8b444833a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/telegram.rs:4404-4411 | crates/zeroclaw-memory/src/qdrant.rs:422-429 \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/zeroclaw-channels/src/telegram.rs:4404\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":4404}}}],"partialFingerprints":{"codehealthFindingId/v1":"497784836ea64bef243bd1d211fcecaaa24174ced92014410cf200ebddf833c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/voice_call.rs:185-192 | crates/zeroclaw-channels/src/voice_call.rs:223-230 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/voice_call.rs:185\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/zeroclaw-channels/src/voice_call.rs"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"206254fbd0a405aa299cbe54ba05b2ced96c5f4e4fdc1ddf3494a71b0123e7d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/rpc/local.rs:705-712 | crates/zeroclaw-runtime/src/rpc/wss.rs:994-1001 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/rpc/local.rs\u0060 and \u0060crates/zeroclaw-runtime/src/rpc/wss.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 81 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/zeroclaw-runtime/src/rpc/local.rs:705\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/zeroclaw-runtime/src/rpc/local.rs"},"region":{"startLine":705}}}],"partialFingerprints":{"codehealthFindingId/v1":"037b19246c899a0a76292a019c6348572d6eed95de084c2c6dfb2ba20a6b8f69"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/dispatcher.rs:73-80 | crates/zeroclaw-runtime/src/rpc/orphans.rs:210-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/agent/dispatcher.rs:73\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/zeroclaw-runtime/src/agent/dispatcher.rs"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dac436ca38261f41dbe0bbf6a33e4ee512137d9ad5e54358b7d3ba942a77eac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 5): crates/zeroclaw-channels/src/matrix.rs:1971-1978 | crates/zeroclaw-channels/src/wechat.rs:1202-1209 | crates/zeroclaw-channels/src/wechat.rs:1244-1251 | crates/zeroclaw-hardware/src/rpi.rs:277-284 | crates/zeroclaw-runtime/src/cron/scheduler.rs:673-680 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/matrix.rs\u0060 and \u0060crates/zeroclaw-channels/src/wechat.rs\u0060 as WHOLE FILES: this scan already matched 9 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 \u0060crates/zeroclaw-channels/src/matrix.rs:1971\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":1971}}}],"partialFingerprints":{"codehealthFindingId/v1":"137b369ae130f78d212d842c619031000096679e6285efad9f3627540a3f088b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-channels/src/wechat.rs:1480-1486 | crates/zeroclaw-channels/src/wechat.rs:1536-1543 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/wechat.rs:1480\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/zeroclaw-channels/src/wechat.rs"},"region":{"startLine":1480}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b170cdc12c3e3cd5289c7ea6206ade922e6bdd6d6eae9a6065e7fe58fa33e19"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-tools/src/claude_code.rs:113-120 | crates/zeroclaw-tools/src/knowledge_tool.rs:218-224 \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/zeroclaw-tools/src/claude_code.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. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060args\u0060 to \u0060serde_json::Value\u0060 in one and \u0060\u0026serde_json::Value\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/zeroclaw-tools/src/claude_code.rs"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"079e0a8b155023ca1d4a0e192545dc8d7b2b93eda7a9b4d2a26e28b5daec30cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/dispatcher.rs:73-80 | crates/zeroclaw-runtime/src/agent/turn/max_iter.rs:121-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/zeroclaw-runtime/src/agent/dispatcher.rs:73\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/zeroclaw-runtime/src/agent/dispatcher.rs"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"b43249c77d2a74891c112de8d91c7847081942f1b7f12694915162532f3919d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-runtime/src/cron/mod.rs:101-105 | crates/zeroclaw-tools/src/model_routing_config.rs:247-254 \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/zeroclaw-runtime/src/cron/mod.rs:101\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/zeroclaw-runtime/src/cron/mod.rs"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2d2a0b3bd0b1f2ea16a60100b7d4360fd52ee2e23fae22dfd0a83ef3e3d87bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/zeroclaw-runtime/src/tunnel/cloudflare.rs:77-89 | crates/zeroclaw-runtime/src/tunnel/ngrok.rs:64-76 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/tunnel/cloudflare.rs\u0060 and \u0060crates/zeroclaw-runtime/src/tunnel/ngrok.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 46 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/zeroclaw-runtime/src/tunnel/cloudflare.rs:77\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/zeroclaw-runtime/src/tunnel/cloudflare.rs"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c54057c1d1159378d0e7972ee5ec2ad369e147438055513e7f260ff8c5341a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): crates/zeroclaw-channels/src/lark.rs:3010-3017 | crates/zeroclaw-channels/src/wechat.rs:1726-1731 | crates/zeroclaw-memory/src/embeddings.rs:149-154 | crates/zeroclaw-memory/src/qdrant.rs:1029-1034 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/lark.rs:3010\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/zeroclaw-channels/src/lark.rs:3018\u0060 calls \u0060get\u0060, \u0060and_then\u0060, \u0060as_i64\u0060 and \u0060crates/zeroclaw-memory/src/qdrant.rs:1036\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":3010}}}],"partialFingerprints":{"codehealthFindingId/v1":"b37f1c8ad40c7987fa55206f591e44a3a92f879697736f3d804b0298a839ba95"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/zeroclaw-providers/src/auth/email_oauth2.rs:126-133 | crates/zeroclaw-providers/src/auth/openai_oauth.rs:171-178 | crates/zeroclaw-providers/src/auth/xai_oauth.rs:272-279 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/auth/email_oauth2.rs\u0060 and \u0060crates/zeroclaw-providers/src/auth/openai_oauth.rs\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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/auth/email_oauth2.rs:126\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/zeroclaw-providers/src/auth/xai_oauth.rs:270\u0060 calls \u0060require_trusted_endpoint\u0060 and \u0060crates/zeroclaw-providers/src/auth/email_oauth2.rs:124\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/zeroclaw-providers/src/auth/email_oauth2.rs"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"463031957b480fe31c9fb47f1a71146c23d2620c7b126844527311c24064e934"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/matrix.rs:1641-1648 | crates/zeroclaw-tools/src/linkedin_client.rs:540-547 \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/zeroclaw-channels/src/matrix.rs:1641\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":1641}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ce486a026ba4dd500f2c362fc8ec5ac4ca6da8a92638794de5def943cceb2c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/telegram.rs:8728-8735 | crates/zeroclaw-channels/src/telegram.rs:8746-8753 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/telegram.rs:8728\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":8728}}}],"partialFingerprints":{"codehealthFindingId/v1":"079a2ccce510c237e436fd5630237ce874230778f7f75831109fd96ec0770491"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): crates/zeroclaw-runtime/src/sop/metrics.rs:117-124 | crates/zeroclaw-runtime/src/sop/metrics.rs:157-164 | crates/zeroclaw-runtime/src/sop/metrics.rs:183-190 | crates/zeroclaw-runtime/src/sop/metrics.rs:205-212 \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/zeroclaw-runtime/src/sop/metrics.rs:117\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/zeroclaw-runtime/src/sop/metrics.rs"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ec21dd70923d9893a4eea4a05fd12ef34e5d72b25a3c99d07e4b73a0af7f919"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-channels/src/telegram.rs:7199-7205 | crates/zeroclaw-infra/src/lib.rs:46-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/zeroclaw-channels/src/telegram.rs:7199\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":7199}}}],"partialFingerprints":{"codehealthFindingId/v1":"1971119dda9b8ee1fd1bc1bd0edc0ee8464b5fbc9159987c8ef8ed810af32901"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 6): crates/zeroclaw-channels/src/orchestrator/mod.rs:10602-10609 | crates/zeroclaw-channels/src/orchestrator/mod.rs:10690-10697 | crates/zeroclaw-config/src/migration.rs:489-493 | crates/zeroclaw-runtime/src/agent/agent.rs:4111-4115 | crates/zeroclaw-runtime/src/daemon/mod.rs:845-849 | crates/zeroclaw-runtime/src/tools/skill_http.rs:195-199 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs\u0060 and \u0060crates/zeroclaw-runtime/src/daemon/mod.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 65 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/zeroclaw-channels/src/orchestrator/mod.rs:10602\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":10602}}}],"partialFingerprints":{"codehealthFindingId/v1":"1124974b5b4c6870a5ea28cf33c16e1c0e3e3faf13be5a5c1c5918416b751174"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/mod.rs:3000-3007 | crates/zeroclaw-runtime/src/tools/mod.rs:3025-3032 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/tools/mod.rs:3000\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/zeroclaw-runtime/src/tools/mod.rs"},"region":{"startLine":3000}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0f7ed449912ff3da3d0b6bfd01368deba910cc54fd4beda29af061be8169101"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/zeroclaw-gateway/src/plugin_webhook.rs:89-96 | crates/zeroclaw-gateway/src/plugin_webhook.rs:159-166 | crates/zeroclaw-gateway/src/plugin_webhook.rs:172-179 \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/zeroclaw-gateway/src/plugin_webhook.rs:89\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/zeroclaw-gateway/src/plugin_webhook.rs"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"459c5b2553351a1e3426caeb4f47b69176d22f5edfdfea39de46d06526980132"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-memory/src/hygiene.rs:271-278 | crates/zeroclaw-memory/src/hygiene.rs:309-316 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-memory/src/hygiene.rs"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"50169e021d9f0220fb8c26a372768f9ccdfe551126c9f492d55a92e52159ff10"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/transcription.rs:1192-1199 | crates/zeroclaw-channels/src/tts.rs:1237-1244 \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/zeroclaw-channels/src/transcription.rs:1192\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/zeroclaw-channels/src/transcription.rs"},"region":{"startLine":1192}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d7ff99416cb9712a42b96d5e71755ad525cdaaa1c94d1b6abe59ce5e0ab4d30"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-gateway/src/api_pairing.rs:687-694 | crates/zeroclaw-tools/src/knowledge_tool.rs:221-228 \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/zeroclaw-gateway/src/api_pairing.rs:687\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/zeroclaw-gateway/src/api_pairing.rs"},"region":{"startLine":687}}}],"partialFingerprints":{"codehealthFindingId/v1":"9600ae8f44b649ad051ebcf415d6412d0c45c90e1df1406c9b52db2f3a7149b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 5): crates/zeroclaw-channels/src/whatsapp_storage.rs:456-463 | crates/zeroclaw-channels/src/whatsapp_storage.rs:491-498 | crates/zeroclaw-channels/src/whatsapp_storage.rs:539-546 | crates/zeroclaw-channels/src/whatsapp_storage.rs:617-624 | crates/zeroclaw-channels/src/whatsapp_storage.rs:673-680 \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/zeroclaw-channels/src/whatsapp_storage.rs:456\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/zeroclaw-channels/src/whatsapp_storage.rs"},"region":{"startLine":456}}}],"partialFingerprints":{"codehealthFindingId/v1":"c02e3d9b394d97efe65e3218518867d0032a300b43b085e00ef4009ea00139d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-runtime/src/security/playbook.rs:99-105 | crates/zeroclaw-runtime/src/security/playbook.rs:112-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/zeroclaw-runtime/src/security/playbook.rs:99\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/zeroclaw-runtime/src/security/playbook.rs"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"70403dca810bb3ef4597ab7578fe8ca3099573beb3a55bea6c305b7ba257a1a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:13483-13490 | crates/zeroclaw-channels/src/orchestrator/mod.rs:13963-13968 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:13483\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":13483}}}],"partialFingerprints":{"codehealthFindingId/v1":"813922a2c73319b8a0e5699c3b2f5b3ff577f3bba870d3b359a66db586cca0d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-memory/src/lib.rs:365-371 | crates/zeroclaw-memory/src/lib.rs:379-386 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-memory/src/lib.rs: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. 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":"crates/zeroclaw-memory/src/lib.rs"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a59ade08242ad1733c26aac565899c27941a1fcf870f9753060a7da4380e798"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-channels/src/notion.rs:221-228 | crates/zeroclaw-channels/src/notion.rs:273-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/notion.rs"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"3637a388274f0e43d6dcffb6db47571240629261c7e2c29c84b00180bad1d3cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 21): crates/zeroclaw-channels/src/lark.rs:1821-1828 | crates/zeroclaw-channels/src/lark.rs:3775-3782 | crates/zeroclaw-channels/src/lark.rs:3788-3795 | crates/zeroclaw-channels/src/qq.rs:419-426 | crates/zeroclaw-channels/src/qq.rs:531-538 | crates/zeroclaw-channels/src/twitter.rs:110-117 | crates/zeroclaw-tools/src/browser.rs:1552-1557 | crates/zeroclaw-tools/src/browser.rs:2372-2377 | crates/zeroclaw-tools/src/browser.rs:2399-2406 | crates/zeroclaw-tools/src/browser.rs:2416-2423 | crates/zeroclaw-tools/src/browser.rs:2427-2432 | crates/zeroclaw-tools/src/browser.rs:2443-2450 | crates/zeroclaw-tools/src/browser.rs:2454-2459 | crates/zeroclaw-tools/src/browser.rs:2470-2477 | crates/zeroclaw-tools/src/browser.rs:2534-2539 | crates/zeroclaw-tools/src/browser.rs:2547-2554 | crates/zeroclaw-tools/src/browser.rs:2564-2571 | crates/zeroclaw-tools/src/browser.rs:2585-2592 | crates/zeroclaw-tools/src/browser.rs:2602-2607 | crates/zeroclaw-tools/src/browser.rs:2611-2616 | crates/zeroclaw-tools/src/browser.rs:2621-2628 \u2014 there are 21 copies across 4 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 21 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/zeroclaw-channels/src/lark.rs:1821\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/zeroclaw-channels/src/twitter.rs:109\u0060 calls \u0060and_then\u0060, \u0060get\u0060 and \u0060crates/zeroclaw-channels/src/lark.rs:1820\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":1821}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffb17911709bdd371e41ebe2a532cb5bc13b54b1c7e8aaf548ce888c751b1036"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/zeroclaw-gateway/src/lib.rs:3161-3168 | crates/zeroclaw-gateway/src/nodes/mdns.rs:317-324 | crates/zeroclaw-gateway/src/nodes/mdns.rs:344-351 \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/zeroclaw-gateway/src/lib.rs:3161\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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":3161}}}],"partialFingerprints":{"codehealthFindingId/v1":"23ebf459a94125f5173c752dea98a64787cfba83850d8d082e3c40b40e5e37d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-hardware/src/peripherals/uno_q_bridge.rs:27-34 | crates/zeroclaw-hardware/src/peripherals/uno_q_bridge.rs:48-55 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-hardware/src/peripherals/uno_q_bridge.rs:27\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/zeroclaw-hardware/src/peripherals/uno_q_bridge.rs"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"419f1488025b26523019856a932deb46590fcf1b71aee766465213b0ef0df0e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-hardware/src/uf2.rs:137-142 | crates/zeroclaw-hardware/src/uf2.rs:190-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-hardware/src/uf2.rs:190\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/zeroclaw-hardware/src/uf2.rs"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7261dc3ede08772f7fbb200f7cecbe0881bef9bfa4a493843abf6e2ffa95241"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-channels/src/telegram.rs:6236-6242 | crates/zeroclaw-channels/src/telegram.rs:6247-6253 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/telegram.rs:6236\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":6236}}}],"partialFingerprints":{"codehealthFindingId/v1":"56658d937a1e5919085a5057dd9e326e4655443894fd799ab54cfcc88a07de0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): crates/zeroclaw-tools/src/linkedin_client.rs:966-972 | crates/zeroclaw-tools/src/linkedin_client.rs:1029-1035 | crates/zeroclaw-tools/src/linkedin_client.rs:1087-1093 | crates/zeroclaw-tools/src/linkedin_client.rs:1143-1149 \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/zeroclaw-tools/src/linkedin_client.rs"},"region":{"startLine":966}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f5bd40dd827a84207e9299a2b761588a61ed9135c21d93e0ba97a845ac39b27"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-runtime/src/quickstart/mod.rs:2072-2078 | crates/zeroclaw-runtime/src/quickstart/mod.rs:2090-2094 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/quickstart/mod.rs:2072\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/zeroclaw-runtime/src/quickstart/mod.rs"},"region":{"startLine":2072}}}],"partialFingerprints":{"codehealthFindingId/v1":"a853502020d00c2a42eb5f71cee0c88a7658e5d0f6628d48b296439a37541604"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-log/src/writer.rs:836-842 | crates/zeroclaw-log/src/writer.rs:895-900 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-log/src/writer.rs:836\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/zeroclaw-log/src/writer.rs"},"region":{"startLine":836}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7816b2ebd14413e62c88ecbf5f805e58bf972b81c83098b567c644808c0fa0b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-tools/src/git_operations.rs:323-329 | crates/zeroclaw-tools/src/git_operations.rs:349-355 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/git_operations.rs:323\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/zeroclaw-tools/src/git_operations.rs"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"e71ef59821d6fb1b5d43e5716d38a09cfd21c070224607fe384d753109ee6ed5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-gateway/src/lib.rs:3436-3441 | crates/zeroclaw-gateway/src/lib.rs:3908-3914 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/lib.rs:3436\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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":3436}}}],"partialFingerprints":{"codehealthFindingId/v1":"80944cfdabb3550192af000b126fc5edac4c99caad3ff88993daf459e63eaf44"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): apps/zerocode/src/doctor.rs:158-164 | apps/zerocode/src/doctor.rs:231-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/doctor.rs"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d6f22fcd7b5803cfce2254e3428c8c2950554a22d0e2d208fa9f64ae33f0341"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): apps/zerocode/src/dashboard.rs:1771-1777 | apps/zerocode/src/dashboard.rs:1781-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 \u0060apps/zerocode/src/dashboard.rs:1771\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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":1771}}}],"partialFingerprints":{"codehealthFindingId/v1":"d46d757de6b6c024027c31084cc9a0cea54a780c9b07ca48cc3ac06ae526b562"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/zeroclaw-channels/src/gmail_push.rs:187-193 | crates/zeroclaw-channels/src/gmail_push.rs:261-267 | crates/zeroclaw-channels/src/gmail_push.rs:562-568 \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/zeroclaw-channels/src/gmail_push.rs:187\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/zeroclaw-channels/src/gmail_push.rs"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"40047f242dcac6c67ecf00bc2ef7fa0c8b6e6d11c3ddf64974f071b6864d5bbf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-gateway/src/api.rs:894-900 | crates/zeroclaw-gateway/src/api.rs:1241-1247 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/api.rs:894\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/zeroclaw-gateway/src/api.rs"},"region":{"startLine":894}}}],"partialFingerprints":{"codehealthFindingId/v1":"fecbb386690f045a6b8171a06dd87fde74bb19f0e7d5a8fb1098de3d0d9a39d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-runtime/src/identity.rs:789-795 | crates/zeroclaw-runtime/src/identity.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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/identity.rs:789\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/zeroclaw-runtime/src/identity.rs"},"region":{"startLine":789}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb615e6a71639c1fd477c220dd85fb0bf335e864fd486d6a605ed0a19a2aa56e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-channels/src/qq.rs:568-574 | crates/zeroclaw-channels/src/qq.rs:598-604 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/qq.rs:568\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/zeroclaw-channels/src/qq.rs"},"region":{"startLine":568}}}],"partialFingerprints":{"codehealthFindingId/v1":"f65adc6e5e92370966bf5801bcc71f86e089e9e298027deb18dbebd5db5544ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-tools/src/discord_search.rs:123-129 | crates/zeroclaw-tools/src/memory_recall.rs:110-116 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/discord_search.rs\u0060 and \u0060crates/zeroclaw-tools/src/memory_recall.rs\u0060 as WHOLE FILES: this scan already matched 4 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/zeroclaw-tools/src/discord_search.rs:123\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/zeroclaw-tools/src/discord_search.rs"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6e388f35918e32e2cfa0f5897fab79848f970c04dcbc48d2486731210cb0ea6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): apps/zerocode/src/dashboard.rs:1771-1777 | apps/zerocode/src/dashboard.rs:1781-1787 | apps/zerocode/src/dashboard.rs:1794-1800 \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 \u0060apps/zerocode/src/dashboard.rs:1771\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, \u0060apps/zerocode/src/dashboard.rs:1778\u0060 calls \u0060Some\u0060 and \u0060apps/zerocode/src/dashboard.rs:1802\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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":1771}}}],"partialFingerprints":{"codehealthFindingId/v1":"1792e137caf97d41bf0a2e34075b1e24215738fa92229c76d8f6975ff1accd4a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-providers/src/factory.rs:1861-1867 | crates/zeroclaw-providers/src/factory.rs:1933-1939 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/factory.rs:1861\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/zeroclaw-providers/src/factory.rs"},"region":{"startLine":1861}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ad92e107be82159e5c185b1d2eeabf1106370f4329911eb6eba718db1483b42"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-config/src/typed_value.rs:184-190 | crates/zeroclaw-tools/src/llm_task.rs:319-325 \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/zeroclaw-config/src/typed_value.rs:184\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/zeroclaw-config/src/typed_value.rs"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa7136901f27402bbcd3e31ae11ee88eee9b66493abfed539efbcbbc13e663e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-channels/src/dingtalk.rs:360-366 | crates/zeroclaw-channels/src/mochat.rs:231-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/zeroclaw-channels/src/dingtalk.rs"},"region":{"startLine":360}}}],"partialFingerprints":{"codehealthFindingId/v1":"11ccc17d522fb1246a7cb651e8bbeca5e333ea955366082651c9cb9dfbf89dba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-channels/src/whatsapp_web.rs:4346-4351 | crates/zeroclaw-gateway/src/acp.rs:153-159 \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/zeroclaw-channels/src/whatsapp_web.rs:4346\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/zeroclaw-channels/src/whatsapp_web.rs"},"region":{"startLine":4346}}}],"partialFingerprints":{"codehealthFindingId/v1":"31be35db433f05a9f0b2e45dd28f8549f458acbd4016730e6b396a401700f90c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-config/src/schema.rs:25996-26002 | crates/zeroclaw-config/src/schema.rs:26127-26133 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-config/src/schema.rs:25996\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/zeroclaw-config/src/schema.rs"},"region":{"startLine":25996}}}],"partialFingerprints":{"codehealthFindingId/v1":"e60dc18c79aa096b7dc954a6234ff68f322e4f13d559f05be1cd432a1f530f53"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): crates/zeroclaw-tools/src/linkedin_client.rs:319-325 | crates/zeroclaw-tools/src/linkedin_client.rs:435-441 | crates/zeroclaw-tools/src/linkedin_client.rs:452-458 | crates/zeroclaw-tools/src/linkedin_client.rs:496-502 \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/zeroclaw-tools/src/linkedin_client.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/zeroclaw-tools/src/linkedin_client.rs"},"region":{"startLine":319}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a108d860c32b976b4f7b34edd15d17e5ccf89d8df010fada228ce52c88607ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): crates/zeroclaw-channels/src/lark.rs:1864-1870 | crates/zeroclaw-channels/src/lark.rs:2000-2006 | crates/zeroclaw-channels/src/whatsapp_web.rs:1469-1475 | crates/zeroclaw-config/src/cost/tracker.rs:942-948 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/lark.rs\u0060 and \u0060crates/zeroclaw-channels/src/whatsapp_web.rs\u0060 as WHOLE FILES: this scan already matched 5 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. 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/zeroclaw-channels/src/lark.rs:1864\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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/zeroclaw-channels/src/lark.rs:2010\u0060 calls \u0060file_download_url\u0060 and \u0060crates/zeroclaw-channels/src/lark.rs:1874\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":1864}}}],"partialFingerprints":{"codehealthFindingId/v1":"19dd255e84a781b4030cb806afdff5c5ca0b4e7440ad78e27473cee565bb50b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): crates/zeroclaw-channels/src/gmail_push.rs:216-222 | crates/zeroclaw-channels/src/gmail_push.rs:291-297 | crates/zeroclaw-channels/src/gmail_push.rs:345-351 | crates/zeroclaw-channels/src/gmail_push.rs:602-608 \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/zeroclaw-channels/src/gmail_push.rs:216\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/zeroclaw-channels/src/gmail_push.rs"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ff69926201e92c12f7b54e50658705aa7704b09b0c45f622feba55a1c5c0199"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-providers/src/hailo_ollama.rs:729-735 | crates/zeroclaw-providers/src/hailo_ollama.rs:1048-1054 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/hailo_ollama.rs:729\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/zeroclaw-providers/src/hailo_ollama.rs"},"region":{"startLine":729}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ff6afbe599e15aec91eaf3ae5fb5ce6231a77adf02da507acacf273d47828a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 8): apps/zerocode/src/dashboard.rs:841-846 | apps/zerocode/src/dashboard.rs:1027-1032 | apps/zerocode/src/dashboard.rs:1130-1135 | apps/zerocode/src/dashboard.rs:1198-1203 | apps/zerocode/src/dashboard.rs:1293-1298 | apps/zerocode/src/dashboard.rs:1453-1458 | apps/zerocode/src/dashboard.rs:1695-1700 | apps/zerocode/src/logs.rs:1102-1108 \u2014 there are 8 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 8 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":841}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cfb4d0efed2b67ec1b6a20faf4341375b2401a8ed3bb053e42310b840090822"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-tools/src/mcp_prompts_tool.rs:114-120 | crates/zeroclaw-tools/src/mcp_resources_tool.rs:113-119 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/mcp_prompts_tool.rs\u0060 and \u0060crates/zeroclaw-tools/src/mcp_resources_tool.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. 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/zeroclaw-tools/src/mcp_prompts_tool.rs:114\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/zeroclaw-tools/src/mcp_prompts_tool.rs"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"484e47d1518b1720d14ba69b1e145d1e18a1e6c0b2f64726945dab70518f27db"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-memory/src/agent_scoped.rs:507-513 | crates/zeroclaw-memory/src/agent_scoped.rs:558-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/zeroclaw-memory/src/agent_scoped.rs:507\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/zeroclaw-memory/src/agent_scoped.rs"},"region":{"startLine":507}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef967efcd7e6df234604fe9c7558e8a4e7326225459758b905905408ec93a88a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): apps/zerocode/src/enroll.rs:718-724 | crates/zeroclaw-runtime/src/sop/mod.rs:389-395 \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":"apps/zerocode/src/enroll.rs"},"region":{"startLine":718}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdd427bad53316b74d2ebdc5516605ccc349829a505728526eb3eefa67a5d0ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): crates/zeroclaw-channels/src/telegram.rs:6730-6736 | crates/zeroclaw-channels/src/telegram.rs:6823-6829 | crates/zeroclaw-channels/src/telegram.rs:6916-6922 | crates/zeroclaw-channels/src/telegram.rs:6965-6971 | crates/zeroclaw-channels/src/telegram.rs:7014-7020 \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/zeroclaw-channels/src/telegram.rs:6730\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":6730}}}],"partialFingerprints":{"codehealthFindingId/v1":"28254fa5e5eedc270bca63b1302238df7fc84adbc8bd91ca84fc68220a9bfb60"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-channels/src/acp_channel.rs:152-158 | crates/zeroclaw-runtime/src/rpc/approval_channel.rs:243-248 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/acp_channel.rs\u0060 and \u0060crates/zeroclaw-runtime/src/rpc/approval_channel.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 49 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/zeroclaw-channels/src/acp_channel.rs:152\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/zeroclaw-channels/src/acp_channel.rs"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd83df9b354b16c4cc8ae8e595ce2d870f674244c789e3de5a0819f461dfdd8e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): src/bin/zeroclaw-acp-bridge.rs:196-202 | src/bin/zeroclaw-acp-bridge.rs:218-224 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/zeroclaw-acp-bridge.rs:196\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/zeroclaw-acp-bridge.rs"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"7dc264566c2b5a6623afef0eb52943afab31f5101ba778608a1f88eb99e76344"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-channels/src/mattermost.rs:1368-1374 | crates/zeroclaw-channels/src/mattermost.rs:1477-1483 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/mattermost.rs:1368\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/zeroclaw-channels/src/mattermost.rs"},"region":{"startLine":1368}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1dce284f4f082c73eb16fc006666b427d7b37456ef48c3ad2bf445aeccec1be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-providers/src/hailo_ollama.rs:777-783 | crates/zeroclaw-providers/src/hailo_ollama.rs:897-903 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/hailo_ollama.rs:777\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/zeroclaw-providers/src/hailo_ollama.rs"},"region":{"startLine":777}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f782f5fdc928fa268510867ee44d725141b269ea0bf641ee031ed6b07d9dd3b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/zeroclaw-channels/src/notion.rs:164-170 | crates/zeroclaw-channels/src/qq.rs:568-574 | crates/zeroclaw-channels/src/qq.rs:598-604 \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/zeroclaw-channels/src/notion.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/zeroclaw-channels/src/notion.rs"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6c29029bf83672f66496d8cb01512ff613222b3c0b7d15fa772763efef6db43"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-runtime/src/skills/mod.rs:3469-3475 | crates/zeroclaw-runtime/src/skills/mod.rs:3483-3489 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/skills/mod.rs:3469\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/zeroclaw-runtime/src/skills/mod.rs"},"region":{"startLine":3469}}}],"partialFingerprints":{"codehealthFindingId/v1":"096d6735882e6be8c9626ec5c3036892a3b62510f5edab636078cc09f13226ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/zeroclaw-hardware/src/peripherals/serial.rs:163-168 | crates/zeroclaw-tools/src/text_browser.rs:424-430 | crates/zeroclaw-tools/src/web_fetch.rs:863-869 \u2014 before extracting anything, compare \u0060crates/zeroclaw-tools/src/text_browser.rs\u0060 and \u0060crates/zeroclaw-tools/src/web_fetch.rs\u0060 as WHOLE FILES: this scan already matched 4 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. 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/zeroclaw-hardware/src/peripherals/serial.rs: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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-hardware/src/peripherals/serial.rs"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ebb4a33d9718ad688ee1575ea54717ddc834af9a4ca0ddd267712553fe505d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-channels/src/dingtalk.rs:361-366 | crates/zeroclaw-channels/src/twitter.rs:342-348 \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/zeroclaw-channels/src/dingtalk.rs"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"e39f327ba46215894bf4fa2931b9fc3c19ac0f68a25713af36c5a1d8c19c9431"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-channels/src/lark.rs:3301-3307 | crates/zeroclaw-channels/src/telegram.rs:2336-2342 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/lark.rs\u0060 and \u0060crates/zeroclaw-channels/src/telegram.rs\u0060 as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 54 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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":3301}}}],"partialFingerprints":{"codehealthFindingId/v1":"217ca21aa5f0ad4630a7ac58d8d483b1f7161c90de325e0459564612be8ffd27"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-providers/src/bedrock.rs:107-113 | crates/zeroclaw-providers/src/openai_codex.rs:1111-1117 \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/zeroclaw-providers/src/bedrock.rs"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a1ab8d92c8d650809fd198e7f3e9423c8b270c61c46be03bee7a4c4a19aea5b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): src/plugins/channel_instance.rs:804-810 | src/plugins/channel_instance.rs:872-877 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/plugins/channel_instance.rs:804\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/plugins/channel_instance.rs"},"region":{"startLine":804}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc41f1ac2b000dcd67b04b9a16fcb887b202e4827f8e14be885dba4122d6c352"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/zeroclaw-channels/src/voice_call.rs:155-161 | crates/zeroclaw-channels/src/voice_call.rs:186-192 | crates/zeroclaw-channels/src/voice_call.rs:224-230 \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/zeroclaw-channels/src/voice_call.rs:155\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/zeroclaw-channels/src/voice_call.rs"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"41f72be95b5cf5452d708c63cf052d4f74e801a1c857a9812b48ef4751df8850"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/zeroclaw-channels/src/discord/mod.rs:1375-1379 | crates/zeroclaw-channels/src/orchestrator/mod.rs:14552-14557 | crates/zeroclaw-memory/src/sqlite.rs:398-404 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/discord/mod.rs:1375\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":1375}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b623fc3c335b56ff0e5ca3d71902ce91defa0ce258ab2f809ae1aa595e19b0b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-runtime/src/skills/mod.rs:2568-2574 | src/skills/discovery.rs:363-369 \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/zeroclaw-runtime/src/skills/mod.rs"},"region":{"startLine":2568}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f1d0a4ab1bbd796707beb905e0772b558520ac278802b54916d051ebf503aa1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/tunnel/custom.rs:81-86 | crates/zeroclaw-runtime/src/tunnel/custom.rs:88-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/tunnel/custom.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. 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/zeroclaw-runtime/src/tunnel/custom.rs"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"56b443dc91ac987840b7929ca290cf5e2444bd2c8af2d5268fa2ef185d737451"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-gateway/src/api.rs:627-633 | crates/zeroclaw-gateway/src/api.rs:873-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/api.rs:627\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/zeroclaw-gateway/src/api.rs"},"region":{"startLine":627}}}],"partialFingerprints":{"codehealthFindingId/v1":"564f81de105a16d147545c6b2b5b8ab4cdd0b0092e3e0e1070a1bf6b3182b7eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/zeroclaw-channels/src/irc.rs:465-471 | crates/zeroclaw-providers/src/gemini_cli.rs:182-188 | crates/zeroclaw-providers/src/kilocli.rs:179-185 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/gemini_cli.rs\u0060 and \u0060crates/zeroclaw-providers/src/kilocli.rs\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 164 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/zeroclaw-channels/src/irc.rs:465\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/zeroclaw-providers/src/gemini_cli.rs:189\u0060 calls \u0060display\u0060, \u0060to_string\u0060 and \u0060crates/zeroclaw-channels/src/irc.rs:472\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/zeroclaw-channels/src/irc.rs"},"region":{"startLine":465}}}],"partialFingerprints":{"codehealthFindingId/v1":"20d3ac99be90073db424fb68d6d64fb7d5ad6bc823ca586ca38f3f87538ab9c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/zeroclaw-config/src/schema.rs:26001-26007 | crates/zeroclaw-config/src/schema.rs:26080-26085 | crates/zeroclaw-config/src/schema.rs:26132-26137 \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/zeroclaw-config/src/schema.rs:26001\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/zeroclaw-config/src/schema.rs"},"region":{"startLine":26001}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d9a704d9a733646814708830930a2a64bd129ddc33e56c2d2bf3e5f3aae46c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-config/src/schema.rs:23733-23739 | crates/zeroclaw-hardware/src/loader.rs:38-43 \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/zeroclaw-config/src/schema.rs:23733\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/zeroclaw-config/src/schema.rs"},"region":{"startLine":23733}}}],"partialFingerprints":{"codehealthFindingId/v1":"c65d8b9fca3f6c282ff60e109c79b9b7bace4dccd56655cc11f6d958f7de7225"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/zeroclaw-gateway/src/api_upload.rs:148-157 | crates/zeroclaw-gateway/src/api_upload.rs:167-176 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/api_upload.rs:148\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/zeroclaw-gateway/src/api_upload.rs"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cf223f8da82c8a2742f25b53f8350ad9b8208cd1fc19a41c4c79bb06e89bef4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): crates/zeroclaw-config/src/env_overrides.rs:182-186 | crates/zeroclaw-gateway/src/ws.rs:1338-1342 | crates/zeroclaw-runtime/src/sop/engine.rs:1800-1804 | crates/zeroclaw-runtime/src/sop/engine.rs:1826-1831 \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/zeroclaw-config/src/env_overrides.rs:182\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/zeroclaw-config/src/env_overrides.rs"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"c54740866e8c9f245aee5341d69f2a1e42f5cdfe5eb087a33d070a74a7161b20"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/loop_.rs:1522-1527 | crates/zeroclaw-runtime/src/agent/turn/context_recovery.rs:217-222 \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/zeroclaw-runtime/src/agent/loop_.rs:1522\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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":1522}}}],"partialFingerprints":{"codehealthFindingId/v1":"932c0bec13c503759468adc5e0f5e351ef8837a091fbb9bc860d68b69453e81e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): apps/zerocode/src/dashboard.rs:1769-1774 | apps/zerocode/src/dashboard.rs:1779-1784 | apps/zerocode/src/dashboard.rs:1792-1797 | apps/zerocode/src/logs.rs:380-385 \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 \u0060apps/zerocode/src/dashboard.rs:1769\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":"apps/zerocode/src/dashboard.rs"},"region":{"startLine":1769}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fa0b092ab0dbe2b5c0ed158171521ee3ef963705c39d564206400706e7ddf2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/audit.rs:166-171 | crates/zeroclaw-runtime/src/sop/audit.rs:200-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/zeroclaw-runtime/src/sop/audit.rs:166\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/zeroclaw-runtime/src/sop/audit.rs"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"396a802835d4ab7566df4f992baafe1560f221454da15df68b58c92d601c99d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-runtime/src/cron/mod.rs:101-105 | crates/zeroclaw-runtime/src/subagent/mod.rs:91-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/zeroclaw-runtime/src/cron/mod.rs:101\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/zeroclaw-runtime/src/cron/mod.rs"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"5254e382fa88046a886876a924f0b70f480701ce017c963c2f5a31407df068a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-infra/src/acp_session_store.rs:2518-2523 | crates/zeroclaw-infra/src/acp_session_store.rs:3143-3148 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":2518}}}],"partialFingerprints":{"codehealthFindingId/v1":"b56d1d750bf33c43a0d4752f5d6904744f85ce7b85067972b4ec2098f6cd9262"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-gateway/src/lib.rs:1892-1897 | crates/zeroclaw-gateway/src/lib.rs:1935-1940 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-gateway/src/lib.rs:1892\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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":1892}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4cea1d1f6fc63f3ed6ece68a38a76c3b96a756f4a4b637775ab8bed37d2149a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-channels/src/notion.rs:315-319 | crates/zeroclaw-runtime/src/tools/mod.rs:3765-3770 \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/zeroclaw-channels/src/notion.rs:315\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/zeroclaw-channels/src/notion.rs"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7803bcf480ff73c4b539967090878afe323261e42074039f89a4d38c2b4b3e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): apps/zerocode/src/main.rs:745-750 | apps/zerocode/src/main.rs:793-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/main.rs:745\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, \u0060apps/zerocode/src/main.rs:752\u0060 calls \u0060Ok\u0060 and \u0060apps/zerocode/src/main.rs:800\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":"apps/zerocode/src/main.rs"},"region":{"startLine":745}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b014dc10af017a5bd84779a1ccf527674afb7fa445db4110dc7c8fd2d4aa2fc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): crates/zeroclaw-runtime/src/agent/loop_.rs:1521-1526 | crates/zeroclaw-runtime/src/agent/loop_.rs:1919-1923 | crates/zeroclaw-runtime/src/agent/turn/context_recovery.rs:216-221 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:7625-7630 \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/zeroclaw-runtime/src/agent/loop_.rs:1521\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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":1521}}}],"partialFingerprints":{"codehealthFindingId/v1":"50133c1ec19bcbd7376fd44b80f3d092eab7a51aad467a032c5cf323390a5a26"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-memory/src/sqlite.rs:2133-2138 | crates/zeroclaw-memory/src/sqlite.rs:2218-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":2133}}}],"partialFingerprints":{"codehealthFindingId/v1":"3070d1019ae4240d3aaba53e7cfd2fa9780d8a8e285e7ffdf90b1c943d13f253"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:5313-5318 | crates/zeroclaw-runtime/src/sop/engine.rs:6117-6122 \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/zeroclaw-channels/src/orchestrator/mod.rs:5313\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":5313}}}],"partialFingerprints":{"codehealthFindingId/v1":"d520dee01b5bbbbe44e16a478d3ac3efa5b8ebefdf3554f8aafd092be90491da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/relay.rs:599-604 | crates/zeroclaw-runtime/src/rpc/tui_identity.rs:106-111 \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/zeroclaw-runtime/src/relay.rs:599\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/zeroclaw-runtime/src/relay.rs"},"region":{"startLine":599}}}],"partialFingerprints":{"codehealthFindingId/v1":"0400779ed72d12af064fb50ae990fde909e757ccb7f318e436de6e3a62b17697"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/mod.rs:646-651 | crates/zeroclaw-runtime/src/tools/mod.rs:657-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/zeroclaw-runtime/src/tools/mod.rs:646\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/zeroclaw-runtime/src/tools/mod.rs"},"region":{"startLine":646}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0ee1a29a556dd39724625322d099d3f02d44f54e9580a4e8cc5ba2792d3412a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/tunnel/ngrok.rs:81-86 | crates/zeroclaw-runtime/src/tunnel/pinggy.rs:121-126 \u2014 before extracting anything, compare \u0060crates/zeroclaw-runtime/src/tunnel/ngrok.rs\u0060 and \u0060crates/zeroclaw-runtime/src/tunnel/pinggy.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 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/zeroclaw-runtime/src/tunnel/ngrok.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/tunnel/ngrok.rs"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e06334fd8c52724726aa0b77286caacafaa6a2c39c9f17feff59b407d837314"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-providers/src/stream_guard.rs:53-58 | crates/zeroclaw-runtime/src/agent/turn/stream_consume.rs:242-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/stream_guard.rs:53\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/zeroclaw-providers/src/stream_guard.rs"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c1d690ff949f8aa13277e7b48e92f69d7e7e60ebf6b5bc878cc664c7dff54c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/turn/provider_call.rs:221-226 | crates/zeroclaw-runtime/src/agent/turn/vision_route.rs:129-134 \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/zeroclaw-runtime/src/agent/turn/provider_call.rs:221\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/zeroclaw-runtime/src/agent/turn/provider_call.rs"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"d462e3ce32f891eac269c1e3f9b4987df2ea352f94a397a5995f0c61bc62c217"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-channels/src/discord/mod.rs:1872-1877 | crates/zeroclaw-channels/src/slack.rs:1253-1258 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/discord/mod.rs\u0060 and \u0060crates/zeroclaw-channels/src/slack.rs\u0060 as WHOLE FILES: this scan already matched 4 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/zeroclaw-channels/src/discord/mod.rs:1872\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":1872}}}],"partialFingerprints":{"codehealthFindingId/v1":"db948466a2a5f7394566fadcec238e04bfca6ba3edac96c073d28bfd14b3a4cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): apps/zerocode/src/chat.rs:7281-7286 | apps/zerocode/src/chat.rs:7327-7332 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/chat.rs:7281\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":"apps/zerocode/src/chat.rs"},"region":{"startLine":7281}}}],"partialFingerprints":{"codehealthFindingId/v1":"2985cd1fffb9a8644f22792f45b99939477d10c5d643c6f3e49d8a649674e673"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 7): crates/zeroclaw-channels/src/orchestrator/acp_server.rs:682-687 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:953-958 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1187-1192 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1210-1214 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1527-1532 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:1550-1554 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:2430-2434 \u2014 all 7 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/zeroclaw-channels/src/orchestrator/acp_server.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. 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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":682}}}],"partialFingerprints":{"codehealthFindingId/v1":"5de7a47472da8a0dbebc6527efc0e3a3b9b7566447535558b0a91fcbc0005cdf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/zeroclaw-providers/src/anthropic.rs:2295-2300 | crates/zeroclaw-runtime/src/agent/turn/provider_call.rs:222-227 | crates/zeroclaw-runtime/src/agent/turn/vision_route.rs:130-135 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/anthropic.rs:2295\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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":2295}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9961b49dacd8c186f73aa2584d0f7a526bcbedb4ad06bedb22bff8c99545421"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): crates/zeroclaw-memory/src/sqlite.rs:1465-1469 | crates/zeroclaw-runtime/src/cron/scheduler.rs:1423-1428 | crates/zeroclaw-runtime/src/cron/scheduler.rs:1444-1449 | crates/zeroclaw-runtime/src/cron/scheduler.rs:1463-1468 \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/zeroclaw-memory/src/sqlite.rs:1465\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/zeroclaw-runtime/src/cron/scheduler.rs:1442\u0060 calls \u0060Some\u0060 and \u0060crates/zeroclaw-runtime/src/cron/scheduler.rs:1422\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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":1465}}}],"partialFingerprints":{"codehealthFindingId/v1":"80fccd8a665ad01a0fd47098513b4a8efc13ef909b7fcecc943193a465dcc0c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): crates/zeroclaw-config/src/secrets.rs:868-873 | crates/zeroclaw-hardware/src/subprocess.rs:160-164 | crates/zeroclaw-providers/src/gemini_cli.rs:134-138 | crates/zeroclaw-providers/src/kilocli.rs:131-135 \u2014 before extracting anything, compare \u0060crates/zeroclaw-providers/src/gemini_cli.rs\u0060 and \u0060crates/zeroclaw-providers/src/kilocli.rs\u0060 as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 164 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/zeroclaw-config/src/secrets.rs:868\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/zeroclaw-config/src/secrets.rs"},"region":{"startLine":868}}}],"partialFingerprints":{"codehealthFindingId/v1":"a36f782f0c6a9839fe3423ef0296ea19366c16b01ea66c6062d702973799867d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-infra/src/acp_session_store.rs:2071-2076 | crates/zeroclaw-infra/src/acp_session_store.rs:2238-2243 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":2071}}}],"partialFingerprints":{"codehealthFindingId/v1":"36b9023c42829010e6438eaf13f83c6bcd6a6943dc9735a4c2d083a4e4c1177e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/zeroclaw-channels/src/telegram.rs:8597-8602 | crates/zeroclaw-channels/src/telegram.rs:8727-8732 | crates/zeroclaw-channels/src/telegram.rs:8745-8750 \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/zeroclaw-channels/src/telegram.rs:8597\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":8597}}}],"partialFingerprints":{"codehealthFindingId/v1":"8988da338e6a8f7ae55db8ece6595557c4452c0f340623bb69e15e70735a2735"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-runtime/src/daemon/mod.rs:1086-1090 | crates/zeroclaw-runtime/src/sop/engine.rs:1743-1748 \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/zeroclaw-runtime/src/daemon/mod.rs:1086\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/zeroclaw-runtime/src/daemon/mod.rs"},"region":{"startLine":1086}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f32cf9c70fe7a2015483709056d33a9aec5c41ae892cd4f0491c8ad0d7e521a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): xtask/src/cmd/mdbook/peer_groups.rs:472-477 | xtask/src/cmd/mdbook/peer_groups.rs:546-551 \u2014 both copies are in the same file, so extract the block 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":"xtask/src/cmd/mdbook/peer_groups.rs"},"region":{"startLine":472}}}],"partialFingerprints":{"codehealthFindingId/v1":"1307a5d6f33824991610989d822ae7c279c711798c4909e4754fe9bb67093e30"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/zeroclaw-plugins/src/registry.rs:69-74 | src/alias_cli/export.rs:535-539 | src/alias_cli/export.rs:545-549 \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/zeroclaw-plugins/src/registry.rs:69\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/zeroclaw-plugins/src/registry.rs"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3ffe75d89639df3db8a6bfffa57d64e0d98805e4aeb138aae826a2131e4ec02"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/turn/max_iter.rs:433-438 | crates/zeroclaw-runtime/src/agent/turn/vision_route.rs:191-196 \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/zeroclaw-runtime/src/agent/turn/max_iter.rs:433\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/zeroclaw-runtime/src/agent/turn/max_iter.rs"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"4769c8aed5c1950de0fd76b7563f2613d2122f56b0fbbe7625c3888eef6e27e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-tools/src/mcp_client.rs:578-583 | crates/zeroclaw-tools/src/mcp_client.rs:597-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-tools/src/mcp_client.rs:578\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/zeroclaw-tools/src/mcp_client.rs"},"region":{"startLine":578}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc90f2301e6b3e40ac36ba9ac32211065db28f02fc80e3556538cd2216027e15"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): apps/zerocode/src/sop_pane.rs:1887-1892 | apps/zerocode/src/sop_pane.rs:1950-1955 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060apps/zerocode/src/sop_pane.rs:1887\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":"apps/zerocode/src/sop_pane.rs"},"region":{"startLine":1887}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d981d41e716039c4145b9fd4742b1ecd17730cd7922c71964cdc8ff5c241ae3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-tools/src/web_search_tool.rs:1079-1083 | crates/zeroclaw-tools/src/web_search_tool.rs:1692-1697 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-tools/src/web_search_tool.rs"},"region":{"startLine":1079}}}],"partialFingerprints":{"codehealthFindingId/v1":"9356346db2ad6c2cd200d66a837afd0ef468358b4ee101b1fef5ebc6b7e51ee0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-channels/src/notion.rs:589-594 | crates/zeroclaw-tools/src/mcp_client.rs:132-136 \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/zeroclaw-channels/src/notion.rs:589\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/zeroclaw-channels/src/notion.rs"},"region":{"startLine":589}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fb3fa624da4a5629ddfb9642ad5b4b30acaf3286d1b681a61d4948c7f9acf77"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-gateway/src/api_quickstart.rs:295-300 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:781-785 \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/zeroclaw-gateway/src/api_quickstart.rs:295\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/zeroclaw-gateway/src/api_quickstart.rs"},"region":{"startLine":295}}}],"partialFingerprints":{"codehealthFindingId/v1":"8502042250214a9a189944eed471dc793f300139d247400f0c9cebb8a6cd994e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): crates/zeroclaw-hardware/src/datasheet.rs:499-504 | crates/zeroclaw-hardware/src/datasheet.rs:514-519 | crates/zeroclaw-hardware/src/datasheet.rs:566-571 | crates/zeroclaw-hardware/src/datasheet.rs:639-644 \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/zeroclaw-hardware/src/datasheet.rs:499\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/zeroclaw-hardware/src/datasheet.rs"},"region":{"startLine":499}}}],"partialFingerprints":{"codehealthFindingId/v1":"9aea396d0019ffb0df3eedb034e0b6f0b852e3b0abe5836ee121402d71595661"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-memory/src/sqlite.rs:2117-2122 | crates/zeroclaw-memory/src/sqlite.rs:2241-2246 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":2117}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e3e8057eb0aa458e04ca22e87b7ddab8293a439542020590fbf226bb0d6dad6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/rpc/dispatch.rs:6328-6333 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:7363-7368 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/rpc/dispatch.rs:6328\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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":6328}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2a32afb9948c310c63ab10e39c5474cbb981615307f1896afda8393b96fabda"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/cron/scheduler.rs:550-555 | src/commands/update.rs:1139-1144 \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/zeroclaw-runtime/src/cron/scheduler.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/zeroclaw-runtime/src/cron/scheduler.rs"},"region":{"startLine":550}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1551027370b01792bab89d29c06a6915670ddbb423e8426cf5cc013a6bfb555"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-providers/src/hailo_ollama.rs:654-659 | crates/zeroclaw-runtime/src/security/seatbelt.rs:226-231 \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/zeroclaw-providers/src/hailo_ollama.rs:654\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/zeroclaw-runtime/src/security/seatbelt.rs:233\u0060 calls \u0060push_str\u0060, \u0060is_control\u0060, \u0060push\u0060 and \u0060crates/zeroclaw-providers/src/hailo_ollama.rs:661\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/zeroclaw-providers/src/hailo_ollama.rs"},"region":{"startLine":654}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bf0471068bfcc32122939d8ff958fd0000029dbcf78effe7522f1479258a5af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-config/src/schema/v2.rs:2186-2190 | crates/zeroclaw-config/src/schema/v2.rs:2195-2200 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-config/src/schema/v2.rs:2186\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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":2186}}}],"partialFingerprints":{"codehealthFindingId/v1":"41835cbbf2d92d08d425432481d76f2866eead84b35bbf79657c7834765747ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): apps/tauri/src/gateway_client.rs:30-35 | apps/tauri/src/gateway_client.rs:51-56 | apps/tauri/src/gateway_client.rs:62-67 \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 \u0060apps/tauri/src/gateway_client.rs:30\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":"apps/tauri/src/gateway_client.rs"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"fedf5a4db55ad8e1c6f85fe0a8e0c5e2a88ad00a84f5f747ffcb10b956d08827"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/agent/turn/approval_gate.rs:193-198 | crates/zeroclaw-runtime/src/agent/turn/results_collect.rs:101-106 \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/zeroclaw-runtime/src/agent/turn/approval_gate.rs:193\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/zeroclaw-runtime/src/agent/turn/approval_gate.rs"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc1142a6aae97dee4f85daee106815780e456688c033a90954225dbf7bb41cf5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 11): crates/zeroclaw-channels/src/discord/rest.rs:104-109 | crates/zeroclaw-channels/src/matrix.rs:1205-1210 | crates/zeroclaw-channels/src/matrix.rs:1236-1241 | crates/zeroclaw-channels/src/matrix.rs:1254-1259 | crates/zeroclaw-channels/src/matrix.rs:1354-1359 | crates/zeroclaw-channels/src/matrix.rs:1374-1379 | crates/zeroclaw-channels/src/matrix.rs:2795-2800 | crates/zeroclaw-channels/src/matrix.rs:2837-2842 | crates/zeroclaw-channels/src/matrix.rs:2956-2961 | crates/zeroclaw-config/src/migration.rs:2073-2078 | crates/zeroclaw-tools/src/pushover.rs:47-52 \u2014 there are 11 copies across 4 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 11 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/zeroclaw-channels/src/discord/rest.rs:104\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 \u0060path\u0060 to \u0060\u0026std::path::Path\u0060 in one and \u0060\u0026Path\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/zeroclaw-config/src/migration.rs:2079\u0060 calls \u0060display\u0060, \u0060to_string\u0060 and \u0060crates/zeroclaw-channels/src/matrix.rs:1211\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/zeroclaw-channels/src/discord/rest.rs"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"7be36d81eae5f92cbba28a0b63c618b543561426b1d14e44b75ecd42e5c03dc6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): xtask/src/generate/flake.rs:105-110 | xtask/src/generate/setup_bat.rs:227-232 \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 \u0060xtask/src/generate/flake.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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060xtask/src/generate/flake.rs:111\u0060 calls \u0060render_zone\u0060 and \u0060xtask/src/generate/setup_bat.rs:234\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":"xtask/src/generate/flake.rs"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"070f28b2bd7bafe99cf16efa100612b06c9afa16e18c76e8dac3fcd14095a62f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 5): crates/zeroclaw-channels/src/matrix.rs:3804-3809 | crates/zeroclaw-channels/src/matrix.rs:3855-3860 | crates/zeroclaw-channels/src/matrix.rs:3916-3920 | crates/zeroclaw-config/src/policy.rs:5744-5748 | crates/zeroclaw-tls/src/lib.rs:574-579 \u2014 there are 5 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 5 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/zeroclaw-channels/src/matrix.rs:3804\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":3804}}}],"partialFingerprints":{"codehealthFindingId/v1":"67ffc1ece9b6bdf6f4988147e5367bdc9597dd6e6a3cf543a4f323288b3af016"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-providers/src/compatible.rs:308-313 | crates/zeroclaw-tools/src/hardware_memory_read.rs:167-172 \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/zeroclaw-providers/src/compatible.rs:308\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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0c03a2eb61c04c1b534b2dca279107292d98bfb6d5c2f85c27daba829004eb9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/zeroclaw-channels/src/line.rs:1246-1250 | crates/zeroclaw-channels/src/orchestrator/media_pipeline.rs:202-207 | crates/zeroclaw-channels/src/transcription.rs:1361-1365 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/line.rs:1246\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/zeroclaw-channels/src/line.rs"},"region":{"startLine":1246}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf520d503421af1064f57ba526984f90a5c05e4c53e51dfb36d85c8898cf6320"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-providers/src/auth/mod.rs:1259-1264 | crates/zeroclaw-providers/src/auth/mod.rs:1514-1519 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/auth/mod.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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/zeroclaw-providers/src/auth/mod.rs:1512\u0060 calls \u0060alias_creds\u0060 and \u0060crates/zeroclaw-providers/src/auth/mod.rs:1257\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/zeroclaw-providers/src/auth/mod.rs"},"region":{"startLine":1259}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3e46581e1c1f96f4a60f7df801ada1396967f83481b3adc2435c19a58fe8e4c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-channels/src/discord/slash_options.rs:201-205 | crates/zeroclaw-channels/src/twitter.rs:281-286 \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/zeroclaw-channels/src/discord/slash_options.rs:201\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/zeroclaw-channels/src/discord/slash_options.rs"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"455a92c6102c330241edc049b9d0f874f94c9d6c04970e6d7a20f30c7711c63d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-channels/src/telegram.rs:5241-5246 | crates/zeroclaw-channels/src/telegram.rs:5277-5282 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/telegram.rs:5241\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":5241}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffc63793a1a5f7289275e8990d17515fbf0c2af3b3e6aff47abeedebd219215c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-config/src/env_overrides.rs:84-89 | crates/zeroclaw-gateway/src/lib.rs:1538-1543 \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/zeroclaw-config/src/env_overrides.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/zeroclaw-config/src/env_overrides.rs"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"afaf677e3bf203f94e8b28857b07a9ab4bc9f02c9968ebdf618a51cca5d9394a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-infra/src/lib.rs:94-99 | crates/zeroclaw-providers/src/bedrock.rs:1105-1110 \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/zeroclaw-infra/src/lib.rs:94\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/zeroclaw-infra/src/lib.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"4922d288b832d7d0342c63f53abaa3e4a5a2a6d9cd164c30e259ae6371e6c198"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u20136 lines \u00D7 20): crates/zeroclaw-channels/src/orchestrator/mod.rs:13212-13215 | crates/zeroclaw-channels/src/orchestrator/mod.rs:13256-13261 | crates/zeroclaw-channels/src/orchestrator/mod.rs:13300-13305 | crates/zeroclaw-channels/src/orchestrator/mod.rs:13348-13353 | crates/zeroclaw-channels/src/orchestrator/mod.rs:13384-13389 | crates/zeroclaw-channels/src/orchestrator/mod.rs:13523-13528 | crates/zeroclaw-channels/src/orchestrator/mod.rs:13548-13553 | crates/zeroclaw-channels/src/orchestrator/mod.rs:13579-13584 | crates/zeroclaw-channels/src/orchestrator/mod.rs:13606-13611 | crates/zeroclaw-channels/src/orchestrator/mod.rs:13676-13681 | crates/zeroclaw-channels/src/orchestrator/mod.rs:13706-13711 | crates/zeroclaw-channels/src/orchestrator/mod.rs:13750-13755 | crates/zeroclaw-channels/src/orchestrator/mod.rs:13794-13799 | crates/zeroclaw-channels/src/orchestrator/mod.rs:13817-13822 | crates/zeroclaw-channels/src/orchestrator/mod.rs:13840-13845 | crates/zeroclaw-channels/src/orchestrator/mod.rs:13872-13877 | crates/zeroclaw-channels/src/orchestrator/mod.rs:13898-13903 | crates/zeroclaw-channels/src/orchestrator/mod.rs:13921-13926 | crates/zeroclaw-channels/src/orchestrator/mod.rs:13940-13945 | crates/zeroclaw-channels/src/orchestrator/mod.rs:13983-13988 \u2014 all 20 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/zeroclaw-channels/src/orchestrator/mod.rs:13212\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/zeroclaw-channels/src/orchestrator/mod.rs:13210\u0060 calls \u0060context\u0060, \u0060unwrap_or\u0060, \u0060to_string\u0060 and \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:13256\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":13212}}}],"partialFingerprints":{"codehealthFindingId/v1":"b65079fb203785efd124a4f8c2b65ab3cf683d34a772b01ab92ff9ece948d6bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-memory/src/sqlite.rs:1987-1991 | crates/zeroclaw-memory/src/sqlite.rs:1992-1996 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-memory/src/sqlite.rs:1987\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/zeroclaw-memory/src/sqlite.rs"},"region":{"startLine":1987}}}],"partialFingerprints":{"codehealthFindingId/v1":"8acebbf0ed00d80b019aa24237f608349e46c2d29d6c97ecbf66c306ab559083"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-tools/src/calculator.rs:440-444 | crates/zeroclaw-tools/src/calculator.rs:450-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/zeroclaw-tools/src/calculator.rs"},"region":{"startLine":440}}}],"partialFingerprints":{"codehealthFindingId/v1":"3636b5e05de4db6c1f92541c0f7ede33894f1146327ad6b5cccb1784a49ffb0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-memory/src/knowledge_graph_pg.rs:238-242 | crates/zeroclaw-memory/src/knowledge_graph_pg.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/zeroclaw-memory/src/knowledge_graph_pg.rs:238\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/zeroclaw-memory/src/knowledge_graph_pg.rs:234\u0060 calls \u0060to_vec\u0060 and \u0060crates/zeroclaw-memory/src/knowledge_graph_pg.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/zeroclaw-memory/src/knowledge_graph_pg.rs"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"383b2d6db0d5e2d71946409ac5cff1c8d08887eb49ef3a3342c0f4c3b32a741a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-tools/src/mcp_client.rs:1381-1385 | crates/zeroclaw-tools/src/mcp_client.rs:1396-1400 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-tools/src/mcp_client.rs"},"region":{"startLine":1381}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb0ea08c521f1acfbdfa77a7d748808afac7fdd595bbeaddfa9369892e8eba2a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/zeroclaw-channels/src/telegram.rs:4189-4193 | crates/zeroclaw-channels/src/telegram.rs:7291-7295 | crates/zeroclaw-channels/src/telegram.rs:7351-7355 \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/zeroclaw-channels/src/telegram.rs:4189\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":4189}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf14316941a83e50e9f622cdd9ef3bab348f3f0b29662cebcf81ee2d6a8cdd81"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/zeroclaw-channels/src/acp_channel.rs:92-96 | crates/zeroclaw-channels/src/acp_channel.rs:147-151 | crates/zeroclaw-runtime/src/rpc/approval_channel.rs:238-242 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/acp_channel.rs\u0060 and \u0060crates/zeroclaw-runtime/src/rpc/approval_channel.rs\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 49 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/zeroclaw-channels/src/acp_channel.rs:92\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/zeroclaw-channels/src/acp_channel.rs"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"395398833202404d4e076728ca998e762dae2195d4e01459927a9619450337d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-channels/src/lark.rs:2084-2088 | crates/zeroclaw-channels/src/orchestrator/mod.rs:5961-5965 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/lark.rs\u0060 and \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 31 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. 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/zeroclaw-channels/src/lark.rs:2084\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/zeroclaw-channels/src/orchestrator/mod.rs:5959\u0060 calls \u0060clone\u0060, \u0060unwrap_or_default\u0060 and \u0060crates/zeroclaw-channels/src/lark.rs:2082\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":2084}}}],"partialFingerprints":{"codehealthFindingId/v1":"302d8b9ab625da2eaaf5c9e592719e7db094cc84bb0f7b889c8127459b04906f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-channels/src/discord/markers.rs:461-465 | crates/zeroclaw-channels/src/discord/markers.rs:508-512 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/discord/markers.rs:461\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/zeroclaw-channels/src/discord/markers.rs"},"region":{"startLine":461}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f30f0e44c7b26faee39662dd647df8375580f8ed5fb62bf6f4f9a48cae9c140"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-channels/src/telegram.rs:6230-6234 | crates/zeroclaw-channels/src/telegram.rs:6282-6286 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/telegram.rs:6230\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":6230}}}],"partialFingerprints":{"codehealthFindingId/v1":"40c3430bd0ced5adb06dd7348813d405bdc75bf06d018e6e62e06a316205b971"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-gateway/src/nodes/mdns.rs:245-249 | crates/zeroclaw-runtime/src/relay.rs:714-718 \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/zeroclaw-gateway/src/nodes/mdns.rs:245\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/zeroclaw-gateway/src/nodes/mdns.rs"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"f758ed70b38db026ce71e51c99de13425b311eb0707fdfef1fbc17c369f8590f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/zeroclaw-channels/src/telegram.rs:6221-6225 | crates/zeroclaw-channels/src/telegram.rs:6231-6235 | crates/zeroclaw-channels/src/telegram.rs:6283-6287 \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/zeroclaw-channels/src/telegram.rs:6221\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":6221}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ccd0fb9904c0b867ccc395ff31b8be5213d88027b1bf5bca269d044e3e61e5f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): crates/zeroclaw-providers/src/auth/gemini_oauth.rs:459-463 | crates/zeroclaw-runtime/src/tools/security_ops.rs:29-33 | crates/zeroclaw-runtime/src/tools/security_ops.rs:189-193 | crates/zeroclaw-runtime/src/tools/verifiable_intent.rs:166-170 \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/zeroclaw-providers/src/auth/gemini_oauth.rs:459\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/zeroclaw-providers/src/auth/gemini_oauth.rs"},"region":{"startLine":459}}}],"partialFingerprints":{"codehealthFindingId/v1":"3136fe93eb9482533a92ffb080cef142beb2c9d605afeca1172a2d77b515322d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/mod.rs:13220-13224 | crates/zeroclaw-channels/src/orchestrator/mod.rs:13434-13438 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/mod.rs:13220\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":13220}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e4054346719855c008633e6e4fc9dffbec20bdc1792d68cc11d876cd207e45a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-runtime/src/agent_lifecycle.rs:356-360 | crates/zeroclaw-runtime/src/agent_lifecycle.rs:455-459 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/agent_lifecycle.rs:356\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/zeroclaw-runtime/src/agent_lifecycle.rs"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6ebd615a63d65402467e6f4ef96a83370edb0f15198c6ed30304c968c226d58"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-channels/src/whatsapp_web.rs:4098-4102 | crates/zeroclaw-channels/src/whatsapp_web.rs:4104-4108 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-channels/src/whatsapp_web.rs"},"region":{"startLine":4098}}}],"partialFingerprints":{"codehealthFindingId/v1":"b38ea512707de56628219823609ef1da6a500eda145d0f3787761cbfd21e4b93"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 18): crates/zeroclaw-channels/src/orchestrator/mod.rs:14915-14919 | crates/zeroclaw-channels/src/orchestrator/mod.rs:14985-14989 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15130-15134 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15335-15339 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15425-15429 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15450-15454 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15485-15489 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15529-15533 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15594-15598 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15632-15636 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15674-15678 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15724-15728 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15763-15767 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15807-15811 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15842-15846 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15887-15891 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15924-15928 | crates/zeroclaw-channels/src/orchestrator/mod.rs:16021-16025 \u2014 all 18 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/zeroclaw-channels/src/orchestrator/mod.rs:14915\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":14915}}}],"partialFingerprints":{"codehealthFindingId/v1":"576bf3890603e5c7f548b0c99ac2fbe1ed5377d9d5d2e22c7d23cf67f845abbd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-channels/src/wechat.rs:2774-2778 | crates/zeroclaw-gateway/src/lib.rs:1537-1541 \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/zeroclaw-channels/src/wechat.rs:2774\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/zeroclaw-channels/src/wechat.rs"},"region":{"startLine":2774}}}],"partialFingerprints":{"codehealthFindingId/v1":"b59fbf80e5034590890799d1697e7282c1252a5dffd136aa9b3227ff05132028"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/zeroclaw-gateway/src/ws.rs:1338-1342 | crates/zeroclaw-gateway/src/ws.rs:1363-1367 | crates/zeroclaw-runtime/src/sop/engine.rs:1800-1804 \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/zeroclaw-gateway/src/ws.rs:1338\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/zeroclaw-gateway/src/ws.rs"},"region":{"startLine":1338}}}],"partialFingerprints":{"codehealthFindingId/v1":"37fe4b8b07ddf0edb7284b7965fa296ecf3a5b2587b54e2fe309a39195f23fae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 7): crates/zeroclaw-tools/src/microsoft365/mod.rs:125-129 | crates/zeroclaw-tools/src/microsoft365/mod.rs:175-179 | crates/zeroclaw-tools/src/microsoft365/mod.rs:258-262 | crates/zeroclaw-tools/src/microsoft365/mod.rs:315-319 | crates/zeroclaw-tools/src/microsoft365/mod.rs:426-430 | crates/zeroclaw-tools/src/microsoft365/mod.rs:482-486 | crates/zeroclaw-tools/src/microsoft365/mod.rs:556-560 \u2014 all 7 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/zeroclaw-tools/src/microsoft365/mod.rs:125\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/zeroclaw-tools/src/microsoft365/mod.rs"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"c25ede293bdd4d0496a7df2b87ecedfed4cd310b68c729c2077678d224938512"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 13): crates/zeroclaw-channels/src/orchestrator/mod.rs:14988-14992 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15045-15049 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15133-15137 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15195-15199 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15338-15342 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15453-15457 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15488-15492 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15597-15601 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15727-15731 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15766-15770 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15810-15814 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15890-15894 | crates/zeroclaw-channels/src/orchestrator/mod.rs:15927-15931 \u2014 all 13 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/zeroclaw-channels/src/orchestrator/mod.rs:14988\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":14988}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ef118f6e3d8647be1cfc2bf8872c08b332591eb1ca7095549f2818384570c4b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-gateway/src/lib.rs:4132-4136 | src/cron/mod.rs:10-14 \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/zeroclaw-gateway/src/lib.rs:4132\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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":4132}}}],"partialFingerprints":{"codehealthFindingId/v1":"83355480be03f1139d724e6ed8b72b4ad02ac5458996b5c4f3153ddf3380d5bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/zeroclaw-providers/src/openai_codex.rs:177-181 | crates/zeroclaw-tools/src/browser.rs:322-326 | crates/zeroclaw-tools/src/git_operations.rs:1771-1775 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-providers/src/openai_codex.rs:177\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/zeroclaw-providers/src/openai_codex.rs"},"region":{"startLine":177}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f02e25b06f2fa20d1283e995a28ac8bb755b7acb306db1647783f9db6cd89d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-memory/src/knowledge_graph_pg.rs:189-193 | crates/zeroclaw-memory/src/knowledge_graph_pg.rs:207-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/zeroclaw-memory/src/knowledge_graph_pg.rs:189\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/zeroclaw-memory/src/knowledge_graph_pg.rs"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6b8037451857acb48efe9dcfc4709a18db826f30603c32d58e2a9f5bb97fe88"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-runtime/src/cron/mod.rs:102-106 | src/skills/mod.rs:846-850 \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/zeroclaw-runtime/src/cron/mod.rs:102\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/zeroclaw-runtime/src/cron/mod.rs"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc476fef948b9ccc241d57486a865a65f160e66084086ed33b8c06e7e7b0aaa8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-config/src/schema.rs:22249-22253 | crates/zeroclaw-config/src/schema.rs:22257-22261 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-config/src/schema.rs:22249\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/zeroclaw-config/src/schema.rs"},"region":{"startLine":22249}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4f5b32b28f16b7580a00e1e94861f6aa727dfbda4df211edccc5367e8319a88"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-config/src/schema/v2.rs:2033-2037 | crates/zeroclaw-config/src/schema/v2.rs:2838-2842 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-config/src/schema/v2.rs:2033\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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":2033}}}],"partialFingerprints":{"codehealthFindingId/v1":"75e2ded9b0d0b613b78cb89adbe71e81df1917a72c23327206488d1fd870f0d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/zeroclaw-runtime/src/enroll/mod.rs:430-434 | crates/zeroclaw-runtime/src/rpc/dispatch.rs:742-746 | crates/zeroclaw-runtime/src/security/cert_ledger.rs:905-909 \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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-runtime/src/enroll/mod.rs:430\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/zeroclaw-runtime/src/enroll/mod.rs"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"566dc9b084de64bdde3d2be1da9b3d4073890fbfe8a0ac271fa42ae8a5cd2284"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 5): crates/zeroclaw-providers/src/auth/gemini_oauth.rs:459-463 | crates/zeroclaw-runtime/src/tools/security_ops.rs:29-33 | crates/zeroclaw-runtime/src/tools/security_ops.rs:189-193 | crates/zeroclaw-runtime/src/tools/verifiable_intent.rs:166-170 | crates/zeroclaw-runtime/src/tools/verifiable_intent.rs:177-181 \u2014 there are 5 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 5 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/zeroclaw-providers/src/auth/gemini_oauth.rs:459\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/zeroclaw-providers/src/auth/gemini_oauth.rs"},"region":{"startLine":459}}}],"partialFingerprints":{"codehealthFindingId/v1":"3284a02678095006597d746f5f8a6927e9c951daa7850fc0122b8fb848ef4f78"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (1\u20135 lines \u00D7 5): crates/zeroclaw-channels/src/telegram.rs:5236-5240 | crates/zeroclaw-gateway/src/api_upload.rs:146-150 | crates/zeroclaw-runtime/src/agent/agent.rs:3325-3325 | crates/zeroclaw-runtime/src/agent/agent.rs:3326-3326 | crates/zeroclaw-runtime/src/agent_lifecycle.rs:126-130 \u2014 there are 5 copies across 4 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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/telegram.rs:5236\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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":5236}}}],"partialFingerprints":{"codehealthFindingId/v1":"596ccd0899f552aacd187fb60a20505f0b9e849ba849d7ccd63552ea396edf28"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-tools/src/jira_tool.rs:1612-1616 | crates/zeroclaw-tools/src/jira_tool.rs:1619-1623 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-tools/src/jira_tool.rs"},"region":{"startLine":1612}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3e313adf2e8e1a953edd17387c4f1c952b39b3c49794c01d6339b326db32813"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-channels/src/qq.rs:1647-1651 | crates/zeroclaw-channels/src/qq.rs:1721-1725 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/qq.rs:1647\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/zeroclaw-channels/src/qq.rs:1655\u0060 calls \u0060get\u0060, \u0060and_then\u0060, \u0060as_str\u0060 and \u0060crates/zeroclaw-channels/src/qq.rs:1729\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/zeroclaw-channels/src/qq.rs"},"region":{"startLine":1647}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b1fb6f7bfe145734e9e7c3193c9860edc819f7484deaa37ebfc1150a3347f42"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 6): crates/zeroclaw-channels/src/orchestrator/mod.rs:17952-17956 | crates/zeroclaw-channels/src/orchestrator/mod.rs:17971-17975 | crates/zeroclaw-channels/src/orchestrator/mod.rs:17997-18001 | crates/zeroclaw-channels/src/orchestrator/mod.rs:18028-18032 | crates/zeroclaw-channels/src/orchestrator/mod.rs:18055-18059 | crates/zeroclaw-channels/src/orchestrator/mod.rs:18201-18205 \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/zeroclaw-channels/src/orchestrator/mod.rs:17952\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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":17952}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f2e06c212f2e01b80d1e541a76acaca83b215acb8e6a2dfe3f2e1c1eea575a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-channels/src/lark.rs:1926-1930 | crates/zeroclaw-channels/src/lark.rs:2049-2053 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/lark.rs:1926\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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":1926}}}],"partialFingerprints":{"codehealthFindingId/v1":"1261d0f6e4cae994e29a315dc1d402098dfcc8007372ac03416e8ec72a955e98"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-channels/src/discord/mod.rs:2193-2197 | crates/zeroclaw-channels/src/qq.rs:1554-1558 \u2014 before extracting anything, compare \u0060crates/zeroclaw-channels/src/discord/mod.rs\u0060 and \u0060crates/zeroclaw-channels/src/qq.rs\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. 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/zeroclaw-channels/src/discord/mod.rs:2193\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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":2193}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b1720c9a74ec57d0dd43491e7b550ab7ea1b600b8bd977dfa5ed12c37149206"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-channels/src/orchestrator/acp_server.rs:3307-3311 | crates/zeroclaw-channels/src/orchestrator/acp_server.rs:3324-3328 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-channels/src/orchestrator/acp_server.rs:3307\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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":3307}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d276a381f1c4472ef83ebf6429f4ed4695d7fde9542efcaf573a856f752fc18"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-config/src/migration.rs:1925-1929 | crates/zeroclaw-config/src/migration.rs:1990-1994 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-config/src/migration.rs:1930\u0060 calls \u0060insert\u0060, \u0060to_string\u0060, \u0060Table\u0060 and \u0060crates/zeroclaw-config/src/migration.rs:1995\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/zeroclaw-config/src/migration.rs"},"region":{"startLine":1925}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9bded65d40fb7fe2e592d19385c3d4f9a88125283de6acb0184ff9c8cb3c27d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-config/src/migration.rs:2479-2484 | crates/zeroclaw-config/src/schema/v2.rs:1934-1939 \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/zeroclaw-config/src/migration.rs:2479\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/zeroclaw-config/src/migration.rs"},"region":{"startLine":2479}}}],"partialFingerprints":{"codehealthFindingId/v1":"e28caed085c51f5f83ce63395e738a2f386c4244af7fa67e69cde5af9291f625"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/zeroclaw-gateway/src/api_pairing.rs:75-82 | crates/zeroclaw-gateway/src/api_pairing.rs:205-212 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-gateway/src/api_pairing.rs"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"68cb77927d05f6f46849c8d179f58d940a39ed1184747e5d02eb95e54331b159"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-infra/src/acp_session_store.rs:1577-1581 | crates/zeroclaw-infra/src/acp_session_store.rs:1584-1588 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/zeroclaw-infra/src/acp_session_store.rs:1577\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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":1577}}}],"partialFingerprints":{"codehealthFindingId/v1":"26a6bfd41273d3b1d2bfbbeaf6c2d7480f2ff56e9bac9beafa8d733619e527dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/zeroclaw-memory/src/postgres.rs:401-407 | crates/zeroclaw-memory/src/postgres.rs:763-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-memory/src/postgres.rs"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"9679eea9b8418685a834cd1ebcaab5889c40f271344caf6034b8ddf40101d48b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-runtime/src/sop/store/mod.rs:445-450 | crates/zeroclaw-runtime/src/sop/store/mod.rs:460-465 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-runtime/src/sop/store/mod.rs"},"region":{"startLine":445}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d35956d95c31495cdb08bf6b84912164595953afa3295a8aafe3f28fa5ffeb4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/zeroclaw-runtime/src/tools/delegate.rs:3818-3822 | crates/zeroclaw-runtime/src/tools/delegate.rs:4245-4249 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-runtime/src/tools/delegate.rs:4250\u0060 calls \u0060clone\u0060 and \u0060crates/zeroclaw-runtime/src/tools/delegate.rs:3823\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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":3818}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f72407e26c9e30ffe7592689f0ada7b1de3fa3bccbe960a25a32d6e54ac0750"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/zeroclaw-tools/src/mcp_transport.rs:2150-2155 | crates/zeroclaw-tools/src/mcp_transport.rs:2160-2165 \u2014 both copies are in the same file, so extract the block 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/zeroclaw-tools/src/mcp_transport.rs"},"region":{"startLine":2150}}}],"partialFingerprints":{"codehealthFindingId/v1":"26e54002c68e39f4655e437550c50c909d0ab362582fffb77f631c82cf5a0c90"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): xtask/src/cmd/mdbook/check.rs:19-23 | xtask/src/cmd/mdbook/stats.rs:8-12 \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":"xtask/src/cmd/mdbook/check.rs"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c7595e93d6179fe294a0400142b442aaf5cd6863284cd619cbc064e0a675e4e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): xtask/src/generate/spec.rs:972-990 | xtask/src/generate/spec.rs:1176-1192 \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":"xtask/src/generate/spec.rs"},"region":{"startLine":972}}}],"partialFingerprints":{"codehealthFindingId/v1":"2722950036b5154934dfce903ac5b1e4aa473b8423e095629b4f64e70fe19fd6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): xtask/src/generate/spec.rs:800-808 | xtask/src/generate/spec.rs:919-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"xtask/src/generate/spec.rs"},"region":{"startLine":800}}}],"partialFingerprints":{"codehealthFindingId/v1":"57207ffa5ff8762220ae60ba341dad98344249b04a9f80b5aec87561f889ec96"}},{"ruleId":"D5","level":"warning","message":{"text":"Unstable project zeroclaw-channels: zeroclaw-channels has instability 0.83 with 2 dependents."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"262b8af5ff332b8822419f765921668670ac5dcfc398fac9580ab8f02fc8ee87"}},{"ruleId":"D5","level":"warning","message":{"text":"Unstable project zeroclaw-gateway: zeroclaw-gateway has instability 0.88 with 2 dependents."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"687f42587d43b58d264445fc06a4bac103339ebb823ba4e6b4848d07633c1f7d"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: zeroclaw-commands: zeroclaw-commands: 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":"d2ae0ee8ce1cdec636756e8046d7c63bb964d31fd8a1e9f0b69bfc0b0bdbbded"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: zeroclaw-relay-proto: zeroclaw-relay-proto: 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":"ff832656d61007a3b9dd851788e9c3870ed59adae55fef90bba92ebe2b6ad839"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: zeroclaw-sop-graph: zeroclaw-sop-graph: 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":"bdccb3e7be08d5c7b0f6f8835237a5bec9971c7669c8ecf6d73c2c62a71ffeb3"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: zeroclaw-api: zeroclaw-api: abstractness 0.09, instability 0.00, distance 0.91 \u2014 zone of pain \u2014 concrete and depended on by 19 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d1838be32cdbd4f9ef18225b3daf4c315b610fca710bb0191402caa38368300c"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: zeroclaw-log: zeroclaw-log: abstractness 0.04, instability 0.07, distance 0.90 \u2014 zone of pain \u2014 concrete and depended on by 14 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"7ac9fd830e15d3c793b3ad569c852c8a21487e9fd787b7ceaeade2eddbd7cd6d"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: zeroclaw-tls: zeroclaw-tls: abstractness 0.09, instability 0.20, distance 0.71 \u2014 zone of pain \u2014 concrete and depended on by 4 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"060a689a566f958b0ec9c17d8a45ed8ccd7b1e50ed4dd2a66b8bd28e5bb22775"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: zeroclaw-config: zeroclaw-config: abstractness 0.03, instability 0.27, distance 0.71 \u2014 zone of pain \u2014 concrete and depended on by 11 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"bef5a41bd0d7e52dbf3dcccc344cd5f1c23cc46a9fd48bcbafa2375d22c5a5d8"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: PairingGuard (LCOM4 7): PairingGuard\u0027s methods fall into 7 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 7 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/zeroclaw-config/src/pairing.rs"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"131e15444699b5f988579d8bbb5100e3884bbf93c5ac0698f60aa38a5d396427"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: WasmMemory (LCOM4 7): WasmMemory\u0027s methods fall into 7 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 7 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/zeroclaw-plugins/src/wasm_memory.rs"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"578425389f8514e7a3c92e6551d9313e49a818784f3c6a794db65d6251f94eea"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: Event (LCOM4 5): Event\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/zeroclaw-log/src/event.rs"},"region":{"startLine":502}}}],"partialFingerprints":{"codehealthFindingId/v1":"8423e715b21ab5fd88d04c52a235b44d20550932a91637498e1badd234afb3f6"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: PluginState (LCOM4 5): PluginState\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/zeroclaw-plugins/src/component.rs"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ff9a8bb33da5843a059810283c666a52311e6b7ef8370bd2a9669f63475997b"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: PluginStateStore (LCOM4 4): PluginStateStore\u0027s methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable \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 4 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/zeroclaw-runtime/src/plugin_state.rs"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"81554a2fea5992e975f2b65613aadff351d2723edf17859204d3f70f3a767b9d"}},{"ruleId":"D13","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":"df39136752aa965e480ce9bea468b86cc095800c659b44c3969a0341fc37d738"},"taxa":[{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D13","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":"7d7ccaa12c259414db202c6d514bdbfe31b280a6dd5df4f4f4e85529b0e6abc2"},"taxa":[{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D14","level":"error","message":{"text":"Banned license: unescaper: \u0060unescaper\u0060 0.1.8 is published on crates.io under \u0060GPL-3.0/MIT\u0060, which this policy bans, and it is in the SHIPPED closure of this repository\u0027s Cargo.lock \u2014 so it is compiled by everything that builds this repository, not just by its test harness. The expression was read as SPDX, not as text: an \u0060OR\u0060 is a choice and is only charged when every branch is banned, while an \u0060AND\u0060 binds you to both operands and is charged when either is. Replace the crate, or record an accepted exception."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"47dec730d9a7d158ad52c682b88a099f7e8063cf5dfb423be01efa4c2e898606"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-config/src/schema.rs: crates/zeroclaw-config/src/schema.rs changed 136 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 277 in Config::validate at line 24639. 60 of those changes were fix/bug commits, and the other 76 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-config/src/schema.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/zeroclaw-config/src/schema.rs"},"region":{"startLine":24639}}}],"partialFingerprints":{"codehealthFindingId/v1":"79520229c886a2b4a285418abc8d59beadada89040626f0425cdbe5d4f195751"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src/main.rs: src/main.rs changed 63 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 378 in zeroclaw::async_main_inner at line 9633. 34 of those changes were fix/bug commits, so the churn is repair rather than feature work. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- src/main.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/main.rs"},"region":{"startLine":9633}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9f4bd697ce412d5d6af59543f06e4a0481b7a56e4bd52631de4c8462fa4ed51"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-channels/src/orchestrator/mod.rs: crates/zeroclaw-channels/src/orchestrator/mod.rs changed 97 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 181 in zeroclaw_channels::orchestrator::process_channel_message_body at line 9281. 47 of those changes were fix/bug commits, and the other 50 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-channels/src/orchestrator/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/zeroclaw-channels/src/orchestrator/mod.rs"},"region":{"startLine":9281}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc902c3d5a2f026079097f30600f8d45171dd809f9fe63bb58b2c4253fa24ae4"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-runtime/src/rpc/dispatch.rs: crates/zeroclaw-runtime/src/rpc/dispatch.rs changed 95 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 115 in RpcDispatcher::dispatch_method at line 3391. 46 of those changes were fix/bug commits, and the other 49 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/rpc/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/zeroclaw-runtime/src/rpc/dispatch.rs"},"region":{"startLine":3391}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ede2a7007b37218974b895010d223db30e4e0e0ef11aee20817ca522ad07523"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: apps/zerocode/src/chat.rs: apps/zerocode/src/chat.rs changed 61 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 160 in Chat::handle_key at line 4024. 33 of those changes were fix/bug commits, so the churn is repair rather than feature work. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- apps/zerocode/src/chat.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":"apps/zerocode/src/chat.rs"},"region":{"startLine":4024}}}],"partialFingerprints":{"codehealthFindingId/v1":"03400139997ba4f12bf6d4e3ef70253c37a3e5dcae3f67747e1e7dee969d701c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-runtime/src/agent/turn/mod.rs: crates/zeroclaw-runtime/src/agent/turn/mod.rs changed 61 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 158 in zeroclaw_runtime::agent::turn::run_tool_call_loop_impl at line 1657. 35 of those changes were fix/bug commits, so the churn is repair rather than feature work. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/agent/turn/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/zeroclaw-runtime/src/agent/turn/mod.rs"},"region":{"startLine":1657}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9a3e3c1a5b6d01eb4e242804104e06662981af1c38699b822b0911d6ff6a329"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: apps/zerocode/src/app.rs: apps/zerocode/src/app.rs changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 275 in zerocode::app::run at line 1673. 16 of those changes were fix/bug commits, so the churn is repair rather than feature work. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- apps/zerocode/src/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":"apps/zerocode/src/app.rs"},"region":{"startLine":1673}}}],"partialFingerprints":{"codehealthFindingId/v1":"6336b85467ed067600325c7f947b97a4b0d15f3172f5000af5569994bb7929b4"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-runtime/src/agent/loop_.rs: crates/zeroclaw-runtime/src/agent/loop_.rs changed 60 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 119 in zeroclaw_runtime::agent::loop_::run_inner at line 1620. 33 of those changes were fix/bug commits, so the churn is repair rather than feature work. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/agent/loop_.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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":1620}}}],"partialFingerprints":{"codehealthFindingId/v1":"6742b10f93925a3404ee6e15f21b401c2d1913bfee5390d1d9dc5017766a0c06"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-runtime/src/tools/mod.rs: crates/zeroclaw-runtime/src/tools/mod.rs changed 63 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 111 in zeroclaw_runtime::tools::all_tools_with_runtime_on_thread at line 2306. 30 of those changes were fix/bug commits, and the other 33 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/tools/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/zeroclaw-runtime/src/tools/mod.rs"},"region":{"startLine":2306}}}],"partialFingerprints":{"codehealthFindingId/v1":"266373a06e7ba3a284e01dfcd6e403bcb76d6d2167097e7e7626d71c5c42e57c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-gateway/src/lib.rs: crates/zeroclaw-gateway/src/lib.rs changed 44 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 88 in zeroclaw_gateway::run_gateway_with_plugin_webhooks at line 1386. 18 of those changes were fix/bug commits, and the other 26 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-gateway/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/zeroclaw-gateway/src/lib.rs"},"region":{"startLine":1386}}}],"partialFingerprints":{"codehealthFindingId/v1":"eedd745be1ebbea79f367455b22e90c56d01776fa8409c1eef809492f94e519c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-runtime/src/agent/agent.rs: crates/zeroclaw-runtime/src/agent/agent.rs changed 67 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 52 in Agent::turn_streamed_with_steering_body at line 4912. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/agent/agent.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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":4912}}}],"partialFingerprints":{"codehealthFindingId/v1":"07983595b0daa7173270e804f10d8f7d6cdd3d00a1be9d9e8baeffe2eb4dd187"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-runtime/src/daemon/mod.rs: crates/zeroclaw-runtime/src/daemon/mod.rs changed 44 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in zeroclaw_runtime::daemon::run_with_authority at line 715. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/daemon/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/zeroclaw-runtime/src/daemon/mod.rs"},"region":{"startLine":715}}}],"partialFingerprints":{"codehealthFindingId/v1":"4818e9c438cdcaa53999fbb7f2bdd8d6fe6a782500d7486591f6113ac8ff5d80"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-channels/src/discord/mod.rs: crates/zeroclaw-channels/src/discord/mod.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 174 in DiscordChannel::listen at line 1999. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-channels/src/discord/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/zeroclaw-channels/src/discord/mod.rs"},"region":{"startLine":1999}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6669c1b7cb767f36bfd20c22769646e1c94d1aa372c9d51fae827744376e228"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-runtime/src/tools/delegate.rs: crates/zeroclaw-runtime/src/tools/delegate.rs changed 47 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in DelegateTool::execute_agentic_with_approval_registry at line 5225. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/tools/delegate.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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":5225}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d77aed961eae66d5cbe6f1cad88852530f21217566884d600e57eaea3a9b6e3"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-gateway/src/ws.rs: crates/zeroclaw-gateway/src/ws.rs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 84 in zeroclaw_gateway::ws::handle_socket at line 592. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-gateway/src/ws.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/zeroclaw-gateway/src/ws.rs"},"region":{"startLine":592}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7f319fa3eabb0f5968d65cf180affaf3fff3aad1d81fd14e0b6512fd52ae994"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-config/src/policy.rs: crates/zeroclaw-config/src/policy.rs changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 96 in zeroclaw_config::policy::scan_unquoted_segments at line 1614. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-config/src/policy.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/zeroclaw-config/src/policy.rs"},"region":{"startLine":1614}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac18653bc800bf0a2940595239b73b790a30b9e9371f18a1dad65f79934d67e1"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-providers/src/anthropic.rs: crates/zeroclaw-providers/src/anthropic.rs changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in AnthropicModelProvider::parse_anthropic_sse_from_reader at line 2485. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-providers/src/anthropic.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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":2485}}}],"partialFingerprints":{"codehealthFindingId/v1":"b31e3cc921c06a257cef8036e18d76170e357b0cd6cd23b59f59ee07bc100f5d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-runtime/src/agent/turn/stream_consume.rs: crates/zeroclaw-runtime/src/agent/turn/stream_consume.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 95 in zeroclaw_runtime::agent::turn::stream_consume::consume_provider_streaming_response_with_policy at line 121. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/agent/turn/stream_consume.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/zeroclaw-runtime/src/agent/turn/stream_consume.rs"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"82a70cc72c2c428e4e5932b7754e8522c27d8ec6180e22dc3472b1ae20f23c7e"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-runtime/src/tools/scoped.rs: crates/zeroclaw-runtime/src/tools/scoped.rs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 72 in ScopedToolRegistry::assemble_prepared at line 699. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/tools/scoped.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/zeroclaw-runtime/src/tools/scoped.rs"},"region":{"startLine":699}}}],"partialFingerprints":{"codehealthFindingId/v1":"6eb542a2b8d18ecaa31a3124bc5deff4c46dd332fc41ffcb4c52c7faac1a86ea"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-runtime/src/agent/turn/max_iter.rs: crates/zeroclaw-runtime/src/agent/turn/max_iter.rs changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in zeroclaw_runtime::agent::turn::max_iter::finish_after_max_iterations 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/agent/turn/max_iter.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/zeroclaw-runtime/src/agent/turn/max_iter.rs"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4e719de6594d8c30b9df45caa4766fdd6774fdef764dd3d44d262cafb4df8bd"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-tools/src/model_routing_config.rs: crates/zeroclaw-tools/src/model_routing_config.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 87 in ModelRoutingConfigTool::handle_upsert_agent at line 1157. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-tools/src/model_routing_config.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/zeroclaw-tools/src/model_routing_config.rs"},"region":{"startLine":1157}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ac2c36f416bf06625cd6e2832b7864bd34315baebd28daada6498cc2c207d3a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-channels/src/whatsapp_web.rs: crates/zeroclaw-channels/src/whatsapp_web.rs changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in WhatsAppWebChannel::listen at line 3927. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-channels/src/whatsapp_web.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/zeroclaw-channels/src/whatsapp_web.rs"},"region":{"startLine":3927}}}],"partialFingerprints":{"codehealthFindingId/v1":"adb04f6ffac3e330f616dc55c5f23f643cd67c03699dd9e8c472b3f3334b79e4"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-channels/src/telegram.rs: crates/zeroclaw-channels/src/telegram.rs changed 37 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in TelegramChannel::process_model_picker_callback at line 2087. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-channels/src/telegram.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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":2087}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c10450dea02850abc947e5e8ee69653acd02bdb2b0c875b1aebe215a926dcb1"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: apps/zerocode/src/input_bar.rs: apps/zerocode/src/input_bar.rs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 55 in InputBarState::handle_key at line 1555. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- apps/zerocode/src/input_bar.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":"apps/zerocode/src/input_bar.rs"},"region":{"startLine":1555}}}],"partialFingerprints":{"codehealthFindingId/v1":"01c8e6f8916f74e5ac8b66dbac121df7f06a10797e42a9c58d2364bf2f37cea1"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-gateway/src/api_config.rs: crates/zeroclaw-gateway/src/api_config.rs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in zeroclaw_gateway::api_config::handle_patch at line 2575. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-gateway/src/api_config.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/zeroclaw-gateway/src/api_config.rs"},"region":{"startLine":2575}}}],"partialFingerprints":{"codehealthFindingId/v1":"adbbad9806c22f5dc673cc4d050424cccb2c79222c5063310dce9517935412f3"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: apps/zerocode/src/config_manager.rs: apps/zerocode/src/config_manager.rs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 52 in App::handle_mouse_inner at line 1385. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- apps/zerocode/src/config_manager.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":"apps/zerocode/src/config_manager.rs"},"region":{"startLine":1385}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb3770ddb4d9bc2086b44648778cda64d742be951027f9b8f09cdcd5cc666961"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: apps/zerocode/src/main.rs: apps/zerocode/src/main.rs changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in zerocode::run at line 891. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- apps/zerocode/src/main.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":"apps/zerocode/src/main.rs"},"region":{"startLine":891}}}],"partialFingerprints":{"codehealthFindingId/v1":"397ebf0c5362df92311422bb83ff64fe070a7cbb85cd44129a851395e80efdd2"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-runtime/src/agent/turn/provider_call.rs: crates/zeroclaw-runtime/src/agent/turn/provider_call.rs changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in zeroclaw_runtime::agent::turn::provider_call::call_provider at line 302. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/agent/turn/provider_call.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/zeroclaw-runtime/src/agent/turn/provider_call.rs"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"482e0c89eb01a0fd67cd382e40a3dde77e3d2457511a4b5d9ed2f118b8b29648"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-channels/src/orchestrator/acp_server.rs: crates/zeroclaw-channels/src/orchestrator/acp_server.rs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in AcpServer::handle_session_prompt at line 1881. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-channels/src/orchestrator/acp_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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":1881}}}],"partialFingerprints":{"codehealthFindingId/v1":"93fa3e524c5cdbc94b44bcb3fea542f5c1501d53c9a670b70a202ff79ba978d6"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-channels/src/matrix.rs: crates/zeroclaw-channels/src/matrix.rs changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in zeroclaw_channels::matrix::inbound::handle_message at line 2279. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-channels/src/matrix.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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":2279}}}],"partialFingerprints":{"codehealthFindingId/v1":"a33587f6248ca530c368d23b2e5ea62e4cd50bd13a7fe608819c3cb6088ebf0a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: apps/zerocode/src/client.rs: apps/zerocode/src/client.rs changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in RpcClient::spawn_ws_session at line 2010. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- apps/zerocode/src/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":"apps/zerocode/src/client.rs"},"region":{"startLine":2010}}}],"partialFingerprints":{"codehealthFindingId/v1":"94deac754b0a3725cf9b665b0e7093c3b042ee36b0e8c8590b5ea4c751c83469"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-tool-call-parser/src/lib.rs: crates/zeroclaw-tool-call-parser/src/lib.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 98 in zeroclaw_tool_call_parser::parse_tool_calls at line 2090. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-tool-call-parser/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/zeroclaw-tool-call-parser/src/lib.rs"},"region":{"startLine":2090}}}],"partialFingerprints":{"codehealthFindingId/v1":"a933251a866d3b14bde96fc480fd7c3901cb000dcfca75fb2cd257e1d51149d0"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-gateway/src/api_sections.rs: crates/zeroclaw-gateway/src/api_sections.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in zeroclaw_gateway::api_sections::select_section at line 900. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-gateway/src/api_sections.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/zeroclaw-gateway/src/api_sections.rs"},"region":{"startLine":900}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6eabe8a0f462188100b0b47b2a0d707c4af479ff6d5187d6bad773fe177a711"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-runtime/src/sop/dispatch.rs: crates/zeroclaw-runtime/src/sop/dispatch.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in zeroclaw_runtime::sop::dispatch::dispatch_sop_event_filtered at line 688. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/sop/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/zeroclaw-runtime/src/sop/dispatch.rs"},"region":{"startLine":688}}}],"partialFingerprints":{"codehealthFindingId/v1":"454d6cfdf4fd18c5a5c87124a72eabe4ce6cd3409f2b211838ea0215da8fa15e"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-providers/src/compatible.rs: crates/zeroclaw-providers/src/compatible.rs changed 28 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in OpenAiCompatibleModelProvider::stream_chat at line 4779. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-providers/src/compatible.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/zeroclaw-providers/src/compatible.rs"},"region":{"startLine":4779}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ecb64de39bee3a20cc89b5d7623174b51c85044df1d349a62e9ae002159587a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-runtime/src/sop/engine.rs: crates/zeroclaw-runtime/src/sop/engine.rs changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in SopEngine::decide_checkpoint_with_principal at line 4505. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/sop/engine.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/zeroclaw-runtime/src/sop/engine.rs"},"region":{"startLine":4505}}}],"partialFingerprints":{"codehealthFindingId/v1":"64c960e4cc39ebcc5d16308abf334c7faa964793af92953214c360fa72fe8255"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-runtime/src/sop/mod.rs: crates/zeroclaw-runtime/src/sop/mod.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in zeroclaw_runtime::sop::parse_steps at line 1309. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/sop/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/zeroclaw-runtime/src/sop/mod.rs"},"region":{"startLine":1309}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb9581aeaf7c438a04b436c32813a3e1fbfc5c8005956ea0c6011f23c6e0d796"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-macros/src/lib.rs: crates/zeroclaw-macros/src/lib.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in zeroclaw_macros::derive_configurable 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-macros/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/zeroclaw-macros/src/lib.rs"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"a20f409d324f99513b955f61e8c213bc444a17b20f48399b38379d9d1fc3ece0"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-runtime/src/doctor/mod.rs: crates/zeroclaw-runtime/src/doctor/mod.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in zeroclaw_runtime::doctor::check_config_semantics at line 1163. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/doctor/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/zeroclaw-runtime/src/doctor/mod.rs"},"region":{"startLine":1163}}}],"partialFingerprints":{"codehealthFindingId/v1":"b03648361115554a965db432abb5c85f7ceeca2fa7d45412dbf3491ef38c4406"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-config/src/schema/v2.rs: crates/zeroclaw-config/src/schema/v2.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 56 in zeroclaw_config::schema::v2::normalize_provider_type at line 619. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-config/src/schema/v2.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/zeroclaw-config/src/schema/v2.rs"},"region":{"startLine":619}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e5b83d8a8940bc31fc5427a58c003d76d9bba350f965d1eb244e52e926c1e22"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-channels/src/slack.rs: crates/zeroclaw-channels/src/slack.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in SlackChannel::listen_socket_mode at line 4229. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-channels/src/slack.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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":4229}}}],"partialFingerprints":{"codehealthFindingId/v1":"534afd304052feb4060e6adcf33469d9f9bb3d7e9ae8a5c25557369d9d1e8032"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-providers/src/multimodal.rs: crates/zeroclaw-providers/src/multimodal.rs changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in zeroclaw_providers::multimodal::jpeg_frame_header at line 3184. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-providers/src/multimodal.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/zeroclaw-providers/src/multimodal.rs"},"region":{"startLine":3184}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e367a4fd031b93495e7824ecc9d1089b41c2ba3c5b8ab9d1b0c1209423fd27f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-runtime/src/tools/shell.rs: crates/zeroclaw-runtime/src/tools/shell.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in ShellTool::execute 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/tools/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/zeroclaw-runtime/src/tools/shell.rs"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"39bcccb6ed93971e19fdbd7cc485889df1b29361e04ca6917ba46074281ce9e6"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-infra/src/session_sqlite.rs: crates/zeroclaw-infra/src/session_sqlite.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in SqliteSessionBackend::migrate_from_jsonl_with_handlers 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-infra/src/session_sqlite.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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"87b8329548876f8eb9116a40ed034dfd7b6b5fecdea391d0ed698e7c5c302878"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-plugins/src/wasm_channel.rs: crates/zeroclaw-plugins/src/wasm_channel.rs changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in WasmChannel::listen at line 1067. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-plugins/src/wasm_channel.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/zeroclaw-plugins/src/wasm_channel.rs"},"region":{"startLine":1067}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fe9486b44bf042fb85a89970e7932c3db99152f75c0dc2f6ab528cc6e0a4bf5"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-providers/src/factory.rs: crates/zeroclaw-providers/src/factory.rs changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in zeroclaw_providers::factory::apply_compat_options at line 294. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-providers/src/factory.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/zeroclaw-providers/src/factory.rs"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dd35c350c24dbf6685b82bc6c1786ccf6a04e6d87021730432f750f4d9cbda6"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-channels/src/line.rs: crates/zeroclaw-channels/src/line.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in zeroclaw_channels::line::handle_webhook at line 294. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-channels/src/line.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/zeroclaw-channels/src/line.rs"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e9913aac78ce9f3f1c8842ecd9cfbcc00e52e827e527840a2d30d1becdd2627"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-runtime/src/agent/turn/call_prep.rs: crates/zeroclaw-runtime/src/agent/turn/call_prep.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in zeroclaw_runtime::agent::turn::call_prep::prepare_tool_calls at line 168. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/agent/turn/call_prep.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/zeroclaw-runtime/src/agent/turn/call_prep.rs"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"14a25a3d51dd6e5dfc395f76f571c50d51e4e1d3e62e468910e050b92b4f906f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-gateway/src/api.rs: crates/zeroclaw-gateway/src/api.rs changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in zeroclaw_gateway::api::handle_api_cron_add at line 487. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-gateway/src/api.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/zeroclaw-gateway/src/api.rs"},"region":{"startLine":487}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea2ce6452fb9af9999c7b7a6efdfb2f35a2d13059df25f9d64ddabf3045a53ac"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: apps/zerocode/src/config/mod.rs: apps/zerocode/src/config/mod.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in zerocode::config::load_persisted at line 919. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- apps/zerocode/src/config/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":"apps/zerocode/src/config/mod.rs"},"region":{"startLine":919}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8782d5a9e5c3866bc27e69534366013c14dab4096265117f210c01019941735"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-runtime/src/agent/turn/approval_gate.rs: crates/zeroclaw-runtime/src/agent/turn/approval_gate.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in zeroclaw_runtime::agent::turn::approval_gate::gate_tool_approval 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/agent/turn/approval_gate.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/zeroclaw-runtime/src/agent/turn/approval_gate.rs"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad513a1f48c596a799f2d15f4e55db5bae68d71a1f10072e59b13de21680b92a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-runtime/src/agent/system_prompt.rs: crates/zeroclaw-runtime/src/agent/system_prompt.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in zeroclaw_runtime::agent::system_prompt::build_system_prompt_with_mode_and_effective_tools at line 253. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/agent/system_prompt.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/zeroclaw-runtime/src/agent/system_prompt.rs"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab31e1a1fa4ca79afef282880c8aa9a6ab5492219e745b0274b170b24b4fb50b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-plugins/src/host.rs: crates/zeroclaw-plugins/src/host.rs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in PluginHost::remove_with_report at line 774. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-plugins/src/host.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/zeroclaw-plugins/src/host.rs"},"region":{"startLine":774}}}],"partialFingerprints":{"codehealthFindingId/v1":"aad24c533f0d24e52b821d04862596a52b9ac26f0aed5369a722dcbe97b5b705"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-runtime/src/sop/executor.rs: crates/zeroclaw-runtime/src/sop/executor.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in zeroclaw_runtime::sop::executor::drive_headless_run at line 932. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/sop/executor.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/zeroclaw-runtime/src/sop/executor.rs"},"region":{"startLine":932}}}],"partialFingerprints":{"codehealthFindingId/v1":"cec53e06bb8a3ce5f1e6dea2c48d266b3bb5254a6d7888ee1681cba5b196b26d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-runtime/src/agent/turn/parse_response.rs: crates/zeroclaw-runtime/src/agent/turn/parse_response.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in zeroclaw_runtime::agent::turn::parse_response::recover_structured_arguments at line 131. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/agent/turn/parse_response.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/zeroclaw-runtime/src/agent/turn/parse_response.rs"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"10f2987feec49c8d4f57c0ca7711fc872db5564dcb1e07cd803d8f29f9102e74"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-runtime/src/quickstart/mod.rs: crates/zeroclaw-runtime/src/quickstart/mod.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in zeroclaw_runtime::quickstart::apply_model_provider at line 1233. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/quickstart/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/zeroclaw-runtime/src/quickstart/mod.rs"},"region":{"startLine":1233}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a1f7e3f7d4735afbc3218cc3882566b329608c6d22db6ec92ba32db7d0435eb"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-gateway/src/api_sop_author.rs: crates/zeroclaw-gateway/src/api_sop_author.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in zeroclaw_gateway::api_sop_author::handle_sop_decide at line 460. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-gateway/src/api_sop_author.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/zeroclaw-gateway/src/api_sop_author.rs"},"region":{"startLine":460}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cd1f52192957fd58fb07a5eb63c478964bc4d75e30309568ea579d9b2dc2fef"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-runtime/src/cron/store.rs: crates/zeroclaw-runtime/src/cron/store.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in zeroclaw_runtime::cron::store::update_job_authorized at line 786. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/cron/store.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/zeroclaw-runtime/src/cron/store.rs"},"region":{"startLine":786}}}],"partialFingerprints":{"codehealthFindingId/v1":"a31850559d6723aced7c3d6ab8d15959db981f2e5024b21257b403036695c1ee"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-providers/src/openai.rs: crates/zeroclaw-providers/src/openai.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in zeroclaw_providers::openai::run_responses_sse at line 890. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-providers/src/openai.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/zeroclaw-providers/src/openai.rs"},"region":{"startLine":890}}}],"partialFingerprints":{"codehealthFindingId/v1":"a731bcedcfc8fc3eadd57d4e9f428dd9259cac9ae550fe784b80a14b42f354a8"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-infra/src/acp_session_store.rs: crates/zeroclaw-infra/src/acp_session_store.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in AcpSessionStore::load_message_page at line 911. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-infra/src/acp_session_store.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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":911}}}],"partialFingerprints":{"codehealthFindingId/v1":"0adfb96b596e6b1e25e7f01defff1f07c1c692ccf678e6aa75230f702dae8bda"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-runtime/src/plugin_runtime.rs: crates/zeroclaw-runtime/src/plugin_runtime.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in PluginActivationPlan::build 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/plugin_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/zeroclaw-runtime/src/plugin_runtime.rs"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdecd0f5abb868fcefc8c2e5e7f7c5037982a5ae2b77bc05d3d0d4094a3e31a3"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-runtime/src/skills/mod.rs: crates/zeroclaw-runtime/src/skills/mod.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in zeroclaw_runtime::skills::skills_to_prompt_with_mode_and_availability at line 1786. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/skills/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/zeroclaw-runtime/src/skills/mod.rs"},"region":{"startLine":1786}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab762ea0f260746ad0f505bee972c5a8ea1708ae4a07207e8352979674ef00f1"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-channels/src/lark.rs: crates/zeroclaw-channels/src/lark.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in zeroclaw_channels::lark::handle_lark_http_event at line 918. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-channels/src/lark.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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":918}}}],"partialFingerprints":{"codehealthFindingId/v1":"30eaca1fd64950ff5a6eb0f57c960e37e8ac716b5430409f2170d6849b77c215"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-runtime/src/agent/tool_execution.rs: crates/zeroclaw-runtime/src/agent/tool_execution.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in zeroclaw_runtime::agent::tool_execution::execute_one_tool_with_provenance 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/agent/tool_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/zeroclaw-runtime/src/agent/tool_execution.rs"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d028fc64a59521c4896c23eac831e93f2713c25937ca775dcc280c6df4ef7dc"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-plugins/src/config.rs: crates/zeroclaw-plugins/src/config.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in zeroclaw_plugins::config::compile_manifest_config at line 289. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-plugins/src/config.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/zeroclaw-plugins/src/config.rs"},"region":{"startLine":289}}}],"partialFingerprints":{"codehealthFindingId/v1":"348f6cc5965f61a8f8c91a7a6a2915090fed3459dec45b138731fac597d24f9c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-gateway/src/principal_gate.rs: crates/zeroclaw-gateway/src/principal_gate.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in zeroclaw_gateway::principal_gate::config_route_auth at line 701. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-gateway/src/principal_gate.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/zeroclaw-gateway/src/principal_gate.rs"},"region":{"startLine":701}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ccbd12e58ff830973a70b291b934483d1c92ecb90e33d734189538dae14b3ed"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-channels/src/signal.rs: crates/zeroclaw-channels/src/signal.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in SignalChannel::listen at line 1248. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-channels/src/signal.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/zeroclaw-channels/src/signal.rs"},"region":{"startLine":1248}}}],"partialFingerprints":{"codehealthFindingId/v1":"324ce01d711aec49f74535694df6d00af9c4276cb880af1eab046e7e9d961368"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-gateway/src/api_oidc.rs: crates/zeroclaw-gateway/src/api_oidc.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in zeroclaw_gateway::api_oidc::finish_pkce_callback at line 1458. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-gateway/src/api_oidc.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/zeroclaw-gateway/src/api_oidc.rs"},"region":{"startLine":1458}}}],"partialFingerprints":{"codehealthFindingId/v1":"305be602dd887bf60bcb81c45d8fc0a55457648a87d336d115a1bb86f442428b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-providers/src/gemini.rs: crates/zeroclaw-providers/src/gemini.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in GeminiModelProvider::send_generate_content at line 1173. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-providers/src/gemini.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/zeroclaw-providers/src/gemini.rs"},"region":{"startLine":1173}}}],"partialFingerprints":{"codehealthFindingId/v1":"9370a9f71754a310c65a049dd25014cd7f61239a6dfd660966958c3f511f679d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-runtime/src/tools/skill_tool.rs: crates/zeroclaw-runtime/src/tools/skill_tool.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in SkillShellTool::execute at line 168. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/tools/skill_tool.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/zeroclaw-runtime/src/tools/skill_tool.rs"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"1be688e84e6153f8f8a785cd5e8ec100a58c44cf8ad0ffd16454bdcda99314c2"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-channels/src/mattermost.rs: crates/zeroclaw-channels/src/mattermost.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in MattermostChannel::listen_websocket at line 1466. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-channels/src/mattermost.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/zeroclaw-channels/src/mattermost.rs"},"region":{"startLine":1466}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ab1e4fea923f34176182168ab6fd91e9e8fbf25312434becb70b5e2268a180c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src/sop/mod.rs: src/sop/mod.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in zeroclaw::sop::handle_command at line 7. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- src/sop/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":"src/sop/mod.rs"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"298fde399a8a929360ddefc2b5122257bae4847f9a92b800596ea7a5101e767d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-runtime/src/rpc/wss.rs: crates/zeroclaw-runtime/src/rpc/wss.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in zeroclaw_runtime::rpc::wss::serve_wss_listener at line 931. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/rpc/wss.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/zeroclaw-runtime/src/rpc/wss.rs"},"region":{"startLine":931}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd5c8f5d4386d003ec8ffcd1199def157f7603fb84b0829678857e172419e384"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-tools/src/mcp_transport.rs: crates/zeroclaw-tools/src/mcp_transport.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in SseTransport::send_and_recv at line 1940. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-tools/src/mcp_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/zeroclaw-tools/src/mcp_transport.rs"},"region":{"startLine":1940}}}],"partialFingerprints":{"codehealthFindingId/v1":"902c206461bc55cd0e328dd4a6d301af060b622c9a6912506ac51e5a66945c63"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: apps/zerorelay/src/lib.rs: apps/zerorelay/src/lib.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in zerorelay::handle_daemon at line 1175. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- apps/zerorelay/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":"apps/zerorelay/src/lib.rs"},"region":{"startLine":1175}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b08d109b208f23ba6dbff1ced5226c5fd28627797f210ddd068949b1c61e430"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-tools/src/embedded_resource.rs: crates/zeroclaw-tools/src/embedded_resource.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in zeroclaw_tools::embedded_resource::format_mcp_tool_result_for_model at line 538. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-15 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-tools/src/embedded_resource.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/zeroclaw-tools/src/embedded_resource.rs"},"region":{"startLine":538}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0bfe4cd6c4013dd2cf65581fc5c5ebdf727f4a4203925852221bda367d58726"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-infra/src/net_guard.rs: crates/zeroclaw-infra/src/net_guard.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in zeroclaw_infra::net_guard::normalize_egress_pattern 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-infra/src/net_guard.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/zeroclaw-infra/src/net_guard.rs"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"05b65d300085db197fd78035f690526a982f70e104e96b85a8794c782ec2f7a9"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-runtime/src/tools/sop_advance.rs: crates/zeroclaw-runtime/src/tools/sop_advance.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in SopAdvanceTool::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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/tools/sop_advance.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/zeroclaw-runtime/src/tools/sop_advance.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f9fa9ec9be9a1a6535de2b2aad7b0594aca552a13590ccc06970ae5cff7f25d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: apps/zerocode/src/logs.rs: apps/zerocode/src/logs.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in Logs::load_page at line 648. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- apps/zerocode/src/logs.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":"apps/zerocode/src/logs.rs"},"region":{"startLine":648}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5fa51382d8c973cec7bb8d84caf266247c7160e96c7d6042a53027a42f40df0"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-log/src/layer.rs: crates/zeroclaw-log/src/layer.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in LogCaptureLayer::on_event at line 101. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-log/src/layer.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/zeroclaw-log/src/layer.rs"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"33e9c72e7e3b37058b4edbd85ade2e14fd0a31d2e065e7d378c24fbff60451f7"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-runtime/src/tools/sop_status.rs: crates/zeroclaw-runtime/src/tools/sop_status.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in SopStatusTool::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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/tools/sop_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/zeroclaw-runtime/src/tools/sop_status.rs"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d61d992ee535cfca7066d07f8cdf1d3c117e4642c8fc5b75181de48a4e6d499"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-tools/src/codex_cli.rs: crates/zeroclaw-tools/src/codex_cli.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in CodexCliTool::execute at line 90. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-tools/src/codex_cli.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/zeroclaw-tools/src/codex_cli.rs"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fa321185a37d583bcfba26c1c41db3df3feed60233c7c38f7773b60facf6e20"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-tools/src/http_request.rs: crates/zeroclaw-tools/src/http_request.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in HttpRequestTool::execute at line 564. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-tools/src/http_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/zeroclaw-tools/src/http_request.rs"},"region":{"startLine":564}}}],"partialFingerprints":{"codehealthFindingId/v1":"9656646189a30dc40c162a1f40cd404e2d96256e41e8e95354a358769fee63ec"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-providers/src/hailo_ollama.rs: crates/zeroclaw-providers/src/hailo_ollama.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in HailoOllamaModelProvider::normalize_messages at line 692. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-providers/src/hailo_ollama.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/zeroclaw-providers/src/hailo_ollama.rs"},"region":{"startLine":692}}}],"partialFingerprints":{"codehealthFindingId/v1":"019df58a9d10fddda08a50a7640c253899c514c88ad3833b534b5d26a60799a0"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: apps/zerocode/src/agent_sidebar.rs: apps/zerocode/src/agent_sidebar.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in AgentSidebar::draw_session_rows 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- apps/zerocode/src/agent_sidebar.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":"apps/zerocode/src/agent_sidebar.rs"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c7adbde07be0a054cba83938734c5c4cd606927077262bbdd6ab02e2875aa7a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-channels/src/voice_wake.rs: crates/zeroclaw-channels/src/voice_wake.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in VoiceWakeChannel::listen at line 220. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-channels/src/voice_wake.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/zeroclaw-channels/src/voice_wake.rs"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2840fa205c45f4d74f4d08911949bc8e6cd8fa1742ec2bbf5d2351ce19ba974"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-config/src/alias_refs.rs: crates/zeroclaw-config/src/alias_refs.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in zeroclaw_config::alias_refs::rewrite_agent_refs at line 712. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-config/src/alias_refs.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/zeroclaw-config/src/alias_refs.rs"},"region":{"startLine":712}}}],"partialFingerprints":{"codehealthFindingId/v1":"d091c7adaa1a66a6e4499377be0ac06792b54a58199f0c0b571921301337fe88"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-tools/src/claude_code.rs: crates/zeroclaw-tools/src/claude_code.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in ClaudeCodeTool::execute at line 87. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-tools/src/claude_code.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/zeroclaw-tools/src/claude_code.rs"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ee61a8293a5183d2405c24e68b20087592c69ec5d595bf09b3969a856953a5a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-hardware/src/datasheet.rs: crates/zeroclaw-hardware/src/datasheet.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in DatasheetTool::execute at line 498. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-hardware/src/datasheet.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/zeroclaw-hardware/src/datasheet.rs"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"a264a14f4cd311c79d52b87626fbb8d2755eb4acc4c95eabae9c7ea7e7b3291a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-tools/src/gemini_cli.rs: crates/zeroclaw-tools/src/gemini_cli.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in GeminiCliTool::execute at line 70. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-tools/src/gemini_cli.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/zeroclaw-tools/src/gemini_cli.rs"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"250c1984a5e0773e02b54f0b0b4a379f6202999e3be1fe9ef103eb0954f9a61c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/zeroclaw-tools/src/opencode_cli.rs: crates/zeroclaw-tools/src/opencode_cli.rs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in OpenCodeCliTool::execute at line 70. 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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-tools/src/opencode_cli.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/zeroclaw-tools/src/opencode_cli.rs"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c038d1205fbcffa7a2fbb76e5ddc95b7178d71aeb8e653b362bd724d16ee187"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-runtime/src/i18n.rs: crates/zeroclaw-runtime/src/i18n.rs changed 25 times in last 90 days and 17 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 zeroclaw_runtime::i18n::format_ftl_messages at line 209), 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(plugins): report the runtime\u0027s config refusal in plugin info and list --verify (#11811)\u201D; \u201Cfix(plugins): count WebSocket and socket transports for a tool package\u0027s egress declaration (#11808)\u201D; \u201Cfix(plugins): recover incomplete installs through plugin remove (#11236)\u201D; \u201Cfix(runtime): localize iMessage and generic chat guidance (#11496)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/i18n.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/zeroclaw-runtime/src/i18n.rs"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"d03ae182e1e3e04beabf3eb1ceb042e968a8ecd288fe7d0560676cce703a9364"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-providers/src/lib.rs: crates/zeroclaw-providers/src/lib.rs changed 29 times in last 90 days and 16 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 zeroclaw_providers::create_model_provider_inner at line 1568), 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(mcp): relocate tool-result images to a user message (OpenAI-compatible 400) (#10502)\u201D; \u201Cfix(tools): declare tool attachments explicitly instead of scanning tool text for image markers (#10938)\u201D; \u201Cfix(multimodal): add pixel-level image validation to prevent corrupt images from failing provider requests (#9819)\u201D; \u201Cfix(runtime): preserve configured provider profile semantics (#10172)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-providers/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/zeroclaw-providers/src/lib.rs"},"region":{"startLine":1568}}}],"partialFingerprints":{"codehealthFindingId/v1":"2da0fa6ff30cb2e056d9eee9821bf6b4446eafd85ba1f14b98ef69dbf7ed61fa"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-runtime/src/agent/turn/vision_route.rs: crates/zeroclaw-runtime/src/agent/turn/vision_route.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 11 (its worst body is zeroclaw_runtime::agent::turn::vision_route::resolve_vision_provider_with_allowed_refs at line 104), 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(config): migrate retired keys at schema version 4 and warn on a missing schema_version (#11218)\u201D; \u201Cfix(tools): declare tool attachments explicitly instead of scanning tool text for image markers (#10938)\u201D; \u201Cfix(runtime): gate the no-vision error on image markers that resolve (#10904)\u201D; \u201Cfix(multimodal): add pixel-level image validation to prevent corrupt images from failing provider requests (#9819)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/agent/turn/vision_route.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/zeroclaw-runtime/src/agent/turn/vision_route.rs"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1ed7627dbc5dfff2daf81e49028030f2c96c8da3df3806933e95dea9688851c"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: apps/zerocode/src/i18n.rs: apps/zerocode/src/i18n.rs changed 12 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 7 (its worst body is zerocode::i18n::format_ftl_messages at line 132), 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(zerocode): name Enter in the paused-queue hint (#11775)\u201D; \u201Cfix(zerocode): explain missing-completion queue pauses (#11449)\u201D; \u201Cfix(runtime): count and report retained history in whole turns (#9368)\u201D; \u201Cfix(zerocode): reduce repeated label and pinned-preview rendering work (#10648)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- apps/zerocode/src/i18n.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":"apps/zerocode/src/i18n.rs"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c0b1d6b0e85caa433623753e7e95a950dba333d8559790a175f0dc3d6d8e66c"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-runtime/src/agent/turn/execution.rs: crates/zeroclaw-runtime/src/agent/turn/execution.rs changed 11 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 4 (its worst body is ResolvedModelAccess::run_model_query at line 77), 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(runtime): honour keep_tool_context_turns when building provider requests (#11297)\u201D; \u201Cfix(runtime): estimate context usage when provider omits token counts (#9453)\u201D; \u201Cfix(tools): declare tool attachments explicitly instead of scanning tool text for image markers (#10938)\u201D; \u201Cfix(runtime): gate the no-vision error on image markers that resolve (#10904)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/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/zeroclaw-runtime/src/agent/turn/execution.rs"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d0d247e0a9d8518b5785f0ec89f598b5e2ad1ef4866f0bed3d77d76927ed52c"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-channels/src/tts.rs: crates/zeroclaw-channels/src/tts.rs changed 11 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 10 (its worst body is TtsManager::from_config_for_agent at line 1097), 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(channels): route every outbound HTTP client through the runtime proxy (#10748)\u201D; \u201Cfix(channels): create Edge TTS artifact with owner-only permissions (#10449)\u201D; \u201Cfix(tts): surface providers dropped for a missing api_key (#10628)\u201D; \u201Cfix(channels): mark ElevenLabs TTS API key sensitive (#10433)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-channels/src/tts.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/zeroclaw-channels/src/tts.rs"},"region":{"startLine":1097}}}],"partialFingerprints":{"codehealthFindingId/v1":"d58a32709764468fcd02c37ad3efbc29e3c6fb2b24234fcf472ea9135991295f"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-config/src/pairing.rs: crates/zeroclaw-config/src/pairing.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 10 (its worst body is PairingGuard::reserve_pair_blocking at line 747), 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(security): enforce cron approval and authority at the write across RPC, tools and token revocation (#11149)\u201D; \u201Cfix(gateway): enforce the [gateway.pairing_dashboard] pairing limits (#12213)\u201D; \u201Cfix(config): migrate retired keys at schema version 4 and warn on a missing schema_version (#11218)\u201D; \u201Cfix(enroll): redeem enrollment codes on the daemon\u0027s canonical pairing guard (#11940)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-config/src/pairing.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/zeroclaw-config/src/pairing.rs"},"region":{"startLine":747}}}],"partialFingerprints":{"codehealthFindingId/v1":"dffb56f9afe75cf2cfec4340ded1de8652e62267dd83ec9604a1f611816989c3"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-runtime/src/cron/mod.rs: crates/zeroclaw-runtime/src/cron/mod.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 7 (its worst body is zeroclaw_runtime::cron::parse_delay at line 511), 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(security): enforce cron approval and authority at the write across RPC, tools and token revocation (#11149)\u201D; \u201Cfix(security): withhold principal-unaware tools and SOP execution from non-admin principals (#12232)\u201D; \u201Cfix(cron): guard agent manual trigger and history (#10414)\u201D; \u201Cfix(cron): make agent-scoped cron mutations atomic (#10177)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/cron/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/zeroclaw-runtime/src/cron/mod.rs"},"region":{"startLine":511}}}],"partialFingerprints":{"codehealthFindingId/v1":"4bf45f93f88f21d67c3ce6e5e34143b14a876ad57b0f26007c93a2d62f584075"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-plugins/src/wasi_http.rs: crates/zeroclaw-plugins/src/wasi_http.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 10 (its worst body is zeroclaw_plugins::wasi_http::send at line 855), 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(plugins): stagger pinned egress dials so a silent address cannot stall the connect (#11814)\u201D; \u201Cfix(plugins): harden named TLS profile materialization (#11228)\u201D; \u201Cfix(deps): bump wasmtime to 48.0.x for RUSTSEC-2026-0313..0316 (#11253)\u201D; \u201Cfix(plugins): escape apostrophes in egress remedy commands (#11107)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-plugins/src/wasi_http.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/zeroclaw-plugins/src/wasi_http.rs"},"region":{"startLine":855}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb74817e8a955ffd4cff1faba286cc3e85a1ccea49f31aefaf95bbf44f8e8eba"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-config/src/cost/tracker.rs: crates/zeroclaw-config/src/cost/tracker.rs changed 9 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 12 (its worst body is CostTracker::check_budget_at_period at line 431), 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(cost): key the process-global cost trackers by ledger path (#11350)\u201D; \u201Cfix(cost): report rejected ledger records in cost summaries (#11557)\u201D; \u201Cfix(cost): count a revisited alias\u0027s spend once in delegation-chain ceilings (#11287)\u201D; \u201Cfix(runtime): scope cost tracking into delegated sub-loops and enforce per-agent ceilings (#10804)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-config/src/cost/tracker.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/zeroclaw-config/src/cost/tracker.rs"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2e8d6b21e94b70f158dc747dd7c9935b456894f7fa265de53a6154d9cab491a"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-runtime/src/service/mod.rs: crates/zeroclaw-runtime/src/service/mod.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 10 (its worst body is zeroclaw_runtime::service::enforce_windows_private_acl at line 475), 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(service): gate the mpsc import for macOS test Clippy (#11314)\u201D; \u201Cfix(service): bound Windows task stdout and stderr logs (#10931)\u201D; \u201Cfix(runtime): keep operational paths panic-free (#10133)\u201D; \u201Cfix(desktop): bound daemon capture logs (#10236)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/service/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/zeroclaw-runtime/src/service/mod.rs"},"region":{"startLine":475}}}],"partialFingerprints":{"codehealthFindingId/v1":"89f4d131cb71bb14a3e8979e36296115bc7a724be25cec70ce5594fefdddb3e7"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-runtime/src/agent/history.rs: crates/zeroclaw-runtime/src/agent/history.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 9 (its worst body is zeroclaw_runtime::agent::history::nudge_around_image_marker at line 35), 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(tools): declare tool attachments explicitly instead of scanning tool text for image markers (#10938)\u201D; \u201Cfix(runtime): count and report retained history in whole turns (#9368)\u201D; \u201Cfix(multimodal): keep tool-result images live for the current user turn (#10903)\u201D; \u201Cfix(runtime): charge image markers a fixed per-image cost in the history token estimate (#10890)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/agent/history.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/zeroclaw-runtime/src/agent/history.rs"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"819cd0227e3484a8a52706cd54244a67344c004d4309629cc293b61ba0859022"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-infra/src/session_store.rs: crates/zeroclaw-infra/src/session_store.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 8 (its worst body is SessionStore::load 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(rpc): hold current authority through session effects (#12239)\u201D; \u201Cfix(rpc): judge queued session ownership by current authority (#11234)\u201D; \u201Cfix(infra): replace JSONL session files that a reader holds open on Windows (#11398)\u201D; \u201Cfix(infra): align JSONL session file validation (#9873)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-infra/src/session_store.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/zeroclaw-infra/src/session_store.rs"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"e86197100bd10ed5dd365584a8ef07249987df83a09565e0a5540190de17b645"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-runtime/src/agent/history_trim.rs: crates/zeroclaw-runtime/src/agent/history_trim.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 10 (its worst body is zeroclaw_runtime::agent::history_trim::collapse_tool_context_older_than at line 518), 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(runtime): honour keep_tool_context_turns when building provider requests (#11297)\u201D; \u201Cfix(tools): declare tool attachments explicitly instead of scanning tool text for image markers (#10938)\u201D; \u201Cfix(runtime): count and report retained history in whole turns (#9368)\u201D; \u201Cfix(runtime): trim history to a low-water target instead of the cap (#10696)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/agent/history_trim.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/zeroclaw-runtime/src/agent/history_trim.rs"},"region":{"startLine":518}}}],"partialFingerprints":{"codehealthFindingId/v1":"74567480c487b3e904b1ffbbe319144e870eddd0feb3c3c51161a14650df8e91"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-runtime/src/security/detect.rs: crates/zeroclaw-runtime/src/security/detect.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 9 (its worst body is zeroclaw_runtime::security::detect::create_selected_sandbox at line 576), 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(security): apply configured firejail_args to the Firejail wrapper (#11656)\u201D; \u201Cfix(security): name the cause when a requested bubblewrap backend is rejected (#11559)\u201D; \u201Cfix(security): report Seatbelt initialization during registry construction (#11499)\u201D; \u201Cfix(runtime): honor allowed roots in Seatbelt (#10556)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/security/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/zeroclaw-runtime/src/security/detect.rs"},"region":{"startLine":576}}}],"partialFingerprints":{"codehealthFindingId/v1":"187eec77ae01ab427c9006c6ae2c494008452603572a5d9fe70b69d6b39c656a"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-runtime/src/tools/cron_update.rs: crates/zeroclaw-runtime/src/tools/cron_update.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 8 (its worst body is CronUpdateTool::execute at line 223), 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(security): enforce cron approval and authority at the write across RPC, tools and token revocation (#11149)\u201D; \u201Cfix(security): withhold principal-unaware tools and SOP execution from non-admin principals (#12232)\u201D; \u201Cfix(cron): make agent-scoped cron mutations atomic (#10177)\u201D; \u201Cfix(cron): scope the cron tools to the calling agent (#9948)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/tools/cron_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/zeroclaw-runtime/src/tools/cron_update.rs"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f770a5eaae1f6edbcdb8a28f06ac755a97121118f7aad1ab95e01c359b6fac8"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-config/src/migration.rs: crates/zeroclaw-config/src/migration.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 zeroclaw_config::migration::unversioned_shape at line 630), 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(gateway): enforce the [gateway.pairing_dashboard] pairing limits (#12213)\u201D; \u201Cfix(config): migrate retired keys at schema version 4 and warn on a missing schema_version (#11218)\u201D; \u201Cfix(config): bind degraded remediation to running executable (#10630)\u201D; \u201Cfix(config): migrate bare vision_model_provider to dotted alias ref (#9707)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-config/src/migration.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/zeroclaw-config/src/migration.rs"},"region":{"startLine":630}}}],"partialFingerprints":{"codehealthFindingId/v1":"33d3896e00feab173e23656c57224cc89653b45f3696d238560132a5963b92ae"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-config/src/validation_warnings.rs: crates/zeroclaw-config/src/validation_warnings.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 5 (its worst body is zeroclaw_config::validation_warnings::levenshtein_distance at line 141), 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(security): stop presenting command execution as audited (#9410)\u201D; \u201Cfix(whatsapp-web): an empty allowed_groups admits no group unless group_policy is all (#9382)\u201D; \u201Cfix(vi): report the withheld vi_verify tool through the config surface (#9942)\u201D; \u201Cfix(config): warn on risky Codex CLI extra args (#9548)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-config/src/validation_warnings.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/zeroclaw-config/src/validation_warnings.rs"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7a02bf94ceb01f5f4d146682da978f35ed5acd75fa3e8126e36169ed4aae734"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-runtime/src/sop/store/sqlite.rs: crates/zeroclaw-runtime/src/sop/store/sqlite.rs changed 8 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 6 (its worst body is SqliteRunStore::save_run_with_pending_capacity at line 206), 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(security): withhold principal-unaware tools and SOP execution from non-admin principals (#12232)\u201D; \u201Cfix(memory): keep owned-session subagent and pipeline memory private (#11266)\u201D; \u201Cfix(sop): keep a stale run copy from reviving or overwriting a run (#11861)\u201D; \u201Cfix(sop): drive headless SOP runs, and close the five defects found reviewing #9494 (#9841)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/sop/store/sqlite.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/zeroclaw-runtime/src/sop/store/sqlite.rs"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"65b1c7f109f516ce0b0d6f93750534b29e1e993bdf8db4b9e4981f5354f181e0"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-runtime/src/sop/store/mod.rs: crates/zeroclaw-runtime/src/sop/store/mod.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 StoreError::fmt at line 195), 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(security): withhold principal-unaware tools and SOP execution from non-admin principals (#12232)\u201D; \u201Cfix(memory): keep owned-session subagent and pipeline memory private (#11266)\u201D; \u201Cfix(sop): keep a stale run copy from reviving or overwriting a run (#11861)\u201D; \u201Cfix(sop): drive headless SOP runs, and close the five defects found reviewing #9494 (#9841)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/sop/store/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/zeroclaw-runtime/src/sop/store/mod.rs"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"0883c1cdfa5c66c4be7f282ae61973a82c576cb11cdc05424f181f24298e2f63"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-runtime/src/approval/mod.rs: crates/zeroclaw-runtime/src/approval/mod.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 ApprovalManager::approval_requirement at line 239), 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(approval): preserve CLI input failure provenance (#11518)\u201D; \u201Cfix(channels): restore supervised shell approval routing (#10241)\u201D; \u201Cfix(runtime): enforce bounded child tool approvals (#10937)\u201D; \u201Cfix(approval): always_ask survives Full autonomy (#9724)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/approval/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/zeroclaw-runtime/src/approval/mod.rs"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d1d13e6faf9a55f821792ff3e626c5bdcd2e0522162cb48fb7ff736f12b0066"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-tools/src/image_gen.rs: crates/zeroclaw-tools/src/image_gen.rs changed 5 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 zeroclaw_tools::image_gen::parse_public_https_url at line 25), 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(tools): declare tool attachments explicitly instead of scanning tool text for image markers (#10938)\u201D; \u201Cfix(tests): fix Windows platform test failures (#10208)\u201D; \u201Cfix(tools): replace panic-prone assumptions (#10129)\u201D; \u201Cfix(tools): pin image_gen to the validated host and cover the redirect boundary (#10046)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-tools/src/image_gen.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/zeroclaw-tools/src/image_gen.rs"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"59178d0ab9cce4a9571dbd0f649c4be8742044058344ad1119e02c3bea7dc1d4"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-runtime/src/live_config_authority.rs: crates/zeroclaw-runtime/src/live_config_authority.rs changed 7 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 ConfigOwnershipGuard::acquire at line 830), 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(config): prefix dash-leading lifecycle remedy paths with ./ (#12172)\u201D; \u201Cfix(security): withhold principal-unaware tools and SOP execution from non-admin principals (#12232)\u201D; \u201Cfix(runtime): settle session turns a killed process left marked running (#11523)\u201D; \u201Cfix(config): move the lifecycle lock into an owner-only data/.lifecycle directory (#11803)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/live_config_authority.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/zeroclaw-runtime/src/live_config_authority.rs"},"region":{"startLine":830}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8b51f383228db533bc4eeea51707fa00d69d9407d0862d40eb9f6a95063e71a"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-providers/src/router.rs: crates/zeroclaw-providers/src/router.rs changed 7 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 RouterModelProvider::resolve_cost_optimized at line 224), 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(runtime): recover from rejected image requests (#10480)\u201D; \u201Cfix(providers): name the fallback that lacks vision in capability errors (#10028)\u201D; \u201Cfix(providers): complete lifecycle provider accounting (#10144)\u201D; \u201Cfix(delegate): honor configured provider fallbacks (#9544)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-providers/src/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/zeroclaw-providers/src/router.rs"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"24ba2f9f79fbd23fc8b3e758d61bce3728f5836bc93fa89f313f0c69ceb0b884"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-runtime/src/rpc/attachments.rs: crates/zeroclaw-runtime/src/rpc/attachments.rs changed 7 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 zeroclaw_runtime::rpc::attachments::load_file_entry at line 299), 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(rpc): refuse a directory attachment by type on Windows (#11361)\u201D; \u201Cfix(multimodal): add pixel-level image validation to prevent corrupt images from failing provider requests (#9819)\u201D; \u201Cfix(runtime): decide attachment image markers by the provider-loadable contract (#10582)\u201D; \u201Cfix(multimodal): preserve attached images after source removal (#10088)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/rpc/attachments.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/zeroclaw-runtime/src/rpc/attachments.rs"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"21161dd9d4b7f3506f35f8ce9f7293333e13d18df925efd2df1bf19ecb57528b"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-gateway/src/dashboard_session.rs: crates/zeroclaw-gateway/src/dashboard_session.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 zeroclaw_gateway::dashboard_session::layer at line 1707), 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(oidc): bind enrollment callbacks to the initiating browser (#12157)\u201D; \u201Cfix(security): enforce cron approval and authority at the write across RPC, tools and token revocation (#11149)\u201D; \u201Cfix(gateway): limit and cap OIDC bearer verification on the config route group (#12233)\u201D; \u201Cfix(gateway/web): offer config pages only to accounts that can read config (#12251)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-gateway/src/dashboard_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/zeroclaw-gateway/src/dashboard_session.rs"},"region":{"startLine":1707}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d4c208ccbad3123df4e9cfeec9bfac77b4636a913314ad4da6164844220bda0"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-memory/src/lib.rs: crates/zeroclaw-memory/src/lib.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 zeroclaw_memory::create_memory_for_agent at line 1019), 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(memory): route CLI memory factory through storage-aware resolver (#10652)\u201D; \u201Cfix(memory): harden response cache storage permissions (#10091)\u201D; \u201Cfix(memory): reject Qdrant in builder-only factory without storage config (#9959)\u201D; \u201Cfix(memory): key conversation autosave suppression on turn origin (#10009)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-memory/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/zeroclaw-memory/src/lib.rs"},"region":{"startLine":1019}}}],"partialFingerprints":{"codehealthFindingId/v1":"39694d434ac465f778129f801d69c632d497763381aae7f9e1dddbfb1207d745"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-channels/src/transcription.rs: crates/zeroclaw-channels/src/transcription.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 12 (its worst body is TranscriptionManager::register_legacy_providers at line 1046), 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(channels): send initial_prompt to Groq and OpenAI transcription (#11258)\u201D; \u201Cfix(channels): forward transcription language hints (#10431)\u201D; \u201Cfix(channels): resolve Voice Wake transcription from the owning agent (#10032)\u201D; \u201Cfix(channels): keep Google STT API keys out of URLs (#10107)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-channels/src/transcription.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/zeroclaw-channels/src/transcription.rs"},"region":{"startLine":1046}}}],"partialFingerprints":{"codehealthFindingId/v1":"72c1631446268f81eeb4c8af18b9559d99469fa2428dfe7ac022984c67095c8d"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-providers/src/model_pin.rs: crates/zeroclaw-providers/src/model_pin.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 2 (its worst body is ModelPinnedProvider::has_stable_request_identity at line 85), 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(runtime): recover from rejected image requests (#10480)\u201D; \u201Cfix(providers): name the fallback that lacks vision in capability errors (#10028)\u201D; \u201Cfix(providers): complete lifecycle provider accounting (#10144)\u201D; \u201Cfix(delegate): honor configured provider fallbacks (#9544)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-providers/src/model_pin.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/zeroclaw-providers/src/model_pin.rs"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f6ffec0578511ce12a85c00555e93f1fa93058887a91de4ea813cd6602c4146"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-providers/src/vision_override.rs: crates/zeroclaw-providers/src/vision_override.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 2 (its worst body is VisionOverrideProvider::capabilities at line 60), 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(runtime): recover from rejected image requests (#10480)\u201D; \u201Cfix(providers): name the fallback that lacks vision in capability errors (#10028)\u201D; \u201Cfix(providers): complete lifecycle provider accounting (#10144)\u201D; \u201Cfix(delegate): honor configured provider fallbacks (#9544)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-providers/src/vision_override.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/zeroclaw-providers/src/vision_override.rs"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"29375c3b3d6558f916a9d4543fcdda70fc267b0a8b36f8c7edf759b997a56d08"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-tools/src/web_fetch.rs: crates/zeroclaw-tools/src/web_fetch.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 15 (its worst body is zeroclaw_tools::web_fetch::validate_target_url_with_dns_check at line 703), 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(tools): decompress gzip/brotli/deflate web_fetch responses (#9283)\u201D; \u201Cfix(tests): fix Windows platform test failures (#10208)\u201D; \u201Cfix(tools): pin image_gen to the validated host and cover the redirect boundary (#10046)\u201D; \u201Cfix(security): harden built-in HTTP egress on the shared network guard (#9580)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-tools/src/web_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/zeroclaw-tools/src/web_fetch.rs"},"region":{"startLine":703}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cc1f53ec2714e0f9ae52c656d672e830f8186aa1a07036504f58fdc0138f194"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-gateway/src/api_pairing.rs: crates/zeroclaw-gateway/src/api_pairing.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 zeroclaw_gateway::api_pairing::submit_pairing_enhanced at line 351), 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(security): enforce cron approval and authority at the write across RPC, tools and token revocation (#11149)\u201D; \u201Cfix(gateway): enforce the [gateway.pairing_dashboard] pairing limits (#12213)\u201D; \u201Cfix(gateway): one shared pairing-code policy, stronger default (#10307)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-gateway/src/api_pairing.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/zeroclaw-gateway/src/api_pairing.rs"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bfc0b83996a5a54ac7a4a0a7bc01699f4b03eac40115b18bb2de06785086c5b"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-runtime/src/tools/sop_execute.rs: crates/zeroclaw-runtime/src/tools/sop_execute.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 13 (its worst body is SopExecuteTool::execute at line 95), 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(security): withhold principal-unaware tools and SOP execution from non-admin principals (#12232)\u201D; \u201Cfix(memory): keep owned-session subagent and pipeline memory private (#11266)\u201D; \u201Cfix(sop): drive headless SOP runs, and close the five defects found reviewing #9494 (#9841)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/tools/sop_execute.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/zeroclaw-runtime/src/tools/sop_execute.rs"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"67974fb650336c958c95d4e54858af75232494296860631eb95bcafe5b9c46a5"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-runtime/src/sop/route/mod.rs: crates/zeroclaw-runtime/src/sop/route/mod.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 13 (its worst body is zeroclaw_runtime::sop::route::resolve_next at line 50), 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(memory): keep owned-session subagent and pipeline memory private (#11266)\u201D; \u201Cfix(sop): drive headless SOP runs, and close the five defects found reviewing #9494 (#9841)\u201D; \u201Cfix(sop): record why a failed run failed (#9957)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/sop/route/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/zeroclaw-runtime/src/sop/route/mod.rs"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d6b845ad1c820312e1f4b296d7a0c1999e42eb6833f7422cc8e8ded1d390043"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-config/src/cost/types.rs: crates/zeroclaw-config/src/cost/types.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 4 (its worst body is TokenUsage::new_with_cache_write at line 114), 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(cost): report rejected ledger records in cost summaries (#11557)\u201D; \u201Cfix(runtime): scope cost tracking into delegated sub-loops and enforce per-agent ceilings (#10804)\u201D; \u201Cfix(cost): surface pricing-unavailable so silent /bin/zsh caps can\u0027t reassure (#9939)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-config/src/cost/types.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/zeroclaw-config/src/cost/types.rs"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fa760fc957161982321667715bb5eb5ce026b37be35c62dab9cec0dcbbb267c"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-plugins/src/wasm_memory.rs: crates/zeroclaw-plugins/src/wasm_memory.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 4 (its worst body is zeroclaw_plugins::wasm_memory::to_wit_category at line 114), 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(plugins): discard a memory plugin\u0027s instance after a failed call (#11402)\u201D; \u201Cfix(plugins): admit exact component payload bytes (#9134)\u201D; \u201Cfix(plugins): bound WASM exports by a wall-clock deadline (#9403)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-plugins/src/wasm_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/zeroclaw-plugins/src/wasm_memory.rs"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc27ed87189dd0a67dfb366fa0a1fe8f01853d31963bbad2ecbfcf0044bae67a"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-providers/src/openrouter.rs: crates/zeroclaw-providers/src/openrouter.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 OpenRouterModelProvider::stream_chat at line 880), 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(tools): declare tool attachments explicitly instead of scanning tool text for image markers (#10938)\u201D; \u201Cfix(providers): retry the stream-failed entry when the stream failed before send (#11170)\u201D; \u201Cfix(providers): keep OpenRouter streams alive (#10442)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-providers/src/openrouter.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/zeroclaw-providers/src/openrouter.rs"},"region":{"startLine":880}}}],"partialFingerprints":{"codehealthFindingId/v1":"b81b6740df29cb0576f8c7224ec60d6cc9de0dbeb8c71ee75524df118b416b49"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-memory/src/postgres.rs: crates/zeroclaw-memory/src/postgres.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 7 (its worst body is zeroclaw_memory::postgres::validate_identifier at line 333), 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(memory): run pgvector setup inside the postgres-memory-init thread (#10209)\u201D; \u201Cfix(memory): harden PostgreSQL knowledge graph queries (#10055)\u201D; \u201Cfix(memory): qualify PostgreSQL recall time predicates (#10052)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-memory/src/postgres.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/zeroclaw-memory/src/postgres.rs"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"53bf6f2294e55b41aa2a2138aa7e80729b8c02a087165317c59e8a9285230d23"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: xtask/src/cmd/mdbook/versions.rs: xtask/src/cmd/mdbook/versions.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 xtask::cmd::mdbook::versions::build_versions_json at line 243), 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(docs): send links to pruned doc versions to the stable page (#12329)\u201D; \u201Cfix(docs): give the stable docs a URL that survives releases (#12328)\u201D; \u201Cfix(xtask): keep the API reference and error pages out of search (#12327)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- xtask/src/cmd/mdbook/versions.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":"xtask/src/cmd/mdbook/versions.rs"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d7e41e9620a33914283c2f77c1d5e5b541e4d3fc95b794620cd67b27f9dc623"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-runtime/src/tools/cron_runs.rs: crates/zeroclaw-runtime/src/tools/cron_runs.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 6 (its worst body is CronRunsTool::execute at line 73), 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(security): withhold principal-unaware tools and SOP execution from non-admin principals (#12232)\u201D; \u201Cfix(cron): guard agent manual trigger and history (#10414)\u201D; \u201Cfix(cron): scope the cron tools to the calling agent (#9948)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/tools/cron_runs.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/zeroclaw-runtime/src/tools/cron_runs.rs"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6ae40194d19cea49f27a8e72d74a53c44c6e3750b83230477b439642a98eb89"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-tools/src/sessions.rs: crates/zeroclaw-tools/src/sessions.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 SessionsHistoryTool::execute at line 434), 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(security): withhold principal-unaware tools and SOP execution from non-admin principals (#12232)\u201D; \u201Cfix(tools): clarify sessions_send append semantics (#11461)\u201D; \u201Cfix(tools): expose owned ACP sessions to session tools (#10468)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-tools/src/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/zeroclaw-tools/src/sessions.rs"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5dcbef141d0642889376653af7aee9617da9eb43066c27d678a0065de2553d7"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-providers/src/grok_cli.rs: crates/zeroclaw-providers/src/grok_cli.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 10 (its worst body is GrokCliModelProvider::normalize_and_validate_extra_args at line 667), 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(tools): declare tool attachments explicitly instead of scanning tool text for image markers (#10938)\u201D; \u201Cfix(providers): resolve grok executable before workspace spawn (#10829)\u201D; \u201Cfix(providers): enforce outbound Grok ACP frame limits (#10830)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-providers/src/grok_cli.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/zeroclaw-providers/src/grok_cli.rs"},"region":{"startLine":667}}}],"partialFingerprints":{"codehealthFindingId/v1":"06709b9a2cc5f0e316890041f5ec663141fd908d4bfd60fbb512320255b74dee"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-runtime/src/tools/coding_cli_executor.rs: crates/zeroclaw-runtime/src/tools/coding_cli_executor.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 6 (its worst body is RuntimeCodingCliExecutor::output at line 35), 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(config): move the lifecycle lock into an owner-only data/.lifecycle directory (#11803)\u201D; \u201Cfix(security): resolve host launchers before workspace cwd (#10381)\u201D; \u201Cfix(tests): silence Windows-only cfg warnings (#10090)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/tools/coding_cli_executor.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/zeroclaw-runtime/src/tools/coding_cli_executor.rs"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"a283244393537bac905d849979910517695c4aaccd20e80b9cbd0274a9751633"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: src/plugins/channel_instance.rs: src/plugins/channel_instance.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 8 (its worst body is zeroclaw::plugins::channel_instance::reaches_secret_marker at line 706), 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(plugins): report the runtime\u0027s config refusal in plugin info and list --verify (#11811)\u201D; \u201Cfix(cli): take non-secret plugin settings as given in config set (#11812)\u201D; \u201Cfix(plugins): count WebSocket and socket transports for a tool package\u0027s egress declaration (#11808)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- src/plugins/channel_instance.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/plugins/channel_instance.rs"},"region":{"startLine":706}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3deec0bbd1739ec5c43453fc3ee2fb2b83579ab56cc9364302c5026c832d0f2"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-runtime/src/tools/model_switch.rs: crates/zeroclaw-runtime/src/tools/model_switch.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 8 (its worst body is ModelSwitchTool::handle_set at line 180), 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(tools/model_switch): tell the model to finish the task after a switch (#11385)\u201D; \u201Cfix(runtime): preserve configured provider profile semantics (#10172)\u201D; \u201Cfix(runtime): keep agent dispatch panic-free (#10134)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/tools/model_switch.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/zeroclaw-runtime/src/tools/model_switch.rs"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd730d7814ff580292176b9e5bfbb708b10f537eaedb422196f4478d56e22d45"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-providers/src/copilot.rs: crates/zeroclaw-providers/src/copilot.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 7 (its worst body is zeroclaw_providers::copilot::admit_cache_dir at line 717), 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(tools): declare tool attachments explicitly instead of scanning tool text for image markers (#10938)\u201D; \u201Cfix(providers): satisfy Windows Clippy for cache builder (#10703)\u201D; \u201Cfix(providers): harden Copilot credential cache (#10370)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-providers/src/copilot.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/zeroclaw-providers/src/copilot.rs"},"region":{"startLine":717}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ccbc4e0f0ddf41c8c7e5f1ba7ce5c088905f344acad3aa7759565ef96f491c6"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-runtime/src/agent/turn/results_collect.rs: crates/zeroclaw-runtime/src/agent/turn/results_collect.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 zeroclaw_runtime::agent::turn::results_collect::collect_tool_results at line 49), 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(tools): declare tool attachments explicitly instead of scanning tool text for image markers (#10938)\u201D; \u201Cfix(runtime): expose tool-result truncation (#10655)\u201D; \u201Cfix(agent): cap the no-progress loop detector at Block (#10503)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/agent/turn/results_collect.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/zeroclaw-runtime/src/agent/turn/results_collect.rs"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"b254a03a5aede66a57f20911f2c6c2de1b3ee7d3e65677975493b357530a0a4f"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-runtime/src/integrations/mod.rs: crates/zeroclaw-runtime/src/integrations/mod.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 14 (its worst body is zeroclaw_runtime::integrations::show_integration_info at line 61), 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(runtime): localize iMessage and generic chat guidance (#11496)\u201D; \u201Cfix(runtime): localize chat integration setup guidance (#11028)\u201D; \u201Cfix(web): route integration config links on the registry key (#10714)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/integrations/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/zeroclaw-runtime/src/integrations/mod.rs"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"f002902aed93872e440165085887fb930577ed32a49235ab9dd457d2e61dae0d"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-runtime/src/hooks/builtin/webhook_audit.rs: crates/zeroclaw-runtime/src/hooks/builtin/webhook_audit.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 14 (its worst body is zeroclaw_runtime::hooks::builtin::webhook_audit::glob_matches at line 208), 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(hooks): pin webhook audit destinations (#10678)\u201D; \u201Cfix(hooks): correlate webhook audit calls by identity (#10016)\u201D; \u201Cfix(hooks): harden webhook audit exports (#9995)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/hooks/builtin/webhook_audit.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/zeroclaw-runtime/src/hooks/builtin/webhook_audit.rs"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"06fffb75f759723ac7023c16fbaf335afe76431e6aecd385643e2caaab4c5667"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-channels/src/filesystem.rs: crates/zeroclaw-channels/src/filesystem.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 11 (its worst body is FilesystemChannel::dispatch_loop at line 129), 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(config)!: refuse macOS broad roots in the filesystem channel (#11406)\u201D; \u201Cfix(sop): drive headless SOP runs, and close the five defects found reviewing #9494 (#9841)\u201D; \u201Cfix(channels): make the filesystem listener cancellation-aware (#10217)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-channels/src/filesystem.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/zeroclaw-channels/src/filesystem.rs"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"5aef51d8c8e35345d2a64311ee17ca1c3b7b7947b3ce6cd3c438731960ac1d44"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-runtime/src/tools/cron_remove.rs: crates/zeroclaw-runtime/src/tools/cron_remove.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 6 (its worst body is CronRemoveTool::execute at line 88), 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(security): withhold principal-unaware tools and SOP execution from non-admin principals (#12232)\u201D; \u201Cfix(cron): make agent-scoped cron mutations atomic (#10177)\u201D; \u201Cfix(cron): scope the cron tools to the calling agent (#9948)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/tools/cron_remove.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/zeroclaw-runtime/src/tools/cron_remove.rs"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd74569ebbe4dd4e75bc7cc5319f26c09e7f3f9f01bdfae9bd5037cb834eabd1"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-runtime/src/enroll/mod.rs: crates/zeroclaw-runtime/src/enroll/mod.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 11 (its worst body is zeroclaw_runtime::enroll::read_request at line 639), 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(gateway): enforce the [gateway.pairing_dashboard] pairing limits (#12213)\u201D; \u201Cfix(enroll): redeem enrollment codes on the daemon\u0027s canonical pairing guard (#11940)\u201D; \u201Cfix(gateway): one shared pairing-code policy, stronger default (#10307)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/enroll/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/zeroclaw-runtime/src/enroll/mod.rs"},"region":{"startLine":639}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ca9c6bbc0f3574c027a6242313c899a21789847024e6ae988990287956f2737"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-runtime/src/tunnel/tailscale.rs: crates/zeroclaw-runtime/src/tunnel/tailscale.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 12 (its worst body is zeroclaw_runtime::tunnel::tailscale::start_forwarder at line 238), 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(tunnel): supervise and verify the tailscale gateway serve process (#11726)\u201D; \u201Cfix(tunnel): report the URL tailscale actually serves the gateway on (#11531)\u201D; \u201Cfix(tunnel): publish WSS and enrollment via tailscale serve with tailnet-valid certificates (#11530)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/tunnel/tailscale.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/zeroclaw-runtime/src/tunnel/tailscale.rs"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"e62d075330d8a71eb81d292240a9905f29146861bbe7d048c8b77daa61d5a40c"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-runtime/src/security/firejail.rs: crates/zeroclaw-runtime/src/security/firejail.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 6 (its worst body is FirejailSandbox::validate_extra_args at line 69), 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(security): apply configured firejail_args to the Firejail wrapper (#11656)\u201D; \u201Cfix(security): resolve host launchers before workspace cwd (#10381)\u201D; \u201Cfix(cron): preserve scheduler workspace policy (#10253)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/security/firejail.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/zeroclaw-runtime/src/security/firejail.rs"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"d84045004bcc66c0adb5eb4d9ffa73a15e65576c89df4dcd80bc370536a9955b"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-tools/src/i18n.rs: crates/zeroclaw-tools/src/i18n.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 8 (its worst body is zeroclaw_tools::i18n::format_ftl_messages at line 78), 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(tools): preserve targeted agent upserts (#11693)\u201D; \u201Cfix(tools): replace panic-prone assumptions (#10129)\u201D; \u201Cfix(publish): keep runtime and tools locale data inside their crates (#10082)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-tools/src/i18n.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/zeroclaw-tools/src/i18n.rs"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"60d41806f29a30f314310a2a9acff4ea8176471e0c0d5808086f6a7ff4c5e004"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-runtime/src/control_plane/reaper.rs: crates/zeroclaw-runtime/src/control_plane/reaper.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 11 (its worst body is zeroclaw_runtime::control_plane::reaper::artifact_validation_error 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(runtime): recover delegate settlements after worker exit (#11450)\u201D; \u201Cfix(runtime): bind background delegate rows to their delegation chain and sign detached tool results (#11043)\u201D; \u201Cfix(runtime): make TaskRecord the single background lifecycle owner (#9726)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/control_plane/reaper.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/zeroclaw-runtime/src/control_plane/reaper.rs"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"0417a74d18533ba046add33349a815a585364fe78539a00d61e28e145c6a6da8"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-api/src/media.rs: crates/zeroclaw-api/src/media.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 8 (its worst body is MediaAttachment::from_file at line 132), 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(tools): declare tool attachments explicitly instead of scanning tool text for image markers (#10938)\u201D; \u201Cfix(channels): deduplicate Discord image URL fallback (#10385)\u201D; \u201Cfix(channels): populate the typed media envelope from Telegram (#9563)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-api/src/media.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/zeroclaw-api/src/media.rs"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"db0c11b60a390e70dd1df82ad8b1ef73311375e80aecf01da1b711e61705449e"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-runtime/src/control_plane/authority.rs: crates/zeroclaw-runtime/src/control_plane/authority.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 zeroclaw_runtime::control_plane::authority::parse_process_identity at line 58), 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(runtime): bind background delegate rows to their delegation chain and sign detached tool results (#11043)\u201D; \u201Cfix(runtime): recognize exited Windows task owners (#10928)\u201D; \u201Cfix(runtime): make TaskRecord the single background lifecycle owner (#9726)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/control_plane/authority.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/zeroclaw-runtime/src/control_plane/authority.rs"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3f302ae205e0a76e40038321bf93ef2d36f5acc37bd2c955e0872f7510e32a3"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-runtime/src/hooks/runner.rs: crates/zeroclaw-runtime/src/hooks/runner.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 4 (its worst body is HookRunner::from_root_config at line 56), 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(hooks): pin webhook audit destinations (#10678)\u201D; \u201Cfix(hooks): correlate webhook audit calls by identity (#10016)\u201D; \u201Cfix(hooks): harden webhook audit exports (#9995)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-runtime/src/hooks/runner.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/zeroclaw-runtime/src/hooks/runner.rs"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c5ed7645759012e52e8bc387a227be2e0213947bca997d32744bf08cc03aed1"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-channels/src/orchestrator/media_pipeline.rs: crates/zeroclaw-channels/src/orchestrator/media_pipeline.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 13 (its worst body is MediaPipeline::process at line 40), 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(multimodal): add pixel-level image validation to prevent corrupt images from failing provider requests (#9819)\u201D; \u201Cfix(channels): deduplicate Discord image URL fallback (#10385)\u201D; \u201Cfix(channels): populate the typed media envelope from Telegram (#9563)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-channels/src/orchestrator/media_pipeline.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/zeroclaw-channels/src/orchestrator/media_pipeline.rs"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"8db901f9d02ec150c99df831d99a70d86c882c12c555b657439ff5f89667f04e"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/zeroclaw-gateway/src/version.rs: crates/zeroclaw-gateway/src/version.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 15 (its worst body is zeroclaw_gateway::version::run_upgrade at line 650), 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(desktop): bound daemon capture logs (#10236)\u201D; \u201Cfix(gateway): generate dashboard status contract (#10375)\u201D; \u201Cfix(gateway): avoid panics in shared state (#10127)\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 20:48:37 \u002B00:00\u0027 --until=\u00272026-11-13 20:48:37 \u002B00:00\u0027 --full-history --no-merges -- crates/zeroclaw-gateway/src/version.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/zeroclaw-gateway/src/version.rs"},"region":{"startLine":650}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae652c3c9568dd3077fa10e7374d44966e937896c333672e0a266a985be146a3"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 30 significant file(s) lose their only recent owner: apps/zerorelay/src/lib.rs, crates/zeroclaw-runtime/src/relay.rs, crates/zeroclaw-runtime/src/security/auth_provider/enrollment.rs, crates/zeroclaw-runtime/src/rpc/auth.rs, src/relay_cli.rs, apps/zerorelay/src/frontdoor.rs, apps/zerorelay/src/frontdoor_assets.rs, crates/zeroclaw-runtime/src/cron/outbox.rs (\u002B22 more). Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"48ddcd5c16d45fc2bdb0551327ed5edce9d9d19128373ba9258e299bae87f4b9"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #2: If anonymized user #2 becomes unavailable, 15 significant file(s) lose their only recent owner: crates/zeroclaw-channels/src/discord/markers.rs, crates/zeroclaw-channels/src/discord/components.rs, crates/zeroclaw-channels/src/discord/slash_options.rs, crates/zeroclaw-memory/src/budget.rs, crates/zeroclaw-channels/src/discord/chunk.rs, crates/zeroclaw-runtime/src/sop/capability/builtins.rs, crates/zeroclaw-channels/src/discord_slash_state.rs, crates/zeroclaw-channels/src/discord/interaction.rs (\u002B7 more). Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"00c9713310cf80f66e5142a5b5b7d8d9141531eb315f1d74aa954f8add0603f8"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #3: If anonymized user #3 becomes unavailable, 15 significant file(s) lose their only recent owner: crates/zeroclaw-runtime/src/hooks/builtin/webhook_audit.rs, crates/zeroclaw-config/src/secrets/windows_key_file.rs, xtask/src/cmd/mdbook/check.rs, crates/zeroclaw-memory/src/sqlite_permissions.rs, crates/zeroclaw-runtime/src/tools/delegate_progress.rs, crates/zeroclaw-gateway/src/nodes/mdns.rs, apps/zerocode/src/text_selection.rs, apps/zerocode/src/chat/transcript_layout.rs (\u002B7 more). Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"37a670b9d4e96cdde6d966f653827ceae8d07632f99e85268cbd7d605776f60e"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #4: If anonymized user #4 becomes unavailable, 5 significant file(s) lose their only recent owner: crates/zeroclaw-tools/src/canvas.rs, xtask/src/cmd/mdbook/themes.rs, crates/zeroclaw-runtime/src/rpc/git.rs, crates/zeroclaw-providers/src/stream_guard.rs, crates/zeroclaw-gateway/src/security_headers.rs. Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"ac943a58c048144c63ffaea17a1baddef9e252c50f3dc85132922a59a339104f"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #5: If anonymized user #5 becomes unavailable, 3 significant file(s) lose their only recent owner: crates/zeroclaw-runtime/src/tunnel/tailscale.rs, crates/zeroclaw-tools/src/mcp_resources_tool.rs, crates/zeroclaw-tools/src/mcp_prompts_tool.rs. Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"505e1166e3dbf1710fe9506941f1b8087c975874c39006e1e0bcffb00e75deb8"}},{"ruleId":"D16","level":"note","message":{"text":"Further sole-owners (lower concentration): 6 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold \u2014 folded into the bus-factor score and metrics (76 single-owned of 869 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 869 of the 1081 production source files in this repository met that bar). They are anonymized user #6 (2 file(s)), anonymized user #7 (2 file(s)), anonymized user #8 (1 file(s)), anonymized user #9 (1 file(s)), anonymized user #10 (1 file(s)), anonymized user #11 (1 file(s)) \u2014 spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: crates/zeroclaw-log/src/log_bridge.rs, crates/zeroclaw-api/src/turn_stop.rs, crates/zeroclaw-hardware/src/manifest.rs, crates/zeroclaw-hardware/src/protocol.rs, crates/zeroclaw-runtime/src/tools/verifiable_intent.rs, crates/zeroclaw-runtime/src/tools/shell_output.rs, xtask/src/generate/sop_syntax.rs, crates/zeroclaw-hardware/src/registry.rs."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6eac528f2429e724e1a97ed868f79eefbcf1888dab4af9a9e673429369bb5b2f"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: implement dynamic GPIO pin drivers \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":"firmware/pico/src/main.rs"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"461eb2ebabef68af0321897e63748470a4096dc3602624993d45ec0c41b79f74"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: implement input pin read \u2014 requires storing InputPin drivers per pin \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":"firmware/esp32/src/main.rs"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecc318bf9f97e9c87928f30f4d38f1eb9f6ac06fdae854ab7e1d81bd9bfdd9d5"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO(compat): remove Brave fallback after default-browser launch has been stable across macOS environments. \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/zeroclaw-tools/src/browser_open.rs"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb896b3ea925f82d33917fc45e631bd606e5ae05c3e577303685c5bdf0ffa9f1"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO(compat): remove Brave fallback commands (brave-browser/brave) once default launcher coverage is validated. \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/zeroclaw-tools/src/browser_open.rs"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1f9165ade1c06129be32290ea6265204598567bbc78f902f7e003ca6f21ba26"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO(compat): remove Brave fallback after default-browser launch has been stable across Windows environments. \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/zeroclaw-tools/src/browser_open.rs"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3b72b013b8095d3b795899c8ae231e9a6ce34c8c2db31872cf0ba58e0ee0a44"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: /// todo list on every invocation (whole-list replace). The tool only \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/zeroclaw-runtime/src/tools/todo_write.rs"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"caa58953e61f78c5745fc42da879b2341c694f5ab414ccc4aab29cfc01ffb98a"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO(PR C): hand this turn to the SOP run the gate names. \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/zeroclaw-runtime/src/agent/turn/mod.rs"},"region":{"startLine":1797}}}],"partialFingerprints":{"codehealthFindingId/v1":"111f094a70cb13300e458a49bb833c86bf4489b69840e8fff67317e77a00643d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO(PR C): route this steering message into the gated \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/zeroclaw-runtime/src/agent/turn/mod.rs"},"region":{"startLine":2021}}}],"partialFingerprints":{"codehealthFindingId/v1":"669b073393cda681ea35993be5abe29b27b8231421f070c8663b83bf2f4b4dfa"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO(grok-cli-vision): Grok Build through 0.2.118 still advertises \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/zeroclaw-providers/src/grok_cli.rs"},"region":{"startLine":975}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dfe23ce36331e30ca4ac71a5552d95ea49932b41356d27f3858cecd0035bf6a"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: wire into session abort mechanism (ref upstream \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/zeroclaw-gateway/src/voice_duplex.rs"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1e528ab321f0fbcddee7aa76d4ea1efa7e67148f8785e75618167efd0f5d0a1"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: I\u0027ve just made this work with parking_lot but it should use either flume or tokio\u0027s async mutexes \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/zeroclaw-config/src/pairing.rs"},"region":{"startLine":465}}}],"partialFingerprints":{"codehealthFindingId/v1":"45c7e916ca877eb3f762de2013347d65861fe4e89e7227252a84f1730f0d9385"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: make this function the main one without spawning a task \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/zeroclaw-config/src/pairing.rs"},"region":{"startLine":945}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7397b51a174493cb0d1de4e64fbc38913631867da14d0ce49874e5169328e1a"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // call is ~2\u00D7 max_audio_bytes. TODO: replace with streaming upload once \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/zeroclaw-channels/src/transcription.rs"},"region":{"startLine":907}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ea7c94f5dcab0216e8151cf97c458a80c0a5e2ff5e61ed8e14968145df93fb3"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // TODO: Re-enable placeholder if WeChat adds message edit/revoke support. \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/zeroclaw-channels/src/wechat.rs"},"region":{"startLine":3476}}}],"partialFingerprints":{"codehealthFindingId/v1":"5519afe7f8d93397de22815a613d77a60c7ab37c14d37fa81ec3b7d8ff9a7b97"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: /// TODO(wacore-0.6): wire to a periodic cleanup cron in the daemon. 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/zeroclaw-channels/src/whatsapp_storage.rs"},"region":{"startLine":1498}}}],"partialFingerprints":{"codehealthFindingId/v1":"62f0aacaaaff3fb42c6b4517fe56094ba8e65e9fb7d430b7731fcc24b5decbc2"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // Todo tracker section \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":"apps/zerocode/src/i18n.rs"},"region":{"startLine":533}}}],"partialFingerprints":{"codehealthFindingId/v1":"b13490fa15a72325e7d15ecf2beeebf50520596e73bc3f8229c4e13d5ce6a0c5"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // \u2500\u2500 Todo tracker fields (Task 7) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \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":"apps/zerocode/src/zerocode_pane.rs"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0ff420c307a32f3caabf15a4a65bc0032442d2a7c5a6c7f6187d754b7ae3b1d"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // \u2500\u2500 Todo tracker section (Task 7) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \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":"apps/zerocode/src/zerocode_pane.rs"},"region":{"startLine":865}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ba4b7587bfdebebcf69f3ea81ea86778c4305479c20de2f6c271b22ebe8d51c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // \u2500\u2500 Todo tracker activate / edit (Task 7) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \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":"apps/zerocode/src/zerocode_pane.rs"},"region":{"startLine":1463}}}],"partialFingerprints":{"codehealthFindingId/v1":"0afe37826eec7d576db59c23ddecb4585ffa727065824446954c3e37bedaf375"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // \u2500\u2500 Todo tracker \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \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":"apps/zerocode/src/config/mod.rs"},"region":{"startLine":581}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf8c940124f7811e9ad87199b34453a3fc37ed3731ad94fd1e6209572586d255"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: // \u2500\u2500 Todo tracker persistence tests \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \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":"apps/zerocode/src/config/mod.rs"},"region":{"startLine":3073}}}],"partialFingerprints":{"codehealthFindingId/v1":"07f5a6054c8d5178c702f82f548c7ccf68aa9461f25719908e37fd84019acefa"}},{"ruleId":"D20","level":"note","message":{"text":"ADR still proposed, but the code already adopted it: docs/book/src/architecture/decisions/ADR-006-runtime-channel-plugins.md:5 says \u0022proposed\u0022, but the production code already uses every element its Decision names: \u0060Channel\u0060 (apps/zerocode/src/quickstart_pane.rs). A proposal the code has adopted is a decision in force; mark it accepted, or, if the code should not do this, say so."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"docs/book/src/architecture/decisions/ADR-006-runtime-channel-plugins.md"},"region":{"startLine":5}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b23590246d6ac79abb5a3188dc936b855a400717379685705c3d67469f3131a"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: 9 of 36 project(s) overshoot their size bounds, lowering Project Cohesion to 5.0/10. The most over is \u0060crates/zeroclaw-runtime\u0060 (407761 LoC, 900 module-visible types across 40 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":"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":"41c1c22788801e4c210770ac271671ac52f9a5e90b3b8e078d43d5909a8616ee"},"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":"482e3b19efd040fb2215efbc5e65f5b9996234817368c5a9198eb89910e46231"},"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":"95edf9338f2cc62a4ebd457820bd3ec1d992707e25991ea54b64ff4ac684bebf"},"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":"ccf877b7d47f804feef1bae44d7660b0f3fc5f87dbcfc07f59ebb40a721935a4"},"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":"1722fd3c0cd211997131a8210ee387879ed81fa04a92176bfdc879e6d21352a5"},"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":"2ff0ca68d220f413e68b255245ff8af6ab2a59184d8575ab35abff0b211e5317"},"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":"07f7ffc27005f5066ed03494cc14c9430c7b65106eedb45a88f2377af0054c9a"},"taxa":[{"id":"CWE-214","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-532","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A09: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":"c488d54cc03d3c295b53bed7fbedb2d3a4cfabe19e682d9a8fef8c3b5b1cf6e6"},"taxa":[{"id":"CWE-214","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-532","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A09: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":"47627fafc585b2b29d599feb888000876cd159925e58783a266330f18de606b2"},"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":"bd6d416a30d63bc8a88a0675d8552bfeb9d87cadf25ea7eb93a5749314aeba49"},"taxa":[{"id":"CWE-250","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A01: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":"6b9a463f08679f53f7a6c655d0fa58b067fa56f7ae7b93b6c91e97892519f420"},"taxa":[{"id":"CWE-250","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A01: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":"c5aec95f3cf1aa1d208f4c5a0f74fd6b837a392e8bd3b6d25424f311ad8d3237"},"taxa":[{"id":"CWE-250","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A01: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":"a058acedbe5077063760eee3f4144f68719581cff38f9b079fbe25462972a119"},"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":"aab088c6ccb25e96004e8718da7f49ff7af72bcf5f6b917a1da926e77db91f9e"},"taxa":[{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08: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":"7ef9f8fff20bb6aa80c09e2e702de1d3655a43bd7c45b26c5b1ad38d135df6dc"},"taxa":[{"id":"CWE-89","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":"0cdcbc7ba1fcf4881a45e3f7cb045508215bb930a154e96a7530cf5dbb8644c6"},"taxa":[{"id":"CWE-89","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":"81725bf1b397a5bbd3f19c09cf959489d8b2dd328b37d82ce5bab1884f06a462"},"taxa":[{"id":"CWE-89","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":"3ddb05121219900c9ceec256016d71e8009b7ed3cc1c4c4fd2745db49fef51cd"},"taxa":[{"id":"CWE-89","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":"df4ab31400b7e5572aa11289313afee15260b6fea92f2bba6e3bd2c868a29119"},"taxa":[{"id":"CWE-89","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":"0ccd5756827026a7082d00f972bc0ce1429a05e39ffe004752a22e6e4c4de010"},"taxa":[{"id":"CWE-89","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":"fdb1ec600d42fc763946879882c1df75ad608006cc3796cfc1c846afbd0910d0"},"taxa":[{"id":"CWE-89","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":"7130071272997c10e25f73b0011be55a73eceaaec6774a79ab184c376f4ade1e"},"taxa":[{"id":"CWE-89","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":"79ea8998a4eb58d53f90964034bfc4dfbe4840465dd338558ae4c30e305bdf42"},"taxa":[{"id":"CWE-89","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":"b021896c82bcdd919d4b98f2fa4437f2c4c58444649d0a7194086bd72d8b795d"},"taxa":[{"id":"CWE-89","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":"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":"ddb84ffc910b1b743c9b2647f698c2173e4e17a123048ea0476e2e20c85b292c"},"taxa":[{"id":"CWE-191","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-248","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A10:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D30","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":"5700cf8ee182fc440abb16030061d2e9976929eb60c880096208a514bc453b10"},"properties":{"dependency":{"package":"zip","version":"9.0.3","advisory":"[GHSA redacted]","aliases":["[CVE 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":"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":"d921db7fd5ae8b779ee17fae2b18fd710427a084082ad317752a8745f9ba31ed"},"properties":{"dependency":{"package":"nostr-relay-pool","version":"0.44.3","advisory":"RUSTSEC-2026-0243","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":"95686d8e64236c3c2c566e482859faf67a5bbd9dbeebb6f4df8aab56c3496281"},"properties":{"dependency":{"package":"proc-macro-error","version":"1.0.4","advisory":"RUSTSEC-2024-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":"7f6329e2b29fe1ee1dd724766af980b151618490b720201bbdc1839704210c3e"},"properties":{"dependency":{"package":"zbus_names","version":"4.3.2","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.12.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.12.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":"05baeb33037572c2215ff2bf732e038ca7651ac0040873773e7adcbcdb7d8162"},"properties":{"dependency":{"package":"anyhow","version":"1.0.101","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":"1e8c2dbc8b89a9496a9a943260d28f0c61949c6646a21a9ba02843c40e3b4211"},"properties":{"dependency":{"package":"crossbeam-epoch","version":"0.9.18","advisory":"RUSTSEC-2026-0204","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":"d3a3b7de99998d95c073cf4b1deff655312547a8fe42c5a9f9efb525c33161e1"},"properties":{"dependency":{"package":"proc-macro-error2","version":"2.0.1","advisory":"RUSTSEC-2026-0173","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":"6702d8774ffbe19edb5950bdfa722e1d73a215a88ff003db3a3f25b1d7218b45"},"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":"5f59bd0641c0446d57a79eb510a26d1618b26c7ef8623419d114d71b1100b8d7"},"properties":{"dependency":{"package":"bare-metal","version":"0.2.5","advisory":"RUSTSEC-2026-0110","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":"fed177959a1d1d098d105e357ba2dfe9c61e9ddece59ba321e85c0656c7b0195"},"properties":{"dependency":{"package":"proc-macro-error2","version":"2.0.1","advisory":"RUSTSEC-2026-0173","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":"2239bc7a8f2c07a849d833383b9baf95d482aa28dc705119c58a731a43f15964"},"properties":{"dependency":{"package":"postcss-selector-parser","version":"6.0.10","advisory":"[GHSA redacted]","aliases":["[CVE 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":"4be74bd39384f28d1235bf978591e749c2555f698b0b61646c69ba117384a5f0"},"properties":{"dependency":{"package":"anymap2","version":"0.13.0","advisory":"RUSTSEC-2026-0319","reachability":{"kind":"unknown"}}}},{"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":"4975822701b3b96654c82dada9bad969e348a6adefa52cd3bba1b6cfd71c3bb7"},"properties":{"dependency":{"package":"bincode","version":"2.0.1","advisory":"RUSTSEC-2025-0141","reachability":{"kind":"unknown"}}}},{"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":"aa275dcc581e31816223ff250817b0083925776ca9db8bc9a83879cc85b97f8d"},"properties":{"dependency":{"package":"derivative","version":"2.2.0","advisory":"RUSTSEC-2024-0388","reachability":{"kind":"unknown"}}}},{"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":"02807c2340c313bd085553cef2aa54725b58db377d04241d3195bea3a23b7783"},"properties":{"dependency":{"package":"glib","version":"0.18.5","advisory":"[GHSA redacted]","aliases":["RUSTSEC-2024-0429"],"reachability":{"kind":"unknown"}}}},{"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":"f48cf8c9f415048128045caa118a1e03769d0b4fe18d7f036c2f3766e3e8d8fb"},"properties":{"dependency":{"package":"instant","version":"0.1.13","advisory":"RUSTSEC-2024-0384","reachability":{"kind":"unknown"}}}},{"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":"7b3f5e73f54279d8a385f3ccb6ce6659725cab3121019062bfd36c6500f66d85"},"properties":{"dependency":{"package":"libsqlite3-sys","version":"0.38.2","advisory":"RUSTSEC-2026-0459","aliases":["[CVE redacted]","[GHSA redacted]","RUSTSEC-2026-0502"],"reachability":{"kind":"unknown"}}}},{"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":"422864efbc32ee020d94634a443edac9d818b90faf02ac96d91c4d66ffa4da37"},"properties":{"dependency":{"package":"lru","version":"0.16.4","advisory":"RUSTSEC-2026-0253","reachability":{"kind":"unknown"}}}},{"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":"46f49615124997a47ae03424c2b2e05e8f53b2ec644cd091de0dc203d46f11ac"},"properties":{"dependency":{"package":"pin-utils","version":"0.1.0","advisory":"RUSTSEC-2026-0441","reachability":{"kind":"unknown"}}}},{"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":"b5524f25221308ec94b7206b58afaa59996104c20abaa242285d451f5344e44b"},"properties":{"dependency":{"package":"rustls-pemfile","version":"2.2.0","advisory":"RUSTSEC-2025-0134","reachability":{"kind":"unknown"}}}},{"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":"d3f6b0dc7d0843f1539cb8274e739376fd4b1be6c39d73c3f6b7e78cb5af4d8b"},"properties":{"dependency":{"package":"unic-char-property","version":"0.9.0","advisory":"RUSTSEC-2025-0081","reachability":{"kind":"unknown"}}}},{"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":"610868c659b2bc4a0ea5bd7cebeddb1d8961b8ebb7c9f31dcc75e07badfe1d8f"},"properties":{"dependency":{"package":"unic-char-range","version":"0.9.0","advisory":"RUSTSEC-2025-0075","reachability":{"kind":"unknown"}}}},{"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":"9a9761ad8cbbcee9fd4b4bb09fc1e6e6977230d7588402bc8497b52c5027e99e"},"properties":{"dependency":{"package":"unic-common","version":"0.9.0","advisory":"RUSTSEC-2025-0080","reachability":{"kind":"unknown"}}}},{"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":"355ee9fdba8596d452516a609f795a54a5bca0f7ed0289c67e6ddbc4bddd9ada"},"properties":{"dependency":{"package":"unic-ucd-ident","version":"0.9.0","advisory":"RUSTSEC-2025-0100","reachability":{"kind":"unknown"}}}},{"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":"b269e07aa3d9bfb90d59d794c0e6a0b7849b288910031fdd0fe253514c3af463"},"properties":{"dependency":{"package":"unic-ucd-version","version":"0.9.0","advisory":"RUSTSEC-2025-0098","reachability":{"kind":"unknown"}}}},{"ruleId":"D31","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":"eea66cd417978ac43b4ab9f50b8e6e6b039f375259d46061b3ef955a0b4a53ed"}},{"ruleId":"D31","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":"8da6f29eee9f42799a60be0689029ba21c9fd0a05f102a68086a458cf82ba386"}},{"ruleId":"D31","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":"fbd0bbfc98d5b191a66ed670097a47fa03e11a3db0c3411c3a8d11fafd557e5a"}},{"ruleId":"D31","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":"66083e7f65693039b0da750fcffb4846880c5fd9ace75e4a648989604d96866f"}},{"ruleId":"D31","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":"51c60b9ebf86bdb2a98356ec11243d657788a98194544920d6017416018ba468"}},{"ruleId":"D31","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":"d0e18f55446f9f1ea4bdb29efa088ca907c008fd3dbda741a570082a8d943a8b"},"taxa":[{"id":"CWE-540","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D31","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":"e83b518b7f52f2dcaa5ae6040062bb11c1eb9b8af4b47d50866778e1f843e3bd"},"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":"D31","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":"b255676cc49ad778ff4d9e02dc4cd3f5b4e1a2d86dfb8de31349ac8c26d7c951"}},{"ruleId":"D31","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":"d657cbeffa66d068eef9f1e82d72f121104ece5781a2392c44ec38f8980cec96"}},{"ruleId":"D31","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":"9ff1ee9dd5615e2d512c1b5a7eb9a731208830cdc6ec1c07d8913d2a5c081e3c"}},{"ruleId":"D31","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":"419cf30cf85332c58259e241aa1c2011373f6a1d6c3a541efb79080a00c0611e"}},{"ruleId":"D31","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":"267fd09c10766eb078c536a395457f3abd126af0cf7e5b84be0831412cd6cc44"},"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":"D31","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":"e82d89a43fda8c7effee3a1b518e26374c3b81d7a8be898ff2bf29fe51f2b39c"}},{"ruleId":"D31","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":"35e8963766dffd5d527270b8cd025e1b0fdc50424cf231315e31ce7329a8d968"},"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":"D31","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":"f7afbf369968a8f3ad6edabd2eff79c5309d32e6d22bedeac657b1c416f08e97"}},{"ruleId":"D31","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":"b6b41ebe97ee26881a4ee36bedaf3200fe4b132d51e772c2dc59093eae4fa508"}},{"ruleId":"D31","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":"86779e4af686e8a0de9b2986372d0330f7f563500678df9026961bd7cd56bd7a"}},{"ruleId":"D31","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":"54227534ad209c2b5899a3c57aabe40cf5f8322e90984d78fdf82a3498e4bec9"}},{"ruleId":"D31","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":"054628761c69077672d7dea12bc6e86d92b42677e2a64a73da1ce0f7ca8c8002"}},{"ruleId":"D31","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":"eeee4aceba5ac2e54d54560eca1af36b063dc76d2b5407c6b23822c8386702e5"}},{"ruleId":"D31","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":"bbefcda349c7f87e7dc49ac606e244490387afddcccf43d05b45bcfdffdd7c76"}},{"ruleId":"D31","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":"2cdd224fa36e94de3c137ac41b2a1abe6a799f66851537d1c2bf830ccda46cbb"}},{"ruleId":"D31","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":"bb84d8d69a125de26236c8fba8fce99fbf7563bd230830e0c49252d6b655cb6f"},"taxa":[{"id":"CWE-250","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-522","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A06:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D31","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":"3369f06005889313c32b7d7d94252495af3bd09cb58e00a2c5d52a999b2e0857"}},{"ruleId":"D31","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":"88d293705ae45ba61f9c4b3e4209dae9a8704d480077fe8110bda81c48a883fb"}},{"ruleId":"D31","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":"748807b05f900511c1808adb54c9c2111fe4031f1556aea3c98d239bf399120e"}},{"ruleId":"D31","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":"5f2d01f3e4118c1688b350b7245e846bb37ca06e76161935936ed83ee67160d2"}},{"ruleId":"D31","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":"e7fac7df4d54fbe1727a8c780d4ba6e20985616b208f523f394c4c4c2e2167fb"}},{"ruleId":"D31","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":"456452202dbc0a8a21d329d982a3fc99b70848f8d45c3de7de60f1542b49659a"}},{"ruleId":"D31","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":"958933e3762b7354d5b854d26ae3703e45240749c5a675ab8c922d8a75cb0396"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/git_forge.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2de43706301e9be06b97c63da5d474d93feed6f3a633e520375a3fe082bda3a8"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/cloud_ops.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c893c58d896d977c0578a9f2f5e5dfa6ae1056a53a4b4b7a9ac107f770df8be"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/sop/trigger_registry.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"967124aa7c7312c9ae68d39ff9647bdd703933f573dbdde438d733cf277f779b"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/project_intel.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"770fbf557e38097e8a2f58d489220d39b86f5460a144a670a87536d21d0531f3"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/browse.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3eab65dbd8015f8af83a06570eccc7212668817b183994f43541cf12ed6a31e"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-hardware/src/device.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e485b69269a37bb37ba59f6454c34ae723779ea859e44d031c12319edae9d190"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-hardware/src/pico_code.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4d8c6a1511d65ad1a043569b422d19cddd2c5b2344759139d3a7a5bb3ee49ea"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-hardware/src/rpi.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c4626ce2427ce4f520be74f3d80a582748bee90dd956dfb5b05789e41abe7c2"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/browser_delegate.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"62fe2064c05f11542564ac46324f329558bda1589c8cfeff81175ee6244635be"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/platform/wasm.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9a08ebdb7a0cc323c602176a9f165281e90b28b14433d73e6e24c172735999c"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/sop/condition.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"64392e3199a9d61fc5110dfa5dfa9156e6f255f8dfc24bba7c527e791b2bc28b"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-hardware/src/gpio.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddf63df185430dd0642ba10e90c2751a485ed0c2ce3bb0f2a5c0632c36f5bc7c"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/trust/tests.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"05e2f7770270f2dfcab4d9932a55a5e569c301300c17110a000ec435779a05c3"}},{"ruleId":"D34","level":"note","message":{"text":"Further orphaned files (smaller): 55 smaller file(s) also have no living knowledge \u2014 folded into the freshness score and metrics rather than raised one row each \u2014 most significant first: crates/zeroclaw-runtime/src/security/playbook.rs, crates/zeroclaw-tools/src/notion_tool.rs, crates/zeroclaw-sop-graph/src/lib.rs, crates/zeroclaw-tools/src/microsoft365/auth.rs, crates/zeroclaw-tools/src/microsoft365/graph_client.rs, crates/zeroclaw-runtime/src/routines/engine.rs, crates/zeroclaw-runtime/src/sop/binding.rs, crates/zeroclaw-runtime/src/security/estop.rs (and 47 more) (68 orphaned of 869 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 869 of the 1081 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"ce861fd78f6935114d3a342cb90ad25870f984e1042954fcbbe27c0e23be3658"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/security/playbook.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f2ae30caa12a33d25ee2a40194d63d8ff97813dda1cf6d6329b3b8aa89ce12f"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/notion_tool.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5708e4859a9aeb729aa1ad987ec816d2f7943eec6e8445733733fb8c89c10dc"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-sop-graph/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"89826dd8197bf049502d9a57d68ca6014d60e1f4b756fa83ad7ebf2bf7d0f048"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/microsoft365/auth.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f874acf5dd05baefd4e2bdacf010c2dd3fc454841ec00117aa3fb8d174e6c0da"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/microsoft365/graph_client.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbdd60031addb32fdd034d5ca711d69d99a48036072fbe30d9f9f40965adc05d"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/routines/engine.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"518a68cb9bc4d135c56285a83f5979507a536bcddd68b635120520de7cd575ab"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/sop/binding.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dce2a3ce22569d38435fe24ef6abeebc26cb7931247999f285e39d5d092ce9a6"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/security/estop.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1bb2a2d0ddbc80cca67a495920187f7b95726eb36dabaca0f8631c7fd7fd153"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-hardware/src/loader.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"23aa9939a04f7b768ab8bf89762bbc4fb9f64bdc8323ab2cb4e21c1b0b807b9f"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-gateway/src/api_personality.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d774e40f10ab9862b22065154481ece8b71ca954f2253d1a913b1a64b3381862"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/security/vulnerability.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"eede0a73b0adb522fb65c74c0d336e4c3e349f98039148da41fbfc6b74aeea3f"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/login_events.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff6d1f0571a752e5350a155674f4d4aeb1943be28f6e9c0a9a9a069643f45b22"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-memory/src/chunker.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7466f08a5fb180686f47ef6b7aa9df70eedd37146589615adcbc5ccd76fa5bd4"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-hardware/src/tool_registry.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab5cf8b91f05664e6e108bfcc16087890dc882b041c537dd6c19fe5daf55129c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/rag/mod.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"56585c2c66d9a41924e24367cbdc6a73e1ae37cab6d0b7c09cb42695785f9433"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-config/src/schema/v1.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7dc68859d1c774139adde932eecbb257b7d6040e4da5e69a2d4cd6c73da1f47"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/color_depth.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ed1c6ff28139b24e67ae4ae9faf744275356977d43730a1c64637e521061c97"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-config/src/api_error.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f22e4bb83d7ce77f13a547b93b7ba1e1af50aa6e15361735ae57741c3ee35c64"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/security/otp.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3363eda953075c9dc634d46b026782e527958080ae1badfb7df5f9cd2dce2a50"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/tools/param_options.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9e42dec22c4594f6e093546384eb175cfd9d21a1362c24889bf6e408dabade4"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/tunnel/openvpn.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9499d624100d61e1965ed6a06b683fdb67a290f9663de940486ef192ccfc4bf1"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/memory_store.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b87561fab0110916a8e97d37c607118454dc3dc79ef7e728716432b0213bba8"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/mcp_protocol.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"21031aa8b241b6d6c8f1c8ee5ada43f0640437955aab671bd8d08c2bc4bd482b"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/tunnel/pinggy.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e36e79cefcc83a1e0f553d51a8ceee0633840e1171438c415f1ebf2dad61a3ed"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/clipboard.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"41120581738344bdb4f15ff2c02ab9acc61fa9dbce3a6ac9d0518d1a27a001d8"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-gateway/src/api_browse.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b501ed800dae54b30e79cc9db1efbc85a0e9052f4a7b210ec3977b280b624a13"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/skills/scaffold.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"32e0528bfd617288cb87c4c6241c3f156f72a61b39ccf7baab1f26c1c3e7be4e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/tunnel/cloudflare.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0ebdba1ff99b3d50e7e56645e71af64df62f26aaa0797542daa79dac8cbe2b3"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/hardware_memory_map.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"78638e82d75331272b2686aa1e38fb5edd4ed34f5558f64f4ba813c11eee36b6"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/help.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6acf7e148a2c1781a0ebfc3110faa1a934589279ac6d6493da2a1c7f5308b92e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/report_template_tool.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9d181b2f71c1cb5cd13b22103f3c2cfdc436939fbe582ca7b538e642e9b8bb6"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"xtask/src/cmd/mdbook/feature_matrix.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3933b0462445ee6ec251b505ea6e371ba000e9628666cf6827b9d40000aa0d86"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-hardware/src/peripherals/rpi.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6305494d2d294fc26ead5915116f524d2b1dad7df35da42c8e376a720c8cd00f"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-spawn/src/lib.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcffaf49ae387912b0917e411165d4c5ad7596eaecf3be9576e7650552e62550"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-gateway/src/voice_duplex.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"620418e3b988305e7ba4eaace9f659f08fe9e0a3f4da3e66420153bb4d1fc5f5"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tools/src/memory_forget.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e83bf4cc10a3beba7487825474881dae85873604219686df067221fe7c6fe107"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-config/src/skill_bundles.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"01fe69a4b12ae2c6033abb82de2579bfb9b8a666a3b9c408eb877c4da02e3722"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/sop/trigger_source.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"439ed5317e0ca713cea175caf6cf1604aacaf40a7da0920053dcea97aa247d6a"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/routines/event_matcher.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b62d860a4a90ce8e6962ba49bc003f25dc9e73109cc3d8aa47a3ea47729da4c"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/tunnel/ngrok.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a555689e0a64b16426b5c5ea9dc7e5484ec7f6cba952ae74c82835cacad185c6"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"xtask/src/cmd/mdbook/plugins.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d875a47b61fbd3caadb741227b0239e5966eca3aac62f346a08293fe5e942c12"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"xtask/src/cmd/mdbook/linkcheck.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbbd8568d28fa06ccab86b053eae37db91626423741dbece5a36d6cbb044b9c4"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-infra/src/stall_watchdog.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6939de732a39c8a6130d691ea1842ba9f269c6116f661453166ed2088d943d6"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-hardware/src/peripherals/smartroom.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f678e8889995c8d9f472b9555b2e3f34cf230a5c44cd0326f834cf3a2bf4811"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/observability/multi.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"df747164280bc5e1dc96ba15c1011176ecdcfeb90ac823b80c8851e62515e127"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-hardware/src/introspect.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9c0888e2377ee6f5bc249f2504f63ad6d67b805b2ab3dc5dc69215f2a01536a"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/verifiable_intent/error.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d9e1b631e8e29e37f1f258c87939f1dac67dd78bb93ebad9194a657fbfcda01"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"firmware/pico/src/main.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba758321ec58725394d51eadd85daf8f1cdfb6ef1575c4badf09f7a66349e987"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/keymap/guard.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c9f30c84b39a9bcba84fe6a3353fe8360fa40faa8d3cf7fdffa07d92f1e80f3"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-memory/src/none.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a13192018df0968efa6611746e48758abb682619af9d649655516c301357b4f9"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-hardware/src/discover.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e1ceab34db5cddea865e07fd7d9f70b894fb79d48d7be0c072da7607aa15efe"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-hardware/src/peripherals/nucleo_flash.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"70e4fd9160a5119555243e2442e2d43c13d73bae34b2858b0b33692267e88ecd"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-log/src/broadcast.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b3fdae48a0739f1685cdc9330d7751293167e0cf383c7d7c5a9cc966fbba3fd"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-providers/src/auth/anthropic_token.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a566e9e6e1909b24dd728f240d6f95a27d06b8af047d9d7da82ad0994ca8769f"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/rag/mod.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"621212a62b9e8bfc7b899299603f136635160672c8d569625a3e587e39424fc9"}},{"ruleId":"D35","level":"error","message":{"text":"Boundary-crossing change coupling: registry.rs \u2194 mod.rs: \u0060crates/zeroclaw-runtime/src/integrations/registry.rs\u0060 (context crates) and \u0060src/config/mod.rs\u0060 (context config) sit in DIFFERENT parts of the tree yet change together 53% of the time (10 of the 19 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \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 10 shared commits counted here, the most recent 3 are \u00605a28cda0\u0060 feat(telegram): make unauthorized notices configurable and authorizat\u2026; \u0060441df131\u0060 feat(channels/telegram): add multi_message streaming mode (#8561); \u0060b954de22\u0060 feat(channels): add passive Telegram group context (#10640) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/integrations/registry.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d70c2a29fd82a0a19ad3f056bf17b1da7d99dc7b754f4438930ac456682a73dc"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: loop_.rs \u2194 vision_route.rs: \u0060crates/zeroclaw-runtime/src/agent/loop_.rs\u0060 and \u0060crates/zeroclaw-runtime/src/agent/turn/vision_route.rs\u0060 change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \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 \u00608a7b3977\u0060 feat(runtime): add effort-aware local and cloud routing (#11516); \u0060638d0f63\u0060 fix(runtime): gate the no-vision error on image markers that resolve \u2026; \u0060360bcaaf\u0060 fix(multimodal): add pixel-level image validation to prevent corrupt \u2026 \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"95f5e832a0e0a23aee08621fee3363ca71ec084d2b87f7204ad8b99cd3564283"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: safety_net.rs \u2194 review.rs: \u0060crates/zeroclaw-runtime/src/agent/safety_net.rs\u0060 and \u0060crates/zeroclaw-runtime/src/skills/review.rs\u0060 change together 57% of the time (8 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well \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 8 shared commits counted here, the most recent 3 are \u006003b29bcc\u0060 fix(runtime): honour keep_tool_context_turns when building provider r\u2026; \u0060638d0f63\u0060 fix(runtime): gate the no-vision error on image markers that resolve \u2026; \u0060e40f153f\u0060 refactor(runtime): seal the engine tool registry as ScopedToolRegistr\u2026 \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/agent/safety_net.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cdcaba63a5b73951a4ddfb417a441a00ae90ec8280f0a8a400a2804ba70cf9c"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: chat.rs \u2194 zerocode_pane.rs: \u0060apps/zerocode/src/chat.rs\u0060 and \u0060apps/zerocode/src/zerocode_pane.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 \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 \u0060782843e2\u0060 feat(zerocode): drag session rows and switch sessions by number (#11573); \u00603c40ce74\u0060 feat(zerocode): combine Sessions Queue and Plan in one dock (#10879); \u0060c265ff64\u0060 feat(zerocode): make modifier intent explicit (#10479) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/chat.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3959967d418dead442e03b838bc6e04aa1e7a67ea5830d42a6df08201df824bb"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: attribution.rs \u2194 catalog.rs: \u0060crates/zeroclaw-api/src/attribution.rs\u0060 and \u0060crates/zeroclaw-providers/src/catalog.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 \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 \u0060a674d03d\u0060 feat(provider): add Crusoe Managed Inference as first-class OpenAI-co\u2026; \u006088f5ff20\u0060 feat(providers): add ZeroRouter preset and public catalog (#9645); \u006034ebc12e\u0060 feat(providers): add Grok Build ACP model provider (#9104) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-api/src/attribution.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"91677f88544c14b12ee17073830a65404e9fb78451816d61f5b14f74875fde8d"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: line.rs \u2194 wechat.rs: \u0060crates/zeroclaw-channels/src/line.rs\u0060 and \u0060crates/zeroclaw-channels/src/wechat.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 \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 5 shared commits counted here, the most recent 3 are \u00607eb00567\u0060 fix(gateway): one shared pairing-code policy, stronger default (#10307); \u0060a5b8c714\u0060 refactor(channels): share one status check for the copy-pasted vendor\u2026; \u00606c2be72b\u0060 feat(channels): operator-bind identities without the /bind code round\u2026 \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/line.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f84b77a873601c0b2dfe770b3baa54b86e27614c3c50a71310d09c9055e78be"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: loop_.rs \u2194 model_switch.rs: \u0060crates/zeroclaw-runtime/src/agent/loop_.rs\u0060 and \u0060crates/zeroclaw-runtime/src/tools/model_switch.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 \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 \u00608a7b3977\u0060 feat(runtime): add effort-aware local and cloud routing (#11516); \u00605c580223\u0060 fix(runtime): keep agent dispatch panic-free (#10134); \u00609dd4bca4\u0060 fix(runtime): isolate model switches per turn (#9232) \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a114ca7dc798b2313316cc6182f165e08c89c20d2572ddb8609d2e5ffccbdc7"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: prompt.rs \u2194 skill_http.rs: \u0060crates/zeroclaw-runtime/src/agent/prompt.rs\u0060 and \u0060crates/zeroclaw-runtime/src/tools/skill_http.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 \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 \u006087cc136c\u0060 feat(runtime)!: bound skill HTTP egress (#10369); \u0060ec785d69\u0060 fix(skills): respect timeout_secs from SKILL.toml (#7552); \u00603ff690f2\u0060 feat(skills): scoped tool elevation for built-in and MCP tools \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/agent/prompt.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c64c92e909897c5481643d3184ce5a75be546d79c68584d8c1e02b1d0c781da5"}},{"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":"cc682cd7167c2c692b624e54d299d32b2ea2b5b3eb72f5516f0dfab9c0ce991d"},"taxa":[{"id":"CICD-SEC-3","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":"79ed2eac5401aa85d2b5924018e6d36b95829149e388df4c8eecc5f112798bc3"}},{"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":"64efeb145b04e6beb945635ab4456a80535b7189b3477380546bf79c8c48105a"},"taxa":[{"id":"CICD-SEC-6","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":"7228a2234401661d06092babe17fe2ea0353ab9d10f531ddec044a9e4caf9dcf"},"taxa":[{"id":"CICD-SEC-6","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":"d657599f6f99da1927d3377533dfc0888b34c4d84aa7d5579841fd72d0e39bce"},"taxa":[{"id":"CICD-SEC-6","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D40","level":"note","message":{"text":"No network policy: No Kubernetes NetworkPolicy (or Cilium policy) found. Without one, every pod can talk to every other pod and reach out to the internet by default. Add a default-deny policy and open only the flows you need."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"295828650a2aaa1b03ae9b32ae6843a0c38011e5a70b1926442c4fa7187de5f0"}},{"ruleId":"D42","level":"note","message":{"text":"No runtime threat detection: No runtime threat-detection engine (Tetragon TracingPolicy / Falco) is committed. These observe process, file and network activity in-kernel and can alert or kill on malicious behaviour a static scan cannot catch."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"aade9827a37dfc7ee064f80a997f47b5d11e31bc09704e26b9252bef00aa0c58"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Ctextarea\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel for\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".claude/skills/skill-creator/eval-viewer/viewer.html"},"region":{"startLine":604}}}],"partialFingerprints":{"codehealthFindingId/v1":"365fd5050010c475b76677277089a1a3fcd72b291a38a68e316d0dd973b28f8f"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/AliasPromptDialog.tsx"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"a066e383e82a190c121813488fdba193a11977faf47eed766c44d4d756fd97ef"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cbutton\u003E with no accessible text: A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/ToolPermissionGrid.tsx"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"e386022b03bf7cde53303ed69be605103ac7563f33e5214961623a1aa2e1ac3d"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/ToolPicker.tsx"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"2409f0c3c28116cff4ebcd5ee29a8f19b7f878ed4ccc41e2c4e73f115e7b9170"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/auth/SignInScreen.tsx"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"73140144abf50312342bd4f4b815dbf61d7e03808a1b7849aa779c33f51b5fb4"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/AddEntityDialog.tsx"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dda1f47686ad65807680538b6af02199da274aa1b231b1fd6ed4ac4681fa3df"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/CostRatesEditor.tsx"},"region":{"startLine":338}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b68cd103ff7fb6226445c38015cf5c4114f2f942045161889a6d6a5f57034ef"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/DirectoryPicker.tsx"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"42b831bdd52f45b9040549a715f730e7cb44b8d48289dde145b68d98116ba67f"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Ctextarea\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/FieldForm.tsx"},"region":{"startLine":894}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff7945a1aacc8749be94454f150ad47ce7c2209d7b92fbf516adb657ee9cd06b"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/FieldForm.tsx"},"region":{"startLine":906}}}],"partialFingerprints":{"codehealthFindingId/v1":"43f25bf880fa9675841793ca73baa908becbb852a248db9cc1f889739102ae6c"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/FieldForm.tsx"},"region":{"startLine":2440}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd42f3623af559c09902f68c4714d184334949eacaac60e79b81803c88c60741"}},{"ruleId":"AC2","level":"warning","message":{"text":"\u003CComboBox\u003E field component without a label: This UI-library field component is named only by a placeholder \u2014 a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a \u003Clabel htmlFor\u003E pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) \u2014 labelling each item leaves the set unnamed."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/FieldForm.tsx"},"region":{"startLine":2600}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3dc85116a89015f398a783d4c2948ea0ed8cb7f1a4293388a4b3f8162d9f9c9"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/FieldForm.tsx"},"region":{"startLine":2610}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e271d465dc65a42665d64dd947f96586739f2083ca450b675967a6f2471f599"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Ctextarea\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/FieldForm.tsx"},"region":{"startLine":2639}}}],"partialFingerprints":{"codehealthFindingId/v1":"8770e3b71246730f7fe43857cb92b3e1ef781aedd744c5e54c79eec4525f8711"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Ctextarea\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/FieldForm.tsx"},"region":{"startLine":2723}}}],"partialFingerprints":{"codehealthFindingId/v1":"15c8929b2f90208a96a8a98b06f3bbeb3c6a4724cbc12e93a69faa03878a1a70"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label htmlFor=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/FieldForm.tsx"},"region":{"startLine":2826}}}],"partialFingerprints":{"codehealthFindingId/v1":"19d1eadc6be2d60c82c1783fcc657d94919f2e3380a87efce6b0d10e8e5c7e57"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cselect\u003E without a programmatic label: This control has no associated label. Add a \u003Clabel htmlFor\u003E / wrapping \u003Clabel\u003E / aria-label / aria-labelledby so assistive tech can name it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/FieldForm.tsx"},"region":{"startLine":2856}}}],"partialFingerprints":{"codehealthFindingId/v1":"b61a8887bde530a8fe08ce601f8b0ceef308f719d77eb4a9f1d6ea99c944ac87"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has no associated label. Add a \u003Clabel htmlFor\u003E / wrapping \u003Clabel\u003E / aria-label / aria-labelledby so assistive tech can name it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/FieldForm.tsx"},"region":{"startLine":2869}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ab088f1eca0f0a3625f55614d1a32c0e569c60c160a0bfbab0dc4ea0dab83f8"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has no associated label. Add a \u003Clabel htmlFor\u003E / wrapping \u003Clabel\u003E / aria-label / aria-labelledby so assistive tech can name it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/FieldForm.tsx"},"region":{"startLine":2926}}}],"partialFingerprints":{"codehealthFindingId/v1":"92869785826020dec850a7e97cfc550ca5577e1cc0a3f09b188af4829683037a"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Ctextarea\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/FieldForm.tsx"},"region":{"startLine":3026}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebec02950a6f5b184d79b9a61cb2640b7364a2aab0b9ae7dbafabdbdfba738a3"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/FieldForm.tsx"},"region":{"startLine":3071}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b16509d956f72c5107dc463be7ba5db293c472ddf73f298b19dd2c9a78d8485"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/FieldForm.tsx"},"region":{"startLine":3079}}}],"partialFingerprints":{"codehealthFindingId/v1":"61f8d119775577a68832f862e51865d445f824af3db55bc2ff31f6cbda3939bb"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cbutton\u003E with no accessible text: A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/ReloadDaemonButton.tsx"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a1ab75badcd59c42ebdd83a91807b813b79aea8cd4b470c34f2cd3d3f2aa35b"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/SectionNavigator.tsx"},"region":{"startLine":388}}}],"partialFingerprints":{"codehealthFindingId/v1":"a18a74a5f52e54a725e3ffb2fd8d2bf3050a04a8a3f37cfa7aea541d87f0cb49"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/SectionPicker.tsx"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"90ac45949bbe56bdb97a7de8227e93a9fbe23c7550d1d17117aa8cd9ad6ff0e9"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label htmlFor=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/SkillsBundleEditor.tsx"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"52e368164532c5cf0bb2f24339c66e1b1b43564282096b135e41e736066f534e"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/SkillsBundleEditor.tsx"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e512741d1aa7810a92328030152d4408493e11a16b2246f27ee5d0cfdfcc042"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label htmlFor=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/SkillsBundleEditor.tsx"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"3917c2b6568b3cdfd9b4af9c21d11e83395a7a4eac998c4d3aec8789973a02af"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Ctextarea\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/SkillsBundleEditor.tsx"},"region":{"startLine":312}}}],"partialFingerprints":{"codehealthFindingId/v1":"bff79f29ae8a360ea4f2c8427e973c5da9b78ca4370071eafd70cbd5d02e0384"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label htmlFor=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/SkillsBundleEditor.tsx"},"region":{"startLine":468}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a9de3ecf0e6d2b318853041a941b1f4348c5f643636db2b490ca80cc2e508b8"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Ctextarea\u003E without a programmatic label: This control has no associated label. Add a \u003Clabel htmlFor\u003E / wrapping \u003Clabel\u003E / aria-label / aria-labelledby so assistive tech can name it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/SkillsBundleEditor.tsx"},"region":{"startLine":471}}}],"partialFingerprints":{"codehealthFindingId/v1":"405828e0ce9d8dc9b1fbf299e350e6f715c9a8db3a4cdbba28d1cb3c2137d55c"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label htmlFor=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/SkillsBundleEditor.tsx"},"region":{"startLine":549}}}],"partialFingerprints":{"codehealthFindingId/v1":"90c8aa49b70d7d52e61eb176114a9e22920596c26125e1449db9c2e0efb86323"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label htmlFor=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/SkillsBundleEditor.tsx"},"region":{"startLine":611}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd6d41c62f5d018b51230eba59bf9e5f18f5355dd4faa87ad24917a89c9950f7"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/SkillsBundleEditor.tsx"},"region":{"startLine":614}}}],"partialFingerprints":{"codehealthFindingId/v1":"808901ec45abeaeee33c7f1973913286195d4de83f9f95840ccf3087d88d419a"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label htmlFor=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/SkillsBundleEditor.tsx"},"region":{"startLine":783}}}],"partialFingerprints":{"codehealthFindingId/v1":"7dcea41d317b9aa2a7c0275d058a8ac3d59c2ea2b31601ac6aa5aa802a1bcd12"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label htmlFor=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/SkillsBundleEditor.tsx"},"region":{"startLine":797}}}],"partialFingerprints":{"codehealthFindingId/v1":"c17b6ae1be90ca6b32e9e3dc80de2a1fb0340a03aa1dd3e2fe6df7ba098cf044"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label htmlFor=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/SkillsBundleEditor.tsx"},"region":{"startLine":863}}}],"partialFingerprints":{"codehealthFindingId/v1":"067d23efec231fd0a3129d223d932f3336a17da6e0b6d9f4a652da48f78a5baf"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label htmlFor=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/SkillsBundleEditor.tsx"},"region":{"startLine":944}}}],"partialFingerprints":{"codehealthFindingId/v1":"95a4e615eb8fbc29cebe901fc9631b52fbf107f124927e7bc95b58d62f65290b"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label htmlFor=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/SkillsBundleEditor.tsx"},"region":{"startLine":1006}}}],"partialFingerprints":{"codehealthFindingId/v1":"1120ec80d3ced94ebf43a68260705bcb472d4dd791ba77a8b9ccb7feb9d9eac6"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has no associated label. Add a \u003Clabel htmlFor\u003E / wrapping \u003Clabel\u003E / aria-label / aria-labelledby so assistive tech can name it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/SkillsBundleEditor.tsx"},"region":{"startLine":1009}}}],"partialFingerprints":{"codehealthFindingId/v1":"1923f64b071e641193c62250422b013cb04dee84b9cf7368c9f48c2c32b20116"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Ctextarea\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/AcpConsole.tsx"},"region":{"startLine":655}}}],"partialFingerprints":{"codehealthFindingId/v1":"15eface6d27f8bcf0f628e8ddf08798b7478dd5fd2f455103aa4aa26f0801432"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Ctextarea\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/AgentChat.tsx"},"region":{"startLine":949}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e2debafdccfe3597892cfbc34e898bc2e45b74ca3f43b2cc36a543938d9dc85"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/AgentWorkspaceExplorer.tsx"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a4f31abf9b368ffb50722b5ffae1c9d5b92ee8cdca81a3c52c6412c3d80d3e6"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Canvas.tsx"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f1cfbe848138f7cd83da3ff62dc287412f3cfb49ef620de2d5266e3e423d116"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Config.tsx"},"region":{"startLine":903}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4a3604ff9310b7de94c08972048cc52be7aeb8f4337908e4b06c1473f85fc65"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cselect\u003E without a programmatic label: This control has no associated label. Add a \u003Clabel htmlFor\u003E / wrapping \u003Clabel\u003E / aria-label / aria-labelledby so assistive tech can name it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Config.tsx"},"region":{"startLine":1191}}}],"partialFingerprints":{"codehealthFindingId/v1":"da7b157a576c6c12bbbbf87c5bd51143da88785e0dcd4927c71c221d7a7712af"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has no associated label. Add a \u003Clabel htmlFor\u003E / wrapping \u003Clabel\u003E / aria-label / aria-labelledby so assistive tech can name it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Config.tsx"},"region":{"startLine":1370}}}],"partialFingerprints":{"codehealthFindingId/v1":"a87b8a22c455df608f9f8637788afc0f13f43d7b571c6a7d6fed6b98ecb3da06"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cbutton\u003E with no accessible text: A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Cron.tsx"},"region":{"startLine":584}}}],"partialFingerprints":{"codehealthFindingId/v1":"32f7a69e8f093b5cebb9f001b5d554bed4aae6291b0156b3e85d4c3abc53c0dd"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label htmlFor=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Cron.tsx"},"region":{"startLine":625}}}],"partialFingerprints":{"codehealthFindingId/v1":"84eef59c001b9f78ef7c80b36a22831d20c492f730f76132ab37e71b462aa387"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label htmlFor=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Cron.tsx"},"region":{"startLine":665}}}],"partialFingerprints":{"codehealthFindingId/v1":"053cfcc87e1f5a3db85fbf515761dd06c68f97bb67d6a9bde50d8c1ef8d3c191"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cselect\u003E without a programmatic label: This control has no associated label. Add a \u003Clabel htmlFor\u003E / wrapping \u003Clabel\u003E / aria-label / aria-labelledby so assistive tech can name it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Cron.tsx"},"region":{"startLine":677}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcee2c55510a065cea1af0c60cc3a731778c1a1e2b824b66737c63266db7ad87"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label htmlFor=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Cron.tsx"},"region":{"startLine":699}}}],"partialFingerprints":{"codehealthFindingId/v1":"4597d1abd14be5f9f73ab1ceab71e927efe105309fd3455a5742feecdb38ce87"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Cron.tsx"},"region":{"startLine":702}}}],"partialFingerprints":{"codehealthFindingId/v1":"34bb0e88673c11b7d73883279259d105b713f770c0749cd01f341f8ead00e4a9"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label htmlFor=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Cron.tsx"},"region":{"startLine":705}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1976c0e53934a990c512678d1e1f484ffb1e104ba6c5f1c745d337253ea62e6"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Cron.tsx"},"region":{"startLine":708}}}],"partialFingerprints":{"codehealthFindingId/v1":"07931e3b4c5a76a4ac9cc85516c23aee96220770c300c41508cdde27a3926822"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label htmlFor=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Cron.tsx"},"region":{"startLine":711}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bae10a46848d9529080828092a7e380f0f84d8ebbc3fc5d256f3b288ec125de"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Cron.tsx"},"region":{"startLine":714}}}],"partialFingerprints":{"codehealthFindingId/v1":"cde358b0a0c65221e4785fc706c7a7414a2e46b1bfd6b5d9b76efc9279fbe247"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label htmlFor=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Cron.tsx"},"region":{"startLine":720}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4a39dcc29d0b699095771446de7b3ff49898a90f1a2196e2ed4887d26f35740"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Ctextarea\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Cron.tsx"},"region":{"startLine":723}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b88f906e4de830e1faa729f1be32b1659e08ec592cfcdb99218fb68adf85b85"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label htmlFor=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Cron.tsx"},"region":{"startLine":734}}}],"partialFingerprints":{"codehealthFindingId/v1":"da92d15dafdda7901e8a24605d2df00842dbbefdda346042568fd6c6d44918ad"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Ctextarea\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Cron.tsx"},"region":{"startLine":737}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cbb4d9065b4f4a8d3ecd5549c29b99d6a98a377153bbfda4d7a91b447a65bef"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label htmlFor=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Cron.tsx"},"region":{"startLine":753}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee248bdd24fd916658c4ecde9fec1e86322e4bc488e3bdebf2eaa8ff7f269631"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label htmlFor=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Cron.tsx"},"region":{"startLine":761}}}],"partialFingerprints":{"codehealthFindingId/v1":"8999080f7d23247f390f41f0a8ffd27d1c6a5015c94ea6b4d407b017fdd6f83e"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label htmlFor=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Cron.tsx"},"region":{"startLine":769}}}],"partialFingerprints":{"codehealthFindingId/v1":"f578d822d006a773a0ae4b555f2e4107cbcec302e5ccd914a7383bf459544166"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label htmlFor=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Cron.tsx"},"region":{"startLine":780}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b1325e28debc81ad1fdf18c7822483955cf8e948c607ebc3567ae2f39ddf234"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Cron.tsx"},"region":{"startLine":783}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad4b6cca4da893b45d82d38ae7e2366d9259c6055af9d368ff2336ca3275ddea"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label htmlFor=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Cron.tsx"},"region":{"startLine":792}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5e30eed6422058a8e2c5053a8863ceb9e8a50df8ccd0fa03fce8b69beb62ed6"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label htmlFor=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Cron.tsx"},"region":{"startLine":819}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4d4a2fa2c1cfb757570598ff8ae24c8044b58284f65b8c11bd2528ed48db0a7"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label htmlFor=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Cron.tsx"},"region":{"startLine":871}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5b27ba1508c80ee3d65a2853101f15dbfb0ba9d30bfd0f39fab39f77f9b1548"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label htmlFor=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Cron.tsx"},"region":{"startLine":904}}}],"partialFingerprints":{"codehealthFindingId/v1":"b33a13538e04c32d283e21ebc82d32bd1dd475f09d178e0aca5e18683485ae31"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cselect\u003E without a programmatic label: This control has no associated label. Add a \u003Clabel htmlFor\u003E / wrapping \u003Clabel\u003E / aria-label / aria-labelledby so assistive tech can name it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Cron.tsx"},"region":{"startLine":931}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5764d3bbf795a6ad2bd45f63fd66763c45d400045518f50019554ea783f3089"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Cron.tsx"},"region":{"startLine":948}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd9686e38ed7b277900e18116ea88caef3462bc9897419ff7bfc54de51420c83"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label htmlFor=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Dashboard.tsx"},"region":{"startLine":2037}}}],"partialFingerprints":{"codehealthFindingId/v1":"00ccf73e76d3a9d01225a1acbdf2097d550a0ef4ef63a959d34b6650334af467"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cselect\u003E without a programmatic label: This control has no associated label. Add a \u003Clabel htmlFor\u003E / wrapping \u003Clabel\u003E / aria-label / aria-labelledby so assistive tech can name it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Dashboard.tsx"},"region":{"startLine":2043}}}],"partialFingerprints":{"codehealthFindingId/v1":"624f3d2fa7e2eab88ab984f94b5169e933f46f94dd55e5042fc3bb955cc9cbde"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cbutton\u003E with no accessible text: A button with no text and no aria-label has no accessible name. Add visible text or an aria-label (an icon-only button still needs one)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Dashboard.tsx"},"region":{"startLine":2615}}}],"partialFingerprints":{"codehealthFindingId/v1":"26311e5a98cd9c72f3e6b48c7494754bd003b384cd91b6964ae7566cad870735"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label htmlFor=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Dashboard.tsx"},"region":{"startLine":2638}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cf27a2f6e539340ab0546d308aae4ea6390950d0586059bfc50c04b26762d08"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Dashboard.tsx"},"region":{"startLine":2645}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0422dfb98d19172b07541999ca4b5704e8f5cc1f6891382de4fb170896d6c05"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label htmlFor=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Dashboard.tsx"},"region":{"startLine":2654}}}],"partialFingerprints":{"codehealthFindingId/v1":"76f3953dc350eada92d20faa877084e26b4075a4fc29af706d0cab6c1a22b3a9"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Ctextarea\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Dashboard.tsx"},"region":{"startLine":2661}}}],"partialFingerprints":{"codehealthFindingId/v1":"919842a642aa6292bd1fb01c0d4b623dff956f48d4755336759de6deb2b40107"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label htmlFor=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Dashboard.tsx"},"region":{"startLine":2670}}}],"partialFingerprints":{"codehealthFindingId/v1":"748f3661abeef2bcee4adc479db42900c52086bfd20871da77d97547846a84ad"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Dashboard.tsx"},"region":{"startLine":2676}}}],"partialFingerprints":{"codehealthFindingId/v1":"69f261e9b0810ffddd873f26a89ef54af08e44881f342b0d229b9f94b2200c4f"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no htmlFor and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association \u2014 it is the TARGET of one, so a control still has to point at it. Give the label htmlFor=\u0022\u003Cthe control\u0027s id\u003E\u0022, move the control inside the label, or point the control\u0027s aria-labelledby at this label\u0027s id."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Dashboard.tsx"},"region":{"startLine":2685}}}],"partialFingerprints":{"codehealthFindingId/v1":"940334687a155f9e58e117cdfd7ccaa9fa426194aaee233c1f21037abdbe1d1a"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cselect\u003E without a programmatic label: This control has no associated label. Add a \u003Clabel htmlFor\u003E / wrapping \u003Clabel\u003E / aria-label / aria-labelledby so assistive tech can name it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Dashboard.tsx"},"region":{"startLine":2691}}}],"partialFingerprints":{"codehealthFindingId/v1":"14116b550c93b2a585431f1c1d00c19b5f76ab02f8ecccab2c8f5ee29e254beb"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Logs.tsx"},"region":{"startLine":443}}}],"partialFingerprints":{"codehealthFindingId/v1":"57a429ab3f9b7663571510da0b98d041a0619d706ccdee30684eb785baa45ee3"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cselect\u003E without a programmatic label: This control has no associated label. Add a \u003Clabel htmlFor\u003E / wrapping \u003Clabel\u003E / aria-label / aria-labelledby so assistive tech can name it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Logs.tsx"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f6847532ec5a7f6bf756999630e34e52fe6a963017422686bef72718851e89a"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cselect\u003E without a programmatic label: This control has no associated label. Add a \u003Clabel htmlFor\u003E / wrapping \u003Clabel\u003E / aria-label / aria-labelledby so assistive tech can name it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Logs.tsx"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf97939bbb4f171ddd460267cbabc629923d43b77634e52e06ba88fa61376d60"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cselect\u003E without a programmatic label: This control has no associated label. Add a \u003Clabel htmlFor\u003E / wrapping \u003Clabel\u003E / aria-label / aria-labelledby so assistive tech can name it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Logs.tsx"},"region":{"startLine":478}}}],"partialFingerprints":{"codehealthFindingId/v1":"e598129cbd523688d3082b5c851d2b0cfd0523857cb60b5ca64dcfc381b4fec3"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Logs.tsx"},"region":{"startLine":489}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d402743eaee55aae96293d548ee9b0a4a81b591769a33f6ef7ee21b6105e1c4"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has no associated label. Add a \u003Clabel htmlFor\u003E / wrapping \u003Clabel\u003E / aria-label / aria-labelledby so assistive tech can name it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Logs.tsx"},"region":{"startLine":540}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bbcb5626b1726f05bbd55a1f701fb72e4934fc7f17944852e201a7344755331"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cselect\u003E without a programmatic label: This control has no associated label. Add a \u003Clabel htmlFor\u003E / wrapping \u003Clabel\u003E / aria-label / aria-labelledby so assistive tech can name it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Logs.tsx"},"region":{"startLine":557}}}],"partialFingerprints":{"codehealthFindingId/v1":"62d9ff8b0f311f85bfa5485ac46965a53306fbb7eedfbe3259fc1e527fccc4ef"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Skills.tsx"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"18066e40f108f0c80d99c76e35f8a0b22a828eeae000f0ebd68a9e748da6e503"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cselect\u003E without a programmatic label: This control has no associated label. Add a \u003Clabel htmlFor\u003E / wrapping \u003Clabel\u003E / aria-label / aria-labelledby so assistive tech can name it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Sops.tsx"},"region":{"startLine":408}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8fe8edf25a88d0ed58932340b0151a44d90a8813ef327c5291a26fb901dc8fa"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Sops.tsx"},"region":{"startLine":571}}}],"partialFingerprints":{"codehealthFindingId/v1":"70de7a78ac9b6aeb24d2249a43cef544c575524a5384daf7c973a6017eff1b05"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Sops.tsx"},"region":{"startLine":578}}}],"partialFingerprints":{"codehealthFindingId/v1":"1474256bdafa5ca77a003d66de93bdc4b6cb8224051d44bae8ba8702f156e219"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cinput\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Sops.tsx"},"region":{"startLine":585}}}],"partialFingerprints":{"codehealthFindingId/v1":"167294991ae883ebc6ef485560dc9933ead8a41cc1a11b119b49195c68243292"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Ctextarea\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Sops.tsx"},"region":{"startLine":1627}}}],"partialFingerprints":{"codehealthFindingId/v1":"d15be8db5c519aa64d7c3b3637edf138fc05341e951488213cb926b94fe2b945"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Cselect\u003E without a programmatic label: This control has no associated label. Add a \u003Clabel htmlFor\u003E / wrapping \u003Clabel\u003E / aria-label / aria-labelledby so assistive tech can name it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/quickstart/ChannelAddForm.tsx"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"af1d157566e4105827e25c17cff0d0c7085378b740779365202593265515634c"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Ctextarea\u003E without a programmatic label: This control has only a placeholder \u2014 a placeholder is not a label (it vanishes on input and many AT ignore it). Add a \u003Clabel htmlFor\u003E, a wrapping \u003Clabel\u003E, or aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/quickstart/Quickstart.tsx"},"region":{"startLine":1241}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6762ba673c5f6994cfc91686367c915dc1321c63a464775ba1a890f7bc7ef8b"}},{"ruleId":"AC3","level":"warning","message":{"text":"Page without a main landmark: No \u003Cmain\u003E (or role=\u0022main\u0022) means no \u0022skip to content\u0022 target and a weaker landmark map. Wrap the primary content in \u003Cmain\u003E."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".claude/skills/skill-creator/assets/eval_review.html"},"region":{"startLine":2}}}],"partialFingerprints":{"codehealthFindingId/v1":"8989e419f3c9215c157ca336477b26e2f248443c4659c9bd5821dece29616608"}},{"ruleId":"AC3","level":"warning","message":{"text":"Page without a main landmark: No \u003Cmain\u003E (or role=\u0022main\u0022) means no \u0022skip to content\u0022 target and a weaker landmark map. Wrap the primary content in \u003Cmain\u003E."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".claude/skills/skill-creator/eval-viewer/viewer.html"},"region":{"startLine":2}}}],"partialFingerprints":{"codehealthFindingId/v1":"fee4f05c2ba8e3ce7a2c7747c94ab7565dc352568170e3479f4c250ea9d09a38"}},{"ruleId":"AC3","level":"warning","message":{"text":"Page without a main landmark: No \u003Cmain\u003E (or role=\u0022main\u0022) means no \u0022skip to content\u0022 target and a weaker landmark map. Wrap the primary content in \u003Cmain\u003E."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/tauri/splash/index.html"},"region":{"startLine":2}}}],"partialFingerprints":{"codehealthFindingId/v1":"29af08fffde334bb4e7d79700ec686528e24267ebbd8259febf7c37fd7470c8b"}},{"ruleId":"AC3","level":"warning","message":{"text":"Page without a main landmark: No \u003Cmain\u003E (or role=\u0022main\u0022) means no \u0022skip to content\u0022 target and a weaker landmark map. Wrap the primary content in \u003Cmain\u003E."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-gateway/src/openapi_docs.html"},"region":{"startLine":2}}}],"partialFingerprints":{"codehealthFindingId/v1":"749df0391a8b34b41aa96033e2c95f276bdc892d22315fe6aaf82d59d847902c"}},{"ruleId":"AC3","level":"error","message":{"text":"\u003Ciframe\u003E without a title: An iframe with no title (or an empty one) is announced only as \u0022frame\u0022. Add a non-empty title describing its content, or an aria-label."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"docs/book/theme/index.hbs"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"9182db6fff1bee15e9703eb89398912ac6b988b997aa072667659a7d6f9465c1"}},{"ruleId":"AC3","level":"warning","message":{"text":"Page without a main landmark: No \u003Cmain\u003E (or role=\u0022main\u0022) means no \u0022skip to content\u0022 target and a weaker landmark map. Wrap the primary content in \u003Cmain\u003E."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/index.html"},"region":{"startLine":2}}}],"partialFingerprints":{"codehealthFindingId/v1":"586768cc4a42c3ff42dd1204c2e5ebd0606d777df1d77a8e14c07a128690a14b"}},{"ruleId":"AC4","level":"error","message":{"text":"Click handler on a \u003Cspan\u003E nested inside \u003Cbutton\u003E: This \u003Cspan\u003E carries its own click handler, but it sits inside a \u003Cbutton\u003E that performs a different action. A keyboard user reaches the \u003Cbutton\u003E and activating it runs the \u003Cbutton\u003E\u0027s handler, never this one, so this action has no keyboard path at all. Role and tabindex cannot supply one: HTML forbids a \u003Cbutton\u003E from containing interactive content or any descendant with a tabindex, so the browser will not put this element in the tab order however it is marked up. Move it out of the \u003Cbutton\u003E and make it a sibling \u003Cbutton\u003E, so each action has its own control."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/AgentCard.tsx"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fff4995990368d94660823ee7893b3864c7e33b1186542d4156490d878b0b24"}},{"ruleId":"AC4","level":"error","message":{"text":"Click handler on a \u003Cspan\u003E nested inside \u003Cbutton\u003E: This \u003Cspan\u003E carries its own click handler, but it sits inside a \u003Cbutton\u003E that performs a different action. A keyboard user reaches the \u003Cbutton\u003E and activating it runs the \u003Cbutton\u003E\u0027s handler, never this one, so this action has no keyboard path at all. Role and tabindex cannot supply one: HTML forbids a \u003Cbutton\u003E from containing interactive content or any descendant with a tabindex, so the browser will not put this element in the tab order however it is marked up. Move it out of the \u003Cbutton\u003E and make it a sibling \u003Cbutton\u003E, so each action has its own control."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/ChatTabBar.tsx"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfda1eaa907bfd6a4a7c32881a155d60b1bc362fe950dc81b948f7e46d7b6987"}},{"ruleId":"AC4","level":"warning","message":{"text":"Modal dialog does not manage focus: This \u003Cdiv role=\u0022dialog\u0022\u003E is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native \u003Cdialog\u003E opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/UpgradeDialog.tsx"},"region":{"startLine":298}}}],"partialFingerprints":{"codehealthFindingId/v1":"40d786c5b3926288a2bed49efe0d64f36e41412e150ad458f59f7302c4125612"}},{"ruleId":"AC4","level":"warning","message":{"text":"Modal dialog does not manage focus: This \u003Cdiv role=\u0022dialog\u0022\u003E is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native \u003Cdialog\u003E opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/auth/ReauthPrompt.tsx"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3b75188e44ad50f3a85378863a5497ef365514a1e9ae75f649e4de54bc58dcf"}},{"ruleId":"AC4","level":"warning","message":{"text":"Modal dialog does not manage focus: This \u003Cdiv role=\u0022dialog\u0022\u003E is a modal dialog, but focus is moved into it, but nothing keeps it there: Tab walks out to the page behind, so a keyboard or screen-reader user keeps acting on the content behind it (WCAG 2.4.3). Use a native \u003Cdialog\u003E opened with showModal(), a dialog component that traps focus, or move focus to the dialog on open, trap Tab inside it (or make the page behind inert) and return focus to the control that opened it on close."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/sections/DirectoryPicker.tsx"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"679c49db97569d3e14100b9e5c1d66654d8ca336be3dbb63d6977ae8833de15e"}},{"ruleId":"AC4","level":"error","message":{"text":"Hover-only interaction on \u003Cdiv\u003E: This \u003Cdiv\u003E binds mouse-enter and mouse-leave and nothing else \u2014 no click, no key handler, no focus handler, and no tabIndex={0}, so it cannot even take focus. A keyboard user cannot hover, so whatever the pair reveals or highlights is reachable with a mouse only. Bind the same state to focus/blur as well, and add tabIndex={0}=\u00220\u0022 so the element can receive that focus."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Dashboard.tsx"},"region":{"startLine":1576}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1f0d1802a2392a8253474e31ddc74b11627b196784902beb19ba696dff9c1a5"}},{"ruleId":"AC4","level":"error","message":{"text":"Click handler on a non-interactive \u003Cg\u003E: A click handler on a plain element isn\u0027t keyboard-operable. Use a \u003Cbutton\u003E, or add role \u002B tabIndex={0} \u002B a key handler."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/SopCanvas.tsx"},"region":{"startLine":941}}}],"partialFingerprints":{"codehealthFindingId/v1":"583985d117f620a064db8e05bbea883b440cb2f8edc1f81da1098bc3e5020c7d"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (2.9:1): \u0060.btn-add\u0060 sets color: white on background-color: #6a9bcc \u2014 2.9:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".claude/skills/skill-creator/assets/eval_review.html"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"219c162804f1c9db72e3eb0b6363665c32db0a889608bf03d6623bacf4598f8f"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (3.1:1): \u0060.btn-export\u0060 sets color: white on background-color: #d97757 \u2014 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".claude/skills/skill-creator/assets/eval_review.html"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6e95608a79f849c6dbc8879fb6c878e1e506e5232448db9eec7bf55dbe64593"}},{"ruleId":"AC6","level":"warning","message":{"text":"Animation without a prefers-reduced-motion guard: \u0060.grades-toggle .arrow\u0060 moves (\u0060transition: transform 0.15s\u0060) and nothing reads prefers-reduced-motion for it \u2014 no @media (prefers-reduced-motion) rule for this element, no reset this project loads \u2014 so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".claude/skills/skill-creator/eval-viewer/viewer.html"},"region":{"startLine":275}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0552963d78edc3291c8b08635519e6b811e5bf1fae382c0263e81ad59a126e4"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (2.1:1): \u0060.section-header\u0060 sets color: #b0aea5 on background-color: #faf9f5 \u2014 2.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".claude/skills/skill-creator/eval-viewer/viewer.html"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"efe0b8b2437158eeadb404ae8f2c889e19610f409171388010b980c28e141ed3"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (2.1:1): \u0060.output-file-header\u0060 sets color: #b0aea5 on background-color: #faf9f5 \u2014 2.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".claude/skills/skill-creator/eval-viewer/viewer.html"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"114ce63fcc53563681ad9602c4e4d9505b7818071acbf51d9696912e5302fb24"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (3.0:1): \u0060.output-file-content .download-link\u0060 sets color: #d97757 on background-color: #faf9f5 \u2014 3.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".claude/skills/skill-creator/eval-viewer/viewer.html"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"47f8c6f68b604f9d185ec50909287e143f7ebbd0f7d3c639b05ff3aeb8e1d155"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (2.1:1): \u0060.prev-feedback\u0060 sets color: #b0aea5 on background-color: #faf9f5 \u2014 2.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".claude/skills/skill-creator/eval-viewer/viewer.html"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"a164e0b0bd23b862dcc73f28136d532f60727b4622165c84c63bfc347b932c35"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (3.2:1): \u0060.grade-pass\u0060 sets color: #788c5d on background-color: #eef2e8 \u2014 3.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".claude/skills/skill-creator/eval-viewer/viewer.html"},"region":{"startLine":302}}}],"partialFingerprints":{"codehealthFindingId/v1":"d289e61516c6e3f98e598c010132db604cf21f5bcd0d378ba48dcc98754f20aa"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (4.0:1): \u0060.grade-fail\u0060 sets color: #c44 on background-color: #fceaea \u2014 4.0:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".claude/skills/skill-creator/eval-viewer/viewer.html"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d2f9c1497258214141ad9eadcd19b1bdeb8039049549135eec85a701052bb3a"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (3.1:1): \u0060.done-btn.ready\u0060 sets color: white on background-color: #d97757 \u2014 3.1:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".claude/skills/skill-creator/eval-viewer/viewer.html"},"region":{"startLine":467}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ac5f81555cf29db6618277e7b932e0e18db6c1b16993a5698089c674adcb79c"}},{"ruleId":"AC6","level":"warning","message":{"text":"Animation without a prefers-reduced-motion guard: \u0060.spinner\u0060 moves (\u0060animation: spin 0.8s linear infinite\u0060) and nothing reads prefers-reduced-motion for it \u2014 no @media (prefers-reduced-motion) rule for this element, no reset this project loads \u2014 so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/tauri/splash/index.html"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d6190e25ef35cccc2a1473785724161d3268e37e734219423598dc5f709d89e"}},{"ruleId":"AC6","level":"warning","message":{"text":"Focus outline removed inline: \u003Cbutton\u003E takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/ChatTabBar.tsx"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"70d9b6c6d2e280cda3acaa13c544a4f1e16905a5ba61f0345ecc946c4f650420"}},{"ruleId":"AC6","level":"warning","message":{"text":"Focus outline removed inline: \u003Cinput\u003E takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/components/CommandPalette.tsx"},"region":{"startLine":357}}}],"partialFingerprints":{"codehealthFindingId/v1":"d490a3956cee0831f0af5202000a3b2282092289b2377cf344ecf6814990dcbc"}},{"ruleId":"AC6","level":"warning","message":{"text":"Focus outline removed inline: \u003Cinput\u003E takes keyboard focus, and its outline-none utility removes the focus ring with no focus-state ring, shadow, border or outline utility in its place. Add one (e.g. focus-visible:ring-2)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/Logs.tsx"},"region":{"startLine":540}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3e6823d9d293542c1da01551554b9294a5055ea03586091d0a2fefe6031b8c9"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (1.8:1): \u0060.btn-electric\u0060 sets color: white on background-color: #22d3ee \u2014 1.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/index.css"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"b086bc1d821311631f7b67f00a791798f60e15831a1a253d0d885ce9b25d30ba"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (1.8:1): \u0060.btn-primary\u0060 sets color: white on background-color: #22d3ee \u2014 1.8:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/index.css"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"658d39ad59efb7be4fef6e2eb88573295eba23f3804f1052ccfbf86ed9da06ea"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (3.2:1): \u0060.table-electric thead th\u0060 sets color: #71717a on background-color: #232329 \u2014 3.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/index.css"},"region":{"startLine":610}}}],"partialFingerprints":{"codehealthFindingId/v1":"511920e4e7c4f16aca314b9e5f8db0bb47f5f6cde4a436a37931dee0fb37f394"}},{"ruleId":"AC6","level":"warning","message":{"text":"Animation without a prefers-reduced-motion guard: \u0060.chapter-fold-toggle\u0060 moves (\u0060transition: transform 0.2s ease, color 0.18s ease\u0060) and nothing reads prefers-reduced-motion for it \u2014 no @media (prefers-reduced-motion) rule for this element, no reset this project loads \u2014 so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"docs/book/theme/custom.css"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fdec5822c5042416c35659dfaf3483d149edf726b2ca5da129476d820f817b1"}},{"ruleId":"AC6","level":"warning","message":{"text":"Animation without a prefers-reduced-motion guard: \u0060#pc-progress\u0060 moves (\u0060transition: width 0.08s linear\u0060) and nothing reads prefers-reduced-motion for it \u2014 no @media (prefers-reduced-motion) rule for this element, no reset this project loads \u2014 so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"docs/book/theme/custom.css"},"region":{"startLine":688}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9687fd081df1093a8a0df95e76fd7585027de01b8d7aaa7322a41c45ca1e0e2"}},{"ruleId":"AC6","level":"warning","message":{"text":"Animation without a prefers-reduced-motion guard: \u0060.pc-diagram-stage \u003E svg\u0060 moves (\u0060transition: transform 0.12s ease\u0060) and nothing reads prefers-reduced-motion for it \u2014 no @media (prefers-reduced-motion) rule for this element, no reset this project loads \u2014 so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"docs/book/theme/custom.css"},"region":{"startLine":1021}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f9d7254eea962c6cb4c5c7dbc266bb895bbc3abfec6aa15cd1d6aa6ce3da9f2"}},{"ruleId":"AC6","level":"warning","message":{"text":"Animation without a prefers-reduced-motion guard: \u0060.pc-hero-glow\u0060 moves (\u0060animation: pc-float 8s ease-in-out infinite\u0060) and nothing reads prefers-reduced-motion for it \u2014 no @media (prefers-reduced-motion) rule for this element, no reset this project loads \u2014 so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"docs/book/theme/custom.css"},"region":{"startLine":1117}}}],"partialFingerprints":{"codehealthFindingId/v1":"569d51a167fc1beabd80fede9049ae8a394345e01a0c1a3ac576fee8a57b6b5f"}},{"ruleId":"AC6","level":"warning","message":{"text":"Animation without a prefers-reduced-motion guard: \u0060.cfg-fields .cfg-field \u003E summary::before\u0060 moves (\u0060transition: transform 0.12s ease\u0060) and nothing reads prefers-reduced-motion for it \u2014 no @media (prefers-reduced-motion) rule for this element, no reset this project loads \u2014 so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"docs/book/theme/custom.css"},"region":{"startLine":1498}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc65e446bc33b3b2d4145e8bb19e580402b9146dc227cc39d3a11758a7c64d5e"}},{"ruleId":"AC6","level":"warning","message":{"text":"Animation without a prefers-reduced-motion guard: \u0060.provider-entry \u003E summary::before\u0060 moves (\u0060transition: transform 0.12s ease\u0060) and nothing reads prefers-reduced-motion for it \u2014 no @media (prefers-reduced-motion) rule for this element, no reset this project loads \u2014 so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"docs/book/theme/custom.css"},"region":{"startLine":1577}}}],"partialFingerprints":{"codehealthFindingId/v1":"48f302f55a6984b570842046b2b78b6533e1ac9a76a3af916a8256b417f1d44f"}},{"ruleId":"C3","level":"note","message":{"text":"Partial audit-trail evidence: An audit mechanism is present, but the trail is not yet complete \u2014 missing: a write-side hook every change flows through (a SeaORM ActiveModelBehavior hook or a database trigger recording each change, or an event-sourced store), per-entity coverage (an event-sourced aggregate, or a hook on each entity that needs a who-changed-what trail)."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"274a04e524f3228d241c99316455563739cb06cfd10a01e446d00b8a14956083"}},{"ruleId":"ES1","level":"error","message":{"text":"Non-deterministic recovery fold: DelegateProgressSink.apply: \u0060DelegateProgressSink.apply\u0060 folds a domain event but reads a clock/random source (\u0060Instant::now\u0060/\u0060Utc::now\u0060/\u0060rand\u0060/\u0060Uuid::new_v4\u0060) on the replay path \u2014 a replay must derive state PURELY from the event\u0027s own fields, or two replays of the same log diverge. Stamp the timestamp/id into the event in the COMMAND, then read it from the event in the fold."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/tools/delegate_progress.rs"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"2718a7c51c0562f9ca5e2bdbe70b9a05d74630d4aff7c723f32a6be1f132f02d"}},{"ruleId":"ES1","level":"error","message":{"text":"Non-deterministic recovery fold: DelegateProgressSink.apply: \u0060DelegateProgressSink.apply\u0060 folds a domain event but reads a clock/random source (\u0060Instant::now\u0060/\u0060Utc::now\u0060/\u0060rand\u0060/\u0060Uuid::new_v4\u0060) on the replay path \u2014 a replay must derive state PURELY from the event\u0027s own fields, or two replays of the same log diverge. Stamp the timestamp/id into the event in the COMMAND, then read it from the event in the fold."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/tools/delegate_progress.rs"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"f336411ecf2d1138794d32011bb4aa637326837272b453ea3cbb8da4616c60fb"}},{"ruleId":"P2","level":"note","message":{"text":"Logging is not universal: Only 10/18 runnable modules use logging (modules with no entry point or server are excluded \u2014 they are libraries a runnable module hosts). Silent: \u0060.\u0060, \u0060apps/tauri\u0060, \u0060apps/zerocode\u0060, \u0060crates/zeroclaw-gateway\u0060, \u0060crates/zeroclaw-memory\u0060 and 3 more."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"91a94e21d6d4d0e6a2003f94505b0b02b157176f0b24c4820f3f82b4447a97fe"}},{"ruleId":"P3","level":"note","message":{"text":"Dependabot does not watch pip/gitsubmodule: \u0060.github/dependabot.yml\u0060 schedules updates, but no \u0060package-ecosystem\u0060 entry covers \u0060pip\u0060, \u0060gitsubmodule\u0060, which this tree depends on \u2014 so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the \u0060updates:\u0060 list."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/dependabot.yml"},"region":{"startLine":3}}}],"partialFingerprints":{"codehealthFindingId/v1":"e94a0b0128f46115c52daffb3a364b9cabd105a5f37321a8bf4fd603e370aa33"}},{"ruleId":"P7","level":"warning","message":{"text":"Outbound HTTP without resilience: \u0060AgentBuilder::new(\u0060 makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service\u0027s request, thread or connection until the call gives up on its own \u2014 or never, for a client with no default timeout."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":1500}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6cf868d3e8d472758889316df326168e4a1482e4fcc3298a510de77fd27e4c8"}},{"ruleId":"P7","level":"warning","message":{"text":"Outbound HTTP without resilience: \u0060reqwest::Client::new(\u0060 makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service\u0027s request, thread or connection until the call gives up on its own \u2014 or never, for a client with no default timeout."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-runtime/src/rpc/locales.rs"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea6c6c4635ff9afe7d3359d85e85a004a5f0189d8a65fb1e5ab17a228cf85f58"}},{"ruleId":"P7","level":"warning","message":{"text":"Outbound HTTP without resilience: \u0060reqwest::get(\u0060 makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service\u0027s request, thread or connection until the call gives up on its own \u2014 or never, for a client with no default timeout."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/zeroclaw-acp-bridge.rs"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a54059d6d01394b315880458abd42fa79001d8a6d50ed8e82b1e0d0ad7674ba"}},{"ruleId":"P7","level":"warning","message":{"text":"Outbound HTTP without resilience: \u0060reqwest::Client::new(\u0060 makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service\u0027s request, thread or connection until the call gives up on its own \u2014 or never, for a client with no default timeout."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/bin/zeroclaw-acp-bridge.rs"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"88310e244fba7d07e24047ec3b8b9a283f90a22b3a2d694893fe84349d966913"}},{"ruleId":"S1","level":"error","message":{"text":"TLS certificate validation disabled: a rustls \u0060ServerCertVerifier\u0060 that accepts every certificate (\u0060AcceptProvisional\u0060) is set on a TLS client, so every peer certificate is accepted \u2014 including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic \u2014 the connection is encrypted to the attacker, not to the intended host. Remove the override so the TLS stack verifies the peer \u2014 reqwest, native-tls, rustls and openssl\u0027s \u0060SslConnector\u0060 all check the chain and hostname when nothing is set. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: \u0060reqwest::ClientBuilder::add_root_certificate(Certificate::from_pem(\u2026))\u0060, a rustls \u0060RootCertStore\u0060 holding its CA, or \u0060SslConnectorBuilder::set_ca_file\u0060, which keeps the chain and hostname checks on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerocode/src/enroll.rs"},"region":{"startLine":459}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcdbd886859de7b31c6ccc414a3f54e4bbde6f560d955cec490b75e5fb0ae1bd"}},{"ruleId":"S1","level":"error","message":{"text":"TLS certificate validation disabled: a rustls \u0060ServerCertVerifier\u0060 that accepts every certificate (\u0060AcceptProvisional\u0060) is set on a TLS client, so every peer certificate is accepted \u2014 including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic \u2014 the connection is encrypted to the attacker, not to the intended host. Remove the override so the TLS stack verifies the peer \u2014 reqwest, native-tls, rustls and openssl\u0027s \u0060SslConnector\u0060 all check the chain and hostname when nothing is set. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: \u0060reqwest::ClientBuilder::add_root_certificate(Certificate::from_pem(\u2026))\u0060, a rustls \u0060RootCertStore\u0060 holding its CA, or \u0060SslConnectorBuilder::set_ca_file\u0060, which keeps the chain and hostname checks on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"apps/zerorelay/src/enroll_proxy.rs"},"region":{"startLine":350}}}],"partialFingerprints":{"codehealthFindingId/v1":"b82647b73ff07bd03edbe5cda046c62cf2dc3f6e0ce95554cdf0792271b24137"}},{"ruleId":"S1","level":"error","message":{"text":"TLS certificate validation disabled: a rustls \u0060ServerCertVerifier\u0060 that accepts every certificate (\u0060AcceptProvisional\u0060) is set on a TLS client, so every peer certificate is accepted \u2014 including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic \u2014 the connection is encrypted to the attacker, not to the intended host. Remove the override so the TLS stack verifies the peer \u2014 reqwest, native-tls, rustls and openssl\u0027s \u0060SslConnector\u0060 all check the chain and hostname when nothing is set. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: \u0060reqwest::ClientBuilder::add_root_certificate(Certificate::from_pem(\u2026))\u0060, a rustls \u0060RootCertStore\u0060 holding its CA, or \u0060SslConnectorBuilder::set_ca_file\u0060, which keeps the chain and hostname checks on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/irc.rs"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"242b59f8209b7105cf5972653588115b800cf229c5eca8349a6bcc90b06ce7ad"}},{"ruleId":"S1","level":"warning","message":{"text":"Weak hash algorithm: MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything \u2014 a signature, an integrity or tamper check, a credential, or any value an attacker can influence \u2014 that is a real weakness: use SHA-256\u002B (\u0060sha2::Sha256::digest(\u2026)\u0060) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead \u2014 a non-cryptographic hash such as xxhash or murmurhash says it in code \u2014 since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-channels/src/wechat.rs"},"region":{"startLine":1709}}}],"partialFingerprints":{"codehealthFindingId/v1":"6449b2671008c8d667381e971ef2b5914029c1126914fd4e29579717c01b3aa4"}},{"ruleId":"S1","level":"warning","message":{"text":"Third-party script without Subresource Integrity: \u0060https://cdn.jsdelivr.net/npm/@scalar/api-reference\u0060 is executed by this page with no Subresource Integrity. Whoever can answer that request \u2014 the CDN, anyone who compromises it, anyone on the network path \u2014 runs arbitrary script in this page\u0027s origin, with its session. The URL also names no version, so it resolves to whatever that origin serves at fetch time \u2014 the executed bytes can change with nobody touching this repository. 2 such include(s) across the repository\u0027s markup."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-gateway/src/openapi_docs.html"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"152b00539a98b385f7adcb9dd0638043a16ae499cd04b22e39bda1ce2e0002fe"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060el.offsetParent !== null || el === document.activeElement\u0060 appears character-identically in 4 files \u2014 web/src/components/SettingsModal.tsx, web/src/components/ui/ConfirmDialog.tsx, web/src/hooks/useFocusTrap.ts, web/src/pages/AgentWorkspaceExplorer.tsx. 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":"web/src/components/SettingsModal.tsx"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"94b3e90d8cc4e00b013342300038efbd80c2b70c01b71948eb4c3eb18aef5047"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060rootRef.current \u0026\u0026 !rootRef.current.contains(e.target as Node)\u0060 appears character-identically in 2 files \u2014 web/src/components/ui/ComboBox.tsx, web/src/components/ui/Select.tsx. 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":"web/src/components/ui/ComboBox.tsx"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bf0072213aca81d989f9bc953064ce64695cba6337051eefc40a25b120e5cb6"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060s.shape === \u0022one_tier_alias_map\u0022 || s.shape === \u0022typed_family_map\u0022\u0060 appears character-identically in 2 files \u2014 web/src/components/sections/SectionNavigator.tsx, web/src/lib/configSearch.ts. 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":"web/src/components/sections/SectionNavigator.tsx"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"427476c295c5012d28b4f95ea665f69e69568f5350b2636b2c64a3e79d8633fc"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060this.intentionallyClosed || !this.autoReconnect\u0060 appears character-identically in 2 files \u2014 web/src/lib/sse.ts, web/src/lib/ws.ts. 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":"web/src/lib/sse.ts"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"738807bdea861407f7cf16dda4ac41785f9805b1ee5e265df46882a7e059a3f0"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060target.startswith(\u0022\u003C\u0022) and target.endswith(\u0022\u003E\u0022)\u0060 appears character-identically in 2 files \u2014 scripts/ci/check_internal_docs_links.py, scripts/ci/collect_changed_links.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/ci/check_internal_docs_links.py"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"641623fa415f9901045133545925917d35465d4e13690813471c5b177edf4b49"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!found \u0026\u0026 std::time::Instant::now() \u003C deadline\u0060 appears character-identically in 3 files \u2014 crates/zeroclaw-log/src/layer.rs, crates/zeroclaw-providers/src/dispatch.rs, crates/zeroclaw-runtime/src/tools/model_switch.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/zeroclaw-log/src/layer.rs"},"region":{"startLine":656}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e8973781325c5367f7d0bbebb8cd8c4019a849436c29736cbae72057e46e08e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!handle_norm.is_empty() \u0026\u0026 handle_norm == sender_norm\u0060 appears character-identically in 3 files \u2014 crates/zeroclaw-api/src/channel.rs, crates/zeroclaw-plugins/src/wasm_channel.rs, crates/zeroclaw-runtime/src/peers.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/zeroclaw-api/src/channel.rs"},"region":{"startLine":1112}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a56536dc4f20ca81d8623ea4ab43f75eda88548b1185a72fb4d85ab3c0ee7f6"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!parsed.username().is_empty() || parsed.password().is_some()\u0060 appears character-identically in 7 files \u2014 crates/zeroclaw-infra/src/net_guard.rs, crates/zeroclaw-tools/src/a2a_client.rs, crates/zeroclaw-tools/src/browser.rs, crates/zeroclaw-tools/src/file_download.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/zeroclaw-infra/src/net_guard.rs"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"f38aad311cb3322756dbf69c80cdf7403709511deca9358bd89aca66fdc7c589"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!self.charge_host_call() || !self.instance_services_enabled()\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-plugins/src/component.rs, crates/zeroclaw-plugins/src/component_websocket.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/zeroclaw-plugins/src/component.rs"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"a17e198be6e7c168c87662529b5146c41caffe20997b841d87d108e6212b563f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!trimmed.is_empty() \u0026\u0026 trimmed != DEFAULT_MODEL_MARKER\u0060 appears character-identically in 3 files \u2014 crates/zeroclaw-providers/src/gemini_cli.rs, crates/zeroclaw-providers/src/grok_cli.rs, crates/zeroclaw-providers/src/kilocli.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/zeroclaw-providers/src/gemini_cli.rs"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"32ea19d32f0cbb8f323d7d7999cca52923df575a1369959eebe24409f120acd4"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!url.starts_with(\u0022http://\u0022) \u0026\u0026 !url.starts_with(\u0022https://\u0022)\u0060 appears character-identically in 3 files \u2014 crates/zeroclaw-tools/src/http_request.rs, crates/zeroclaw-tools/src/text_browser.rs, crates/zeroclaw-tools/src/web_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/zeroclaw-tools/src/http_request.rs"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0ceb4d7b0e903df1ad755b13bb1b4810ffa5146f2b647bd25e48ee00376fdb8"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!url.username().is_empty() || url.password().is_some()\u0060 appears character-identically in 8 files \u2014 apps/zerocode/src/oidc_enroll.rs, crates/zeroclaw-hardware/src/datasheet.rs, crates/zeroclaw-providers/src/hailo_ollama.rs, crates/zeroclaw-runtime/src/security/auth_provider/oidc.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":"apps/zerocode/src/oidc_enroll.rs"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"60bf301882033917632ca5192edbc981dad2cec03d7b042bfb320f628fc93377"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060( chrono::DateTime::parse_from_rfc3339(s), chrono::DateTime::parse_from_rfc3339(u), ) \u0026\u0026 s_dt \u003E= u_dt\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-tools/src/discord_search.rs, crates/zeroclaw-tools/src/memory_recall.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/zeroclaw-tools/src/discord_search.rs"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4b633e8c23a3eda354ed0007fae51361b8fb27af8eab801e3600d211712d7d3"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060auth.principal.expires_at \u0026\u0026 expires_at \u003C= now\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-runtime/src/rpc/auth.rs, crates/zeroclaw-runtime/src/rpc/dispatch.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/zeroclaw-runtime/src/rpc/auth.rs"},"region":{"startLine":657}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ae81a3965bc563e2062426c84a240d00a3b415bcf8e35b676adc41a3e38f9cc"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060auth.principal.revalidate_by \u0026\u0026 revalidate_by \u003C= now\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-runtime/src/rpc/auth.rs, crates/zeroclaw-runtime/src/rpc/dispatch.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/zeroclaw-runtime/src/rpc/auth.rs"},"region":{"startLine":664}}}],"partialFingerprints":{"codehealthFindingId/v1":"37c0d9a614bad98396452398c53c6cf68e9fb2b57806430d6cd7e91ca3079916"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060board == \u0022nucleo-f401re\u0022 || board == \u0022nucleo-f411re\u0022\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-tools/src/hardware_board_info.rs, crates/zeroclaw-tools/src/hardware_memory_map.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/zeroclaw-tools/src/hardware_board_info.rs"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"41038aba68c7e4c2ce3dba64031700045c9581d44414f6aa00aab1a5701e0fc5"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060body.get(\u0022tools\u0022).is_some() \u0026\u0026 body .get(\u0022reasoning_effort\u0022) .and_then(serde_json::Value::as_str) != Some(\u0022none\u0022)\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-providers/src/azure_openai.rs, crates/zeroclaw-providers/src/compatible.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/zeroclaw-providers/src/azure_openai.rs"},"region":{"startLine":885}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ee728d911a783bdf1baf163717b9c7a07f35dfae267293233e3faaad4e39486"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060bytes.len() \u003E= 2 \u0026\u0026 bytes.starts_with(b\u0022BM\u0022)\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-channels/src/lark.rs, crates/zeroclaw-channels/src/slack.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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":3987}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7ec9b2c5636a221f07f7786836ffbc52424cee34151451529a5eccff578e68a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060bytes.len() \u003E= 2 \u0026\u0026 bytes[1] == b\u0027:\u0027 \u0026\u0026 bytes[0].is_ascii_alphabetic()\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-config/src/policy.rs, src/plugin_registry.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/zeroclaw-config/src/policy.rs"},"region":{"startLine":960}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b8b20cc7c007eb2c27a1d65c5afde69f52715733af20ef967661fa70677c40b"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060bytes.len() \u003E= 6 \u0026\u0026 (bytes.starts_with(b\u0022GIF87a\u0022) || bytes.starts_with(b\u0022GIF89a\u0022))\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-channels/src/lark.rs, crates/zeroclaw-channels/src/slack.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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":3981}}}],"partialFingerprints":{"codehealthFindingId/v1":"fca61a77736555b0c71acc65bd2f594d383bf515f7727bc4997cf8cad30e3036"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060bytes.starts_with(b\u0022GIF87a\u0022) || bytes.starts_with(b\u0022GIF89a\u0022)\u0060 appears character-identically in 4 files \u2014 crates/zeroclaw-api/src/media.rs, crates/zeroclaw-channels/src/wecom_ws.rs, crates/zeroclaw-runtime/src/tools/file_read.rs, crates/zeroclaw-tools/src/embedded_resource.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/zeroclaw-api/src/media.rs"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2818346a362187216b74c2e8302699945243b785b4167d3a53573483816f07c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060ch.is_ascii_alphanumeric() || ch == \u0027-\u0027 || ch == \u0027_\u0027\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-channels/src/wecom_ws.rs, crates/zeroclaw-runtime/src/sop/procedural_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/zeroclaw-channels/src/wecom_ws.rs"},"region":{"startLine":2125}}}],"partialFingerprints":{"codehealthFindingId/v1":"90df2f29f6c7e166fbb37ad5a29cab7d87a543ca9ac43ff7655b3b8618a18188"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060chat.content == \u0022old request\u0022 || chat.content == \u0022old answer\u0022\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-channels/src/orchestrator/acp_server.rs, crates/zeroclaw-runtime/src/agent/agent.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/zeroclaw-channels/src/orchestrator/acp_server.rs"},"region":{"startLine":8031}}}],"partialFingerprints":{"codehealthFindingId/v1":"104b3f32df0a62250b442a5fcc2745744064a30423bd391e0f0e8c096e619873"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060chat.role == \u0022assistant\u0022 \u0026\u0026 chat.content == \u0022checking\u0022\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-infra/src/acp_session_store.rs, crates/zeroclaw-runtime/src/rpc/dispatch.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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":4345}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc5e9f3885e6add4e46bb84a6d5378fd2a9f189877b8fb94915419468d719a58"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060col \u003E= r.x \u0026\u0026 col \u003C r.x \u002B r.width \u0026\u0026 row \u003E= r.y \u0026\u0026 row \u003C r.y \u002B r.height\u0060 appears character-identically in 2 files \u2014 apps/zerocode/src/quickstart_pane.rs, apps/zerocode/src/sop_pane.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":"apps/zerocode/src/quickstart_pane.rs"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"f66e7a060c2608697714ee44686f80d0b4713db7614bd0179fcf2b082d2f0c3c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060construction == crate::composition::RegistryConstruction::NativeCompat \u0026\u0026 config.sop.runtime_enabled()\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-runtime/src/agent/agent.rs, crates/zeroclaw-runtime/src/agent/loop_.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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":3391}}}],"partialFingerprints":{"codehealthFindingId/v1":"62f3b337553215b7e98eb6bc5a769c9c933ebe1a75ab279478fa4bebf3b2d447"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060cutoff \u003E 0 \u0026\u0026 !output.is_char_boundary(cutoff)\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-runtime/src/cron/store.rs, crates/zeroclaw-runtime/src/heartbeat/store.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/zeroclaw-runtime/src/cron/store.rs"},"region":{"startLine":1506}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b6cb0063b9d6506ffe7fc075b5945d0c739fd643985367b35307f69682c048f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060elapsed \u003E= DEFAULT_CONNECT_TIMEOUT \u0026\u0026 elapsed \u003C DEFAULT_CONNECT_TIMEOUT \u002B Duration::from_secs(1)\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-plugins/src/component_websocket.rs, crates/zeroclaw-plugins/src/sockets.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/zeroclaw-plugins/src/component_websocket.rs"},"region":{"startLine":1324}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc002c23744d24187087b77d9e47d490f6c028aa5ab4ec01d5f162315d399d3a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060end \u003E 0 \u0026\u0026 !output.is_char_boundary(end)\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-infra/src/acp_session_store.rs, crates/zeroclaw-runtime/src/daemon/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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":2742}}}],"partialFingerprints":{"codehealthFindingId/v1":"424c5955092775607fa7fa4acd987589fcad2252e2adcd2845c502a8a7bc5c15"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060err.contains(\u0022http://\u0022) || err.contains(\u0022https://\u0022)\u0060 appears character-identically in 3 files \u2014 crates/zeroclaw-tools/src/http_request.rs, crates/zeroclaw-tools/src/text_browser.rs, crates/zeroclaw-tools/src/web_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/zeroclaw-tools/src/http_request.rs"},"region":{"startLine":2375}}}],"partialFingerprints":{"codehealthFindingId/v1":"700104ab3f5da69feb557307ea45d1582a6ac143866047918eeecce9832975b4"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060err_msg.contains(\u0022No such file or directory\u0022) || err_msg.contains(\u0022not found\u0022) || err_msg.contains(\u0022cannot find\u0022)\u0060 appears character-identically in 4 files \u2014 crates/zeroclaw-tools/src/claude_code.rs, crates/zeroclaw-tools/src/codex_cli.rs, crates/zeroclaw-tools/src/gemini_cli.rs, crates/zeroclaw-tools/src/opencode_cli.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/zeroclaw-tools/src/claude_code.rs"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e2c292825462edaca8db62261416e005bc2a322ee758cdc26665947a17da25e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060failures == 1 || failures.is_power_of_two()\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-runtime/src/tools/delegate.rs, crates/zeroclaw-runtime/src/tools/send_message_to_peer.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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":2659}}}],"partialFingerprints":{"codehealthFindingId/v1":"039f7fceb1098aab6d01f32e3e32107c812dcb64958f2a2d7decf64657e45787"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060filter.since \u0026\u0026 e.timestamp.as_str() \u003C since.as_str()\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-api/src/memory_traits.rs, crates/zeroclaw-memory/src/agent_scoped.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/zeroclaw-api/src/memory_traits.rs"},"region":{"startLine":709}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1306a56bbd53e8a516e79c885fb3b4fc8f5a9fcb5d5a021a82043392daa7b79"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060filter.until \u0026\u0026 e.timestamp.as_str() \u003E until.as_str()\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-api/src/memory_traits.rs, crates/zeroclaw-memory/src/agent_scoped.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/zeroclaw-api/src/memory_traits.rs"},"region":{"startLine":714}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc227e58f0031061579258b5f749a4fd990f0dc88551e64df60d86b0119a8b1a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060filtered.len() \u003E= limit || !backend_may_have_more\u0060 appears character-identically in 3 files \u2014 crates/zeroclaw-api/src/memory_traits.rs, crates/zeroclaw-memory/src/agent_scoped.rs, crates/zeroclaw-memory/src/agent_scoped_markdown.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/zeroclaw-api/src/memory_traits.rs"},"region":{"startLine":677}}}],"partialFingerprints":{"codehealthFindingId/v1":"54e4f47fa0604f34475d3e971326de16771b8dfeff1d551dc6bf6accaa6983e6"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060first.is_ascii_alphabetic() || first == \u0027_\u0027\u0060 appears character-identically in 3 files \u2014 crates/zeroclaw-config/src/policy.rs, crates/zeroclaw-memory/src/postgres.rs, crates/zeroclaw-runtime/src/tools/shell.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/zeroclaw-config/src/policy.rs"},"region":{"startLine":1030}}}],"partialFingerprints":{"codehealthFindingId/v1":"713d2d495ba2959118f6f68067a2bd37ff8058a924b2e429df02dd710575d099"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060id == \u0022o1\u0022 || id.starts_with(\u0022o1-\u0022) || id == \u0022o3\u0022 || id.starts_with(\u0022o3-\u0022) || id == \u0022o4\u0022 || id.starts_with(\u0022o4-\u0022) || (id.starts_with(\u0022gpt-5\u0022\u2026\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-providers/src/azure_openai.rs, crates/zeroclaw-providers/src/compatible.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/zeroclaw-providers/src/azure_openai.rs"},"region":{"startLine":312}}}],"partialFingerprints":{"codehealthFindingId/v1":"323584448462cce22afe3d4ba2659aceabdfeb6dc7e7fc36394267d70d7483f7"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060id.starts_with(\u0022gpt-5\u0022) \u0026\u0026 id.ends_with(\u0022-chat-latest\u0022)\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-providers/src/azure_openai.rs, crates/zeroclaw-providers/src/compatible.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/zeroclaw-providers/src/azure_openai.rs"},"region":{"startLine":311}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5795b07266d32b87c0d2f207fb901f313333f21813f4c6a87d44118c32383d4"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060info.is_secret || info.derived_from_secret\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-config/src/traits.rs, crates/zeroclaw-gateway/src/api_config.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/zeroclaw-config/src/traits.rs"},"region":{"startLine":900}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a98b97a0c5f543688dc5f621b1c2c5ef51bcfb0a19d491b3b4921bdd046dbf9"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060inner.starts_with(\u0027\u0022\u0027) \u0026\u0026 inner.ends_with(\u0027\u0022\u0027) \u0026\u0026 inner.len() \u003E= 2\u0060 appears character-identically in 2 files \u2014 tools/fill-translations/src/main.rs, xtask/src/cmd/mdbook/check.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":"tools/fill-translations/src/main.rs"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"86d5ccc957e4d8002f3b0b2b9e53d772af4b3e1df99de4fbf81919c953b703f9"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060is_glm_global_alias(name) || is_glm_cn_alias(name)\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-config/src/provider_aliases.rs, crates/zeroclaw-providers/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/zeroclaw-config/src/provider_aliases.rs"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"d227f3dc3e13e52b2732653eb613108f84eef87eeef5c80e3d6cdd930389b2ef"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060is_minimax_intl_alias(name) || is_minimax_cn_alias(name)\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-config/src/provider_aliases.rs, crates/zeroclaw-providers/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/zeroclaw-config/src/provider_aliases.rs"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"4060eeefa57f0d64cd1caaa2d84493ed41b5894da8ae7da10ca84a79126c9f6c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060is_moonshot_intl_alias(name) || is_moonshot_cn_alias(name)\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-config/src/provider_aliases.rs, crates/zeroclaw-providers/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/zeroclaw-config/src/provider_aliases.rs"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"865537d597aaac0ccba3681d26f2fdc040aa6d31ff257c685d84843386f8f561"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060is_qwen_cn_alias(name) || is_qwen_intl_alias(name) || is_qwen_us_alias(name) || is_qwen_oauth_alias(name)\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-config/src/provider_aliases.rs, crates/zeroclaw-providers/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/zeroclaw-config/src/provider_aliases.rs"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"84a3eafe82eaf9e81974ecdad3ef32d2c2d829f177534cbc5f091fe814703414"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060is_zai_global_alias(name) || is_zai_cn_alias(name)\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-config/src/provider_aliases.rs, crates/zeroclaw-providers/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/zeroclaw-config/src/provider_aliases.rs"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"74d22faf72d8622c3b8541669ebb346c985a61014eaf53a29cc8158fe129e69d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060key.code \u0026\u0026 !key.modifiers.contains(KeyModifiers::CONTROL)\u0060 appears character-identically in 5 files \u2014 apps/zerocode/src/app.rs, apps/zerocode/src/config_manager.rs, apps/zerocode/src/dashboard.rs, apps/zerocode/src/file_explorer.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":"apps/zerocode/src/app.rs"},"region":{"startLine":1292}}}],"partialFingerprints":{"codehealthFindingId/v1":"36a4a5cd953694816e9c66d0fc14378f75505df10b9387c5638907227d65740c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060line.starts_with(\u0027 \u0027) || line.starts_with(\u0027\\t\u0027)\u0060 appears character-identically in 3 files \u2014 crates/zeroclaw-runtime/src/skills/document.rs, crates/zeroclaw-runtime/src/skills/improver.rs, crates/zeroclaw-runtime/src/tools/skill_manage.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/zeroclaw-runtime/src/skills/document.rs"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa63eb6ac60345ea7cf36f99d1813edb1faa9b2556bef07cda84c35ba77c1dea"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060line.starts_with(\u0027 \u0027) || line.starts_with(\u0027\\t\u0027) || line.trim().is_empty()\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-runtime/src/skills/document.rs, crates/zeroclaw-runtime/src/skills/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/zeroclaw-runtime/src/skills/document.rs"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2a8e1533c5d8f0d4545e2eb81cf4108041a46418c4127a4719ab0197e443ffa"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060line.starts_with(\u0027#\u0027) || line.is_empty()\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-tools/src/linkedin_client.rs, crates/zeroclaw-tools/src/pushover.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/zeroclaw-tools/src/linkedin_client.rs"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff53bc3adaf6ba62d4c8c644206e0e534ef7566506e27b68bd84c33c10cd2192"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060m.role == \u0022user\u0022 \u0026\u0026 m.content == \u0022hello\u0022\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-infra/src/acp_session_store.rs, crates/zeroclaw-runtime/src/agent/agent.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/zeroclaw-infra/src/acp_session_store.rs"},"region":{"startLine":4181}}}],"partialFingerprints":{"codehealthFindingId/v1":"559b41bc0842fe239524dbfc5066867b4acd971c4632db7e5918ce7bec8f2c3d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060message.role == \u0022user\u0022 \u0026\u0026 message.content == \u0022new request\u0022\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-runtime/src/agent/agent.rs, crates/zeroclaw-runtime/src/agent/history_trim.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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":14205}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ea08e8b75f6c8fc19e2dd2aac796a13eaec8e6a4c8513da2ea767c449195454"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060metadata.file_type().is_symlink() || !metadata.is_dir()\u0060 appears character-identically in 4 files \u2014 crates/zeroclaw-providers/src/copilot.rs, crates/zeroclaw-runtime/src/service/mod.rs, crates/zeroclaw-runtime/src/skills/audit.rs, src/alias_cli/export.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/zeroclaw-providers/src/copilot.rs"},"region":{"startLine":728}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f83a3760ad88be55611228655b657a3cbd3fe9c896154ecf8f68208853e3339"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060out.contains(\u0022NEW\u0022) \u0026\u0026 !out.contains(\u0022OLD\u0022)\u0060 appears character-identically in 2 files \u2014 xtask/src/generate/container.rs, xtask/src/generate/setup_bat.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":"xtask/src/generate/container.rs"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"38fb580820f383f8934a6fca2b6826168d390442357726f155ecdf294df4e4d4"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060params.get(\u0022code\u0022) \u0026\u0026 !code.trim().is_empty()\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-providers/src/auth/openai_oauth.rs, crates/zeroclaw-providers/src/auth/xai_oauth.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/zeroclaw-providers/src/auth/openai_oauth.rs"},"region":{"startLine":344}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0b30cef0bf62549b63cbb3f5b6ad06dabe9e9e80b9cbfcc80e69f61f50fab81"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060parsed.scheme() != \u0022http\u0022 \u0026\u0026 parsed.scheme() != \u0022https\u0022\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-tools/src/a2a_client.rs, crates/zeroclaw-tools/src/browser.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/zeroclaw-tools/src/a2a_client.rs"},"region":{"startLine":507}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef1208e80f300dad27a2590ab5e80d874704ba8750e37126aa2085715a1d345c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060passive_group_context \u0026\u0026 is_group \u0026\u0026 !addressed_to_bot\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-channels/src/telegram.rs, crates/zeroclaw-channels/src/whatsapp_web.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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":2828}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a17ec5a8a6e2ac1e7312b1a00ae2fd93eec13f1dd4490d20affb9e50f4eb597"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060raw.len() \u003E= 2 \u0026\u0026 ((raw.starts_with(\u0027\u0022\u0027) \u0026\u0026 raw.ends_with(\u0027\u0022\u0027)) || (raw.starts_with(\u0027\\\u0027\u0027) \u0026\u0026 raw.ends_with(\u0027\\\u0027\u0027)))\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-tools/src/linkedin_client.rs, crates/zeroclaw-tools/src/pushover.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/zeroclaw-tools/src/linkedin_client.rs"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"19308cd353b5460b1a741295196513d4d4a3271fde716ad38352c1149c7749cf"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060reference.starts_with(\u0022http://\u0022) || reference.starts_with(\u0022https://\u0022)\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-api/src/media.rs, crates/zeroclaw-providers/src/multimodal.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/zeroclaw-api/src/media.rs"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ffb46c0357722878da027a57ba8a59e38350b23fb63add6293497f8f6bfa53a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060request.tools \u0026\u0026 !tools.is_empty() \u0026\u0026 !self.supports_native_tools()\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-api/src/model_provider.rs, crates/zeroclaw-providers/src/gemini.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/zeroclaw-api/src/model_provider.rs"},"region":{"startLine":871}}}],"partialFingerprints":{"codehealthFindingId/v1":"f365dcb15b63e8bf918be116965ceac9d0169a5b665a638d2371cc67c1f38f69"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060response.content_length() \u0026\u0026 content_length \u003E max_bytes\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-channels/src/util.rs, crates/zeroclaw-providers/src/compatible.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/zeroclaw-channels/src/util.rs"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"1117648bfe9de5d85ad4b9d7c247445554c9101b2cc09cb961ef419de94414be"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060response.prompt_eval_count.is_some() || response.eval_count.is_some()\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-providers/src/hailo_ollama.rs, crates/zeroclaw-providers/src/ollama.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/zeroclaw-providers/src/hailo_ollama.rs"},"region":{"startLine":1212}}}],"partialFingerprints":{"codehealthFindingId/v1":"f99ace620e4a2d6776a22721aa2bbe92dca0c00c9b7cb219fb7f27e2ceaec8d8"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060selected.is_none() \u0026\u0026 std::time::Instant::now() \u003C deadline\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-runtime/src/agent/agent.rs, crates/zeroclaw-runtime/src/sop/executor.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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":15712}}}],"partialFingerprints":{"codehealthFindingId/v1":"b940429541739dc7b42535314b35c56dca228c53b4a9a075a4994c3b6044282e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.allowed_domains.is_empty() \u0026\u0026 self.allowed_private_hosts.is_empty()\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-tools/src/browser.rs, crates/zeroclaw-tools/src/browser_open.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/zeroclaw-tools/src/browser.rs"},"region":{"startLine":473}}}],"partialFingerprints":{"codehealthFindingId/v1":"d51fbf16d99acc91ab111e8c15d70e5c1db8cef133ca6fea23f5e63f29ff744f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060since \u0026\u0026 chrono::DateTime::parse_from_rfc3339(s).is_err()\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-tools/src/discord_search.rs, crates/zeroclaw-tools/src/memory_recall.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/zeroclaw-tools/src/discord_search.rs"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"db67ee563eb9ce4cc7e5d5611f95f4ffcaa3b5a672ddbf9af8e08324cacdb7e4"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060status != libc::ERANGE || capacity \u003E= 1024 * 1024\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-config/src/platform/native.rs, crates/zeroclaw-runtime/src/live_config_authority.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/zeroclaw-config/src/platform/native.rs"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"7945f973038a47d0a2efced15ef4c80dbee40ef9101e5e6e55298b2b848d1b3b"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060status.is_client_error() \u0026\u0026 code != 429 \u0026\u0026 code != 408\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-providers/src/auth/mod.rs, crates/zeroclaw-providers/src/reliable.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/zeroclaw-providers/src/auth/mod.rs"},"region":{"startLine":871}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b6b9a0ea75a29f24a883c56ab08c27ff75f37489c183b49d520fecea10cb73c"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060target.starts_with(\u0022data:\u0022) || target.starts_with(\u0022file:\u0022)\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-channels/src/discord/markers.rs, crates/zeroclaw-channels/src/matrix.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/zeroclaw-channels/src/discord/markers.rs"},"region":{"startLine":807}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a11e63881973a7d00306ad392a7f77d43353c56b004dd9093e9a96920122e2b"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060target.starts_with(\u0022http://\u0022) || target.starts_with(\u0022https://\u0022)\u0060 appears character-identically in 6 files \u2014 crates/zeroclaw-channels/src/discord/markers.rs, crates/zeroclaw-channels/src/matrix.rs, crates/zeroclaw-channels/src/qq.rs, crates/zeroclaw-channels/src/telegram.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/zeroclaw-channels/src/discord/markers.rs"},"region":{"startLine":788}}}],"partialFingerprints":{"codehealthFindingId/v1":"a78e4507a8c362695f4ad208fe3e6742b021dcfca52780391ff1f1292bfb4be1"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060text.is_empty() || text.trim().is_empty()\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-runtime/src/agent/loop_.rs, crates/zeroclaw-tool-call-parser/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/zeroclaw-runtime/src/agent/loop_.rs"},"region":{"startLine":16870}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6b493ae526e0c8687ba5dcdf22c3527598a72fdc328f546288751a4043d803f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060thinking.is_empty() \u0026\u0026 signature.is_empty()\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-providers/src/anthropic.rs, crates/zeroclaw-providers/src/compatible.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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"249e74ffbaa56b96d0f1993bcf7a0bd562fa18ef4df379429ac5b3d2508d1ab7"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060tools_count \u003E 0 \u0026\u0026 policy == zeroclaw_api::model_provider::ToolRoundPolicy::Single \u0026\u0026 self.supports_single_tool_rounds(model)\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-providers/src/anthropic.rs, crates/zeroclaw-providers/src/openai.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/zeroclaw-providers/src/anthropic.rs"},"region":{"startLine":3045}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e5e8bd2eee97a5efb66005ef5ed2c468c5a951496243d042509f994656af0e4"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060trimmed.is_empty() || trimmed.contains(\u0027\\n\u0027)\u0060 appears character-identically in 3 files \u2014 apps/zerocode/src/clipboard.rs, crates/zeroclaw-channels/src/telegram.rs, crates/zeroclaw-channels/src/wechat.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":"apps/zerocode/src/clipboard.rs"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c6b00957e6a236dd40ca6b77a5527b8aa745d279086df47afec1c09f46c6ae8"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060trimmed.is_empty() || trimmed.eq_ignore_ascii_case(\u0022c\u0022) || trimmed.eq_ignore_ascii_case(\u0022posix\u0022)\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-runtime/src/i18n.rs, crates/zeroclaw-tools/src/i18n.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/zeroclaw-runtime/src/i18n.rs"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1e76e77dc2431ee852c9a91f13a4cfc0cbf1ae1dd82deebbee41d4e25577551"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060trimmed.is_empty() || trimmed.starts_with(\u0027#\u0027)\u0060 appears character-identically in 3 files \u2014 crates/zeroclaw-runtime/src/migration.rs, crates/zeroclaw-runtime/src/skills/testing.rs, tools/fill-translations/src/main.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/zeroclaw-runtime/src/migration.rs"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"a518808d2fbdea14ecccc1f455df8fb0e1df746c496443f0eddcb40b40b44990"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060trimmed.is_empty() || trimmed.starts_with(\u0027#\u0027) || trimmed.starts_with(\u0027-\u0027)\u0060 appears character-identically in 3 files \u2014 apps/zerocode/src/i18n.rs, crates/zeroclaw-runtime/src/i18n.rs, crates/zeroclaw-tools/src/i18n.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":"apps/zerocode/src/i18n.rs"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"790f692902c898b770011973ef299fd1d39ee5d218da61c136a8ac9dfa335ad1"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060trimmed.starts_with(\u0027#\u0027) || trimmed.is_empty()\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-tools/src/linkedin_client.rs, xtask/src/cmd/mdbook/protected.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/zeroclaw-tools/src/linkedin_client.rs"},"region":{"startLine":757}}}],"partialFingerprints":{"codehealthFindingId/v1":"201fb951a0f10df6eb3e8b79809ffa7c50519d3c75370a8f8463e4fec6348537"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060trimmed.starts_with(\u0027\u003C\u0027) \u0026\u0026 trimmed.ends_with(\u0027\u003E\u0027)\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-channels/src/email_channel.rs, crates/zeroclaw-channels/src/slack.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/zeroclaw-channels/src/email_channel.rs"},"region":{"startLine":1008}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd559884891dd68f6baca68d633118af3b9f16b8d9b9e6f038e0d1f1c6c66b8f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060trimmed.starts_with(\u0027{\u0027) || trimmed.starts_with(\u0027[\u0027)\u0060 appears character-identically in 3 files \u2014 crates/zeroclaw-runtime/src/agent/turn/stream_guard.rs, crates/zeroclaw-runtime/src/tools/cron_common.rs, crates/zeroclaw-tool-call-parser/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/zeroclaw-runtime/src/agent/turn/stream_guard.rs"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"35072f5d7a95fd2f126b9a27ba9f24bf1a895b93d407ce5635b1390bdcfd7a1b"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060until \u0026\u0026 chrono::DateTime::parse_from_rfc3339(u).is_err()\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-tools/src/discord_search.rs, crates/zeroclaw-tools/src/memory_recall.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/zeroclaw-tools/src/discord_search.rs"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"6db7a85c5d102d95e47aadbd3f214d38bd22b999efc47af5dace493a298c66d9"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060url.query().is_some() || url.fragment().is_some()\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-providers/src/hailo_ollama.rs, src/relay_cli.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/zeroclaw-providers/src/hailo_ollama.rs"},"region":{"startLine":316}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6be9f052fd5ef7d821f10d9b3fdf90bd0650785ef0d0171cddc6b4aa5d54758"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060url.starts_with(\u0022http://\u0022) || url.starts_with(\u0022https://\u0022)\u0060 appears character-identically in 3 files \u2014 crates/zeroclaw-channels/src/telegram.rs, crates/zeroclaw-providers/src/lib.rs, crates/zeroclaw-tool-call-parser/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/zeroclaw-channels/src/telegram.rs"},"region":{"startLine":6272}}}],"partialFingerprints":{"codehealthFindingId/v1":"e71770f29eb8431be79c24064e6e70823dd776a3332848820bcb0357d00687c7"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060usage.input_tokens \u003E 0 || usage.output_tokens \u003E 0\u0060 appears character-identically in 2 files \u2014 crates/zeroclaw-runtime/src/agent/agent.rs, crates/zeroclaw-runtime/src/agent/loop_.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/zeroclaw-runtime/src/agent/agent.rs"},"region":{"startLine":4728}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bf07d51b287d0d6d83a196beeabb84689d1bcf89226874ef09f5c0f51246e9c"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060warn!\u0060 at line 266 is handed a format string with \u0060{\u2026}\u0060 values in it, so tracing records one finished \u0060message\u0060 field \u2014 the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: \u0060warn!(order_id = %order_id, status = ?status, \u0022order status updated\u0022)\u0060 (\u0060%\u0060 records a value by its \u0060Display\u0060, \u0060?\u0060 by its \u0060Debug\u0060, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: \u0060error = %err\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-log/src/writer.rs"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"979e2b58a035c9f9f53073b4bd1156150dc9b5aa3c5506fcb7dca44cd960c696"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060warn!\u0060 at line 292 is handed a format string with \u0060{\u2026}\u0060 values in it, so tracing records one finished \u0060message\u0060 field \u2014 the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Record the values as fields beside a constant message instead: \u0060warn!(order_id = %order_id, status = ?status, \u0022order status updated\u0022)\u0060 (\u0060%\u0060 records a value by its \u0060Display\u0060, \u0060?\u0060 by its \u0060Debug\u0060, a bare name as itself), which a JSON subscriber, OpenTelemetry or a log store keeps as queryable keys. An error goes in as a field too: \u0060error = %err\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-log/src/writer.rs"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f4ba9cde154757062550980d79af492bdb3e3e053d9bb812159fdfdb85ef9bd"}},{"ruleId":"X6","level":"note","message":{"text":"Hand-rolled JSON/XML parsing via regex: A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand \u2014 malformed or differently-typed content (e.g. \u0060\u0022amount\u0022: \u00225\u0022\u0060 as a string) silently mis-parses instead of failing validation. This Rust code already uses a real parser in the same package; use it here too."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/zeroclaw-tool-call-parser/src/lib.rs"},"region":{"startLine":669}}}],"partialFingerprints":{"codehealthFindingId/v1":"2061802d811a12aa1303eae6422da92c2e561b4356242be75390934c3c825e21"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on parse failure: \u0060_read_lines\u0060 returns \u0060[]\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/ci/check_internal_docs_links.py"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"68c962e6b4cbe3a522cf6655169207c6d63e96583961b1772aa5e8025a82ab8b"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on parse failure: \u0060emit_package_args\u0060 returns \u00602\u0060 when \u0060json.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/ci/windows_test_scope.py"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4bd5f6c25179f7c8d00424c91813cdf486f386cd8d558b92fc3707a6dd4b56d"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060bound_trigger_detail\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":"apps/zerocode/src/sop_pane.rs"},"region":{"startLine":2200}}}],"partialFingerprints":{"codehealthFindingId/v1":"12e9b6313444d1639e76225211e109d6179f4aaf194ec63398878002f5eb018b"}},{"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/zeroclaw-channels/src/discord_slash_state.rs"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"81cb8acba50339b36cde385013bf69c91aa8e5c5a0f41ea5534d7c0870dcaddb"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060multi_message_confirmed_offset\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/zeroclaw-channels/src/matrix.rs"},"region":{"startLine":4933}}}],"partialFingerprints":{"codehealthFindingId/v1":"72b08f1737ac30d83640bcf8be22e2155d2dda278d6cb68d8c84228d237b2427"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060redact_raw_slack_url\u0060 turns every \u0060Err\u0060 into \u0060\u0022\u003Cinvalid-url\u003E\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/zeroclaw-channels/src/slack.rs"},"region":{"startLine":2786}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a8c6db740717c17db61c02d4584370cad028ad2c6921fc01b10f91665ed756a"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060unknown_keys\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/zeroclaw-config/src/schema.rs"},"region":{"startLine":23295}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ce3e30f09c762a4cc019a628845013b0c4b3d716d29c9f87b93dd31e8291451"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060unknown_provider_families\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/zeroclaw-config/src/schema.rs"},"region":{"startLine":23343}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e83cd10d8b877ddf3d40c6b3530fd0555957985f8801312d4e571d61a8396a8"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060extra_nested_model_provider_tables\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/zeroclaw-config/src/schema.rs"},"region":{"startLine":23384}}}],"partialFingerprints":{"codehealthFindingId/v1":"b102ccd30d72848a5cfbe121b81128f3660d8570828be1bf052887d6065bb88d"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060enum_variants\u0060 turns every \u0060Err\u0060 into \u0060\u0022(unknown variants)\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/zeroclaw-config/src/helpers.rs"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"868f669ad79740e634144357ac5e03d2221fc4798817e6d94a33d0b680e38674"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060object_array_json_display_value\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/zeroclaw-config/src/helpers.rs"},"region":{"startLine":360}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e5e8df523131488a975d8a4154a357f6b0a4912202cc51530a702be20450d67"}},{"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/zeroclaw-eval/src/report.rs"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"06ca55fcdd560fc9a139218a307f8c03e0bd8bdf6fb625fe9f5e992c00e32b71"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060exposed_skills\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/zeroclaw-gateway/src/a2a.rs"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"933b431130ea079a93168e1f2bb169e76a5f5d8dd930d84c53aa2992a58ae5dc"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060list_datasheets\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/zeroclaw-hardware/src/datasheet.rs"},"region":{"startLine":403}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d1f56dc6893fb64c686d6bc9e3f502279093ecd1efc9f83c46706267326c927"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060get_ip_address\u0060 turns every \u0060Err\u0060 into \u0060\u0022unknown\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/zeroclaw-hardware/src/rpi.rs"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0ed573e1c0d8c5505786271d38725bef8312d8ff0d0ae4c59c7049cc920e75b"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060load\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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":943}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3a7840bcc3341970f7c9969ec9b70c7e34953090de4ff1b997d6231c71f29f0"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060load_with_timestamps\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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":988}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ef5d48ff0139178640d6ea09837bbd7badc4ec61145b7d9d2b8f8a5761aa913"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060list_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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":1217}}}],"partialFingerprints":{"codehealthFindingId/v1":"c077f094c722b00274232efe412964f441a2be4b45ef28feb579c3bdd3e07012"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060list_sessions_with_metadata\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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":1235}}}],"partialFingerprints":{"codehealthFindingId/v1":"a733a2fa7c76b7b3f4ffb42da31115796c682951d6dc55bfb404bcc4b12c8608"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060list_running_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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":1642}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d95c3944ac80a10a7a6c2f9877f4f23e2eeef368aa3757f7039692df44c6975"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060list_stuck_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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":1694}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf0501d9019968f535e36a40ebfb7205e98c30686df1c5b3411f2cf4a7830c9a"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060search\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/zeroclaw-infra/src/session_sqlite.rs"},"region":{"startLine":1752}}}],"partialFingerprints":{"codehealthFindingId/v1":"03621391e1813015de4dc731ceeff9f6693987b63a370f7407f13b843cad0949"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060list_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/zeroclaw-infra/src/session_store.rs"},"region":{"startLine":371}}}],"partialFingerprints":{"codehealthFindingId/v1":"28b0379427ab852063e2a740eda23e7e2819801d81c08c8940fae90a271374e1"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060recency_factor\u0060 turns every \u0060Err\u0060 into \u00601.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/zeroclaw-memory/src/rerank.rs"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e10eaf3993ad87f6a1ed10a52a9cb60bba56c7e18d26016d5e9e48b3a4e588b"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060migrate_plugins_dir\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/zeroclaw-plugins/src/host.rs"},"region":{"startLine":3408}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f123e698c52eab453d95f9f364b4e2cbf6f493a6f0eee3e631eae7544fc4990"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060http_client\u0060 turns every \u0060Err\u0060 into \u0060Client::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/zeroclaw-providers/src/openai.rs"},"region":{"startLine":1259}}}],"partialFingerprints":{"codehealthFindingId/v1":"942d1571f913a1b51d8db319fecc82be219724ed060ae5dd68b5e1bd8df1b746"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060streaming_client\u0060 turns every \u0060Err\u0060 into \u0060Client::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/zeroclaw-providers/src/openai.rs"},"region":{"startLine":1289}}}],"partialFingerprints":{"codehealthFindingId/v1":"14925cab369039bdf0d8ed66b3b22b07f9d8f47876fa69ba562a62d5f310bb35"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060assistant_tool_call_names\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/zeroclaw-runtime/src/agent/history_trim.rs"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9da6823465320ffdf1506aa3b640148b53ad022a31f6db016a9eaf159b8186f"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060load_jsonl_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/zeroclaw-runtime/src/daemon/mod.rs"},"region":{"startLine":3148}}}],"partialFingerprints":{"codehealthFindingId/v1":"c87627d9888f545440f4b76a6e588a1f8080d2bc6b42e1dac02fb572531d5c68"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060check_codex_auth_wiring\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/zeroclaw-runtime/src/doctor/mod.rs"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"0983475235b3f5441c9b1f595428b69dc1755bd2bc790a9d7860067a754a9909"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060list_open_skill_names\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/zeroclaw-runtime/src/skills/mod.rs"},"region":{"startLine":3130}}}],"partialFingerprints":{"codehealthFindingId/v1":"4be7c7668b0d022e3586afda51c0153e9ee1ca8ffdced0f9f12eb37756477bf3"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060prompt_value\u0060 turns every \u0060Err\u0060 into \u0060\u0022\\\u0022\u003Cinvalid\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/zeroclaw-runtime/src/tools/send_message_to_peer.rs"},"region":{"startLine":780}}}],"partialFingerprints":{"codehealthFindingId/v1":"7369ecf3abdcc4d7175aa30e200bad284e4ad3a963db65b19ec5b933f650287f"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060proxy_url_for_display\u0060 turns every \u0060Err\u0060 into \u0060\u0022[REDACTED]\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/zeroclaw-tools/src/proxy_config.rs"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"504bb05d51176dad63d5c05c6b84ea2225f7bce5b25fb2ce5152ba9f8d101d2a"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060AgentChatInner\u0060 swallows every exception into \u0060return false\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":"web/src/pages/AgentChat.tsx"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"526e1af870c651dd978d630fb8f12e69eea6b67b5875aba0dfb18d55928b9454"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060browserProvidedTimezone\u0060 swallows every exception into \u0060return \u0027\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":"web/src/pages/Cron.tsx"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"f87a35f569cb895130b42886d96888b3a03bc5752a9e7cc3286468430a8a498d"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060parseInput\u0060 swallows every exception into \u0060return []\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":"web/src/components/sections/FieldForm.tsx"},"region":{"startLine":405}}}],"partialFingerprints":{"codehealthFindingId/v1":"6959111e52df5c6010dbcf2fc526fc97b428c4964e1c66a135ea4a4d18aa59c3"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060argsEntries\u0060 swallows every exception into \u0060return []\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":"web/src/pages/SopCanvas.tsx"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"54206212f9166bae47272b621222cada7a8e0858fbdc140bcffe11c1ac8902fe"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060agentBoundChannels\u0060 swallows every exception into \u0060return []\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":"web/src/lib/agentChannels.ts"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"17a72f632452a90ccf7cb95dd38511b0f32c74d51e443426ac6340777efaaf2a"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060loadChatHistory\u0060 swallows every exception into \u0060return []\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":"web/src/lib/chatHistoryStorage.ts"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"a53e8b8f852d3b9173fad9102b5a50f5070bc7787e59401ba5569b82ba865e8d"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060loadEntities\u0060 swallows every exception into \u0060return []\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":"web/src/lib/configSearch.ts"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"65b4ffe67066cace48255100095bc99eaad5f76316654487ba4cda765ae0a3b8"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default in catch: \u0060loadPersisted\u0060 swallows every exception into \u0060return {}\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":"web/src/pages/chatWorkspace.state.ts"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"537d098c8a8aea7eb2e3d5f68ac66d2c3052509af187f7313a1de6d952fdb3d8"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060text.contains(\u0022.jsonl\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060text.contains(\u0022.jsonl\u0022)\u0060 also satisfies \u0060text.contains(\u0022.json\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":"xtask/src/cmd/mdbook/protected.rs"},"region":{"startLine":681}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e6d5f9f15d48da0a7ad289ac44d29d7bdcb0909ccb2fa70be6f06f104377d23"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060key.ends_with(\u0022-long-about\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060key.ends_with(\u0022-long-about\u0022)\u0060 also satisfies \u0060key.ends_with(\u0022-about\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":"xtask/src/cmd/fluent/scan.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ec82802496e030c6c3e4d3cb5a492e4b5564e22db24d7db5e849baf6a11474c"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060err.contains(\u0022cancelled\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060err.contains(\u0022cancelled\u0022)\u0060 also satisfies \u0060err.contains(\u0022cancel\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/zeroclaw-tools/src/ask_user.rs"},"region":{"startLine":712}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebabc51e9816f1a6ebac3c05655da3af823d6b4ffb26802dbbef3b09a5de42b7"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060lower.contains(\u0022tool_call_id\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060lower.contains(\u0022tool_call_id\u0022)\u0060 also satisfies \u0060lower.contains(\u0022call_id\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/zeroclaw-tool-call-parser/src/lib.rs"},"region":{"startLine":584}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7a14776fdda2c72fc9d3b79281cbf95e3ed962a3f9569735c6654c2a1c05208"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060trimmed.contains(\u0022[TOOL_CALL]\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060trimmed.contains(\u0022[TOOL_CALL]\u0022)\u0060 also satisfies \u0060trimmed.contains(\u0022TOOL_CALL\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/zeroclaw-tool-call-parser/src/lib.rs"},"region":{"startLine":2644}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e5fa0fb29e943db8aa57f7ff57a7814368db0bf8813990c7f7b4b1f995255cc"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060prompt.contains(\u0022Shell: powershell\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060prompt.contains(\u0022Shell: powershell\u0022)\u0060 also satisfies \u0060prompt.contains(\u0022powershell\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/zeroclaw-runtime/src/tools/delegate.rs"},"region":{"startLine":15607}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab9bd914f11278f692b9ff20a102c72e68b526bc4922df4a2dae01afb79baec9"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060auth.contains(\u0022authorized to call (to attempt)\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060auth.contains(\u0022authorized to call (to attempt)\u0022)\u0060 also satisfies \u0060auth.contains(\u0022authorized to call\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/zeroclaw-runtime/src/agent/system_prompt.rs"},"region":{"startLine":1226}}}],"partialFingerprints":{"codehealthFindingId/v1":"995799ed1bf40f9c988e26016042b5e41a42d711bf9540c36dd49ddfc2acc2ec"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060lower.starts_with(\u0022https://\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060lower.starts_with(\u0022https://\u0022)\u0060 also satisfies \u0060lower.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/zeroclaw-channels/src/lark.rs"},"region":{"startLine":588}}}],"partialFingerprints":{"codehealthFindingId/v1":"cadbaf8af227e6cd8115eb9e07551ee33f707d1e94c551ae1c27bf0b7c3c0788"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060message.content.contains(\u0022\u003Ctool_calls\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060message.content.contains(\u0022\u003Ctool_calls\u0022)\u0060 also satisfies \u0060message.content.contains(\u0022\u003Ctool_call\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/zeroclaw-channels/src/whatsapp_web.rs"},"region":{"startLine":3692}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e49ad467490c3c44718514d49cfc4ac10d9cb45b1d2b31a7ee4d6c887ff3b03"}},{"ruleId":"X9","level":"note","message":{"text":"Subsumed condition operand: \u0060message.content.contains(\u0022\u003C/tool_calls\u0022)\u0060 can never decide this \u0060||\u0060 \u2014 every value satisfying \u0060message.content.contains(\u0022\u003C/tool_calls\u0022)\u0060 also satisfies \u0060message.content.contains(\u0022\u003C/tool_call\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/zeroclaw-channels/src/whatsapp_web.rs"},"region":{"startLine":3693}}}],"partialFingerprints":{"codehealthFindingId/v1":"c60703a534f3ad312d6a4e06afcc6bf8fa526c1be1623966866843310ae06299"}}],"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-1059","guid":"a2381a08-60f6-9554-a8b8-f3018cfaaca5","name":"Insufficient Technical Documentation","shortDescription":{"text":"Insufficient Technical Documentation"},"helpUri":"https://cwe.mitre.org/data/definitions/1059.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-191","guid":"31b5d115-a84b-875f-a016-48689827db3c","name":"CWE-191","shortDescription":{"text":"CWE-191"},"helpUri":"https://cwe.mitre.org/data/definitions/191.html"},{"id":"CWE-214","guid":"b10ad120-fb22-1351-9348-aa23b453e815","name":"CWE-214","shortDescription":{"text":"CWE-214"},"helpUri":"https://cwe.mitre.org/data/definitions/214.html"},{"id":"CWE-248","guid":"64b58946-d244-a556-a48a-f82fcd4f4186","name":"Uncaught Exception","shortDescription":{"text":"Uncaught Exception"},"helpUri":"https://cwe.mitre.org/data/definitions/248.html"},{"id":"CWE-250","guid":"52ee12e8-390a-7351-b1e6-388afa694e54","name":"CWE-250","shortDescription":{"text":"CWE-250"},"helpUri":"https://cwe.mitre.org/data/definitions/250.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-532","guid":"1cd8877a-76e8-ce54-b40b-779af23364a0","name":"Insertion of Sensitive Information into Log File","shortDescription":{"text":"Insertion of Sensitive Information into Log File"},"helpUri":"https://cwe.mitre.org/data/definitions/532.html"},{"id":"CWE-540","guid":"1a9db5db-e5bb-ae5d-935a-d1b4e9ee080b","name":"Inclusion of Sensitive Information in Source Code","shortDescription":{"text":"Inclusion of Sensitive Information in Source Code"},"helpUri":"https://cwe.mitre.org/data/definitions/540.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-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":"A01:2025","guid":"df693558-c822-0452-8f7b-4d53cb6bcc59","name":"Broken Access Control","shortDescription":{"text":"Broken Access Control"},"helpUri":"https://top10.owasp.org/2025/A01_2025-Broken_Access_Control/"},{"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/"},{"id":"A09:2025","guid":"78892bc9-3c98-495d-881c-8af1390d643c","name":"Security Logging \u0026 Alerting Failures","shortDescription":{"text":"Security Logging \u0026 Alerting Failures"},"helpUri":"https://top10.owasp.org/2025/A09_2025-Security_Logging_and_Alerting_Failures/"},{"id":"A10:2025","guid":"9ca3ab55-ca61-fd5e-b9ab-3dad2efa59d0","name":"Mishandling of Exceptional Conditions","shortDescription":{"text":"Mishandling of Exceptional Conditions"},"helpUri":"https://top10.owasp.org/2025/A10_2025-Mishandling_of_Exceptional_Conditions/"}]},{"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-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"}]}],"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":90,"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."]}]}