{"$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":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"id":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"id":"D24","name":"Comment Value","shortDescription":{"text":"Comment Value"},"helpUri":"https://codehealth.canine.dev/dimensions/D24"},{"id":"D26","name":"Project Cohesion","shortDescription":{"text":"Project Cohesion"},"helpUri":"https://codehealth.canine.dev/dimensions/D26"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"],"owasp":"A05:2025"}},{"id":"D30","name":"Dependency Vulnerabilities","shortDescription":{"text":"Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D30","relationships":[{"target":{"id":"CWE-1395","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-937","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1395","CWE-937"],"owasp":"A03:2025"}},{"id":"D31","name":"IaC \u0026 Container Security","shortDescription":{"text":"IaC \u0026 Container Security"},"helpUri":"https://codehealth.canine.dev/dimensions/D31","relationships":[{"target":{"id":"CWE-1032","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-732","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-16","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A02:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1032","CWE-732","CWE-16"],"owasp":"A02:2025"}},{"id":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"D36","name":"Supply-chain Provenance \u0026 Signing","shortDescription":{"text":"Supply-chain Provenance \u0026 Signing"},"helpUri":"https://codehealth.canine.dev/dimensions/D36","relationships":[{"target":{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1357","CWE-494"],"owasp":"A03:2025"}},{"id":"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":"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":"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":"AX8","name":"Test isolation","shortDescription":{"text":"Test isolation"},"helpUri":"https://codehealth.canine.dev/dimensions/AX8"},{"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":"ED5","name":"Idempotency","shortDescription":{"text":"Idempotency"},"helpUri":"https://codehealth.canine.dev/dimensions/ED5"},{"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":"P8","name":"Schema migrations","shortDescription":{"text":"Schema migrations"},"helpUri":"https://codehealth.canine.dev/dimensions/P8"},{"id":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"R1","name":"Type Safety","shortDescription":{"text":"Type Safety"},"helpUri":"https://codehealth.canine.dev/dimensions/R1"},{"id":"R10","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/R10"},{"id":"R11","name":"Import Boundaries","shortDescription":{"text":"Import Boundaries"},"helpUri":"https://codehealth.canine.dev/dimensions/R11"},{"id":"R2","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/R2"},{"id":"R3","name":"Large Files","shortDescription":{"text":"Large Files"},"helpUri":"https://codehealth.canine.dev/dimensions/R3"},{"id":"R4","name":"Test Coverage","shortDescription":{"text":"Test Coverage"},"helpUri":"https://codehealth.canine.dev/dimensions/R4"},{"id":"R5","name":"Dependency Freshness","shortDescription":{"text":"Dependency Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/R5"},{"id":"R6","name":"Tooling","shortDescription":{"text":"Tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/R6"},{"id":"R7","name":"Dead Code","shortDescription":{"text":"Dead Code"},"helpUri":"https://codehealth.canine.dev/dimensions/R7"},{"id":"R8","name":"Dependency Hygiene","shortDescription":{"text":"Dependency Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/R8"},{"id":"R9","name":"Circular Imports","shortDescription":{"text":"Circular Imports"},"helpUri":"https://codehealth.canine.dev/dimensions/R9"},{"id":"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":"X13","name":"Undrained process stream","shortDescription":{"text":"Undrained process stream"},"helpUri":"https://codehealth.canine.dev/dimensions/X13"},{"id":"X14","name":"Bypassable address classification","shortDescription":{"text":"Bypassable address classification"},"helpUri":"https://codehealth.canine.dev/dimensions/X14"},{"id":"X15","name":"Unvalidated length from an untrusted reader","shortDescription":{"text":"Unvalidated length from an untrusted reader"},"helpUri":"https://codehealth.canine.dev/dimensions/X15"},{"id":"X16","name":"Unfloored truncation loop","shortDescription":{"text":"Unfloored truncation loop"},"helpUri":"https://codehealth.canine.dev/dimensions/X16"},{"id":"X18","name":"Disposal-pattern correctness","shortDescription":{"text":"Disposal-pattern correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/X18"},{"id":"X19","name":"Unrestored process-global state","shortDescription":{"text":"Unrestored process-global state"},"helpUri":"https://codehealth.canine.dev/dimensions/X19"},{"id":"X20","name":"Mistyped argument guard","shortDescription":{"text":"Mistyped argument guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X20"},{"id":"X21","name":"Side-effecting pattern guard","shortDescription":{"text":"Side-effecting pattern guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X21"},{"id":"X22","name":"Contradicted release guard","shortDescription":{"text":"Contradicted release guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X22"},{"id":"X23","name":"Unguarded diagnostic materialisation","shortDescription":{"text":"Unguarded diagnostic materialisation"},"helpUri":"https://codehealth.canine.dev/dimensions/X23"},{"id":"X24","name":"Document value interpolated into markup unescaped","shortDescription":{"text":"Document value interpolated into markup unescaped"},"helpUri":"https://codehealth.canine.dev/dimensions/X24"},{"id":"X25","name":"Inert configuration knob","shortDescription":{"text":"Inert configuration knob"},"helpUri":"https://codehealth.canine.dev/dimensions/X25"},{"id":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"X27","name":"Collection changed while being enumerated","shortDescription":{"text":"Collection changed while being enumerated"},"helpUri":"https://codehealth.canine.dev/dimensions/X27"},{"id":"X28","name":"Index access outside its own emptiness guard","shortDescription":{"text":"Index access outside its own emptiness guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X28"},{"id":"X29","name":"Per-element action decided by a fixed element","shortDescription":{"text":"Per-element action decided by a fixed element"},"helpUri":"https://codehealth.canine.dev/dimensions/X29"},{"id":"X30","name":"Support guard that admits what it rejects","shortDescription":{"text":"Support guard that admits what it rejects"},"helpUri":"https://codehealth.canine.dev/dimensions/X30"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"X4","name":"Structured logging","shortDescription":{"text":"Structured logging"},"helpUri":"https://codehealth.canine.dev/dimensions/X4"},{"id":"X5","name":"Nullable reference types","shortDescription":{"text":"Nullable reference types"},"helpUri":"https://codehealth.canine.dev/dimensions/X5"},{"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":"ai_memory_store::writer::worker_loop (cyclomatic 152): ai_memory_store::writer::worker_loop has cyclomatic complexity 152 (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/ai-memory-store/src/writer.rs"},"region":{"startLine":4030}}}],"partialFingerprints":{"codehealthFindingId/v1":"be9dee9947383c27648b930700a0d59e0296f023dde2b7973a0846c268bd7eec"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::commands::hook::run_with_payload_in_home (cyclomatic 151): ai_memory_cli::commands::hook::run_with_payload_in_home has cyclomatic complexity 151 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/hook.rs"},"region":{"startLine":1557}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca2ef90c86dfed094a30bd080c660aedd3280270afb385148926e4bca92b4072"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::commands::run::run_once_with_wiring (cyclomatic 146): ai_memory_cli::commands::run::run_once_with_wiring has cyclomatic complexity 146 (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/ai-memory-cli/src/commands/run.rs"},"region":{"startLine":613}}}],"partialFingerprints":{"codehealthFindingId/v1":"f48930105b160c3510871dbe0ca123895869c4d740e82cd59e7c051fbd9b8a1a"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_hooks::router::process_authorized (cyclomatic 101): ai_memory_hooks::router::process_authorized 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":"crates/ai-memory-hooks/src/router.rs"},"region":{"startLine":4995}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e0dd476fb31028207f1ba4afa4309edcc1d49f3a5b66d19b60abb90628cfc3b"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::commands::install_hooks::run_with_hook_connection (cyclomatic 96): ai_memory_cli::commands::install_hooks::run_with_hook_connection has cyclomatic complexity 96 (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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":807}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cee3009f4f41daba0227cdb3757143a51b4ce18ab60f10a85ffe59d8d9959df"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::dispatch (cyclomatic 88): ai_memory_cli::dispatch has cyclomatic complexity 88 (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/ai-memory-cli/src/lib.rs"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f9a250dbfd8643a65ca84a3e9a4f725f2e6bd7756b80226883d2c8f68cf17c0"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::commands::hook_spool::drain_with_live_token (cyclomatic 82): ai_memory_cli::commands::hook_spool::drain_with_live_token has cyclomatic complexity 82 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/hook_spool.rs"},"region":{"startLine":1462}}}],"partialFingerprints":{"codehealthFindingId/v1":"bef7260fdebcbc717e22144a7f22e502b9ff16bd79b664ad742f911cab552233"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_importer::agentmemory::export::plan (cyclomatic 70): ai_memory_importer::agentmemory::export::plan has cyclomatic complexity 70 (threshold 15). Of this number, 69 points are the body\u0027s own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-importer/src/agentmemory/export.rs"},"region":{"startLine":665}}}],"partialFingerprints":{"codehealthFindingId/v1":"29649e0733a268f7160e3389d6f66bb21cd7ee2314045381fddcbc1a4a0b8fd1"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::commands::serve::run (cyclomatic 61): ai_memory_cli::commands::serve::run 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":"crates/ai-memory-cli/src/commands/serve.rs"},"region":{"startLine":1221}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6413154ee335a31bd558d2340cde448305d105e3ed8bb27497189968b012b63"}},{"ruleId":"D1","level":"warning","message":{"text":"ReaderPool::hybrid_search_inner (cyclomatic 59): ReaderPool::hybrid_search_inner has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/reader.rs"},"region":{"startLine":8730}}}],"partialFingerprints":{"codehealthFindingId/v1":"113fb1e67b4fe42d6e0c00e24afdd373fd72e937333e87261a78afce4cbbcddd"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::commands::backup_agents::discover_assets (cyclomatic 52): ai_memory_cli::commands::backup_agents::discover_assets 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/ai-memory-cli/src/commands/backup_agents.rs"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"7074bdf7a6251caa07cce28bc1e326591aaab40f506e6ddbd3803ff82fb39436"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::commands::uninstall::build_plan (cyclomatic 47): ai_memory_cli::commands::uninstall::build_plan 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/ai-memory-cli/src/commands/uninstall.rs"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"79adb776587633493c59ae7a803fcae138884236007c614ee53df14222dc6e50"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_consolidate::sweep::run_sweep_at (cyclomatic 47): ai_memory_consolidate::sweep::run_sweep_at has cyclomatic complexity 47 (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/ai-memory-consolidate/src/sweep.rs"},"region":{"startLine":604}}}],"partialFingerprints":{"codehealthFindingId/v1":"b425c96d398042842dc8865f68f67275868c0b7a47b5df5ca4db1174a7cdb03e"}},{"ruleId":"D1","level":"warning","message":{"text":"AiMemoryServer::memory_query (cyclomatic 43): AiMemoryServer::memory_query has cyclomatic complexity 43 (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/ai-memory-mcp/src/server.rs"},"region":{"startLine":3216}}}],"partialFingerprints":{"codehealthFindingId/v1":"734294f8c7aa95a2411395fb4035367fcf2dea67cd96b792eb9f0318b600d98e"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_workstream::transcript::export_jsonl_range (cyclomatic 43): ai_memory_workstream::transcript::export_jsonl_range 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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":1247}}}],"partialFingerprints":{"codehealthFindingId/v1":"8419bebf40f83ef6926e9e17cc9918e784ef51f4f70bab943b41926e80cee457"}},{"ruleId":"D1","level":"warning","message":{"text":"Config::load_with_runtime_env (cyclomatic 42): Config::load_with_runtime_env has cyclomatic complexity 42 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/config.rs"},"region":{"startLine":2477}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0f58468b670dd5aafaa2055da397b284b0efc2fb9605ea6c3c2006187dcf3c9"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::commands::serve::start_maintenance_scheduler (cyclomatic 41): ai_memory_cli::commands::serve::start_maintenance_scheduler has cyclomatic complexity 41 (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/ai-memory-cli/src/commands/serve.rs"},"region":{"startLine":2188}}}],"partialFingerprints":{"codehealthFindingId/v1":"0348de2b0714940a5c67d8fbf199d580b0349ed285dd9ac2fba690094ae0c143"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::commands::recovery::recover (cyclomatic 40): ai_memory_cli::commands::recovery::recover 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/ai-memory-cli/src/commands/recovery.rs"},"region":{"startLine":553}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ad9eb7b0c5cd8fa14daa4e22ac1a7c4f8a5d4cf24713e36d679d0550b97f2ed"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::commands::install_mcp::build_mcp_entry (cyclomatic 38): ai_memory_cli::commands::install_mcp::build_mcp_entry 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/ai-memory-cli/src/commands/install_mcp.rs"},"region":{"startLine":1802}}}],"partialFingerprints":{"codehealthFindingId/v1":"b80b2c555c21008952f57969a2b8318c947b5b5e5a31819237b0c4f01640631f"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_hooks::router::resolve_project_ids_inner (cyclomatic 38): ai_memory_hooks::router::resolve_project_ids_inner has cyclomatic complexity 38 (threshold 15). Of this number, 29 points are the body\u0027s own statements and 9 belong to 4 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/router.rs"},"region":{"startLine":4178}}}],"partialFingerprints":{"codehealthFindingId/v1":"261356fc55df379a999b716e20a0acbfb726de802890dc44a6bd91bb1a364d17"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_workstream::harness::build_launch_plan_with_env_lookup (cyclomatic 38): ai_memory_workstream::harness::build_launch_plan_with_env_lookup 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/ai-memory-workstream/src/harness.rs"},"region":{"startLine":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"8163c1e181b6689924ba67c334e05de7c1bacdf9082966ceed82e462981a50fd"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::commands::setup_agent::run (cyclomatic 37): ai_memory_cli::commands::setup_agent::run has cyclomatic complexity 37 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/setup_agent.rs"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3e465b50868efb8d23fd5ef6757e62d1113db3d24eb79a4754c807753377385"}},{"ruleId":"D1","level":"warning","message":{"text":"PageWriteMetadata::into_frontmatter (cyclomatic 37): PageWriteMetadata::into_frontmatter has cyclomatic complexity 37 (threshold 15). Of this number, 35 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":"crates/ai-memory-core/src/page.rs"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4e4e81274d4efaffdb95ba805a1e3ca6fb07c71f1a9cb3797c2d4bd5f7be576"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_hooks::capture_policy::has_unevaluated_expansion (cyclomatic 35): ai_memory_hooks::capture_policy::has_unevaluated_expansion has cyclomatic complexity 35 (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/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":3526}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d1c783f5dc0b618bd90b51a3d5dc1b492f434a218e2e100852868ba0bbf05c5"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_workstream::transcript::locate_session_file (cyclomatic 35): ai_memory_workstream::transcript::locate_session_file 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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":4036}}}],"partialFingerprints":{"codehealthFindingId/v1":"f48cf6a4c7de123c33b0c02a9f77b3f62000f8e158d02c496416fba4416f0cbc"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_importer::document::extract_xlsx_sheet_with_limit (cyclomatic 34): ai_memory_importer::document::extract_xlsx_sheet_with_limit 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":"companions/ai-memory-importer/src/document.rs"},"region":{"startLine":872}}}],"partialFingerprints":{"codehealthFindingId/v1":"52ea4b3bdbfd30248857308ff01436313bb32be2853ecc14e1584b09f816fc78"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_relay::relay::flush_locked (cyclomatic 34): ai_memory_relay::relay::flush_locked 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":"companions/ai-memory-relay/src/relay.rs"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ba70aad495f3106b89b7051067dc3d345e153bdd4e406ec80f93be7bed1441d"}},{"ruleId":"D1","level":"warning","message":{"text":"AiMemoryServer::write_page_in_scope (cyclomatic 33): AiMemoryServer::write_page_in_scope has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/server.rs"},"region":{"startLine":5139}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae9bf115adff1082764b0e025ac436daff5a17d6dac14c7f6c75dd666e2f24db"}},{"ruleId":"D1","level":"warning","message":{"text":"ReaderPool::audit_contamination (cyclomatic 31): ReaderPool::audit_contamination 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/ai-memory-store/src/reader.rs"},"region":{"startLine":13617}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dc5c597ad5a842b697c9c9e67dc4b8391868a3cb70545e44134750875b45218"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_hooks::capture_policy::tool_observation_outcome (cyclomatic 30): ai_memory_hooks::capture_policy::tool_observation_outcome 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/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":493}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6d942c2b5dfff44296e786b9f535d161321969c509fc46ddf6a1978c5ab3421"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_hooks::workstream::prepare_run (cyclomatic 30): ai_memory_hooks::workstream::prepare_run 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/ai-memory-hooks/src/workstream.rs"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d13a1b1c773536cd5fb21fd5cc77ca32e2f16fa5725ca03536811c24f303e74"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_web::routes::inbox::handler (cyclomatic 30): ai_memory_web::routes::inbox::handler 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/ai-memory-web/src/routes/inbox.rs"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3903854e8ac6f930032009b517bb030f77e209f39954facb9c923d4e3f427bd"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_wikisync::bidi::build_plan (cyclomatic 29): ai_memory_wikisync::bidi::build_plan 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":"companions/ai-memory-wikisync/src/bidi.rs"},"region":{"startLine":408}}}],"partialFingerprints":{"codehealthFindingId/v1":"90a3c6bb05a205555dac40de6acf29b4da066a5cfb4c9669a1e7e92c9401b977"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::commands::session_usage::read_live_calls (cyclomatic 29): ai_memory_cli::commands::session_usage::read_live_calls 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/ai-memory-cli/src/commands/session_usage.rs"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b8c4e72771b35d29a092ccafa5e3b302385328d787a6b1ddebbf4f4edfb3a4f"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_workstream::transcript::export_antigravity (cyclomatic 29): ai_memory_workstream::transcript::export_antigravity 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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":4892}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e3a088e6c5a6b27c381b566c9f43c4bdd53cbdd757f817bb8fb406cee54eae9"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::commands::install_mcp::run_with_opencode_dialect (cyclomatic 28): ai_memory_cli::commands::install_mcp::run_with_opencode_dialect has cyclomatic complexity 28 (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: ai_memory_cli::commands::install_mcp::mcp_config_path_with (cyclomatic 33) 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/ai-memory-cli/src/commands/install_mcp.rs"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"e966b69779e21d0650ab1e2e49a6fbed907f95ec2165cf3379ee8b8c54a2cdae"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_store::ops::admit_hook_session_event (cyclomatic 28): ai_memory_store::ops::admit_hook_session_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/ai-memory-store/src/ops.rs"},"region":{"startLine":3471}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd97d3002fb3f3a5ced155a86313203ebb32a6aa17961273acd04424f928c0e9"}},{"ruleId":"D1","level":"warning","message":{"text":"Wiki::merge_project (cyclomatic 28): Wiki::merge_project has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-wiki/src/wiki.rs"},"region":{"startLine":754}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e5fe3a97ab91369dbc2188a751f9651e5c95aa5ae4ef59d566e9648e0cdb0f7"}},{"ruleId":"D1","level":"warning","message":{"text":"client.metadataFromFrontmatter (cyclomatic 28): client.metadataFromFrontmatter has cyclomatic complexity 28 (threshold 15). Of this number, 23 points are the body\u0027s own statements and 5 belong to 3 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/src/client.ts"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"a286010a4d68a68a3cc52fe4663a67091a992927206683f539e4f9b722f05a09"}},{"ruleId":"D1","level":"warning","message":{"text":"CapturePolicy::inspect (cyclomatic 27): CapturePolicy::inspect 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/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":914}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf8cf9773c6e6234ab5d9cea99b125b56121828778e0db84e6ae51b1110fc187"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_hooks::capture_policy::extract (cyclomatic 27): ai_memory_hooks::capture_policy::extract 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/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":1362}}}],"partialFingerprints":{"codehealthFindingId/v1":"da4c1b03b6a0aad4efab234a76b1d7408876e5a21b5906f8e3de351ed64a4ed3"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_store::ops::merge_project (cyclomatic 27): ai_memory_store::ops::merge_project 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/ai-memory-store/src/ops.rs"},"region":{"startLine":8798}}}],"partialFingerprints":{"codehealthFindingId/v1":"f257500a49f545ad05f987bfa8aac4a0594192409b18bca9c8be92c2b8588d0e"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_wikisync::bidi::decide (cyclomatic 26): ai_memory_wikisync::bidi::decide 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":"companions/ai-memory-wikisync/src/bidi.rs"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f4faebb61c8dc76f5e46da61884e870a392f99ce33ff05bcad26a04e75faf5d"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_hooks::capture_policy::glob_walk_with (cyclomatic 26): ai_memory_hooks::capture_policy::glob_walk_with 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/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":2417}}}],"partialFingerprints":{"codehealthFindingId/v1":"45d3b261a2f13a3d459d5a225ccda9492dbc5b310a55c64713315090c2555086"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_hooks::router::fetch_and_accept_handoff_at (cyclomatic 26): ai_memory_hooks::router::fetch_and_accept_handoff_at 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/ai-memory-hooks/src/router.rs"},"region":{"startLine":2018}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dbf9b2ac6020056bfe61de59304b2df73ba1db2d2a1b4404448ed52a9fed587"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_web::routes::search::handler (cyclomatic 26): ai_memory_web::routes::search::handler 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/ai-memory-web/src/routes/search.rs"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d3b467e7006d6afe006169086f5a47c2db32f2a08b85cc025f018ec28619c47"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_workstream::harness::launch_mode (cyclomatic 26): ai_memory_workstream::harness::launch_mode 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":"crates/ai-memory-workstream/src/harness.rs"},"region":{"startLine":786}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b70b4de9a4d2749d667c23d4b50a8e9fa58baac884be3ddc26c63a19402b8ef"}},{"ruleId":"D1","level":"warning","message":{"text":"Config::embedder_config (cyclomatic 25): Config::embedder_config 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/ai-memory-cli/src/config.rs"},"region":{"startLine":3266}}}],"partialFingerprints":{"codehealthFindingId/v1":"da1495fbda42b31a473a898d145d8e604af6c30e3707552d62588084db6300bf"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::commands::restore_agents::run (cyclomatic 25): ai_memory_cli::commands::restore_agents::run has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/restore_agents.rs"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"91bf030334ddb7ff34584079195cd5cece2ebc55f449e306de51f948631c99da"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::commands::show::select_inner (cyclomatic 25): ai_memory_cli::commands::show::select_inner has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/show.rs"},"region":{"startLine":827}}}],"partialFingerprints":{"codehealthFindingId/v1":"64a199e34559a7d8052def0c37753ef4b1a8a8b516c44da120a1b063924398f2"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::commands::status::presentation::render (cyclomatic 25): ai_memory_cli::commands::status::presentation::render has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/status/presentation.rs"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"76eb72935cd4a1655a1d4839aacbddcc5715eeb719f0db2b79b4c1356f66f5e1"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_consolidate::sweep::plan_cold_cluster_dedup (cyclomatic 25): ai_memory_consolidate::sweep::plan_cold_cluster_dedup 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/ai-memory-consolidate/src/sweep.rs"},"region":{"startLine":1265}}}],"partialFingerprints":{"codehealthFindingId/v1":"900c472721fe0de3ef95754689415ca5320d4eded94e7a11faef94bb165916ee"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_hooks::capture_policy::tokenize (cyclomatic 25): ai_memory_hooks::capture_policy::tokenize 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/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":3718}}}],"partialFingerprints":{"codehealthFindingId/v1":"81499b54055df217c2c8ec7bb0c72a10af7ac4edd17c7517d54263dc4a14fc97"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_web::health::localized_checks (cyclomatic 25): ai_memory_web::health::localized_checks has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-web/src/health.rs"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b284282b429f53f0f9c4dd3f6f0f14a2aade4f74a5709cd989895687dd1ac51"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::commands::uninstall::generated_file_is_ours (cyclomatic 24): ai_memory_cli::commands::uninstall::generated_file_is_ours 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/ai-memory-cli/src/commands/uninstall.rs"},"region":{"startLine":1704}}}],"partialFingerprints":{"codehealthFindingId/v1":"0eb81a309a037efb99b789a7dc7c786864443240407700302ccb226ac7cc7c3c"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_hooks::capture_policy::output_spool (cyclomatic 24): ai_memory_hooks::capture_policy::output_spool 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/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":1643}}}],"partialFingerprints":{"codehealthFindingId/v1":"5429b9fde1a44491800d378e12dba37b7356d630510d0f976bbfca6b307ab90d"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_hooks::workstream::finish_run_inner (cyclomatic 24): ai_memory_hooks::workstream::finish_run_inner 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/ai-memory-hooks/src/workstream.rs"},"region":{"startLine":1183}}}],"partialFingerprints":{"codehealthFindingId/v1":"e30f9f131ee2c0b99e227bc99db9141937f73241b78e23cdd8bb0ab2475351ab"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_mcp::server::answer_sentence_suffix (cyclomatic 24): ai_memory_mcp::server::answer_sentence_suffix 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/ai-memory-mcp/src/server.rs"},"region":{"startLine":9478}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e613edcbbada68406f2b33f1dcea689bc83b267a7bed0d96c86f00a0bae811e"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_wiki::watcher::handle_event (cyclomatic 24): ai_memory_wiki::watcher::handle_event 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/ai-memory-wiki/src/watcher.rs"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bbbf19d0de7beb538e5899bd41c5e74d9d2ccf9065eae8fd99eb4583685afbb"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_eval::retrieval::run (cyclomatic 24): ai_memory_eval::retrieval::run 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":"evals/src/retrieval/mod.rs"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"c20d98d3d3502a35b7b9f2246dcc8fbb542f6dea8c607cbcb530a06296f38858"}},{"ruleId":"D1","level":"warning","message":{"text":"ScanContext::observe (cyclomatic 23): ScanContext::observe 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/ai-memory-cli/src/commands/session_usage_context.rs"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"d305642daf6a377bd61759d481db331a20221f23bcdf8de98e6971e2dc277fe5"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::commands::uninstall::run (cyclomatic 23): ai_memory_cli::commands::uninstall::run has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/uninstall.rs"},"region":{"startLine":864}}}],"partialFingerprints":{"codehealthFindingId/v1":"b513fdf3585be3204638359b8452138f36054f216294676b9d4b3b04082fdd00"}},{"ruleId":"D1","level":"warning","message":{"text":"AiMemoryServer::memory_read_page (cyclomatic 23): AiMemoryServer::memory_read_page 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/ai-memory-mcp/src/server.rs"},"region":{"startLine":5922}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bb620d3bf28e676e7923aab87314871381ed9360ff03d3cd954e0523c7d8f15"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_mcp::admin::copy_purge_merge (cyclomatic 23): ai_memory_mcp::admin::copy_purge_merge 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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":8609}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ea11ca73c247afbf82d3c220a57cd5fbd77c53e9e8487ec2dc8af964e1efc9a"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_mcp::page_patch::apply (cyclomatic 23): ai_memory_mcp::page_patch::apply 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/ai-memory-mcp/src/page_patch.rs"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"7556683c71fc3b3e00d73fe0b5a699d31a27c6fa612b69b57abc370f1b4b93d1"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_web::features::states (cyclomatic 23): ai_memory_web::features::states has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-web/src/features.rs"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"128f23a9c3b9ce9e014783393cb1827ce3b5037ef94eb7c0ec09d841f9278e1b"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_workstream::transcript::claude_continued_sessions (cyclomatic 23): ai_memory_workstream::transcript::claude_continued_sessions 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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":851}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c25d6eec4fa8ba232e817aba75140def975641d593f08d9d60bac4eafda894e"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_importer::agentmemory::apply_pages_batched (cyclomatic 22): ai_memory_importer::agentmemory::apply_pages_batched 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":"companions/ai-memory-importer/src/agentmemory/mod.rs"},"region":{"startLine":487}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8af508e182d4cdddb4fc4fd64b65791a2723f03822e927e733ee67d48b08807"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_importer::agentmemory::vault::plan (cyclomatic 22): ai_memory_importer::agentmemory::vault::plan 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":"companions/ai-memory-importer/src/agentmemory/vault.rs"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"859f902908f0c16e4ed17dfd3ca634d1a310a5739d0e314332f2f84f9450844b"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::commands::doctor::presentation::render (cyclomatic 22): ai_memory_cli::commands::doctor::presentation::render 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/ai-memory-cli/src/commands/doctor/presentation.rs"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"481d50b1919e8f4c59e08f2dfab4414495f385d851e62a776aa7772481ec4cdf"}},{"ruleId":"D1","level":"warning","message":{"text":"Bootstrap::process_sources (cyclomatic 22): Bootstrap::process_sources 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/ai-memory-consolidate/src/bootstrap.rs"},"region":{"startLine":436}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5c481706f59a49ae0c00c21304ca4e67aa4b8f010aa48345582e920587485a1"}},{"ruleId":"D1","level":"warning","message":{"text":"Consolidator::consolidate_session_multi_in_scope (cyclomatic 22): Consolidator::consolidate_session_multi_in_scope 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/ai-memory-consolidate/src/consolidator.rs"},"region":{"startLine":844}}}],"partialFingerprints":{"codehealthFindingId/v1":"089e7778ead5309f7ab9fdf496a54c56bb6adf0949df80f356cf3fc7f0a27585"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_consolidate::dream::run_dream_pass (cyclomatic 22): ai_memory_consolidate::dream::run_dream_pass 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/ai-memory-consolidate/src/dream.rs"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"87b1f1cdd26f64a50334b44f6ad69b98ff1656075fd438c85b2aff1c65b38635"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_consolidate::link_guard::unresolved_generated_links (cyclomatic 22): ai_memory_consolidate::link_guard::unresolved_generated_links 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/ai-memory-consolidate/src/link_guard.rs"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"77bfd6b944516a39fdf78dbff9d3ea26785b72d2f71abccb0cba16eb9459fafe"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_hooks::capture_policy::capture_lookup_locations (cyclomatic 22): ai_memory_hooks::capture_policy::capture_lookup_locations has cyclomatic complexity 22 (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":"crates/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":2076}}}],"partialFingerprints":{"codehealthFindingId/v1":"6850f1ca022ba21d9257bc446e0245a84f12319581b5c037fd948214d42c92d8"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_hooks::capture_policy::brace_overflow_could_leave (cyclomatic 22): ai_memory_hooks::capture_policy::brace_overflow_could_leave 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/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":2653}}}],"partialFingerprints":{"codehealthFindingId/v1":"faaf494d954963f2e2a22a5dd8e742d1846db3cd3238ecc15b254b2164db37d8"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_web::management::forms::submit (cyclomatic 22): ai_memory_web::management::forms::submit 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/ai-memory-web/src/management/forms.rs"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b2eb59a7a21a31739cd4bc5b0425aff72147ea05d24e8a9abdeeaeaa2e990f2"}},{"ruleId":"D1","level":"warning","message":{"text":"Wiki::apply_batch_inner (cyclomatic 22): Wiki::apply_batch_inner 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/ai-memory-wiki/src/wiki.rs"},"region":{"startLine":3328}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8620094e0debe83deb41a464aa3924598ac497909689ac5d6295c7c02fa0294"}},{"ruleId":"D1","level":"warning","message":{"text":"Transport.request (cyclomatic 22): Transport.request 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":"companions/ai-memory-ts/src/transport.ts"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"916f85e9787a7877f020238732e6b935479c582124feeac84b9912574abd360f"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_importer::document::xlsx_shared_strings (cyclomatic 21): ai_memory_importer::document::xlsx_shared_strings 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":"companions/ai-memory-importer/src/document.rs"},"region":{"startLine":807}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1af52277d322b004ac00b24f0adfb389c7ce15c24bbd814c806ffddd917c1bd"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::commands::uninstall::apply_change (cyclomatic 21): ai_memory_cli::commands::uninstall::apply_change 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/ai-memory-cli/src/commands/uninstall.rs"},"region":{"startLine":744}}}],"partialFingerprints":{"codehealthFindingId/v1":"25643ca931f18908b13a208a0ba97f8ef0f28127514328f65e94a1ec88c31c0a"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_consolidate::profile::converge (cyclomatic 21): ai_memory_consolidate::profile::converge 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/ai-memory-consolidate/src/profile.rs"},"region":{"startLine":1448}}}],"partialFingerprints":{"codehealthFindingId/v1":"34dbc91c030e6e513d3ae6fd6cf276e39a2c6869fa28bdc626bc37f2509b2c78"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_consolidate::profile::harvest_project (cyclomatic 21): ai_memory_consolidate::profile::harvest_project 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/ai-memory-consolidate/src/profile.rs"},"region":{"startLine":2235}}}],"partialFingerprints":{"codehealthFindingId/v1":"088f31931e20cfa31cae2876c3567e91d1c0583a89417e0279bbb2cc6cd21bf5"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_hooks::router::handle_hook_batch (cyclomatic 21): ai_memory_hooks::router::handle_hook_batch 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/ai-memory-hooks/src/router.rs"},"region":{"startLine":1203}}}],"partialFingerprints":{"codehealthFindingId/v1":"21acebf91b521c109b6752757fc501a055cefdcc042a18b580c22fdc5b0779e2"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_mcp::admin::move_session_batch (cyclomatic 21): ai_memory_mcp::admin::move_session_batch 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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":8323}}}],"partialFingerprints":{"codehealthFindingId/v1":"b563a7c48e8982cc897196d161e4dce5e2ce2fb4ed813ddae2c185ab3a2506c9"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_store::ops::resolve_project_by_identity (cyclomatic 21): ai_memory_store::ops::resolve_project_by_identity has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/ops.rs"},"region":{"startLine":847}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3c02f066ae02d1784e7931b23284d7976dceb39c7fd1b8e332f34c84fea92f8"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_workstream::transcript::parse_command_code (cyclomatic 21): ai_memory_workstream::transcript::parse_command_code 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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":2369}}}],"partialFingerprints":{"codehealthFindingId/v1":"f115a41f361291bf0af7ae81672eed67cf8bcec3eecf8e0a5e908dfc24095202"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_workstream::transcript::parse_opencode2 (cyclomatic 21): ai_memory_workstream::transcript::parse_opencode2 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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":6006}}}],"partialFingerprints":{"codehealthFindingId/v1":"9632d42b0b619acb5b700a6d202736a8745dee80a27b0133626a4c64a2e86f3a"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::commands::restore::stage_then_swap (cyclomatic 20): ai_memory_cli::commands::restore::stage_then_swap 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/ai-memory-cli/src/commands/restore.rs"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"adaf5e5822fe82463740e931f1f29e4d56a451d12e97893356ee2260d668cd8a"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_consolidate::auto_improve_schedule::run_auto_improve_scheduler_tick (cyclomatic 20): ai_memory_consolidate::auto_improve_schedule::run_auto_improve_scheduler_tick 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/ai-memory-consolidate/src/auto_improve_schedule.rs"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"b86c40c2e837af61498a42ec24e8d086d56544b5761d25b95055df3bd0586532"}},{"ruleId":"D1","level":"warning","message":{"text":"ReaderPool::observation_stream_votes (cyclomatic 20): ReaderPool::observation_stream_votes 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/ai-memory-store/src/reader.rs"},"region":{"startLine":4528}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e0b8c2aca23d78d90ad42402740e5d031bae066758063d67bd9d043d16b29ca"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_store::workstream::finish_run_inner (cyclomatic 20): ai_memory_store::workstream::finish_run_inner 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/ai-memory-store/src/workstream.rs"},"region":{"startLine":1396}}}],"partialFingerprints":{"codehealthFindingId/v1":"85f741bab716b83399865704f1c25ecb5180c3e38d2ff6ec76497eebd75496bc"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::commands::hook_capture::build_marker_query_suffix (cyclomatic 19): ai_memory_cli::commands::hook_capture::build_marker_query_suffix 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/ai-memory-cli/src/commands/hook_capture.rs"},"region":{"startLine":765}}}],"partialFingerprints":{"codehealthFindingId/v1":"f42d60ecc88d003a26bfbf9c283c207b8d4d104cfa0ecb93b0cd530e3c1382c9"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::commands::hook_spool::recover_stranded_temp_entries (cyclomatic 19): ai_memory_cli::commands::hook_spool::recover_stranded_temp_entries 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/ai-memory-cli/src/commands/hook_spool.rs"},"region":{"startLine":443}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ce6787f1787f57dc97fadfe62c9c0e75727a216fce02b44aab9754dc74bc697"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::commands::serve::run_session_consolidation_worker (cyclomatic 19): ai_memory_cli::commands::serve::run_session_consolidation_worker 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/ai-memory-cli/src/commands/serve.rs"},"region":{"startLine":1007}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f50dc1b6a4d326198f536c9148c07325b4f7ec069e9f1d6f06930c46175d884"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_consolidate::curator::run_curator_report_with_breadth (cyclomatic 19): ai_memory_consolidate::curator::run_curator_report_with_breadth 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/ai-memory-consolidate/src/curator.rs"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ae1739d6eae1ad78d2b619ec353d233f92d902bef5a7b6c48f509b35896d7e2"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_hooks::capture_policy::search_scope (cyclomatic 19): ai_memory_hooks::capture_policy::search_scope 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. This is NOT this file\u0027s highest cyclomatic complexity: ClassMember::admits (cyclomatic 22) 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/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":2250}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad519153d4bbe7e53887ffa927f19c80e2f7e071db6cb11c51bdac5bbd16f8f2"}},{"ruleId":"D1","level":"warning","message":{"text":"AiMemoryServer::memory_write_pages_batch (cyclomatic 19): AiMemoryServer::memory_write_pages_batch 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/ai-memory-mcp/src/server.rs"},"region":{"startLine":5504}}}],"partialFingerprints":{"codehealthFindingId/v1":"efa9411b5ff6b0827fbf32766e7e1cace135879699a1f8560365242422374a76"}},{"ruleId":"D1","level":"warning","message":{"text":"PageAuthority::from_stored (cyclomatic 19): PageAuthority::from_stored 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/ai-memory-store/src/reader.rs"},"region":{"startLine":525}}}],"partialFingerprints":{"codehealthFindingId/v1":"336aabe7dd6eb561bf0c6d709c390467761be0efd64821f3dd5a3baf8d2e244b"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_store::ops::accept_handoff_in_transaction (cyclomatic 19): ai_memory_store::ops::accept_handoff_in_transaction 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/ai-memory-store/src/ops.rs"},"region":{"startLine":5640}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f003ad9a57ff0c1b037e2fe228cee1ab8a76d3de04416823fe89cb20d0aa1d8"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_workstream::transcript::parse_kimi (cyclomatic 19): ai_memory_workstream::transcript::parse_kimi 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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":2145}}}],"partialFingerprints":{"codehealthFindingId/v1":"e14223031cfddd150571c9ee0b1423eea937038b5d98d6a72e5209c16f696697"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_workstream::transcript::session_header (cyclomatic 19): ai_memory_workstream::transcript::session_header 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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":4569}}}],"partialFingerprints":{"codehealthFindingId/v1":"2939b051ab19d835f63ba925264083fb4ceb45a0f4e7e28cd69be7a71a36f4d6"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_eval::abstention::validate_fixture (cyclomatic 19): ai_memory_eval::abstention::validate_fixture 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":"evals/src/abstention.rs"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"175b34ced6c2f059f98398002842a6d267cad21b5ae2483ba9dc787fa5a58554"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_importer::document::xml_text (cyclomatic 18): ai_memory_importer::document::xml_text 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":"companions/ai-memory-importer/src/document.rs"},"region":{"startLine":1247}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcfbefbde2825c04cbf0910238d28610d05a8917414ed3cfda15790434a07a10"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::commands::hook::foreign_decision_within (cyclomatic 18): ai_memory_cli::commands::hook::foreign_decision_within 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/ai-memory-cli/src/commands/hook.rs"},"region":{"startLine":2849}}}],"partialFingerprints":{"codehealthFindingId/v1":"411c38040e98a3360aecf3ec25737a200374526eb92c0674444975ea8145450c"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::commands::hook_spool::spool_entry_matches_session (cyclomatic 18): ai_memory_cli::commands::hook_spool::spool_entry_matches_session has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/hook_spool.rs"},"region":{"startLine":1087}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddbdf61f8de46afe00611a07eeadc63b5003d9a3f47732ad2c2676dc858a4c2a"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::commands::run_autowire::ensure_wired_with_env (cyclomatic 18): ai_memory_cli::commands::run_autowire::ensure_wired_with_env 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/ai-memory-cli/src/commands/run_autowire.rs"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"d750a0dc874ffc32398b1f0160a89c6f5b888a4c0f04cdcc6d29b8cee4a05d0d"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::commands::session_usage::locate_codex_rollout (cyclomatic 18): ai_memory_cli::commands::session_usage::locate_codex_rollout 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/ai-memory-cli/src/commands/session_usage.rs"},"region":{"startLine":618}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c003ce2a02ee6badc432cf609d397dcb770c62ef816d6c5555850c43816164b"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_hooks::capture_policy::extract_paths (cyclomatic 18): ai_memory_hooks::capture_policy::extract_paths has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: ClassMember::admits (cyclomatic 22) 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/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":1913}}}],"partialFingerprints":{"codehealthFindingId/v1":"caf9e74d82fdeeba7dbd1e24b9ec989c670bd101e47a310eb275f9c0f6bd0bcc"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_hooks::capture_policy::windows_spellings (cyclomatic 18): ai_memory_hooks::capture_policy::windows_spellings 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. This is NOT this file\u0027s highest cyclomatic complexity: ClassMember::admits (cyclomatic 22) 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/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":4435}}}],"partialFingerprints":{"codehealthFindingId/v1":"aada6761778e748d50c47139824f7fba4956dc2bfbc91f68f66897ce658213b0"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_hooks::workstream::list_recent_workstreams (cyclomatic 18): ai_memory_hooks::workstream::list_recent_workstreams 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/ai-memory-hooks/src/workstream.rs"},"region":{"startLine":795}}}],"partialFingerprints":{"codehealthFindingId/v1":"66ce3b654d8a0dfe6b631c8a776b78a95ad191e3f957d0faf1346652ed86a5a2"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_llm::openai_oauth::parse_sse_response (cyclomatic 18): ai_memory_llm::openai_oauth::parse_sse_response 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/ai-memory-llm/src/openai_oauth.rs"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e33edd97d5bef307c5c4e0c4b9cde6f917ea5a748f6e41553fcf3b11a372dcb"}},{"ruleId":"D1","level":"warning","message":{"text":"ReaderPool::diagnose_project_coordinate (cyclomatic 18): ReaderPool::diagnose_project_coordinate 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/ai-memory-store/src/reader.rs"},"region":{"startLine":13270}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ec59c559527fcc30cc0f14938a11b352f3f8166d6203cdec22475431312cd9a"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_web::knowledge::view (cyclomatic 18): ai_memory_web::knowledge::view 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/ai-memory-web/src/knowledge.rs"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bcb181ea36c5373db4230d4f56977430c1bf7c1ad00e9bff9186c546e5ad617"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_workstream::transcript::transcript_file (cyclomatic 18): ai_memory_workstream::transcript::transcript_file 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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":4251}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ffbf2769d57c140c7728bd778d4b80f68a55707a5a95bd295c555ed66c7873d"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_importer::run_omc (cyclomatic 17): ai_memory_importer::run_omc 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":"companions/ai-memory-importer/src/main.rs"},"region":{"startLine":429}}}],"partialFingerprints":{"codehealthFindingId/v1":"0180ed92de0f3a76a3ae895314c8a225c84145a1e134df15b3ac787c77b55fd6"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_importer::plan_external_conversation (cyclomatic 17): ai_memory_importer::plan_external_conversation 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":"companions/ai-memory-importer/src/main.rs"},"region":{"startLine":545}}}],"partialFingerprints":{"codehealthFindingId/v1":"609a1afc0207a6148dd4a68f68eb6bd013ae3a0313ec0fe36d3f7bfeab00dd96"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_wikisync::bidi::local_pages (cyclomatic 17): ai_memory_wikisync::bidi::local_pages 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":"companions/ai-memory-wikisync/src/bidi.rs"},"region":{"startLine":660}}}],"partialFingerprints":{"codehealthFindingId/v1":"be8d9d090d5d29b35db1e0dbc6165ffa085d43bb841a54d9dc04afad4b506d2e"}},{"ruleId":"D1","level":"warning","message":{"text":"TranscriptCapture::decide (cyclomatic 17): TranscriptCapture::decide 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/ai-memory-cli/src/commands/transcript_capture.rs"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"d88d59a08437eb66fbee1827cd07167ec40027af4d7d8be69dbc998daa15b64e"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_consolidate::embed::run_embedding_backfill (cyclomatic 17): ai_memory_consolidate::embed::run_embedding_backfill 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/ai-memory-consolidate/src/embed.rs"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"20f5faa1596a6429fa3194ab0ffe5b0f74ecc74edeb4958b07227697abcf9459"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_hooks::brief_tiers::assign_tiers (cyclomatic 17): ai_memory_hooks::brief_tiers::assign_tiers 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/ai-memory-hooks/src/brief_tiers.rs"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe0ee325d38ae1e63ffcba78aa2aa07c872528d1fbff7d713ae1b9ed812fb990"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_hooks::idle_end::run_idle_end_tick (cyclomatic 17): ai_memory_hooks::idle_end::run_idle_end_tick 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/ai-memory-hooks/src/idle_end.rs"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"805cc7849f50878289ad83a09c277e36ada4cbe58b9440c15387ad6b051607f5"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_hooks::router::render_interrupted_session_markdown (cyclomatic 17): ai_memory_hooks::router::render_interrupted_session_markdown 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/ai-memory-hooks/src/router.rs"},"region":{"startLine":2855}}}],"partialFingerprints":{"codehealthFindingId/v1":"91d970ea278692554e376756df285cc23ab7ab2476f295a6cafd0fd795956339"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_mcp::server::answer_evidence_order (cyclomatic 17): ai_memory_mcp::server::answer_evidence_order has cyclomatic complexity 17 (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":"crates/ai-memory-mcp/src/server.rs"},"region":{"startLine":9379}}}],"partialFingerprints":{"codehealthFindingId/v1":"28636d98a6fc777df08624fd3dacc053277214fcafe4c9f2625a962ce3b751cb"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_store::auto_improve::stage_run_impl (cyclomatic 17): ai_memory_store::auto_improve::stage_run_impl 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/ai-memory-store/src/auto_improve.rs"},"region":{"startLine":800}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8d29118db0e85f2d9140ee3db8cbe96d8f1d5f7d76dffdd0c4589e9562df226"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_store::ops::repair_session_times (cyclomatic 17): ai_memory_store::ops::repair_session_times 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/ai-memory-store/src/ops.rs"},"region":{"startLine":3166}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3b21a99c948c1f57f2fb429b75f77093e4138d203f8684b99509e4291079fd3"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_store::ops::purge_session_with_owner (cyclomatic 17): ai_memory_store::ops::purge_session_with_owner 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/ai-memory-store/src/ops.rs"},"region":{"startLine":7575}}}],"partialFingerprints":{"codehealthFindingId/v1":"e506bcd07f2765b6f2a7b7b4899e438292042c4d322b5e5088777ef21a0e5e66"}},{"ruleId":"D1","level":"warning","message":{"text":"AdmissionChain::run (cyclomatic 17): AdmissionChain::run has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-wiki/src/admission.rs"},"region":{"startLine":405}}}],"partialFingerprints":{"codehealthFindingId/v1":"d091b5c5abaff988066fcca2d2a8ff4d0e849edc16a1c420adf57a16d49e81c7"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_wiki::watcher::walk_project_dirs (cyclomatic 17): ai_memory_wiki::watcher::walk_project_dirs 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/ai-memory-wiki/src/watcher.rs"},"region":{"startLine":860}}}],"partialFingerprints":{"codehealthFindingId/v1":"a86fb9b0eccf2054cc1ef3b95058e389d2f5cee552364d441924c3867ac8a481"}},{"ruleId":"D1","level":"warning","message":{"text":"PagesNamespace.read (cyclomatic 17): PagesNamespace.read 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":"companions/ai-memory-ts/src/client.ts"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"37f93b5862f18f8424e7cd8dd6b8abca6d221c69bb496da4574c1abc929a57ca"}},{"ruleId":"D1","level":"warning","message":{"text":"AiMemoryClient.query (cyclomatic 17): AiMemoryClient.query 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":"companions/ai-memory-ts/src/client.ts"},"region":{"startLine":946}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a271024ac16b06d10269a6e2ee1b3274cd565a1ff4fa4575b1ccfbdbd65e089"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_importer::agentmemory::export::run (cyclomatic 16): ai_memory_importer::agentmemory::export::run has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-importer/src/agentmemory/export.rs"},"region":{"startLine":408}}}],"partialFingerprints":{"codehealthFindingId/v1":"275dc5ff8b32fcf580afb19fa562ec034802324bf2d5fb572823c7fac707ba85"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_wikisync::bidi::apply_plan (cyclomatic 16): ai_memory_wikisync::bidi::apply_plan 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":"companions/ai-memory-wikisync/src/bidi.rs"},"region":{"startLine":743}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c6ea0f0604ba91ea6ebc3f0888bed87fc5da9b87bf3540f4025dc1ea614c46f"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_wikisync::bidi::print_plan (cyclomatic 16): ai_memory_wikisync::bidi::print_plan 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":"companions/ai-memory-wikisync/src/bidi.rs"},"region":{"startLine":1023}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec169a7f4d0c57e3706d55d72d3e6e25cee92f10b4abbd35e433d9aadaabd786"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::commands::install_hooks::apply_to_zcode_hooks (cyclomatic 16): ai_memory_cli::commands::install_hooks::apply_to_zcode_hooks 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: ai_memory_cli::commands::install_hooks::infer_installed_mcp_config (cyclomatic 32) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":7597}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e517de37420717887c3941f08e302b0f777f87716bd54bb1b95e4d1087e0c92"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::commands::install_mcp::infer_owned_opencode_mcp_config (cyclomatic 16): ai_memory_cli::commands::install_mcp::infer_owned_opencode_mcp_config has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file\u0027s highest cyclomatic complexity: ai_memory_cli::commands::install_mcp::mcp_config_path_with (cyclomatic 33) 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/ai-memory-cli/src/commands/install_mcp.rs"},"region":{"startLine":1450}}}],"partialFingerprints":{"codehealthFindingId/v1":"191bafdf7a607f1bec24509f9810983cb00ddaa85c699233c06c3700f51f096c"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_cli::marker::inspect_scope_for (cyclomatic 16): ai_memory_cli::marker::inspect_scope_for 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/ai-memory-cli/src/marker.rs"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c56a139528d08cbac81096433833bfa06cbc2af98da004dc9ceca0b9c40a991"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_consolidate::auto_improve::apply_eval_gate_with_before_bodies (cyclomatic 16): ai_memory_consolidate::auto_improve::apply_eval_gate_with_before_bodies 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/ai-memory-consolidate/src/auto_improve.rs"},"region":{"startLine":918}}}],"partialFingerprints":{"codehealthFindingId/v1":"d47096a2c533d4dc8bb55e8a60b9388b7a2afc42010bf6940beb2b8590496576"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_consolidate::consolidator_frozen_oracle::project_observations (cyclomatic 16): ai_memory_consolidate::consolidator_frozen_oracle::project_observations 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: ai_memory_consolidate::consolidator_frozen_oracle::observation_score (cyclomatic 17) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c364b1be409fc1958e113bfabff59075353b46226982bb8ff5c40edd1f51261"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_consolidate::profile::converge_target (cyclomatic 16): ai_memory_consolidate::profile::converge_target has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/profile.rs"},"region":{"startLine":2552}}}],"partialFingerprints":{"codehealthFindingId/v1":"01eaf77a5c19795699cfe3121f1e754326952b65d8991b767f0e5cb2e82db976"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_consolidate::projection::project_from_rows (cyclomatic 16): ai_memory_consolidate::projection::project_from_rows 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: ai_memory_consolidate::projection::observation_score (cyclomatic 17) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/projection.rs"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"b30fb6ab4a4bd0a1673d25f84c231cc1def72b4fc1108c3ca492f0fab4e53255"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_hooks::antigravity::read_transcript_prompts (cyclomatic 16): ai_memory_hooks::antigravity::read_transcript_prompts 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/ai-memory-hooks/src/antigravity.rs"},"region":{"startLine":486}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6555d0297b1ca26d7aa09abffd146161439e8d2e7b330351415d6d7b7548ed2"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_hooks::capture_policy::runs_inline_code (cyclomatic 16): ai_memory_hooks::capture_policy::runs_inline_code has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file\u0027s highest cyclomatic complexity: ClassMember::admits (cyclomatic 22) 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/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":3455}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e87ef1f1680daf4ea6bf9fd2369c4f00bb56371dc5faa4105c9071da8e07b4f"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_hooks::capture_policy::glob_states (cyclomatic 16): ai_memory_hooks::capture_policy::glob_states 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. This is NOT this file\u0027s highest cyclomatic complexity: ClassMember::admits (cyclomatic 22) 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/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":4774}}}],"partialFingerprints":{"codehealthFindingId/v1":"d275272ef246f929b10a3b81d789b2da749a36163fb4d36951399c35197da84a"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_hooks::workstream::rename_workstream (cyclomatic 16): ai_memory_hooks::workstream::rename_workstream 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/ai-memory-hooks/src/workstream.rs"},"region":{"startLine":910}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef0d6c1aa2463b65a662076e44ae8e1addd1c361923c79c3520b26c007c8eb84"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_llm::factory::build_provider (cyclomatic 16): ai_memory_llm::factory::build_provider has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-llm/src/factory.rs"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c366ba7e1bf1118eabd466be6f82338647596194d1bc0d9b1b557735863e69b"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_mcp::admin::build_okf_bundle_file (cyclomatic 16): ai_memory_mcp::admin::build_okf_bundle_file 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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":1073}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fa6a44674dc4da2316209129213e68d693df1e998ef6280567fe1de0dfff426"}},{"ruleId":"D1","level":"warning","message":{"text":"ai_memory_mcp::human_auth::handle_change_password (cyclomatic 16): ai_memory_mcp::human_auth::handle_change_password 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/ai-memory-mcp/src/human_auth.rs"},"region":{"startLine":832}}}],"partialFingerprints":{"codehealthFindingId/v1":"030cccb00487c9ebfd487a75dcfd5730cbf8e3c39779e283e430c87c549e12fd"}},{"ruleId":"D1","level":"warning","message":{"text":"Walker::node (cyclomatic 16): Walker::node 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/ai-memory-wiki/src/frontmatter_yaml.rs"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6a0a1a1117860354380b26e649d10797fdcb700b696665cf223e3575caed3f6"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::hook::run_with_payload_in_home (cognitive 233): ai_memory_cli::commands::hook::run_with_payload_in_home has cognitive complexity 233 (threshold 15). Drivers by points: if/else 89 (158 pts), boolean chains 54, match/switch 11 (19 pts), loops 1 (2 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/ai-memory-cli/src/commands/hook.rs"},"region":{"startLine":1557}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d6672e37c8db2c6036c4f3dd2c93de96e5f32db56a7895b4a9d36d87ff9b18f"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::run::run_once_with_wiring (cognitive 196): ai_memory_cli::commands::run::run_once_with_wiring has cognitive complexity 196 (threshold 15). Drivers by points: if/else 84 (101 pts), match/switch 29 (49 pts), boolean chains 39, loops 6 (7 pts) (nesting depth added 38). 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/ai-memory-cli/src/commands/run.rs"},"region":{"startLine":613}}}],"partialFingerprints":{"codehealthFindingId/v1":"eab51f56bb914ab7ff1a03aecd3e463680f9d2417fbdccfb0c52f2c500a83435"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::hook_spool::drain_with_live_token (cognitive 182): ai_memory_cli::commands::hook_spool::drain_with_live_token has cognitive complexity 182 (threshold 15). Drivers by points: if/else 34 (101 pts), loops 10 (44 pts), match/switch 9 (30 pts), boolean chains 7 (nesting depth added 122). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/hook_spool.rs"},"region":{"startLine":1462}}}],"partialFingerprints":{"codehealthFindingId/v1":"a62760a5324d539f25153507902033e7267f91c3fa894676e63c5a0a3b39388b"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::router::process_authorized (cognitive 159): ai_memory_hooks::router::process_authorized has cognitive complexity 159 (threshold 15). Drivers by points: if/else 62 (103 pts), match/switch 19 (35 pts), boolean chains 20, loops 1 (nesting depth added 57). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/router.rs"},"region":{"startLine":4995}}}],"partialFingerprints":{"codehealthFindingId/v1":"9837d8ec8be35c0dd1f55e0189cf2e1b556f098723c499b07e7cc9765ca27687"}},{"ruleId":"D2","level":"warning","message":{"text":"ReaderPool::hybrid_search_inner (cognitive 121): ReaderPool::hybrid_search_inner has cognitive complexity 121 (threshold 15). Drivers by points: if/else 52 (97 pts), loops 12 (14 pts), boolean chains 6, match/switch 2 (4 pts) (nesting depth added 49). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/reader.rs"},"region":{"startLine":8730}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d11aeaa202f0a152a5243929625550e736d8d3651f4a979f54f75bdf1ecdd3b"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_importer::agentmemory::export::plan (cognitive 117): ai_memory_importer::agentmemory::export::plan has cognitive complexity 117 (threshold 15). Drivers by points: if/else 38 (78 pts), loops 23 (31 pts), match/switch 5 (7 pts), boolean chains 1 (nesting depth added 50). Of this number, 116 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":"companions/ai-memory-importer/src/agentmemory/export.rs"},"region":{"startLine":665}}}],"partialFingerprints":{"codehealthFindingId/v1":"eea2fd391e19998d183f7f95072c29cce7a4d7284bccf710701554e21cd9a4ed"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_consolidate::sweep::run_sweep_at (cognitive 113): ai_memory_consolidate::sweep::run_sweep_at has cognitive complexity 113 (threshold 15). Drivers by points: match/switch 15 (52 pts), if/else 17 (32 pts), loops 9 (27 pts), boolean chains 2 (nesting depth added 70). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own 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/ai-memory-consolidate/src/sweep.rs"},"region":{"startLine":604}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c1bbef89c9ae348ec4e97e4ff133af0ed88851709e65218ea35e786efb24f81"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::uninstall::build_plan (cognitive 99): ai_memory_cli::commands::uninstall::build_plan has cognitive complexity 99 (threshold 15). Drivers by points: if/else 30 (60 pts), loops 13 (31 pts), boolean chains 5, match/switch 1 (3 pts) (nesting depth added 50). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/uninstall.rs"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b70023665c9c5106a4bbd8daf8f08e523652013df69b3f873fe3ad15ab6cc05"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::serve::run (cognitive 93): ai_memory_cli::commands::serve::run has cognitive complexity 93 (threshold 15). Drivers by points: if/else 40 (60 pts), match/switch 11 (22 pts), boolean chains 11 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/serve.rs"},"region":{"startLine":1221}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bd2c903c81fb5e839d3d145717458288a6d9fcc8e238280ca7c653bd6c13835"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::backup_agents::discover_assets (cognitive 79): ai_memory_cli::commands::backup_agents::discover_assets has cognitive complexity 79 (threshold 15). Drivers by points: if/else 43 (71 pts), boolean chains 8 (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/ai-memory-cli/src/commands/backup_agents.rs"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4d7b30da97f2e1add05faef24e6d7c89b2dc7953bab58e6e4f44bf029936786"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_workstream::transcript::locate_session_file (cognitive 78): ai_memory_workstream::transcript::locate_session_file has cognitive complexity 78 (threshold 15). Drivers by points: if/else 28 (63 pts), loops 6 (15 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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":4036}}}],"partialFingerprints":{"codehealthFindingId/v1":"95e096092f521e6dd00176c873b9893542e3c109ae50c34153272e31dbf912b1"}},{"ruleId":"D2","level":"warning","message":{"text":"AiMemoryServer::memory_query (cognitive 73): AiMemoryServer::memory_query has cognitive complexity 73 (threshold 15). Drivers by points: if/else 30 (39 pts), match/switch 5 (16 pts), boolean chains 12, loops 2 (6 pts) (nesting depth added 24). 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/ai-memory-mcp/src/server.rs"},"region":{"startLine":3216}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a9f61efeeabc041e986bb718b6c8813315845e28297b14059b53f26946656b4"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_relay::relay::flush_locked (cognitive 72): ai_memory_relay::relay::flush_locked has cognitive complexity 72 (threshold 15). Drivers by points: if/else 20 (40 pts), loops 9 (22 pts), match/switch 4 (9 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":"companions/ai-memory-relay/src/relay.rs"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1aedd2b944210666f4321bf921394dfc32b9827a302965170371806cc9fe0cc"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::serve::start_maintenance_scheduler (cognitive 68): ai_memory_cli::commands::serve::start_maintenance_scheduler has cognitive complexity 68 (threshold 15). Drivers by points: if/else 19 (26 pts), match/switch 9 (25 pts), loops 4 (9 pts), boolean chains 8 (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/ai-memory-cli/src/commands/serve.rs"},"region":{"startLine":2188}}}],"partialFingerprints":{"codehealthFindingId/v1":"096baef77783e2e45d4e84a17e9c4672dfb81438404f291daa786308089bfdd4"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::recovery::recover (cognitive 66): ai_memory_cli::commands::recovery::recover has cognitive complexity 66 (threshold 15). Drivers by points: if/else 21 (40 pts), match/switch 8 (16 pts), boolean chains 5, loops 5 (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/ai-memory-cli/src/commands/recovery.rs"},"region":{"startLine":553}}}],"partialFingerprints":{"codehealthFindingId/v1":"edd1a61741983a43458da1ad1ad08fbb68cd05083ab2d258393e2722ed17f1a2"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_workstream::transcript::export_jsonl_range (cognitive 65): ai_memory_workstream::transcript::export_jsonl_range has cognitive complexity 65 (threshold 15). Drivers by points: if/else 30 (51 pts), match/switch 5 (9 pts), boolean chains 4, loops 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":1247}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c1af692159b521ceb47bfae1e373d8677f769cad3bebdeac2a21d680de78465"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::session_usage::read_live_calls (cognitive 63): ai_memory_cli::commands::session_usage::read_live_calls has cognitive complexity 63 (threshold 15). Drivers by points: if/else 30 (59 pts), boolean chains 3, loops 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/session_usage.rs"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"525d878a7363c735928e3c5f1f96575a871423d0ad7e22d27b25db691358a4e5"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_workstream::harness::build_launch_plan_with_env_lookup (cognitive 63): ai_memory_workstream::harness::build_launch_plan_with_env_lookup has cognitive complexity 63 (threshold 15). Drivers by points: if/else 23 (53 pts), match/switch 4 (5 pts), boolean chains 4, loops 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-workstream/src/harness.rs"},"region":{"startLine":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"aaea20860b9da0333591da59f99a3820e3390357e0e6363206be24b8b600c305"}},{"ruleId":"D2","level":"warning","message":{"text":"PageWriteMetadata::into_frontmatter (cognitive 57): PageWriteMetadata::into_frontmatter has cognitive complexity 57 (threshold 15). Drivers by points: if/else 19 (36 pts), boolean chains 12, loops 5 (6 pts), match/switch 1 (3 pts) (nesting depth added 20). Of this number, 55 points are the body\u0027s own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-core/src/page.rs"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"d53d8fc2e42c91e3e14801450d8f8b08cfeb311c3a1e62915fd7b9ed349a9ce8"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_importer::document::extract_xlsx_sheet_with_limit (cognitive 55): ai_memory_importer::document::extract_xlsx_sheet_with_limit has cognitive complexity 55 (threshold 15). Drivers by points: if/else 17 (45 pts), boolean chains 4, loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-importer/src/document.rs"},"region":{"startLine":872}}}],"partialFingerprints":{"codehealthFindingId/v1":"c02777e9843cc9d1ad47763e0bcb9056108243a560173b7917ae783c83e7c4af"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::router::resolve_project_ids_inner (cognitive 53): ai_memory_hooks::router::resolve_project_ids_inner has cognitive complexity 53 (threshold 15). Drivers by points: if/else 21 (32 pts), match/switch 7 (12 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 17). Of this number, 38 points are the body\u0027s own statements and 15 belong to 4 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/router.rs"},"region":{"startLine":4178}}}],"partialFingerprints":{"codehealthFindingId/v1":"61091ad4d8b9b596438c283e38371d463948c3607d6c01da5e225946b74e4b70"}},{"ruleId":"D2","level":"warning","message":{"text":"ScanContext::observe (cognitive 52): ScanContext::observe has cognitive complexity 52 (threshold 15). Drivers by points: if/else 17 (37 pts), loops 4 (11 pts), boolean chains 4 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/session_usage_context.rs"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"5eea02dae14e59b5d22002cef5a867062d5416b13ebe4e5eaed06ff02b137f10"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::install_hooks::run_with_hook_connection (cognitive 49): ai_memory_cli::commands::install_hooks::run_with_hook_connection has cognitive complexity 49 (threshold 15). Drivers by points: if/else 19 (22 pts), match/switch 10 (14 pts), boolean chains 13 (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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":807}}}],"partialFingerprints":{"codehealthFindingId/v1":"04ef185fcc05bfc5115deceedfb022fa14db5aea66beadf4c18beae28ac03c46"}},{"ruleId":"D2","level":"warning","message":{"text":"CapturePolicy::inspect (cognitive 49): CapturePolicy::inspect has cognitive complexity 49 (threshold 15). Drivers by points: if/else 7 (22 pts), match/switch 5 (13 pts), loops 2 (9 pts), boolean chains 5 (nesting depth added 30). 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/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":914}}}],"partialFingerprints":{"codehealthFindingId/v1":"12de4cff46380a49bf21cb0f285c46f1deb530d46d7f2abacac3eb8540ed31b5"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_web::features::states (cognitive 49): ai_memory_web::features::states has cognitive complexity 49 (threshold 15). Drivers by points: if/else 35 (44 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 10). 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/ai-memory-web/src/features.rs"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"67017dc3a2a81ed9cef23b09e7604d9f1dc1982f8f0178e878b6c938b6178739"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_importer::agentmemory::apply_pages_batched (cognitive 48): ai_memory_importer::agentmemory::apply_pages_batched has cognitive complexity 48 (threshold 15). Drivers by points: if/else 9 (29 pts), loops 4 (9 pts), boolean chains 5, match/switch 2 (5 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":"companions/ai-memory-importer/src/agentmemory/mod.rs"},"region":{"startLine":487}}}],"partialFingerprints":{"codehealthFindingId/v1":"d21a0e1a77e8137fe1aa633ac3fa9b0aaabaad17e68e61b5df63bd88c6cfd24d"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_consolidate::auto_improve_schedule::run_auto_improve_scheduler_tick (cognitive 48): ai_memory_consolidate::auto_improve_schedule::run_auto_improve_scheduler_tick has cognitive complexity 48 (threshold 15). Drivers by points: if/else 8 (22 pts), match/switch 6 (19 pts), loops 3 (7 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/auto_improve_schedule.rs"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"eccefd08dec025e9640c0fe4adeda0a5589a3d183cd3128a201072f9bc73ece6"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::capture_policy::capture_lookup_locations (cognitive 48): ai_memory_hooks::capture_policy::capture_lookup_locations has cognitive complexity 48 (threshold 15). Drivers by points: loops 11 (34 pts), if/else 6 (12 pts), boolean chains 1, match/switch 1 (nesting depth added 29). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":2076}}}],"partialFingerprints":{"codehealthFindingId/v1":"917ef269a49482a6d46a979f025c590ff302f79502590bb85dfc3f62f6a31429"}},{"ruleId":"D2","level":"warning","message":{"text":"ReaderPool::audit_contamination (cognitive 47): ReaderPool::audit_contamination has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (26 pts), loops 8 (11 pts), boolean chains 6, match/switch 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/ai-memory-store/src/reader.rs"},"region":{"startLine":13617}}}],"partialFingerprints":{"codehealthFindingId/v1":"44d51a6b028b546426df1bc60b4558e2b1f75ae9bd247330dc666f1380ca35eb"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_wikisync::bidi::local_pages (cognitive 46): ai_memory_wikisync::bidi::local_pages has cognitive complexity 46 (threshold 15). Drivers by points: if/else 9 (27 pts), match/switch 3 (13 pts), loops 3 (6 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-wikisync/src/bidi.rs"},"region":{"startLine":660}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd1b213c6d7ffafdcc2940d90c951525abea72e29537afc9238198bf5609532a"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_workstream::transcript::claude_continued_sessions (cognitive 46): ai_memory_workstream::transcript::claude_continued_sessions has cognitive complexity 46 (threshold 15). Drivers by points: if/else 15 (38 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":851}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc937387c13294fbc0d1adcc6acacb2e9002f47514b86f08bea511972c288244"}},{"ruleId":"D2","level":"warning","message":{"text":"Config::load_with_runtime_env (cognitive 45): Config::load_with_runtime_env has cognitive complexity 45 (threshold 15). Drivers by points: if/else 28 (31 pts), boolean chains 12, loops 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/ai-memory-cli/src/config.rs"},"region":{"startLine":2477}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3b377d9280d262a737c8b21dfcca9c062c495b34c1367f34bf4e8b03e2aab6b"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_consolidate::profile::harvest_project (cognitive 44): ai_memory_consolidate::profile::harvest_project has cognitive complexity 44 (threshold 15). Drivers by points: if/else 13 (26 pts), loops 6 (12 pts), match/switch 1 (4 pts), boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/profile.rs"},"region":{"startLine":2235}}}],"partialFingerprints":{"codehealthFindingId/v1":"539cc81de7a23646ee751cd0ad47099ed374daea47d27f576f908b4e4a764ebf"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_store::ops::admit_hook_session_event (cognitive 43): ai_memory_store::ops::admit_hook_session_event has cognitive complexity 43 (threshold 15). Drivers by points: if/else 21 (32 pts), boolean chains 8, match/switch 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/ops.rs"},"region":{"startLine":3471}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b0404067fb571a1f72d60c8ce9ea2f6f589d69823cad283a880fa94574283e6"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::install_mcp::build_mcp_entry (cognitive 42): ai_memory_cli::commands::install_mcp::build_mcp_entry has cognitive complexity 42 (threshold 15). Drivers by points: if/else 19 (39 pts), boolean chains 2, match/switch 1 (nesting depth added 20). 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/ai-memory-cli/src/commands/install_mcp.rs"},"region":{"startLine":1802}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c0a1b5d6824a842d2f46214fa2273a76033df7a2301dca7fff809062dc99fb8"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_consolidate::link_guard::unresolved_generated_links (cognitive 42): ai_memory_consolidate::link_guard::unresolved_generated_links has cognitive complexity 42 (threshold 15). Drivers by points: if/else 9 (26 pts), loops 7 (11 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/link_guard.rs"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"1eb0a3cdfb7e6436fcb59d02a735378b756bf7e0f64fdc2b9d9613835f529f79"}},{"ruleId":"D2","level":"warning","message":{"text":"AiMemoryServer::write_page_in_scope (cognitive 42): AiMemoryServer::write_page_in_scope has cognitive complexity 42 (threshold 15). Drivers by points: if/else 23 (28 pts), match/switch 5 (8 pts), boolean chains 6 (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/ai-memory-mcp/src/server.rs"},"region":{"startLine":5139}}}],"partialFingerprints":{"codehealthFindingId/v1":"0167954d81772826e659e392154730f53058d673bc548a6392d73dbee6abe086"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_store::ops::resolve_project_by_identity (cognitive 42): ai_memory_store::ops::resolve_project_by_identity has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (21 pts), match/switch 7 (13 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/ops.rs"},"region":{"startLine":847}}}],"partialFingerprints":{"codehealthFindingId/v1":"7057ce73cfeb28ee7d2fe9f71234363b1a7f0379851b013110b567e1c50c9855"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_importer::agentmemory::vault::plan (cognitive 41): ai_memory_importer::agentmemory::vault::plan has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (28 pts), loops 7 (11 pts), match/switch 1 (2 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-importer/src/agentmemory/vault.rs"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"f52c80af2576580eb05c056fb4a31858ececc9db50116f94610aa659af0f3daf"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_consolidate::sweep::plan_cold_cluster_dedup (cognitive 40): ai_memory_consolidate::sweep::plan_cold_cluster_dedup has cognitive complexity 40 (threshold 15). Drivers by points: if/else 14 (22 pts), loops 6 (9 pts), match/switch 3 (8 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/ai-memory-consolidate/src/sweep.rs"},"region":{"startLine":1265}}}],"partialFingerprints":{"codehealthFindingId/v1":"08474c7453600cb73c237973cd9335d83de429c7b31d39226b74f9c8fca4a6e3"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_workstream::transcript::export_antigravity (cognitive 40): ai_memory_workstream::transcript::export_antigravity has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (25 pts), match/switch 4 (7 pts), boolean chains 6, loops 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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":4892}}}],"partialFingerprints":{"codehealthFindingId/v1":"977882c49efd926da6b07cd3b8880c3066fd5223e2e0f0a9cb98369b35ee5302"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_wikisync::bidi::build_plan (cognitive 39): ai_memory_wikisync::bidi::build_plan has cognitive complexity 39 (threshold 15). Drivers by points: if/else 11 (25 pts), match/switch 4 (10 pts), boolean chains 3, loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-wikisync/src/bidi.rs"},"region":{"startLine":408}}}],"partialFingerprints":{"codehealthFindingId/v1":"d73a95df6aed8d11dd4fe80b915a586627d246e7c4a98f130425a43ed36ff12a"}},{"ruleId":"D2","level":"warning","message":{"text":"AdmissionChain::run (cognitive 39): AdmissionChain::run has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (29 pts), match/switch 3 (8 pts), boolean chains 1, loops 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-wiki/src/admission.rs"},"region":{"startLine":405}}}],"partialFingerprints":{"codehealthFindingId/v1":"69015c7efce3ac3a74f3090f5bb0343fcc69d1f1effc52498525435104603976"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_wiki::watcher::handle_event (cognitive 39): ai_memory_wiki::watcher::handle_event has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (30 pts), match/switch 2 (4 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-wiki/src/watcher.rs"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"2440a844971612a3ca1a1c4c936e60182100a54357497726c8405f38e3bc3d97"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::session_usage::locate_codex_rollout (cognitive 38): ai_memory_cli::commands::session_usage::locate_codex_rollout has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 4 (9 pts), boolean chains 3 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/session_usage.rs"},"region":{"startLine":618}}}],"partialFingerprints":{"codehealthFindingId/v1":"6918d2c7b5f0b2fe83cd3e35d6793de0604e3821687222e6040ad7cb1e3a7929"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::router::fetch_and_accept_handoff_at (cognitive 38): ai_memory_hooks::router::fetch_and_accept_handoff_at has cognitive complexity 38 (threshold 15). Drivers by points: if/else 23 (24 pts), match/switch 7 (12 pts), boolean chains 2 (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/ai-memory-hooks/src/router.rs"},"region":{"startLine":2018}}}],"partialFingerprints":{"codehealthFindingId/v1":"f735092d61a2894bc8f3eba6e19fe2f14e223f86ea68b2f1a74d380223d9f489"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::hook_spool::recover_stranded_temp_entries (cognitive 37): ai_memory_cli::commands::hook_spool::recover_stranded_temp_entries has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (25 pts), match/switch 5 (10 pts), boolean chains 1, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/hook_spool.rs"},"region":{"startLine":443}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfeef7663ccab95227e4458a9e4b6b2c544fc5ed985a0c1f43e6d568a2a0da88"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_mcp::admin::build_okf_bundle_file (cognitive 37): ai_memory_mcp::admin::build_okf_bundle_file has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (30 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/admin.rs"},"region":{"startLine":1073}}}],"partialFingerprints":{"codehealthFindingId/v1":"d249ca85ddd3e162f2881bbad1e6bf5d7e2b6006f3eb409b0dcafc74b9dcb4e9"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_store::writer::worker_loop (cognitive 37): ai_memory_store::writer::worker_loop has cognitive complexity 37 (threshold 15). Drivers by points: if/else 5 (14 pts), match/switch 5 (14 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/writer.rs"},"region":{"startLine":4030}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a3780a9ba80b5cc6656192c98494bf04427708724417f2451ad1a4e9ac555b8"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_web::routes::inbox::handler (cognitive 37): ai_memory_web::routes::inbox::handler has cognitive complexity 37 (threshold 15). Drivers by points: match/switch 13 (19 pts), if/else 12 (14 pts), boolean chains 4 (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/ai-memory-web/src/routes/inbox.rs"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"37770f96e1d5f8a151aa379a42b1c5672e8b2178b1b15b5567c30af0cd1150a1"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_consolidate::embed::run_embedding_backfill (cognitive 36): ai_memory_consolidate::embed::run_embedding_backfill has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (23 pts), match/switch 3 (9 pts), boolean chains 3, 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/ai-memory-consolidate/src/embed.rs"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"30b8d7a4bf73e1a4229fa36783493e71c019ef66f5a37b7cd95db0a39cb07222"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_mcp::page_patch::apply (cognitive 36): ai_memory_mcp::page_patch::apply has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (24 pts), match/switch 2 (5 pts), loops 4, 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/ai-memory-mcp/src/page_patch.rs"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cee691f2da36e1f43b77ee59788f6a93345f9dbd1f5b7cb88b896afb4b4421c"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_web::routes::search::handler (cognitive 36): ai_memory_web::routes::search::handler has cognitive complexity 36 (threshold 15). Drivers by points: match/switch 12 (20 pts), loops 4 (7 pts), if/else 3 (6 pts), boolean chains 3 (nesting depth added 14). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own 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/ai-memory-web/src/routes/search.rs"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8b77bd84d9dedf36279ba683c921f878dfc303766b0faf7e349605d88c90cea"}},{"ruleId":"D2","level":"warning","message":{"text":"Wiki::merge_project (cognitive 36): Wiki::merge_project has cognitive complexity 36 (threshold 15). Drivers by points: if/else 19 (25 pts), boolean chains 9, loops 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, 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/ai-memory-wiki/src/wiki.rs"},"region":{"startLine":754}}}],"partialFingerprints":{"codehealthFindingId/v1":"d655ca84c68fe7257aa9d0afdc8f1d3a23eb8c0c651c4497a486964083668b11"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_workstream::transcript::parse_opencode2 (cognitive 36): ai_memory_workstream::transcript::parse_opencode2 has cognitive complexity 36 (threshold 15). Drivers by points: if/else 10 (25 pts), match/switch 4 (9 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":"crates/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":6006}}}],"partialFingerprints":{"codehealthFindingId/v1":"262d3cc556cd4dbc6bcdfefe416915ff9654d49730113a57e19c95c39a63c04f"}},{"ruleId":"D2","level":"warning","message":{"text":"Bootstrap::process_sources (cognitive 35): Bootstrap::process_sources has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (19 pts), loops 6 (11 pts), match/switch 2 (5 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/ai-memory-consolidate/src/bootstrap.rs"},"region":{"startLine":436}}}],"partialFingerprints":{"codehealthFindingId/v1":"513eca675433077b61d23348d0c47725749650c5d87b130c4b4291bcfc8e6dd0"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_consolidate::profile::converge (cognitive 35): ai_memory_consolidate::profile::converge has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (26 pts), boolean chains 5, loops 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":"crates/ai-memory-consolidate/src/profile.rs"},"region":{"startLine":1448}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6f29b7c81f1536d711e20a38c351adba519626aec7d75c0b5c76fe18340435a"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::doctor::presentation::render (cognitive 34): ai_memory_cli::commands::doctor::presentation::render has cognitive complexity 34 (threshold 15). Drivers by points: if/else 24 (31 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/doctor/presentation.rs"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"39fad8f65df7ab57b2a7ceca17c34b6aa5b2cc92a0235d8f6a41d8476c8f6ed2"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::serve::run_session_consolidation_worker (cognitive 34): ai_memory_cli::commands::serve::run_session_consolidation_worker has cognitive complexity 34 (threshold 15). Drivers by points: match/switch 8 (18 pts), if/else 7 (14 pts), boolean chains 1, 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/ai-memory-cli/src/commands/serve.rs"},"region":{"startLine":1007}}}],"partialFingerprints":{"codehealthFindingId/v1":"259e5a6357321a1165958f5453ce9ed057c8a9a667b9bc4da3c54aa9a5bb162d"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::show::select_inner (cognitive 34): ai_memory_cli::commands::show::select_inner has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (28 pts), boolean chains 2, loops 2, match/switch 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/show.rs"},"region":{"startLine":827}}}],"partialFingerprints":{"codehealthFindingId/v1":"424f58e5236506ca46d8de697bb17cdd3947492ad39cf9d5adcbc230cf08da85"}},{"ruleId":"D2","level":"warning","message":{"text":"Consolidator::consolidate_session_multi_in_scope (cognitive 34): Consolidator::consolidate_session_multi_in_scope has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (18 pts), match/switch 5 (11 pts), loops 3 (5 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/consolidator.rs"},"region":{"startLine":844}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c0c38c4ce50e20b5bddd755eb00aebe3372bc33008138fc6edb408aebff6c24"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_consolidate::bootstrap::collect_rust_module_headers (cognitive 34): ai_memory_consolidate::bootstrap::collect_rust_module_headers has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 3 (7 pts), boolean chains 2, 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/ai-memory-consolidate/src/bootstrap.rs"},"region":{"startLine":1295}}}],"partialFingerprints":{"codehealthFindingId/v1":"76ed69c6b41d4fcd9b4ff60c25067bddcf7e5946cdd4c777bcb15f0f47413c0c"}},{"ruleId":"D2","level":"warning","message":{"text":"CapturePolicy::match_command (cognitive 34): CapturePolicy::match_command has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (23 pts), loops 4 (10 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":1101}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd10667a5d462645216d1aafe87bc3e11dd146269b8c49d43c2d039b9036cb09"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::capture_policy::brace_overflow_could_leave (cognitive 34): ai_memory_hooks::capture_policy::brace_overflow_could_leave has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (23 pts), boolean chains 7, loops 2, match/switch 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":2653}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c60881e3fc8cc0931176df994c1b5ce6ed23af1e0c52f24776a9aaa09c9721b"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_store::ops::merge_project (cognitive 34): ai_memory_store::ops::merge_project has cognitive complexity 34 (threshold 15). Drivers by points: if/else 17 (24 pts), loops 7, 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/ai-memory-store/src/ops.rs"},"region":{"startLine":8798}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c6d3fd0bdd122c8219565cc91a3312bbf6649d09f0127fbdd478a0646624853"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_web::knowledge::view (cognitive 34): ai_memory_web::knowledge::view has cognitive complexity 34 (threshold 15). Drivers by points: if/else 18 (25 pts), loops 2 (4 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-web/src/knowledge.rs"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6e3d657e2e135c49df71cd909f2c3b6dbe5a5d24e8d6197d553291228646feb"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::hook::foreign_decision_within (cognitive 33): ai_memory_cli::commands::hook::foreign_decision_within has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (19 pts), match/switch 5 (10 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/hook.rs"},"region":{"startLine":2849}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1b031c80aa04c719028099b781d8e84e458696440efa29017476333cc217209"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::install_mcp::run_with_opencode_dialect (cognitive 33): ai_memory_cli::commands::install_mcp::run_with_opencode_dialect has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 16, if/else 10 (16 pts), match/switch 1 (nesting depth added 6). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/install_mcp.rs"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"fce5c23905387fd0a96150ec442b36264c243dfd7c741b52d8a74c682209bef7"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::restore::stage_then_swap (cognitive 33): ai_memory_cli::commands::restore::stage_then_swap has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (28 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/restore.rs"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"20d1f7a7f49cdd6e4e74043f9f3282ee700ab04aedbaddc0e5084352b7196105"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::restore_agents::run (cognitive 33): ai_memory_cli::commands::restore_agents::run has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 4, match/switch 2 (4 pts), 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/ai-memory-cli/src/commands/restore_agents.rs"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"14e362eaeebff8a4fa10023a03ec5604f1dceb2b8f47e3a76ff246bf12b87698"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_consolidate::dream::run_dream_pass (cognitive 33): ai_memory_consolidate::dream::run_dream_pass has cognitive complexity 33 (threshold 15). Drivers by points: if/else 16 (25 pts), loops 5 (6 pts), match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/dream.rs"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c44f9ff98d6e79de9bef4c56d90345d3eca01cc50d22f4ae11b3062f39d1399"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::capture_policy::output_spool (cognitive 33): ai_memory_hooks::capture_policy::output_spool has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 13, loops 3 (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/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":1643}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3cfe1fa594b784f74c12eb5a7f86b21b40d96fbbfd1045312f832f2555ef94a"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::capture_policy::glob_walk_with (cognitive 33): ai_memory_hooks::capture_policy::glob_walk_with has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 12, 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/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":2417}}}],"partialFingerprints":{"codehealthFindingId/v1":"a89914d71f4f1a341feaac46d98b374ec1f66ef82d26a7762d1eccff70904c66"}},{"ruleId":"D2","level":"warning","message":{"text":"ReaderPool::observation_stream_votes (cognitive 33): ReaderPool::observation_stream_votes has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 5 (6 pts), match/switch 2 (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/ai-memory-store/src/reader.rs"},"region":{"startLine":4528}}}],"partialFingerprints":{"codehealthFindingId/v1":"35944ca81c98833207a44d5c606e4d8551c6f481510c457fdc60d2059e907caf"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_wiki::migrations::m2026_09_okf_conformance::nonconformant_files (cognitive 33): ai_memory_wiki::migrations::m2026_09_okf_conformance::nonconformant_files has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (25 pts), boolean chains 3, 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/ai-memory-wiki/src/migrations/m2026_09_okf_conformance.rs"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"27da708d6dde4f1a20dcc7aaf862e9496c1cc27625196d165f0eaf580144fcc2"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::status::presentation::render (cognitive 32): ai_memory_cli::commands::status::presentation::render has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (23 pts), loops 4 (5 pts), boolean chains 2, match/switch 1 (2 pts) (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/ai-memory-cli/src/commands/status/presentation.rs"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"d096452bfd82e8c2f5b71e14da347a783db1556eb521332db639e3a501d1ab09"}},{"ruleId":"D2","level":"warning","message":{"text":"AiMemoryServer::memory_read_page (cognitive 32): AiMemoryServer::memory_read_page has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (22 pts), match/switch 5 (8 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/ai-memory-mcp/src/server.rs"},"region":{"startLine":5922}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b5e5f0bcaca74523bff03b50b7ccc6595ff9e296b1d15b43defc07f6fed848b"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_mcp::admin::move_session_batch (cognitive 32): ai_memory_mcp::admin::move_session_batch has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (20 pts), match/switch 5 (7 pts), boolean chains 4, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/admin.rs"},"region":{"startLine":8323}}}],"partialFingerprints":{"codehealthFindingId/v1":"a308c10be180fbe4cc3d081694a6be222502aa35755a3185d54ba622aebed218"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_mcp::admin::copy_purge_merge (cognitive 32): ai_memory_mcp::admin::copy_purge_merge has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (16 pts), match/switch 6 (10 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/admin.rs"},"region":{"startLine":8609}}}],"partialFingerprints":{"codehealthFindingId/v1":"c75625113187f1f0997ceb23f76f33ee6fb20132ae3fae77ef1b1e295f7efe2f"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_mcp::server::answer_evidence_order (cognitive 32): ai_memory_mcp::server::answer_evidence_order has cognitive complexity 32 (threshold 15). Drivers by points: loops 9 (16 pts), if/else 5 (14 pts), boolean chains 2 (nesting depth added 16). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/server.rs"},"region":{"startLine":9379}}}],"partialFingerprints":{"codehealthFindingId/v1":"058edd96e7b5253810ca9646b7889ba5502e3c861135d09b9481882b3c423ccd"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_eval::retrieval::run (cognitive 32): ai_memory_eval::retrieval::run has cognitive complexity 32 (threshold 15). Drivers by points: if/else 19 (22 pts), boolean chains 5, match/switch 2 (3 pts), loops 1 (2 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":"evals/src/retrieval/mod.rs"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"db87603de298dc066300fef35dd6af008d90ea9867c5cdf4b64decdc9e80a84e"}},{"ruleId":"D2","level":"warning","message":{"text":"TranscriptCapture::decide (cognitive 31): TranscriptCapture::decide has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (23 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/ai-memory-cli/src/commands/transcript_capture.rs"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"078d1e769f1adcee17c84396ea4b6895da9c578ceebd91cb7d1e85b49e06867b"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_web::management::forms::submit (cognitive 31): ai_memory_web::management::forms::submit has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 5, match/switch 4 (5 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-web/src/management/forms.rs"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"7450a68464b5e927939a70aea9d5ae0f10847b14786081aba3bc015861722916"}},{"ruleId":"D2","level":"warning","message":{"text":"Wiki::apply_batch_inner (cognitive 31): Wiki::apply_batch_inner has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 8 (10 pts), match/switch 3 (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/ai-memory-wiki/src/wiki.rs"},"region":{"startLine":3328}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fa4e50d8707f80589b34b5641409d7cfeb03078c13f7352d0a8227681b30548"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_consolidate::curator::run_curator_report_with_breadth (cognitive 30): ai_memory_consolidate::curator::run_curator_report_with_breadth has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (24 pts), boolean chains 3, loops 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/curator.rs"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"49714479132c5e241028a73e0a3e71e740b55eeed745d33e996aeee82c7b347f"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_mcp::server::answer_sentence_suffix (cognitive 30): ai_memory_mcp::server::answer_sentence_suffix has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 13, 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/ai-memory-mcp/src/server.rs"},"region":{"startLine":9478}}}],"partialFingerprints":{"codehealthFindingId/v1":"8708e5fd02311cf1291eeb083e4454fed28d374ee79df206984a1e9fc32f610f"}},{"ruleId":"D2","level":"warning","message":{"text":"GlobBudget::markers_below (cognitive 29): GlobBudget::markers_below has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 4 (9 pts), match/switch 1 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/hook.rs"},"region":{"startLine":3019}}}],"partialFingerprints":{"codehealthFindingId/v1":"c62c4f73b8cc91ae7828a8d29e8b5c64ea13f99656ee90a350c3132de46fd511"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_consolidate::profile::convergence_targets (cognitive 29): ai_memory_consolidate::profile::convergence_targets has cognitive complexity 29 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 3 (7 pts), match/switch 2 (5 pts), boolean chains 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":"crates/ai-memory-consolidate/src/profile.rs"},"region":{"startLine":2445}}}],"partialFingerprints":{"codehealthFindingId/v1":"62f61f89b4396112c53580113007f1facc48d5327ab9473cdcdb587b0e1ba365"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_core::excerpt::leading_prose (cognitive 29): ai_memory_core::excerpt::leading_prose has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 4 (7 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-core/src/excerpt.rs"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9fc22f952f887058ff78e8dcc26705883b8e858275d8e89b559d0fca2dd0b99"}},{"ruleId":"D2","level":"warning","message":{"text":"AiMemoryServer::memory_write_pages_batch (cognitive 29): AiMemoryServer::memory_write_pages_batch has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 2, match/switch 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/ai-memory-mcp/src/server.rs"},"region":{"startLine":5504}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbea719d4ec48e8f94daff758b1b1824fe2c087200aa4899474c851e6f596b19"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_workstream::transcript::transcript_baseline_blocking (cognitive 29): ai_memory_workstream::transcript::transcript_baseline_blocking has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (23 pts), match/switch 2 (4 pts), loops 1 (2 pts) (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":"crates/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":528}}}],"partialFingerprints":{"codehealthFindingId/v1":"95502fc5d9a97291fb2503929bbb5ea5ce3803d75cf13d261df49d8901f4c788"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_importer::run_omc (cognitive 28): ai_memory_importer::run_omc has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 3 (7 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":"companions/ai-memory-importer/src/main.rs"},"region":{"startLine":429}}}],"partialFingerprints":{"codehealthFindingId/v1":"23ee45ecb5840a3a31885a1c9b5021217b1b913d040c2ac62c1c12c9b0eac311"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::restore_agents::stage_archive (cognitive 28): ai_memory_cli::commands::restore_agents::stage_archive has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (25 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/ai-memory-cli/src/commands/restore_agents.rs"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"59c29ee3b670c8ca6decd96ee816ee1adcd320ecdaec3dc58b4b6f7ce4da54bf"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::uninstall::run (cognitive 28): ai_memory_cli::commands::uninstall::run has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (15 pts), loops 4 (6 pts), boolean chains 5, match/switch 1 (2 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/ai-memory-cli/src/commands/uninstall.rs"},"region":{"startLine":864}}}],"partialFingerprints":{"codehealthFindingId/v1":"8664353d950b97a56390d44e1fbeb8938f22db934b098cd8d6ad956808ec1ad7"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::capture_policy::extract_paths (cognitive 28): ai_memory_hooks::capture_policy::extract_paths has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 3 (6 pts), boolean chains 5 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":1913}}}],"partialFingerprints":{"codehealthFindingId/v1":"941b145fd58bfb2bad1689d499ca6efd1c3364fc7c37951b65f6d665abae9394"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::router::handle_hook_batch (cognitive 28): ai_memory_hooks::router::handle_hook_batch has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/router.rs"},"region":{"startLine":1203}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ab3b6f44e4b5a7627dbc12da2031ad9c926c218e9082ceab85edf7e72096f37"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_store::workstream::finish_run_inner (cognitive 28): ai_memory_store::workstream::finish_run_inner has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 5, 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/ai-memory-store/src/workstream.rs"},"region":{"startLine":1396}}}],"partialFingerprints":{"codehealthFindingId/v1":"509dfc32f53524fdd1435f89ad7c05196893339b7984507223087cb612360d19"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_web::health::localized_checks (cognitive 28): ai_memory_web::health::localized_checks has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 4, match/switch 2, 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/ai-memory-web/src/health.rs"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"696aff11cff85622344d9a406177ebbc74eee48c3fccc6c840e6a1d304554bba"}},{"ruleId":"D2","level":"warning","message":{"text":"client.metadataFromFrontmatter (cognitive 28): client.metadataFromFrontmatter has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 6, loops 1 (2 pts), ternaries 2 (nesting depth added 4). Of this number, 25 points are the body\u0027s own statements and 3 belong to 3 function items inside it that branch. 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":"companions/ai-memory-ts/src/client.ts"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"06ce1e4c67af0f4ad114ec878f18e61b6ed77a459f959a24da1b4b9dacb3e2b6"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::run_autowire::ensure_wired_with_env (cognitive 27): ai_memory_cli::commands::run_autowire::ensure_wired_with_env has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (18 pts), match/switch 2 (5 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/run_autowire.rs"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"5623ef996ebb6d77df7258576d87691e798c7fe2eb6c92dac7ca3b4abde920e9"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_consolidate::profile::converge_target (cognitive 27): ai_memory_consolidate::profile::converge_target has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (18 pts), match/switch 3 (6 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/ai-memory-consolidate/src/profile.rs"},"region":{"startLine":2552}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d381e4cfb213444d88c44e71455afb686eec1066ab01226ef6fb6672a099fdc"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::capture_policy::has_unevaluated_expansion (cognitive 27): ai_memory_hooks::capture_policy::has_unevaluated_expansion has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 8, match/switch 2 (5 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":3526}}}],"partialFingerprints":{"codehealthFindingId/v1":"145a9dfdd70da72d045c88a5dfb3002a24b67b95bf2c55a91d4fe342bddafa38"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::workstream::finish_run_inner (cognitive 27): ai_memory_hooks::workstream::finish_run_inner has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (14 pts), match/switch 7 (9 pts), boolean chains 3, loops 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/workstream.rs"},"region":{"startLine":1183}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2db045ba05f7fb102ddeb0f81a4957925b27635791ff707ebbecc8656dda815"}},{"ruleId":"D2","level":"warning","message":{"text":"Transport.request (cognitive 27): Transport.request has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 3, ternaries 3, loops 1 (2 pts), error handling 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":"companions/ai-memory-ts/src/transport.ts"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c839ae1cabe067cbc149c3d9fc5c81a1d1cd4fe67e5b0a9845f31342cb69c3b"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_importer::plan_external_conversation (cognitive 26): ai_memory_importer::plan_external_conversation has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (21 pts), loops 2, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-importer/src/main.rs"},"region":{"startLine":545}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fd6b5c7c1974635c3d55d0056812923f93a83df90a70169abe8e30abe2165ac"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeRoutes::parse (cognitive 26): HomeRoutes::parse has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (23 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/ai-memory-cli/src/marker.rs"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"a67cfbd88c2ca52db8cefd9c2823fc75626450fc18f53c3a8a95284d0aaf9838"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_consolidate::cold_cluster::dbscan (cognitive 26): ai_memory_consolidate::cold_cluster::dbscan has cognitive complexity 26 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 3 (8 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/cold_cluster.rs"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"682cd78c347606803b0b43d9a287ef533325ba7182e7d300798f42d762b7dd62"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::workstream::prepare_run (cognitive 26): ai_memory_hooks::workstream::prepare_run has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (13 pts), match/switch 6 (7 pts), boolean chains 5, loops 1 (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/ai-memory-hooks/src/workstream.rs"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a71f43402b3199247c6ee40ff9e32c48862e441bb471b1626b9c7ff9dc43fcf"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_store::ops::repair_session_times (cognitive 26): ai_memory_store::ops::repair_session_times has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 5, 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/ai-memory-store/src/ops.rs"},"region":{"startLine":3166}}}],"partialFingerprints":{"codehealthFindingId/v1":"12eb7633788e9b9b2d5a77599e20ad4fde4436270ed53cb8882d8b3602e0168e"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_store::ops::accept_handoff_in_transaction (cognitive 26): ai_memory_store::ops::accept_handoff_in_transaction has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (23 pts), match/switch 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/ops.rs"},"region":{"startLine":5640}}}],"partialFingerprints":{"codehealthFindingId/v1":"47d9c93ffb1de5139f3fcd88aa28b7920375a03ea8cc57065e063b01e62ad910"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_workstream::transcript::parse_kimi (cognitive 26): ai_memory_workstream::transcript::parse_kimi has cognitive complexity 26 (threshold 15). Drivers by points: match/switch 5 (12 pts), if/else 4 (11 pts), loops 1 (3 pts) (nesting depth added 16). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":2145}}}],"partialFingerprints":{"codehealthFindingId/v1":"55cf5fd9e2a6275fa5d444df3702d849a321a47ad51305ef344a4463b3ad5bec"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_importer::document::xlsx_shared_strings (cognitive 25): ai_memory_importer::document::xlsx_shared_strings has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (20 pts), boolean chains 2, match/switch 1 (2 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":"companions/ai-memory-importer/src/document.rs"},"region":{"startLine":807}}}],"partialFingerprints":{"codehealthFindingId/v1":"d762cfa485ff2eff318d18aa7509d2fffb56b1d23a3124282cc62acc86be73cf"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::localization::command (cognitive 25): ai_memory_cli::localization::command has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (23 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/ai-memory-cli/src/localization.rs"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"891bbc0e367f9e02325656d23cf161ad3d505256879445aa98afc06ca8404995"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_consolidate::auto_improve::apply_eval_gate_with_before_bodies (cognitive 25): ai_memory_consolidate::auto_improve::apply_eval_gate_with_before_bodies has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 2 (5 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/ai-memory-consolidate/src/auto_improve.rs"},"region":{"startLine":918}}}],"partialFingerprints":{"codehealthFindingId/v1":"43022c374368716f56050dd46060aa8503f8278191ae273344e99f4e83cecd53"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_consolidate::lint::run_lint (cognitive 25): ai_memory_consolidate::lint::run_lint has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 3 (5 pts), loops 3, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/lint.rs"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"a76739ccdce4e83d06fdb313780165eddd9782e5489110aa87e6feba08d60039"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::capture_policy::tool_observation_outcome (cognitive 25): ai_memory_hooks::capture_policy::tool_observation_outcome has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 10 (22 pts), if/else 2 (3 pts) (nesting depth added 13). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own 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/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":493}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3a3d738629dcbcce45c5d3bdc2558f82ec8d09f2af54532e34aa64e83e37958"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::capture_policy::extract (cognitive 25): ai_memory_hooks::capture_policy::extract has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13, boolean chains 9, match/switch 3. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":1362}}}],"partialFingerprints":{"codehealthFindingId/v1":"293b1e9be7bb6813af08d7fb1df1ca8cfbd99ad53d25620368d53cc084b5d8b6"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::capture_policy::tokenize (cognitive 25): ai_memory_hooks::capture_policy::tokenize has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 4 (12 pts), boolean chains 8, if/else 2 (4 pts), loops 1 (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/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":3718}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d8ec8d840869907aa37c63818925a91d42ff37893dd2c5dc88344583be55913"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_store::ops::purge_session_with_owner (cognitive 25): ai_memory_store::ops::purge_session_with_owner has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 4 (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/ai-memory-store/src/ops.rs"},"region":{"startLine":7575}}}],"partialFingerprints":{"codehealthFindingId/v1":"260d3fd2c538e0761086ca9119ccea7273ed5b9bb13e02b7319a3fa371cb4c37"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_wiki::watcher::walk_project_dirs (cognitive 25): ai_memory_wiki::watcher::walk_project_dirs has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 3 (4 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-wiki/src/watcher.rs"},"region":{"startLine":860}}}],"partialFingerprints":{"codehealthFindingId/v1":"48863e91bba41ba757c99fefa0e34b38063d87464c2031457341c404c153146b"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_workstream::transcript::parse_command_code (cognitive 25): ai_memory_workstream::transcript::parse_command_code has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (21 pts), match/switch 2 (3 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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":2369}}}],"partialFingerprints":{"codehealthFindingId/v1":"03ea1d86da42cd165f011fdc56b0e5a86673f702b1c610c48c8783ae294a21b1"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_workstream::transcript::parse_kiro (cognitive 25): ai_memory_workstream::transcript::parse_kiro has cognitive complexity 25 (threshold 15). Drivers by points: if/else 3 (11 pts), match/switch 4 (8 pts), loops 3 (6 pts) (nesting depth added 15). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":2686}}}],"partialFingerprints":{"codehealthFindingId/v1":"d89821781550403061bffe98cb59c7af346617eb13ef3197e4e20734da148539"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_eval::abstention::validate_fixture (cognitive 25): ai_memory_eval::abstention::validate_fixture has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 7, 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":"evals/src/abstention.rs"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea1009ecb2962b312db6d7d5e17b35fac5e6c18d29825dde4cfb9775c2159b10"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::install_hooks::baked_capture_assistant (cognitive 24): ai_memory_cli::commands::install_hooks::baked_capture_assistant has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (14 pts), loops 3 (6 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":1609}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a3f9eda304ec3dfc1838680dc4743ed5870f770239df72e67faf5d5daff057e"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::install_hooks::stage_hook_scripts_in (cognitive 24): ai_memory_cli::commands::install_hooks::stage_hook_scripts_in has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":6918}}}],"partialFingerprints":{"codehealthFindingId/v1":"afd6db8b6fdd0b91ac0c8cf94175938406f128c0099d5f9ff41ae52183d5610a"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::profile::review (cognitive 24): ai_memory_cli::commands::profile::review has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (18 pts), loops 3 (6 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/ai-memory-cli/src/commands/profile.rs"},"region":{"startLine":405}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ad659511544d2548bbd37e61a1f7fbc730f48962f84327246acbbd8a9c7d148"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_consolidate::consolidator::fold_rule_slug (cognitive 24): ai_memory_consolidate::consolidator::fold_rule_slug has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (14 pts), match/switch 3 (5 pts), loops 3 (4 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/ai-memory-consolidate/src/consolidator.rs"},"region":{"startLine":2314}}}],"partialFingerprints":{"codehealthFindingId/v1":"af483d07479bb2f8eb6e4d1628b2f84385cc47abc0896577f39e73a28a83b465"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::capture_policy::expand_braces (cognitive 24): ai_memory_hooks::capture_policy::expand_braces has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 4 (8 pts), match/switch 2 (6 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/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":2530}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d38a75fb5424f7f33777ee1159ed6612511d2369e2d7d878a530223b11b2f49"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_store::auto_improve::stage_run_impl (cognitive 24): ai_memory_store::auto_improve::stage_run_impl has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 3 (7 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/ai-memory-store/src/auto_improve.rs"},"region":{"startLine":800}}}],"partialFingerprints":{"codehealthFindingId/v1":"8498b97440672f01160d24924368c3845d87410cc98cc817d96d09440a7b232d"}},{"ruleId":"D2","level":"warning","message":{"text":"Walker::node (cognitive 24): Walker::node has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 4 (8 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-wiki/src/frontmatter_yaml.rs"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb703becea8881d179d67cf57b7a197b425a26b5ced3a419236550e904152c66"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_wiki::watcher::reconcile_at (cognitive 24): ai_memory_wiki::watcher::reconcile_at has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 2 (6 pts), loops 2 (3 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/ai-memory-wiki/src/watcher.rs"},"region":{"startLine":722}}}],"partialFingerprints":{"codehealthFindingId/v1":"42cad66cf7620af3a25dfd424598cae34e895fea1d9830f3aedd20907d9ab9ea"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_importer::document::extract_transcript (cognitive 23): ai_memory_importer::document::extract_transcript has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 5, 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":"companions/ai-memory-importer/src/document.rs"},"region":{"startLine":1068}}}],"partialFingerprints":{"codehealthFindingId/v1":"5818199e95397824630f53727938285b8c05b4c547832b23965f45028eea5507"}},{"ruleId":"D2","level":"warning","message":{"text":"Queue::enqueue (cognitive 23): Queue::enqueue has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 3, 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":"companions/ai-memory-relay/src/queue.rs"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1db1d00f73ca6210044c8f07231af17e9a1b6b3a892de9acad910c0a1f6f723"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::install_instructions::run_inner (cognitive 23): ai_memory_cli::commands::install_instructions::run_inner has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (18 pts), loops 2 (4 pts), boolean chains 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/ai-memory-cli/src/commands/install_instructions.rs"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"4544e32439e7aa8a945095600526e81136a1a9712e47d61f060dbfc56ea97225"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_consolidate::projection::project_from_rows (cognitive 23): ai_memory_consolidate::projection::project_from_rows has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (17 pts), loops 3 (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/ai-memory-consolidate/src/projection.rs"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"82248e527eb57b3ed613cfe510998469db151592e99371c4b12fcaf672b1d60d"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::capture_policy::search_scope (cognitive 23): ai_memory_hooks::capture_policy::search_scope has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 4 (7 pts), match/switch 3 (4 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":2250}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fe8a7eef632866f38247fb39071203c69b9764bcf31c730ea7afe1c349ddcc5"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_llm::openai_compat::strip_reasoning_blocks (cognitive 23): ai_memory_llm::openai_compat::strip_reasoning_blocks has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-llm/src/openai_compat.rs"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7f9723a7d395879af5204ad2e1266399812f9e626cce7533e12ca1b38314a72"}},{"ruleId":"D2","level":"warning","message":{"text":"ReaderPool::related_walk (cognitive 23): ReaderPool::related_walk has cognitive complexity 23 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 4 (10 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/reader.rs"},"region":{"startLine":11301}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfbc15d60de7dcfa0c776a4620a933309e42712950071d3198264d7dab67bf83"}},{"ruleId":"D2","level":"warning","message":{"text":"ReaderPool::diagnose_project_coordinate (cognitive 23): ReaderPool::diagnose_project_coordinate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (17 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, 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/ai-memory-store/src/reader.rs"},"region":{"startLine":13270}}}],"partialFingerprints":{"codehealthFindingId/v1":"e21aea0a4b5d823a5c2895ad79b2e5e226650d55d17d783dc73cfafbbbf8f38c"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_store::ops::idle_end_sessions_inner (cognitive 23): ai_memory_store::ops::idle_end_sessions_inner has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 3 (7 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/ai-memory-store/src/ops.rs"},"region":{"startLine":3961}}}],"partialFingerprints":{"codehealthFindingId/v1":"eec90de005c235fe052a1bf2ad1d496e2514e2c5309cf89d4f46556967b1bf18"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_wiki::backup::create_pre_migration_backup_inner (cognitive 23): ai_memory_wiki::backup::create_pre_migration_backup_inner has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (4 pts), boolean chains 2, 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/ai-memory-wiki/src/backup.rs"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd0c4dbc7ab96e5592f760d4ddafd6c81bbd45a3a6c6000acf03f66e91a2f9dc"}},{"ruleId":"D2","level":"warning","message":{"text":"AiMemoryClient.query (cognitive 23): AiMemoryClient.query has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 6 (8 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":"companions/ai-memory-ts/src/client.ts"},"region":{"startLine":946}}}],"partialFingerprints":{"codehealthFindingId/v1":"47b71593775889a596d5116350b71fe650dc2a20da0b7c0c6755d1f9ae606029"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::cli::delimit_run_native_args (cognitive 22): ai_memory_cli::cli::delimit_run_native_args has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 2, 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/ai-memory-cli/src/cli.rs"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bf226b6c6624a08903dd073e9d1c2ca1a4c9689d93da2918006976b3b29bafd"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::backfill::run_in (cognitive 22): ai_memory_cli::commands::backfill::run_in has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (18 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/backfill.rs"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"df7dce56cc85c472557c5cca73bca2c74c51bbef0561e57d0636e987a28087f3"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::hook_capture::post_batch (cognitive 22): ai_memory_cli::commands::hook_capture::post_batch has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (17 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/hook_capture.rs"},"region":{"startLine":1079}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf0980ad8341ef52e233f40d0889c4fabd40807cd8302b348fad06aa1ee69019"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::setup_agent::run (cognitive 22): ai_memory_cli::commands::setup_agent::run has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (15 pts), match/switch 3 (4 pts), boolean chains 2, loops 1 (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/ai-memory-cli/src/commands/setup_agent.rs"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"deff9a4aa593dacc426783129c1491e34b9f2debce8f4e04f357a9feb99b2f78"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::show::collect_candidates (cognitive 22): ai_memory_cli::commands::show::collect_candidates has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (15 pts), match/switch 3 (4 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/ai-memory-cli/src/commands/show.rs"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce935175eff962ce50c56b4c333fb2ee7418e2e0d3291abf89780c66a5457a79"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_consolidate::consolidator_frozen_oracle::project_observations (cognitive 22): ai_memory_consolidate::consolidator_frozen_oracle::project_observations has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2a3e298ebc95a9a1d04d7cae79017db3fd0d45a2395b01426a2a3129ddef471"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_consolidate::keep_tokens::mine (cognitive 22): ai_memory_consolidate::keep_tokens::mine has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (18 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/ai-memory-consolidate/src/keep_tokens.rs"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5fb358fdb6c1131bf5b1b8ca2562154502d371402945aa63d2b0f489825518b"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::antigravity::read_transcript_prompts (cognitive 22): ai_memory_hooks::antigravity::read_transcript_prompts has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (17 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/ai-memory-hooks/src/antigravity.rs"},"region":{"startLine":486}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a8d267cc4c50ba609c4662c17ebff0456fd3c15b4489c72362011b2e51b6656"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::capture_policy::windows_spellings (cognitive 22): ai_memory_hooks::capture_policy::windows_spellings has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 6 (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/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":4435}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f1f017be68088c54dc01a7022df0240cf67bc05728b6e6b64b4763fe959868a"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::router::render_interrupted_session_markdown (cognitive 22): ai_memory_hooks::router::render_interrupted_session_markdown has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 6, 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/ai-memory-hooks/src/router.rs"},"region":{"startLine":2855}}}],"partialFingerprints":{"codehealthFindingId/v1":"977584cbfa7c2d7e1a6b974f87abe1e7360c6ea0ea09762721178dc247f5b08e"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::synth::render_body (cognitive 22): ai_memory_hooks::synth::render_body has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (11 pts), loops 4 (11 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":"crates/ai-memory-hooks/src/synth.rs"},"region":{"startLine":824}}}],"partialFingerprints":{"codehealthFindingId/v1":"402b6aa75c5a34a3d7c4f3dcbb447f6d78a1b1b3a9521098f111734fb785fe41"}},{"ruleId":"D2","level":"warning","message":{"text":"ClaudeCodeTotals::add (cognitive 21): ClaudeCodeTotals::add has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (20 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/ai-memory-cli/src/commands/session_usage.rs"},"region":{"startLine":464}}}],"partialFingerprints":{"codehealthFindingId/v1":"a91d87d1f4b983ab12276b5bf909b29e525ba6e7ccca33d0ee13b27649a42b41"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::hook_capture::build_marker_query_suffix (cognitive 21): ai_memory_cli::commands::hook_capture::build_marker_query_suffix has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18 (21 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/ai-memory-cli/src/commands/hook_capture.rs"},"region":{"startLine":765}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7f04b45cf2629022664bc1f08e1c6891040ae22673fefa6f8ec5684e15272da"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::run::render_checklist (cognitive 21): ai_memory_cli::commands::run::render_checklist has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (18 pts), match/switch 1 (2 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/ai-memory-cli/src/commands/run.rs"},"region":{"startLine":3109}}}],"partialFingerprints":{"codehealthFindingId/v1":"13a87a9eb8f4fc92d05d0b57b6eec6b5039db91cfa891544d84e177dbbb6a5a7"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_consolidate::auto_improve::materialize_patch (cognitive 21): ai_memory_consolidate::auto_improve::materialize_patch has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (18 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/auto_improve.rs"},"region":{"startLine":2299}}}],"partialFingerprints":{"codehealthFindingId/v1":"46d792e19179fef05140164351dadc72e62a25df1a48121a3b15e2c2d5fb3193"}},{"ruleId":"D2","level":"warning","message":{"text":"ShellCommand::split (cognitive 21): ShellCommand::split has cognitive complexity 21 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 3 (5 pts), boolean chains 3, match/switch 1 (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":3066}}}],"partialFingerprints":{"codehealthFindingId/v1":"02ed154d3326824b858bcd3a44986d833e4a253adbbaba970bb2dfb2a3f9b7f8"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_web::diff::backtrack (cognitive 21): ai_memory_web::diff::backtrack has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, 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/ai-memory-web/src/diff.rs"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"25fc6d2710f0faf4ddddcccb164bcfce51adffb21cf7496a1bd76b33e767fb2a"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_wiki::watcher::walk_markdown_partial (cognitive 21): ai_memory_wiki::watcher::walk_markdown_partial has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 2 (4 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/ai-memory-wiki/src/watcher.rs"},"region":{"startLine":984}}}],"partialFingerprints":{"codehealthFindingId/v1":"e89d2041f7497fe85847658bc3d399eb283cd1077e89cc13b83840f4bbdb0da8"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_importer::agentmemory::apply_page (cognitive 20): ai_memory_importer::agentmemory::apply_page 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":"companions/ai-memory-importer/src/agentmemory/mod.rs"},"region":{"startLine":682}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9b3ff5e7b9761ff1289bf059704b2fe0998434fc999227a2ac9c1fd2a946b1e"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_importer::agentmemory::export::run (cognitive 20): ai_memory_importer::agentmemory::export::run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-importer/src/agentmemory/export.rs"},"region":{"startLine":408}}}],"partialFingerprints":{"codehealthFindingId/v1":"7746aaeb280d8ae5c1f1b75679d6381e9c68e570772fc7979274072568c622f0"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_importer::claude_mem::read_summaries (cognitive 20): ai_memory_importer::claude_mem::read_summaries has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (3 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":"companions/ai-memory-importer/src/claude_mem.rs"},"region":{"startLine":727}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fb684d5db64f68e24369b01abafcaefa4ff83be73ac78ebf7039f0011204ba9"}},{"ruleId":"D2","level":"warning","message":{"text":"ScanContext::for_call (cognitive 20): ScanContext::for_call has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/session_usage_context.rs"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd90dd3c66eee5c2424bbf70a295a8b67e6629f277652f589616cfe489525c59"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::move_project::run (cognitive 20): ai_memory_cli::commands::move_project::run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 1 (3 pts), boolean chains 2, match/switch 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/move_project.rs"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe852483126b8941da24fbefba019b9911e2df93b09b4190b719b14daf99708a"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::run::confirm_yolo_and_maybe_reexec (cognitive 20): ai_memory_cli::commands::run::confirm_yolo_and_maybe_reexec has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 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/ai-memory-cli/src/commands/run.rs"},"region":{"startLine":3559}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4610069722f474d1ae3bc2694daec73560e8cce468ef22f97398172b616a346"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::uninstall::strip_mcp_json_at (cognitive 20): ai_memory_cli::commands::uninstall::strip_mcp_json_at has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/uninstall.rs"},"region":{"startLine":1986}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a761ce46bbd752ec1dd8759315708d6deb5401ea3c9d4f915d74e66169dea5a"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_consolidate::auto_improve::builtin_structure_score (cognitive 20): ai_memory_consolidate::auto_improve::builtin_structure_score has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/auto_improve.rs"},"region":{"startLine":1105}}}],"partialFingerprints":{"codehealthFindingId/v1":"04473081031976945702397f34450ba93fc4d320ee3c1588c6444ffbf98f4fb2"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_consolidate::lint::rule_based_findings (cognitive 20): ai_memory_consolidate::lint::rule_based_findings has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 6, 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/ai-memory-consolidate/src/lint.rs"},"region":{"startLine":380}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6b75d5073173cbdf82d857637256a1134f698ec5d48201b761903e689151daa"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::antigravity::read_bounded_line (cognitive 20): ai_memory_hooks::antigravity::read_bounded_line has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/antigravity.rs"},"region":{"startLine":581}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccbcbd4294614b29f09b38d1ec04349d9a16b6220ab1c6f99db19a936f7cad8c"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::brief_tiers::assign_tiers (cognitive 20): ai_memory_hooks::brief_tiers::assign_tiers has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 4, match/switch 3 (4 pts), loops 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/ai-memory-hooks/src/brief_tiers.rs"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed1ef1dbf2a3c54e96f297a44e684f30f6d34fab858662e31cd20209c685902d"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::router::inspect_capture_envelope (cognitive 20): ai_memory_hooks::router::inspect_capture_envelope has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (17 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/ai-memory-hooks/src/router.rs"},"region":{"startLine":1439}}}],"partialFingerprints":{"codehealthFindingId/v1":"f76ca0d6eb50e1e0eb7ca71cea24fdb373d827bf088979469b83a5ac859d9889"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_llm::gemini::normalize_nullable_types (cognitive 20): ai_memory_llm::gemini::normalize_nullable_types has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 3 (8 pts), loops 3 (7 pts), if/else 2 (5 pts) (nesting depth added 12). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-llm/src/gemini.rs"},"region":{"startLine":459}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c3d5b961e6a9dbf026f046cf89b7963acd5e015202675f07d508ec2e831c1ca"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_mcp::server::resolve_def_pass (cognitive 20): ai_memory_mcp::server::resolve_def_pass has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 3 (8 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/ai-memory-mcp/src/server.rs"},"region":{"startLine":8528}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce68688984341c643dd5fb77caa29706f7290b0dae9d911349f61c382050d82b"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_store::reader::page_descriptor (cognitive 20): ai_memory_store::reader::page_descriptor has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (17 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/ai-memory-store/src/reader.rs"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa36ec8b19a2b8af1d042e9fa53c78b9b267f5e92617b88b6f14b10ff1b55da8"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_wiki::markdown::extract_relation_links (cognitive 20): ai_memory_wiki::markdown::extract_relation_links has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-wiki/src/markdown.rs"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"aadc588024f1d18f5359c931e53683d711da890f0055c393cd6399f2771800d6"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_wiki::markdown::extract_markdown_links (cognitive 20): ai_memory_wiki::markdown::extract_markdown_links has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (14 pts), boolean chains 3, 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":"crates/ai-memory-wiki/src/markdown.rs"},"region":{"startLine":909}}}],"partialFingerprints":{"codehealthFindingId/v1":"9175304909ab7cfaa99b95e24bcfde3c0f3509f3d48318e802a173f240e81c03"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_eval::ab::run (cognitive 20): ai_memory_eval::ab::run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (6 pts), match/switch 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"evals/src/ab.rs"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fe840b84b086c68ffa9d84e52e783b5e046ec16842eb4b4f425001242ecedc3"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_importer::document::run (cognitive 19): ai_memory_importer::document::run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (16 pts), match/switch 2, boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-importer/src/document.rs"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"19e0e08be5799e40915246691afca826c10fc4322cf19d4c40674ab24a7cf05f"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::doctor::render_plugins (cognitive 19): ai_memory_cli::commands::doctor::render_plugins has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), match/switch 1 (3 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/ai-memory-cli/src/commands/doctor.rs"},"region":{"startLine":965}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac0a036c3affa5bee39152006bd4f9d2ae1edd50a96a11f7362ac5816c4c47e0"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::install_hooks::project_strategy_from_json (cognitive 19): ai_memory_cli::commands::install_hooks::project_strategy_from_json has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 1 (3 pts), boolean chains 2, 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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":1801}}}],"partialFingerprints":{"codehealthFindingId/v1":"f02c76e03832795b54aae352586fd54635aa36c71f65ec54fc2e0c8062519f6f"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::install_hooks::apply_to_zcode_hooks (cognitive 19): ai_memory_cli::commands::install_hooks::apply_to_zcode_hooks has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 3, match/switch 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":"crates/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":7597}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1b153290a118e0dbc1c9ac3d770dc786b1406868b9e028eed671e0a09ad885d"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::install_mcp::codex_tool_approvals (cognitive 19): ai_memory_cli::commands::install_mcp::codex_tool_approvals has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (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/ai-memory-cli/src/commands/install_mcp.rs"},"region":{"startLine":2250}}}],"partialFingerprints":{"codehealthFindingId/v1":"63bb53ad70bd9e633142261d431af6d7b59509ddafe900a5a78e761ce080769d"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::uninstall::stop_service_guarding_purge (cognitive 19): ai_memory_cli::commands::uninstall::stop_service_guarding_purge has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 1 (3 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/uninstall.rs"},"region":{"startLine":1116}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f987cb8ad66601fa3593aef9d2c46646f6ff3728defc93ebcc5cd724ee409e0"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_core::repository_identity::normalize_remote_url (cognitive 19): ai_memory_core::repository_identity::normalize_remote_url has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4, 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/ai-memory-core/src/repository_identity.rs"},"region":{"startLine":643}}}],"partialFingerprints":{"codehealthFindingId/v1":"b59e1b59c7a34316fb7c4c620dff4acba1464cfac3ff1bac97dd289fe8953b95"}},{"ruleId":"D2","level":"warning","message":{"text":"CapturePolicy::match_pattern_candidate (cognitive 19): CapturePolicy::match_pattern_candidate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 7, 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/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":1184}}}],"partialFingerprints":{"codehealthFindingId/v1":"3baa3266ae066e67dc6f54feb8d880828c2ecae8e8457823126224d0cb137c8a"}},{"ruleId":"D2","level":"warning","message":{"text":"HookEnvelope::from_query_and_body (cognitive 19): HookEnvelope::from_query_and_body has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, boolean chains 4, 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/ai-memory-hooks/src/payload.rs"},"region":{"startLine":664}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f6ad4d52f2cdd28ee366bcb14a7f3558c7f34c46d6e405baf1719d4ada4f055"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::capture_policy::globs_intersect (cognitive 19): ai_memory_hooks::capture_policy::globs_intersect has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":1734}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5cd1740810c47b1cc9a7d4e2b4bfaf0374e7c0adda32cbd817c334f0d979788"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_llm::openai_oauth::parse_sse_response (cognitive 19): ai_memory_llm::openai_oauth::parse_sse_response has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 2 (3 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/ai-memory-llm/src/openai_oauth.rs"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3622e0eca00713d442aa287278435135ab3f2644e39b5e0f92bbde0f25cc6ab"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_mcp::admin::handle_embed (cognitive 19): ai_memory_mcp::admin::handle_embed has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 1 (3 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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":4577}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f811981e8e07b7c3d0bb0a7c90b315be5f82e23b08daceb6dcc4fbedc19e2a9"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_mcp::auth::authenticate_token (cognitive 19): ai_memory_mcp::auth::authenticate_token has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/auth.rs"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"22d362d4648c1b68a85ab29a5d6e3efc2ec4909f676a02647232e6afb183ca90"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_store::ops::move_session (cognitive 19): ai_memory_store::ops::move_session has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/ops.rs"},"region":{"startLine":9393}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b94a10fff641a986a2650b65cbea7241617489e2cb3ceefd508fd43a34d7278"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_web::diff::hunks (cognitive 19): ai_memory_web::diff::hunks has cognitive complexity 19 (threshold 15). Drivers by points: if/else 2 (7 pts), loops 4 (6 pts), match/switch 2 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-web/src/diff.rs"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cfa33993531621c5f536e44a5e44d29ebf63e5dda069c854f1fbe9dc60ba6e4"}},{"ruleId":"D2","level":"warning","message":{"text":"Wiki::move_session_page (cognitive 19): Wiki::move_session_page has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 3 (5 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/ai-memory-wiki/src/wiki.rs"},"region":{"startLine":943}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7a92c7131d37bba7022cdea2dc268ed259f7e0baf2e5aad2102af1ab6f38f0a"}},{"ruleId":"D2","level":"warning","message":{"text":"Wiki::plan_session_page_files_locked (cognitive 19): Wiki::plan_session_page_files_locked has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 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/ai-memory-wiki/src/wiki.rs"},"region":{"startLine":1082}}}],"partialFingerprints":{"codehealthFindingId/v1":"a42ddb636d1e167c7110af9d173bd4830c975114df442e35be2eafad663e1f83"}},{"ruleId":"D2","level":"warning","message":{"text":"Wiki::reindex_all (cognitive 19): Wiki::reindex_all has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (8 pts), match/switch 2 (5 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-wiki/src/wiki.rs"},"region":{"startLine":2998}}}],"partialFingerprints":{"codehealthFindingId/v1":"411a03b5f7347247c0c3109cb481b95931b93d814af9c57d5392e052317b7a81"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_wiki::git::stage_paths (cognitive 19): ai_memory_wiki::git::stage_paths has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-wiki/src/git.rs"},"region":{"startLine":1166}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c24eb3df254ea8066dbe250685d97c4faf233f667d1899dd3d478727afe1083"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_wiki::markdown::inline_code_spans (cognitive 19): ai_memory_wiki::markdown::inline_code_spans has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-wiki/src/markdown.rs"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"021b69946cc6c5f2823870f91e758259ae47c0504b868dbf88295ef1fa367aad"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_workstream::transcript::parse_content_blocks (cognitive 19): ai_memory_workstream::transcript::parse_content_blocks has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (16 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":"crates/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":3256}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb02bb581217f3f8929e0f415e4c7deee69a62792c0d5035e44de230c3373004"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_workstream::transcript::read_bounded_line (cognitive 19): ai_memory_workstream::transcript::read_bounded_line has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":5420}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e643e6db3c6863a9caf9e018e04e71297c520b356e9fdd1e6179ae043de4b46"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_workstream::transcript::discover_crush (cognitive 19): ai_memory_workstream::transcript::discover_crush has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (16 pts), loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":5668}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a82bde45478c6e83455dd36c99e9b3f1d0f66d12943b06a1ecf71e3f278f22f"}},{"ruleId":"D2","level":"warning","message":{"text":"EvalServer::launch (cognitive 19): EvalServer::launch has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 3 (5 pts), match/switch 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":"evals/src/retrieval/server.rs"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"1030771e50bce647d019a070300e3e04381d0abdbb588ed45bb27ef222b433ff"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_importer::run_conversation (cognitive 18): ai_memory_importer::run_conversation has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 1 (3 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":"companions/ai-memory-importer/src/main.rs"},"region":{"startLine":325}}}],"partialFingerprints":{"codehealthFindingId/v1":"df70e6f3f51411f06b84ec2d37c84475a9480229b2016e0c605c8e8b32ff28f2"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_wikisync::bidi::print_plan (cognitive 18): ai_memory_wikisync::bidi::print_plan has cognitive complexity 18 (threshold 15). Drivers by points: loops 8, if/else 5 (7 pts), match/switch 2 (3 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-wikisync/src/bidi.rs"},"region":{"startLine":1023}}}],"partialFingerprints":{"codehealthFindingId/v1":"94eaaa5bfb6049ba9eea49e60f8709ed06d37d796491ae5ee538c649a1d120af"}},{"ruleId":"D2","level":"warning","message":{"text":"LiveCallBatch::commit (cognitive 18): LiveCallBatch::commit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/session_usage.rs"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"baa621d94b95ed09a28911151375acff8cc85365f4b7daf2567ba82fa73ffeb3"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::dispatch (cognitive 18): ai_memory_cli::dispatch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 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/ai-memory-cli/src/lib.rs"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b4bffe570d324d8eb43e1ac4451b990e0ba286e4b04d4ab4933542c8a460aa4"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::hook_spool::recovery_target_for_entry (cognitive 18): ai_memory_cli::commands::hook_spool::recovery_target_for_entry has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 1, loops 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/hook_spool.rs"},"region":{"startLine":940}}}],"partialFingerprints":{"codehealthFindingId/v1":"c564c03e396effdcd308665727b92b6ef18b00eb4724d6452fbe53aa9b0d98c6"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::install_hooks::unrecognized_ai_memory_hook_entries (cognitive 18): ai_memory_cli::commands::install_hooks::unrecognized_ai_memory_hook_entries has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":3349}}}],"partialFingerprints":{"codehealthFindingId/v1":"66e6f299965587478d8cce06a9a6658a5456082c5eff44734bfd628203d048c4"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::resume::candidates_across_checkouts (cognitive 18): ai_memory_cli::commands::resume::candidates_across_checkouts has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 3 (5 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/resume.rs"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"175ca4c4db97cb518946c342effee6cf25ce9627b6a02dbdbd0494d6ebdbf300"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::serve::run_dream_scheduler_loop (cognitive 18): ai_memory_cli::commands::serve::run_dream_scheduler_loop has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (5 pts), match/switch 2 (5 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/ai-memory-cli/src/commands/serve.rs"},"region":{"startLine":2680}}}],"partialFingerprints":{"codehealthFindingId/v1":"19366fed763e0e09c0bf105599068c323130e80a4af9fda8250e25922b41c8d4"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_consolidate::experience::run_experience_review (cognitive 18): ai_memory_consolidate::experience::run_experience_review has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 3 (5 pts), match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/experience.rs"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f6f52a4c6e151577307bd71eddec561674952f977c3b8c488478bc335913ff3"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_consolidate::projection::project_session_observations (cognitive 18): ai_memory_consolidate::projection::project_session_observations has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (13 pts), match/switch 2 (4 pts), loops 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/projection.rs"},"region":{"startLine":573}}}],"partialFingerprints":{"codehealthFindingId/v1":"479c1cee094f86705b33ee67c23239ecf9dadc358d3daab476495026afe45787"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_core::i18n::diagnostic_templates (cognitive 18): ai_memory_core::i18n::diagnostic_templates has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (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/ai-memory-core/src/i18n.rs"},"region":{"startLine":546}}}],"partialFingerprints":{"codehealthFindingId/v1":"068ef556b8ad6b11dc892bb46c3b2f92c7c11cf72eb68b4014264ca4c50df44c"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::router::combine_startup_context (cognitive 18): ai_memory_hooks::router::combine_startup_context has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (16 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/ai-memory-hooks/src/router.rs"},"region":{"startLine":3344}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa5fda51268d43a0d5eca052d2446c76ec8ff29d6396b1fa7fac6886cfdccd54"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_llm::openai::enforce_strict_object_schemas (cognitive 18): ai_memory_llm::openai::enforce_strict_object_schemas has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-llm/src/openai.rs"},"region":{"startLine":695}}}],"partialFingerprints":{"codehealthFindingId/v1":"b55cd0ffe152c49d5200b5c363bf0561995d62ccbd2346b4d3766e3ca7902607"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_mcp::admin::handle_read_page (cognitive 18): ai_memory_mcp::admin::handle_read_page has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 7 (11 pts), if/else 6, boolean chains 1 (nesting depth added 4). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own 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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":2261}}}],"partialFingerprints":{"codehealthFindingId/v1":"79638625e0581049a1aa86c4d53b07e179d4006c656837d4a2fbf15c1704f7e1"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_store::workstream::link_native_session_in_transaction (cognitive 18): ai_memory_store::workstream::link_native_session_in_transaction has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 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/ai-memory-store/src/workstream.rs"},"region":{"startLine":1013}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ae6d884b9d2818290a5a9570b971068e12fead75634c78c6b156b280d96697a"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_web::diff::myers (cognitive 18): ai_memory_web::diff::myers has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 3 (6 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/ai-memory-web/src/diff.rs"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"42584fd853ab38af42eadab669833bbd5ad63f7c35a2807bdc6bd566d20fc3d0"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_web::operations::usage_panel (cognitive 18): ai_memory_web::operations::usage_panel has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 1, match/switch 1. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-web/src/operations.rs"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d15b0f34c448f3575a3f5aaaf3c295d954b2f32b04de02bd714bc7c0ade09bf"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_web::routes::session::handler (cognitive 18): ai_memory_web::routes::session::handler has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, match/switch 7. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-web/src/routes/session.rs"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"df877c574dac86272b50e2e80e9d66a6a06173f2b8bd0520eecdf5ad5ee53c8a"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_wiki::markdown::split_scope (cognitive 18): ai_memory_wiki::markdown::split_scope has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 4, match/switch 1 (3 pts) (nesting depth added 8). 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/ai-memory-wiki/src/markdown.rs"},"region":{"startLine":428}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cfc203caeb751fcfa4eb7e1b03b0466d4ea7d2d38d846afc0e80d1ce5e7776d"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_workstream::harness::launch_mode (cognitive 18): ai_memory_workstream::harness::launch_mode has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 5, 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/ai-memory-workstream/src/harness.rs"},"region":{"startLine":786}}}],"partialFingerprints":{"codehealthFindingId/v1":"9efd1e1446ff0165a172df1d2a937ee4709e9d24ba2b633a950d1f77dfbfa88e"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_workstream::jail::parse_jail_toggles (cognitive 18): ai_memory_workstream::jail::parse_jail_toggles has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (5 pts), match/switch 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-workstream/src/jail.rs"},"region":{"startLine":776}}}],"partialFingerprints":{"codehealthFindingId/v1":"43a4cd05900bd879216d141a672ebce0d60980e041c1d22233a791bf11cf1b73"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_relay::ack::validate (cognitive 17): ai_memory_relay::ack::validate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-relay/src/ack.rs"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"86cc5b88e940725b6755d33593501430bfcba1522f7d8945a8a020f49e9613d1"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_wikisync::page_file::parse (cognitive 17): ai_memory_wikisync::page_file::parse has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 2 (5 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":"companions/ai-memory-wikisync/src/page_file.rs"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"a951022bebb76dbcafb5ada98614236f5acd0b44bea0d925414ab404704abab3"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::install_hooks::native_claude_hook_url (cognitive 17): ai_memory_cli::commands::install_hooks::native_claude_hook_url has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, 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, 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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"345bdf1c1afbdc45f818e63d75ea5e77e7430e19ae0391ce92c5b90a068baf82"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::setup::run (cognitive 17): ai_memory_cli::commands::setup::run has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15 (17 pts) (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/ai-memory-cli/src/commands/setup.rs"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"55b7b2468345fe5883ac211a0e6908fe027a2961af5ced85a3b8c3bc19658489"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::status::report_offline_spool (cognitive 17): ai_memory_cli::commands::status::report_offline_spool has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (17 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/status.rs"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"b615bd6d8d0d5257b86387fc7f7a76eaa1a862c06c0a70fa5b2bbad2fdb4bfac"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::uninstall::strip_mcp_toml (cognitive 17): ai_memory_cli::commands::uninstall::strip_mcp_toml has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (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/ai-memory-cli/src/commands/uninstall.rs"},"region":{"startLine":2024}}}],"partialFingerprints":{"codehealthFindingId/v1":"a87125b9201e45d3517fcb8371916d161e9c8c2d9cf2110c68222d004c9f7886"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::config::validate_run_profiles (cognitive 17): ai_memory_cli::config::validate_run_profiles has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/config.rs"},"region":{"startLine":1609}}}],"partialFingerprints":{"codehealthFindingId/v1":"ddf03f7d33eea8b385cb34c6dc7768fcc478686202aadcdbce370c04c44e2280"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::marker::inspect_scope_for (cognitive 17): ai_memory_cli::marker::inspect_scope_for has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, loops 1 (2 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/ai-memory-cli/src/marker.rs"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"90ceedcb6d8d41255ed7ecfe5fa50de3fb4f50b7d013b858e213b8956d5b242d"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_consolidate::profile::slugify (cognitive 17): ai_memory_consolidate::profile::slugify has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (15 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/ai-memory-consolidate/src/profile.rs"},"region":{"startLine":1096}}}],"partialFingerprints":{"codehealthFindingId/v1":"e673a490522fd1628b1c3c99e359bafd6e0f84be0f7568bb5a08f1e53964de04"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_core::profile::render_digest (cognitive 17): ai_memory_core::profile::render_digest has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (16 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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/ai-memory-core/src/profile.rs"},"region":{"startLine":698}}}],"partialFingerprints":{"codehealthFindingId/v1":"a09328f5de0d2530c6bdcc37c7eab0ba4ee7e261106f9a5ceed324a42daf338b"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::capture_policy::runs_inline_code (cognitive 17): ai_memory_hooks::capture_policy::runs_inline_code has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 4, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":3455}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c68fc0a1dc3ddf3a742d991f93795f35188ab2187c52a078fb87e1e2845ccfc"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::capture_policy::bracket_class (cognitive 17): ai_memory_hooks::capture_policy::bracket_class has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":4217}}}],"partialFingerprints":{"codehealthFindingId/v1":"48165fd9bb259069edee356b7c4d676da05e42cd52feabe9b3697e1c69d6d3aa"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::idle_end::run_idle_end_tick (cognitive 17): ai_memory_hooks::idle_end::run_idle_end_tick has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), match/switch 3 (6 pts), loops 2, 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/ai-memory-hooks/src/idle_end.rs"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fb7201a2cb6f03c23428203b3dffbf6d765c9079acac44e8228ccff8938e59a"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::workstream::list_recent_workstreams (cognitive 17): ai_memory_hooks::workstream::list_recent_workstreams has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), match/switch 4 (6 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/ai-memory-hooks/src/workstream.rs"},"region":{"startLine":795}}}],"partialFingerprints":{"codehealthFindingId/v1":"52e5526c1c1658cd739d93f9f083a2656f0e4f947273d32eab24bf5810d24d31"}},{"ruleId":"D2","level":"warning","message":{"text":"AiMemoryServer::memory_auto_improve (cognitive 17): AiMemoryServer::memory_auto_improve has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 3, loops 3, match/switch 2 (3 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/server.rs"},"region":{"startLine":4700}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8aa0e2d4d537329947d1b55a5a64b55705b159c93231ead6d602c4fd0ee2e80"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_mcp::human_auth::require_dual_auth (cognitive 17): ai_memory_mcp::human_auth::require_dual_auth has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 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/ai-memory-mcp/src/human_auth.rs"},"region":{"startLine":1057}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d3b200bd34e087a781b38a6d57d2db6cdfad0d7f8431e2c0a1e57fd0e729d22"}},{"ruleId":"D2","level":"warning","message":{"text":"AmbiguousProjectHolders::fmt (cognitive 17): AmbiguousProjectHolders::fmt has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (6 pts), match/switch 3 (6 pts), boolean chains 3, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/error.rs"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4a4f14490b4eb2240ea4063f237feffc04636859aa41aba4c4643bafceb587f"}},{"ruleId":"D2","level":"warning","message":{"text":"ReaderPool::hybrid_search_scopes_outcome (cognitive 17): ReaderPool::hybrid_search_scopes_outcome has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 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/ai-memory-store/src/reader.rs"},"region":{"startLine":8620}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b2cf75b74e9578f02aa106b9fabeec91712a6aa746852489b95805ab74bb670"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_store::fts_query::prepare_fts5_token (cognitive 17): ai_memory_store::fts_query::prepare_fts5_token has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 5 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/fts_query.rs"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"075346be1f1887526495eea7be9bdfbfcf0134233aa8f9a6a99a74066f57453c"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_store::reader::entity_query_tokens (cognitive 17): ai_memory_store::reader::entity_query_tokens has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/reader.rs"},"region":{"startLine":910}}}],"partialFingerprints":{"codehealthFindingId/v1":"789b01daa5504ae55d72e7565982b89eea67a7b93ca1d2e308821565ff69bdc1"}},{"ruleId":"D2","level":"warning","message":{"text":"ConsoleView::load_sessions (cognitive 17): ConsoleView::load_sessions has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (12 pts), match/switch 2 (3 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":"crates/ai-memory-web/src/management/views.rs"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fc63776e5585e497a8f0e5f461e94c0b32262730d23449ce63dbb3da47f7b11"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_wiki::confinement::inspect_tree_except (cognitive 17): ai_memory_wiki::confinement::inspect_tree_except has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 4 (9 pts), if/else 3 (5 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-wiki/src/confinement.rs"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a9fed2a4e06f3eab8f671a29dee19324e6002da253292307dd4ed1b80a0e0b9"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_workstream::transcript::transcript_file (cognitive 17): ai_memory_workstream::transcript::transcript_file has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, boolean chains 8. To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":4251}}}],"partialFingerprints":{"codehealthFindingId/v1":"24a82c64b52556cd6cdf2993eccf5f403f34d1d2ab644a08fc12fb48db14c23b"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_eval::retrieval::run_config (cognitive 17): ai_memory_eval::retrieval::run_config has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 3 (7 pts), if/else 4 (6 pts), loops 3 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"evals/src/retrieval/mod.rs"},"region":{"startLine":600}}}],"partialFingerprints":{"codehealthFindingId/v1":"415cd1fb00c99922b816e1bad67226bd5273424850331668d65cb066bf6a2951"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_eval::retrieval::ingest::ingest_question (cognitive 17): ai_memory_eval::retrieval::ingest::ingest_question has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 3 (6 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":"evals/src/retrieval/ingest.rs"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"14379a20ae276c12f7dafe969776b90bf85b05de75ecb9822fb77521ff7c9189"}},{"ruleId":"D2","level":"warning","message":{"text":"ApiNamespace.recent (cognitive 17): ApiNamespace.recent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 3, loops 2 (3 pts), ternaries 1 (2 pts) (nesting depth added 6). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 187). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal\u0027s work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/src/api.ts"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c37746cf5409547b7d70b57c146ea7e00c1c998f529feafef9b97c209ccb135"}},{"ruleId":"D2","level":"warning","message":{"text":"PagesNamespace.update (cognitive 17): PagesNamespace.update has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/src/client.ts"},"region":{"startLine":542}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcb942c939fec59ece1affb8338276e6117b9d25e26a5801aa9f36384f779099"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_importer::first_h1_line (cognitive 16): ai_memory_importer::first_h1_line has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), boolean chains 4, match/switch 1 (4 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":"companions/ai-memory-importer/src/main.rs"},"region":{"startLine":1191}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb47986a3c65793b36325469eae2356cfeb59e501741d449e095c490352b0a22"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_importer::claude_mem::snapshot_database (cognitive 16): ai_memory_importer::claude_mem::snapshot_database has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 2, loops 2, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-importer/src/claude_mem.rs"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"c088a29992a3861cf7e7deb46479d321ebb9a88818dadeafffaa9090910f02ee"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::hook_capture::hook_scope_from_selection (cognitive 16): ai_memory_cli::commands::hook_capture::hook_scope_from_selection has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 4, match/switch 2 (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/ai-memory-cli/src/commands/hook_capture.rs"},"region":{"startLine":619}}}],"partialFingerprints":{"codehealthFindingId/v1":"140e63a13368876a40775f7f286ae339baab5190ed35f6d2a34247442877a9b6"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::run::prepare_previous_session_history (cognitive 16): ai_memory_cli::commands::run::prepare_previous_session_history has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 5 (11 pts), if/else 3 (4 pts), 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/ai-memory-cli/src/commands/run.rs"},"region":{"startLine":5091}}}],"partialFingerprints":{"codehealthFindingId/v1":"217591f291da9b448f2bc18b62fe5c038763b4f327cbf58ff7bcbefc0d6f1f6d"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::setup::execute (cognitive 16): ai_memory_cli::commands::setup::execute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6, loops 4 (5 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/setup.rs"},"region":{"startLine":833}}}],"partialFingerprints":{"codehealthFindingId/v1":"299faa8a20f8ccfde415610364f677c60fd401d1bcaf67407cec86046178eb55"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_cli::commands::uninstall::apply_change (cognitive 16): ai_memory_cli::commands::uninstall::apply_change has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), match/switch 2 (4 pts), boolean chains 2, loops 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/ai-memory-cli/src/commands/uninstall.rs"},"region":{"startLine":744}}}],"partialFingerprints":{"codehealthFindingId/v1":"b374953155313d3edea6665a7a859a848ad1310cad457ff3366d8897e7cbb27a"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_consolidate::consolidator::resolve_rule_path_collisions (cognitive 16): ai_memory_consolidate::consolidator::resolve_rule_path_collisions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 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/ai-memory-consolidate/src/consolidator.rs"},"region":{"startLine":1312}}}],"partialFingerprints":{"codehealthFindingId/v1":"17d545953b069c50da58112c8eb6fbf6020df0d91607b96f0e66e9cd0f2b2d12"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::capture_policy::raw_readings (cognitive 16): ai_memory_hooks::capture_policy::raw_readings has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 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":"crates/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":4046}}}],"partialFingerprints":{"codehealthFindingId/v1":"82e4351c21fef166cea0800768a5b71d7907bc6c3964124ac4fa6afab0c2a069"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::payload::extract_first_string_array_item (cognitive 16): ai_memory_hooks::payload::extract_first_string_array_item has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (8 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/payload.rs"},"region":{"startLine":1307}}}],"partialFingerprints":{"codehealthFindingId/v1":"11301dd350b45ec3e37bdd86501423c432cfdbad29fea87405944356b800ed74"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::router::render_managed_context (cognitive 16): ai_memory_hooks::router::render_managed_context has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), loops 2 (3 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 3). Of this number, 15 points are the body\u0027s own statements and 1 belongs to one function item inside it that branches. 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/ai-memory-hooks/src/router.rs"},"region":{"startLine":3945}}}],"partialFingerprints":{"codehealthFindingId/v1":"f876fa0f7cf3b59c5bc775b3d25a6775870b44f7f9479db112a75475b36d2ee6"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_hooks::router::derive_open_questions (cognitive 16): ai_memory_hooks::router::derive_open_questions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/router.rs"},"region":{"startLine":6263}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d087d79c2f198e027d9dc8a86f9e018b860cb52fa45fde08a15e8f5d4bb7d99"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_llm::copilot::response_text (cognitive 16): ai_memory_llm::copilot::response_text has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-llm/src/copilot.rs"},"region":{"startLine":944}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8a387c577fcfe10e200bfd3f457e73ba4048f009d5095b860019a05e76d0b66"}},{"ruleId":"D2","level":"warning","message":{"text":"ProjectAuthz::authorize (cognitive 16): ProjectAuthz::authorize has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/project_authz.rs"},"region":{"startLine":210}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a2ff875aaa4031484c6f7ab6bee04207961fa2097b4a5f65d6df43174d9e70f"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_store::project_authz::resolve (cognitive 16): ai_memory_store::project_authz::resolve has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), match/switch 3 (6 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/ai-memory-store/src/project_authz.rs"},"region":{"startLine":419}}}],"partialFingerprints":{"codehealthFindingId/v1":"debca1c477a8362a2d84cc7fc8589ec13ca2133827536b747a679eb226ff7b36"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_store::workstream::link_or_adopt_native_session (cognitive 16): ai_memory_store::workstream::link_or_adopt_native_session has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), match/switch 3 (4 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/workstream.rs"},"region":{"startLine":1158}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd1a9ac31c2426088983d0a94df09bf72c1a337307c66acaa128b66ef9ab9ba4"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_workstream::transcript::export_crush_range_inner (cognitive 16): ai_memory_workstream::transcript::export_crush_range_inner 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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":3678}}}],"partialFingerprints":{"codehealthFindingId/v1":"d88cb8880a81baa6381128afb2ce8e5dc11327c0bc6a1dee21932a914e50c821"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_workstream::transcript::session_header (cognitive 16): ai_memory_workstream::transcript::session_header has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), match/switch 3 (5 pts), loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":4569}}}],"partialFingerprints":{"codehealthFindingId/v1":"652c756d846cedc8a9a6779f1bb5e2ee59cbe151f6bceaf993575aebeabddf77"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_eval::ab::extract_first_balanced_object (cognitive 16): ai_memory_eval::ab::extract_first_balanced_object has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"evals/src/ab.rs"},"region":{"startLine":703}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea3694cd0276ea18212476df5a5d8fe69b83a135141995c3e79ea1cabf92afa9"}},{"ruleId":"D2","level":"warning","message":{"text":"ai_memory_eval::retrieval::reachability::evidence_turns (cognitive 16): ai_memory_eval::retrieval::reachability::evidence_turns has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 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":"evals/src/retrieval/reachability.rs"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab87fb58ad123d8234cfbd54a138ee8a1178fb5305b5ba96a6e4f6ebd5961f36"}},{"ruleId":"D2","level":"warning","message":{"text":"LaunchdController.restart (cognitive 16): LaunchdController.restart has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), error handling 2 (5 pts), boolean chains 2, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-macos/Sources/AIMemoryMenuCore/LaunchdController.swift"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"308326378b5927efdfba7fff3a4763dcfa3f97c974248fef39a86b42742f4113"}},{"ruleId":"D2","level":"warning","message":{"text":"PagesNamespace.read (cognitive 16): PagesNamespace.read has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 9, if/else 4, boolean chains 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":"companions/ai-memory-ts/src/client.ts"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"626190fa0a78cdb372309bee8bf8d75bf23bfdd0dfb451d0e6f39e606cebbec9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/reader.rs: FileTooLong \u2014 10922 significant 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 76% of them inside a single declaration: ReaderPool (2 blocks, 2955-14844), declaring 89 free functions. The bar is 500 significant lines; this is 10422 over it, 21.84\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/ai-memory-store/src/reader.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fb58f183422c6fa85a92f0b007f744e03c81a1cdb303f11a3fcd504c02d6616"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: ReaderPool: ClassTooLong \u2014 8249 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 237 methods, 2 blocks, lines 2955-14844. The bar is 400 significant lines; this is 7849 over it, 20.62\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/reader.rs"},"region":{"startLine":2955}}}],"partialFingerprints":{"codehealthFindingId/v1":"53d53a97e7d8a0493da7ec994547b6f23bcd9e8953e445c9c7bd72edf5fd92de"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/server.rs: FileTooLong \u2014 6548 significant 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: AiMemoryServer (5 blocks, 573-9038), declaring 48 free functions. The bar is 500 significant lines; this is 6048 over it, 13.10\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/server.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f86426ba9d29c5930dbef504c23489aa524078f66e28dadffe725d5dfca98eac"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/admin.rs: FileTooLong \u2014 6336 significant 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 191 free functions. The bar is 500 significant lines; this is 5836 over it, 12.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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"820e18694b699aefdc92389875cd3bb9f383e6d1d1f9c0b172a6c4222674056b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/ops.rs: FileTooLong \u2014 6265 significant 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 154 free functions. The bar is 500 significant lines; this is 5765 over it, 12.53\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/ops.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae2e0c1f0a99120bc041ac327e254f2ad9296610932034f57fd4b593a548b081"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/install_hooks.rs: FileTooLong \u2014 6085 significant 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 241 free functions. The bar is 500 significant lines; this is 5585 over it, 12.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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c8e748d7aac6e5718ece3e92305a447f265c6cf9c491b1f9e2b2aedc48f2865"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: AiMemoryServer: ClassTooLong \u2014 4565 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 108 methods, 5 blocks, lines 573-9038. The bar is 400 significant lines; this is 4165 over it, 11.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/ai-memory-mcp/src/server.rs"},"region":{"startLine":573}}}],"partialFingerprints":{"codehealthFindingId/v1":"0927a47e9fad96e8da81047adc4d9f334a6d605712ec89b534fd985d69296d8d"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_cli::commands::run::run_once_with_wiring: FunctionTooLong \u2014 ai_memory_cli::commands::run::run_once_with_wiring runs 1003 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 903 over it, 10.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/ai-memory-cli/src/commands/run.rs"},"region":{"startLine":613}}}],"partialFingerprints":{"codehealthFindingId/v1":"ade0a2d89f15b3baa06f1ebccc21fff8ec4985f555056bf574fa15224d0dbd9e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/transcript.rs: FileTooLong \u2014 4569 significant 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 150 free functions. The bar is 500 significant lines; this is 4069 over it, 9.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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"645ea483d5830ed3527f12a20ac191cf03c7e937a7281c71d9e4d8c33bb388b2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/run.rs: FileTooLong \u2014 4351 significant 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 151 free functions. The bar is 500 significant lines; this is 3851 over it, 8.70\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/run.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9fa0415ad742625142472e9da52cbbdeda29a774607a17cf7da0d83ed223278"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ReaderPool: TooManyMethods \u2014 237 methods, declared across 3 files: src/reader.rs (228), src/dashboard.rs (8), src/provenance.rs (1). The bar is 30 methods; this is 207 over it, 7.90\u00D7 the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/reader.rs"},"region":{"startLine":2955}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ad76c89bc8171585ac84fbe02fcb3abdf46613ae8899ebe04b95f04855294e5"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/router.rs: FileTooLong \u2014 3810 significant 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 95 free functions. The bar is 500 significant lines; this is 3310 over it, 7.62\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/router.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"221b9af1b79a292353b4621a112b12aaf6652256a6758f5d962c4f03f3ebf659"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/writer.rs: FileTooLong \u2014 3784 significant 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 3284 over it, 7.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/ai-memory-store/src/writer.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dcf531e1e77f741f3759ddd08e05c19210e240d9844893b6c083972faaafb76"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_cli::commands::serve::run: FunctionTooLong \u2014 ai_memory_cli::commands::serve::run runs 644 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 544 over it, 6.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/ai-memory-cli/src/commands/serve.rs"},"region":{"startLine":1221}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8592bc17e248883e47557a365fa8934ed617b01166b3e5f93d4edfc1ffda096"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_hooks::router::process_authorized: FunctionTooLong \u2014 ai_memory_hooks::router::process_authorized runs 637 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 537 over it, 6.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/ai-memory-hooks/src/router.rs"},"region":{"startLine":4995}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc8c09a06d0445c43c42f68ec2941ee402116161a8d93b01b7e6e3e48047f861"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/capture_policy.rs: FileTooLong \u2014 2927 significant 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 118 free functions. The bar is 500 significant lines; this is 2427 over it, 5.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":"crates/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e469520b79e7b6b6fc0b059ed2d5a36799c5c0072c9dd9c3fede4a6cefaf6c6"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_cli::commands::backup_agents::discover_assets: FunctionTooLong \u2014 ai_memory_cli::commands::backup_agents::discover_assets runs 567 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 467 over it, 5.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/ai-memory-cli/src/commands/backup_agents.rs"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7b5247eaa867566f50c413b2844697813d0dc35b59c10c072b66af93c8a02f8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/wiki.rs: FileTooLong \u2014 2715 significant 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 2215 over it, 5.43\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-wiki/src/wiki.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"eee4452608ceab56915331148e30edc4827ae58036f45a848f6c65ed5522a727"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: WriterHandle: TooManyMethods \u2014 152 methods. The bar is 30 methods; this is 122 over it, 5.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/ai-memory-store/src/writer.rs"},"region":{"startLine":927}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f35add4360fb9ceaef443e74665b1a5cca17a042c861b901eaf74c6043d05cb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/serve.rs: FileTooLong \u2014 2268 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 60 free functions. The bar is 500 significant lines; this is 1768 over it, 4.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/ai-memory-cli/src/commands/serve.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"da85d6bd0ee00fb483069d3e9a770c07a35f3053e164900464c7db1f38e092f5"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_importer::agentmemory::export::plan: FunctionTooLong \u2014 ai_memory_importer::agentmemory::export::plan runs 442 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 342 over it, 4.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":"companions/ai-memory-importer/src/agentmemory/export.rs"},"region":{"startLine":665}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebc4d04a8a38264a7e352c49367f0784d45a6eec472bf6eb3b6990fef43a1057"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AiMemoryServer.memory_query: MethodTooLong \u2014 memory_query runs 422 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 322 over it, 4.22\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/server.rs"},"region":{"startLine":3216}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6121b4f9211674ec5e23a3abe2dd95b8b5aabdefea6bfe20b93e615744d7735"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_cli::commands::hook_spool::drain_with_live_token: FunctionTooLong \u2014 ai_memory_cli::commands::hook_spool::drain_with_live_token runs 407 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 307 over it, 4.07\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/hook_spool.rs"},"region":{"startLine":1462}}}],"partialFingerprints":{"codehealthFindingId/v1":"e530a5a710ddaf7b26b648d838058b5e947d7880931274da1edd9c7831027cdf"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ReaderPool.hybrid_search_inner: MethodTooLong \u2014 hybrid_search_inner runs 393 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 293 over it, 3.93\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/reader.rs"},"region":{"startLine":8730}}}],"partialFingerprints":{"codehealthFindingId/v1":"115f5bf9f347725a568e6b7176208d4ac28b5e9cca41ad4a8711ac611b88cd51"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/install_mcp.rs: FileTooLong \u2014 1918 significant 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 107 free functions. The bar is 500 significant lines; this is 1418 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/ai-memory-cli/src/commands/install_mcp.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a673129fd8d8e9011b5c82a6a1170ef37f7e23556d12485427da4b946a469dc2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/hook.rs: FileTooLong \u2014 1907 significant 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 107 free functions. The bar is 500 significant lines; this is 1407 over it, 3.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/ai-memory-cli/src/commands/hook.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"13db93270d8b2cbebb9f6e8119192fb1a95098c1d7aefa652f0dd8279c634aa6"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_store::ops::merge_project: FunctionTooLong \u2014 ai_memory_store::ops::merge_project runs 380 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 280 over it, 3.80\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/ops.rs"},"region":{"startLine":8798}}}],"partialFingerprints":{"codehealthFindingId/v1":"07353a1320cc70537317a95329578e6e54694ba4440a900100081d4bda645944"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AiMemoryServer: TooManyMethods \u2014 108 methods. The bar is 30 methods; this is 78 over it, 3.60\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/ai-memory-mcp/src/server.rs"},"region":{"startLine":573}}}],"partialFingerprints":{"codehealthFindingId/v1":"cec317ae5d27723b30a5b4a23dd28a06d795f91b2a081b18f574bd994505ed2a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/config.rs: FileTooLong \u2014 1798 significant 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 1298 over it, 3.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/ai-memory-cli/src/config.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c3c1d997a96d72d8f6d387d700e6a0b25b95bf67d0e5cb6d02356df3bd86cb8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/profile.rs: FileTooLong \u2014 1798 significant 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 61 free functions. The bar is 500 significant lines; this is 1298 over it, 3.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/ai-memory-consolidate/src/profile.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb56710f2c761281ce50d299d018a4aa96453bbaa0bbbff7a636a1368816d5ca"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/workstream.rs: FileTooLong \u2014 1779 significant 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 1279 over it, 3.56\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/workstream.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"232e6c8774c630d2e471795742a630559f14a5f8a6e549d631e602212456494b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/cli.rs: FileTooLong \u2014 1699 significant 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 1199 over it, 3.40\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/cli.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e8c0b900b7946e01d024027abd9c6b510e6fdcd3d0b009691503b0cccb7ed81"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/render_shared.rs: FileTooLong \u2014 1653 significant 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 73 free functions. The bar is 500 significant lines; this is 1153 over it, 3.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/ai-memory-cli/src/commands/render_shared.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9134d88856618bd2d9371aab2821bc0f22da047880a4d96550c83e3b43545823"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_cli::commands::serve::start_maintenance_scheduler: FunctionTooLong \u2014 ai_memory_cli::commands::serve::start_maintenance_scheduler runs 330 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 230 over it, 3.30\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/serve.rs"},"region":{"startLine":2188}}}],"partialFingerprints":{"codehealthFindingId/v1":"5654699ba4651d920f6d9c3357fbe96bf0c798b6231869a4e61317559cdf0e59"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/auto_improve.rs: FileTooLong \u2014 1647 significant 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 1147 over it, 3.29\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/auto_improve.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"90163268427bc97ec96aaebaecca0515e84c32fd1ce1e71b9f4b2dac40a5be9c"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Wiki: TooManyMethods \u2014 98 methods. The bar is 30 methods; this is 68 over it, 3.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/ai-memory-wiki/src/wiki.rs"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"663893cc254f53d2bac4c3d81c5820e1eba7a248ce29448188c808b9754871d2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/hook_spool.rs: FileTooLong \u2014 1593 significant 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 58 free functions. The bar is 500 significant lines; this is 1093 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/ai-memory-cli/src/commands/hook_spool.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3c1cfb059fc7d25edb0dad5247059f5c872134f0993af910f055999a026509a"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_cli::commands::status::presentation::render: FunctionTooLong \u2014 ai_memory_cli::commands::status::presentation::render 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/ai-memory-cli/src/commands/status/presentation.rs"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"a31fc7beb5533a7619ca9f16185cd9302f929fcaf4c2af18bbc4084fc68bc96b"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_cli::commands::uninstall::build_plan: FunctionTooLong \u2014 ai_memory_cli::commands::uninstall::build_plan runs 305 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 205 over it, 3.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/ai-memory-cli/src/commands/uninstall.rs"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"8085c7c5bb5b3990a55f0d68bc9230850c35835660ecda230b8c54f8d450e7c8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/consolidator.rs: FileTooLong \u2014 1516 significant 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 47 free functions. The bar is 500 significant lines; this is 1016 over it, 3.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/ai-memory-consolidate/src/consolidator.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"42cfa92366d05ac9f451dd6454467aa311c9c0824c10d6d959f65b22c4927c8a"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_web::features::states: FunctionTooLong \u2014 ai_memory_web::features::states runs 274 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 174 over it, 2.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/ai-memory-web/src/features.rs"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"05e56ac9d33ce9e101f4ae4dc70cad74e00e1bef14a4d9202c8a3a877034f5e2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/uninstall.rs: FileTooLong \u2014 1353 significant 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 853 over it, 2.71\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file 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/ai-memory-cli/src/commands/uninstall.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"01ba63fc96e2416b5d5b129a6d1ebabcf9a65c380dec1c334719ebedda04b8c4"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AiMemoryServer.write_page_in_scope: MethodTooLong \u2014 write_page_in_scope runs 265 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 165 over it, 2.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/ai-memory-mcp/src/server.rs"},"region":{"startLine":5139}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0a92f5153c656dc069e596872edbd0f84bff397f8ff922b14eace9029ad9b91"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_consolidate::sweep::run_sweep_at: FunctionTooLong \u2014 ai_memory_consolidate::sweep::run_sweep_at runs 262 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 162 over it, 2.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/ai-memory-consolidate/src/sweep.rs"},"region":{"startLine":604}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb1d6058e8942495018630f28cd0c5bd48524ad7f687767a2764367696089148"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: routes/api.rs: FileTooLong \u2014 1258 significant 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 758 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/ai-memory-web/src/routes/api.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b80e53b9d9d236543942c40cca5969d37a1d623d6e1b9395291a08f8d202395"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_workstream::harness::launch_mode: FunctionTooLong \u2014 ai_memory_workstream::harness::launch_mode runs 249 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 149 over it, 2.49\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-workstream/src/harness.rs"},"region":{"startLine":786}}}],"partialFingerprints":{"codehealthFindingId/v1":"4259851943e4f903fc32680ffce7236ae722b8e6781619606b9791855fc5ae66"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_mcp::admin::copy_purge_merge: FunctionTooLong \u2014 ai_memory_mcp::admin::copy_purge_merge runs 248 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 148 over it, 2.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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":8609}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b34af6efdbb3d34bcd97ef2340466bf329e9d387d925ab5e3ba6f3742bb0447"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/harness.rs: FileTooLong \u2014 1188 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 54 free functions. The bar is 500 significant lines; this is 688 over it, 2.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/ai-memory-workstream/src/harness.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"13003e31eaa3a2ac2712dd2fd895fb6cadc9566814d057583bab6baed13a52b6"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: Config: TooManyFields \u2014 70 stored fields beside 27 methods. The bar is 30 stored fields; this is 40 over it, 2.33\u00D7 the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member \u2014 each reader then names only the group it uses."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/config.rs"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e4f78bab7189b3bcfd90818da137c6b8cab3429680897143fb428bb3ada307a"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_hooks::router::resolve_project_ids_inner: FunctionTooLong \u2014 ai_memory_hooks::router::resolve_project_ids_inner 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":"crates/ai-memory-hooks/src/router.rs"},"region":{"startLine":4178}}}],"partialFingerprints":{"codehealthFindingId/v1":"346d6f205a20371323c47aa6191bd94295bb09c4809fbcc69cd970ab9aefd210"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Config.load_with_runtime_env: MethodTooLong \u2014 load_with_runtime_env 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/ai-memory-cli/src/config.rs"},"region":{"startLine":2477}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fc69be7e1a8a2f1ca536f5965d04ce7cf057d17205ed115e088905fe0809d0f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/main.rs: FileTooLong \u2014 1118 significant 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 618 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":"companions/ai-memory-importer/src/main.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"acddff84589c4a773500d1292f12936c0ed6dd486ef1cdc93b49909ed8351afc"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/workstream.rs: FileTooLong \u2014 1115 significant 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 615 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/ai-memory-hooks/src/workstream.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"497566381316a304a10d07aaa6bf89c4ccabcd4d151e6f084617c6fc8aef4e5f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AiMemoryServer.memory_auto_improve: MethodTooLong \u2014 memory_auto_improve runs 222 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 122 over it, 2.22\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/server.rs"},"region":{"startLine":4700}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e61a6efe078a8786acb007439500e2c9dd8cd98c669f42ff4291b80e7f27d7d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AiMemoryServer.memory_read_page: MethodTooLong \u2014 memory_read_page runs 221 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 121 over it, 2.21\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/server.rs"},"region":{"startLine":5922}}}],"partialFingerprints":{"codehealthFindingId/v1":"c821f1251c735288507874e83afc364a2ab77e1343c2f8a3835b49ad5e06d0e3"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_store::ops::move_session: FunctionTooLong \u2014 ai_memory_store::ops::move_session 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/ai-memory-store/src/ops.rs"},"region":{"startLine":9393}}}],"partialFingerprints":{"codehealthFindingId/v1":"02f29dda1527a5d6e89206ab05c1a0d1120eb7dcb544ed36d21fc9a132b8c8d7"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: agentmemory/export.rs: FileTooLong \u2014 1093 significant 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 593 over it, 2.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":"companions/ai-memory-importer/src/agentmemory/export.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"affa5f02ba7cbb59ab41ec41ac365fc9fcf56da51cba1ccbc97ecc3c60ad4176"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_web::routes::inbox::handler: FunctionTooLong \u2014 ai_memory_web::routes::inbox::handler 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/ai-memory-web/src/routes/inbox.rs"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8c5ef46e90701b25aeea98af9b469b1ceb0e54b7d2bee7dc298f8ce9f79b642"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/document.rs: FileTooLong \u2014 1074 significant 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 574 over it, 2.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":"companions/ai-memory-importer/src/document.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"90eba58bf1e112c36eeb693490bee85693fd485b1f8d04878ea4b7037d29313d"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_store::workstream::finish_run_inner: FunctionTooLong \u2014 ai_memory_store::workstream::finish_run_inner runs 214 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 114 over it, 2.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/ai-memory-store/src/workstream.rs"},"region":{"startLine":1396}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bb04c45b22a32701d7ab6500b7b89add83127212fc3f9d5e743203b2e167482"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ReaderPool.audit_contamination: MethodTooLong \u2014 audit_contamination runs 213 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 113 over it, 2.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/ai-memory-store/src/reader.rs"},"region":{"startLine":13617}}}],"partialFingerprints":{"codehealthFindingId/v1":"200eca2a16bc0be61d9c9897d5c2b050803040a5208b75d95ba8fa5fd8cb8dbc"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/auto_improve.rs: FileTooLong \u2014 1045 significant 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 545 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/ai-memory-store/src/auto_improve.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e3bd8adc8beb952d67d28db1368503fd728b3df856b57ac533606c3e0442299"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_store::ops::purge_session_with_owner: FunctionTooLong \u2014 ai_memory_store::ops::purge_session_with_owner 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/ai-memory-store/src/ops.rs"},"region":{"startLine":7575}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dfc32023f97ab01f319572b3cb20b420a83ea622d70bcacd609bf6e4c88cab1"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_cli::commands::recovery::recover: FunctionTooLong \u2014 ai_memory_cli::commands::recovery::recover 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/ai-memory-cli/src/commands/recovery.rs"},"region":{"startLine":553}}}],"partialFingerprints":{"codehealthFindingId/v1":"10c2ca173988d5abb32aebf7b58dad9fb72286c0bd14b7622217ed8868d0c41a"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_consolidate::profile::converge: FunctionTooLong \u2014 ai_memory_consolidate::profile::converge 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/ai-memory-consolidate/src/profile.rs"},"region":{"startLine":1448}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b1cccfbf7fbc9519acab8603caff146d2c5bae9713c1eee480fa405361988d6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/bootstrap.rs: FileTooLong \u2014 1014 significant 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 514 over it, 2.03\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/bootstrap.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"89167f2160f3e801f9d84fc702b8ae5ecb8ee63210127139664c16cd5ceda3b9"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_consolidate::auto_improve_schedule::run_auto_improve_scheduler_tick: FunctionTooLong \u2014 ai_memory_consolidate::auto_improve_schedule::run_auto_improve_scheduler_tick runs 202 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 102 over it, 2.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/ai-memory-consolidate/src/auto_improve_schedule.rs"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"925a41cc96c80684c9b7ca9965637389d4b27baf1a41f19ca2abdb96b7fd56bf"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Bootstrap.process_sources: MethodTooLong \u2014 process_sources runs 202 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 102 over it, 2.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/ai-memory-consolidate/src/bootstrap.rs"},"region":{"startLine":436}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8a58a120f7798b15bc4e63baac97e13137ea7cc9935489aedfba0a74aea3ec8"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_cli::commands::openclaw_plugin::build_plugin: FunctionTooLong \u2014 ai_memory_cli::commands::openclaw_plugin::build_plugin 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/ai-memory-cli/src/commands/openclaw_plugin.rs"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a06ec1f09775331530738bbc1bbef987f75bdb9707d822d403445603c12cc88"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_web::routes::health::sections: FunctionTooLong \u2014 ai_memory_web::routes::health::sections runs 200 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 100 over it, 2.00\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-web/src/routes/health.rs"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"b54adc4068a2c66124de94af4149352fdcf9ebd8593846e5493631c83f891cc3"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_web::routes::search::handler: FunctionTooLong \u2014 ai_memory_web::routes::search::handler runs 200 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 100 over it, 2.00\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-web/src/routes/search.rs"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"427751d16784cc60b54b5a40b7551355096a739b7a83ba95bfdbc986e68ea2f5"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ReaderPool.briefing_for_project_with_slot_visibility: MethodTooLong \u2014 briefing_for_project_with_slot_visibility runs 199 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 99 over it, 1.99\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/reader.rs"},"region":{"startLine":10069}}}],"partialFingerprints":{"codehealthFindingId/v1":"c849062ca120f727d89492056739f9dcde6349c7aef1dffd41068b334d5e4728"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/marker.rs: FileTooLong \u2014 969 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 37 free functions. The bar is 500 significant lines; this is 469 over it, 1.94\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/marker.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1118a667f2c0d3de973572fc8f6123110700e623f26b3fa8f3657499f119c920"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: Config: ClassTooLong \u2014 769 significant 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, 3 blocks, lines 292-3551. The bar is 400 significant lines; this is 369 over it, 1.92\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/config.rs"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f1aac6260aabfc04e19a4ee8b6647c0f4d94c4ec0041d050fa2bed4bca09401"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_web::routes::project::render: FunctionTooLong \u2014 ai_memory_web::routes::project::render 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/ai-memory-web/src/routes/project.rs"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bd5e6e2f5c43a228ca77b3fb022cdac5dafd45aceb97523042de157a539bfe2"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_eval::ab::run: FunctionTooLong \u2014 ai_memory_eval::ab::run 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":"evals/src/ab.rs"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"c70696e971d440f55653adb137e6a16e39a381f271d82b01319ed918a366600b"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_store::ops::resolve_project_by_identity: FunctionTooLong \u2014 ai_memory_store::ops::resolve_project_by_identity 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":"crates/ai-memory-store/src/ops.rs"},"region":{"startLine":847}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f104834168f5ec29e3b2fa75c4ba0921df34ecea6da27113be2eb5ecd5c337d"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ReaderPool.observation_stream_votes: MethodTooLong \u2014 observation_stream_votes 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":"crates/ai-memory-store/src/reader.rs"},"region":{"startLine":4528}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffc0f0d1c73bde31e783e017b8e9cbee3a2cf38f7229806f23b8fb7bc9f96616"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_hooks::router::fetch_and_accept_handoff_at: FunctionTooLong \u2014 ai_memory_hooks::router::fetch_and_accept_handoff_at runs 188 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 88 over it, 1.88\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/router.rs"},"region":{"startLine":2018}}}],"partialFingerprints":{"codehealthFindingId/v1":"93d3576743019c187d3b42a9be73d25c802c5b92a68b138540fca1914f92a1c0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/backfill.rs: FileTooLong \u2014 939 significant 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 439 over it, 1.88\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file 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/ai-memory-cli/src/commands/backfill.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f96ec58f0d63e725c99a54619cbf2fc5f4491cbed7fcc01839bba1d013beed45"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/git.rs: FileTooLong \u2014 938 significant 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 438 over it, 1.88\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file 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/ai-memory-wiki/src/git.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c97690b87ee9388ffa2a359f3c359d07d3ff8f762d72108bbedc2106373e48fd"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_cli::commands::setup_agent::run: FunctionTooLong \u2014 ai_memory_cli::commands::setup_agent::run 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/ai-memory-cli/src/commands/setup_agent.rs"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2fec20081c31615fdcc6ab4385b4e65ca41ffba087bff600794b937a63d4fa4"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Consolidator.consolidate_session_multi_in_scope: MethodTooLong \u2014 consolidate_session_multi_in_scope runs 185 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 85 over it, 1.85\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/consolidator.rs"},"region":{"startLine":844}}}],"partialFingerprints":{"codehealthFindingId/v1":"58d6f4a4d15224366262348db1d9c257503dd2b78670038a142d79a010c8886e"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_relay::relay::flush_locked: FunctionTooLong \u2014 ai_memory_relay::relay::flush_locked runs 183 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 83 over it, 1.83\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-relay/src/relay.rs"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d664a6077e12fc12cda71f54e28703d5e3836ec6985f2e1b17981d982410e60"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_store::auto_improve::stage_run_impl: FunctionTooLong \u2014 ai_memory_store::auto_improve::stage_run_impl runs 183 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 83 over it, 1.83\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/auto_improve.rs"},"region":{"startLine":800}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd005319e1a82090a4a5407f0b303bc0bc8fb0eacad8de60c4f902c5b432303f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/upgrade.rs: FileTooLong \u2014 902 significant 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 402 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/ai-memory-cli/src/commands/upgrade.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e5eb61f6730571be30527cf4a361ef8137b8cffac20abd1295bbf6b24c67033"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_cli::commands::session_usage::read_live_calls: FunctionTooLong \u2014 ai_memory_cli::commands::session_usage::read_live_calls runs 180 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 80 over it, 1.80\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/session_usage.rs"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fd2588bf853713277ad4906cffa4f73613256276611648e117ed52f359b2fe4"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AiMemoryServer.memory_write_pages_batch: MethodTooLong \u2014 memory_write_pages_batch runs 180 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 80 over it, 1.80\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/server.rs"},"region":{"startLine":5504}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b404f2f23cef24f8171db7da48c4e4da07b5bf3c314a47a19fae3fc7fd4498d"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/projection.rs: FileTooLong \u2014 898 significant 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 398 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/ai-memory-consolidate/src/projection.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8292a07ff17feae7318b8af0d6e5039de6783351ac7a840d98c52f32f4682da"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/show.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), declaring 34 free functions. The bar is 500 significant lines; this is 384 over it, 1.77\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file 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/ai-memory-cli/src/commands/show.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c43928f82b46022503c4dc6cdfe638fd7d2a7cf03e46d06dd9957093f8b9b963"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_store::ops::admit_hook_session_event: FunctionTooLong \u2014 ai_memory_store::ops::admit_hook_session_event 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/ai-memory-store/src/ops.rs"},"region":{"startLine":3471}}}],"partialFingerprints":{"codehealthFindingId/v1":"df73a51cb5850ea90054d0ea49ec6d85f0bebb8eef766064b982334f4bb46a2c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/payload.rs: FileTooLong \u2014 870 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 45 free functions. The bar is 500 significant lines; this is 370 over it, 1.74\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/payload.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"96a0b845998887800fa178580820a5a113f9955ecd9b92a7a5d4bed18241f797"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/sweep.rs: FileTooLong \u2014 868 significant 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 368 over it, 1.74\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/sweep.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"87b37683685827ad5950adec1036749b60fbbced0194ccdfe4139a7ddb9cb948"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_hooks::workstream::prepare_run: FunctionTooLong \u2014 ai_memory_hooks::workstream::prepare_run runs 172 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 72 over it, 1.72\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/workstream.rs"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"a83b5e2f24212c910d24dfd07857f443003cd6cd15108d604ff327851b729492"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/recovery.rs: FileTooLong \u2014 848 significant 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 348 over it, 1.70\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/recovery.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1aabbb080bbc3ebb2df654c8c982326eb6b88151c373e5a0fbfc4b5b2816212f"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/backup_agents.rs: FileTooLong \u2014 844 significant 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 344 over it, 1.69\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/backup_agents.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"30a093342b596d262f847060a2674a88d1f6fd92eb723b831f6f8af2b920d3c2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/human_auth.rs: FileTooLong \u2014 840 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), declaring 41 free functions. The bar is 500 significant lines; this is 340 over it, 1.68\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/human_auth.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5346315ec7c7d3872855936daf41421a2e317e424a9cd4aefda2c08f3c734413"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/scope.rs: FileTooLong \u2014 836 significant 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 336 over it, 1.67\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/scope.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e199853c4c6fb0bce75f0791011e849805dcfcaa3497d181a8d936743899164e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/setup.rs: FileTooLong \u2014 832 significant 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 332 over it, 1.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/ai-memory-cli/src/commands/setup.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c1a236b874493aca79e8a352b3e7aa01a11bf257a2b6978995b83d381c6b84e"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_store::ops::upsert_page_in_tx: FunctionTooLong \u2014 ai_memory_store::ops::upsert_page_in_tx 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/ai-memory-store/src/ops.rs"},"region":{"startLine":2077}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6b42edf2847ded333793cec4066e49e2c8e3d74440516f73f5da0f32e7e7738"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_store::ops::accept_handoff_in_transaction: FunctionTooLong \u2014 ai_memory_store::ops::accept_handoff_in_transaction 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/ai-memory-store/src/ops.rs"},"region":{"startLine":5640}}}],"partialFingerprints":{"codehealthFindingId/v1":"2de43386028b919ddb30f5070ddd22970a2b53aad83895d6408fc38a53f54f4c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/copilot.rs: FileTooLong \u2014 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). The bar is 500 significant lines; this is 313 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/ai-memory-llm/src/copilot.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9598ec038c0d451d9409a5131de17d8a49fbf9edd044a74f060f1557f9d9e5d6"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_consolidate::dream::merge_one_cluster: FunctionTooLong \u2014 ai_memory_consolidate::dream::merge_one_cluster 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/ai-memory-consolidate/src/dream.rs"},"region":{"startLine":599}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8f276167c2dc9a0aadf2052aa5e56755efd1bd1be2af222673abc5b2bec5e71"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_hooks::router::handle_hook_batch: FunctionTooLong \u2014 ai_memory_hooks::router::handle_hook_batch 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/ai-memory-hooks/src/router.rs"},"region":{"startLine":1203}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff0da9abee52784aa7f59060a839c98dd866362e9039313e440e600341bdeb78"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_web::health::localized_checks: FunctionTooLong \u2014 ai_memory_web::health::localized_checks 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/ai-memory-web/src/health.rs"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"105e650103fe2610f93310234384c418d8124d5ebe79c9ce4f20f2fa6f840d45"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/client.ts: FileTooLong \u2014 804 significant lines (blank, comment-only and punctuation-only lines excluded). 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":"companions/ai-memory-ts/src/client.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"db195028af67df37a4baa255b0f7085106f47d46f1dabee74308740218d9814d"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_cli::commands::doctor::run: FunctionTooLong \u2014 ai_memory_cli::commands::doctor::run 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/ai-memory-cli/src/commands/doctor.rs"},"region":{"startLine":563}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e03d6af1bba6b5121d2b469ad2ecad26027a83909ee2787cac48ac6494f6581"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_consolidate::sweep::plan_cold_cluster_dedup: FunctionTooLong \u2014 ai_memory_consolidate::sweep::plan_cold_cluster_dedup 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/ai-memory-consolidate/src/sweep.rs"},"region":{"startLine":1265}}}],"partialFingerprints":{"codehealthFindingId/v1":"947bfcbd13ec6d934c3661df864c2a4b47fa516df78d1e4e8e39f30d6e6e734e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/claude_mem.rs: FileTooLong \u2014 792 significant 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 292 over it, 1.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":"companions/ai-memory-importer/src/claude_mem.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dcb47106bb5acfaf5d07046d9d3089644930e11a4f9fec301d2ce21bfa36db6"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_consolidate::experience::run_experience_review: FunctionTooLong \u2014 ai_memory_consolidate::experience::run_experience_review 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/ai-memory-consolidate/src/experience.rs"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"847168c5f543a4912f523e4221ccf0c3006cb10b48f2549542eaf5095b421ad2"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_consolidate::auto_improve::run_auto_improve_review: FunctionTooLong \u2014 ai_memory_consolidate::auto_improve::run_auto_improve_review runs 156 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 56 over it, 1.56\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/auto_improve.rs"},"region":{"startLine":562}}}],"partialFingerprints":{"codehealthFindingId/v1":"68191979db576a207a98b0ee863e22ac7f7e5dff1231b10ac734acbff94b0430"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_importer::agentmemory::vault::plan: FunctionTooLong \u2014 ai_memory_importer::agentmemory::vault::plan runs 155 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 55 over it, 1.55\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-importer/src/agentmemory/vault.rs"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"30da3b1696d50531ff37a7a6335b91ad09fe8226ea4ff10322dd5050bb7761de"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/doctor.rs: FileTooLong \u2014 773 significant 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 273 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/ai-memory-cli/src/commands/doctor.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9f52ba6c7685d8941ce11a96e3ae0eebebdd9d75a678147004ae42b70dfe71a"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_cli::commands::restore_agents::run: FunctionTooLong \u2014 ai_memory_cli::commands::restore_agents::run runs 154 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 54 over it, 1.54\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/restore_agents.rs"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"be0f988c6ba777ea5ddeb58d9f744543ed08b06a08200fa96e447142badce256"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_web::knowledge::view: FunctionTooLong \u2014 ai_memory_web::knowledge::view runs 154 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 54 over it, 1.54\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-web/src/knowledge.rs"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc9f80eb730efec3c1373f56fcdde174bb96caa945ed35c4fc9679d27a7dc7e9"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_wikisync::bidi::build_plan: FunctionTooLong \u2014 ai_memory_wikisync::bidi::build_plan 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":"companions/ai-memory-wikisync/src/bidi.rs"},"region":{"startLine":408}}}],"partialFingerprints":{"codehealthFindingId/v1":"67c77f10b49650ecf4cca9d3a6df9aa4678c8d97195dc35361a4dde22dffb8ec"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_importer::plan_external_conversation: FunctionTooLong \u2014 ai_memory_importer::plan_external_conversation 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":"companions/ai-memory-importer/src/main.rs"},"region":{"startLine":545}}}],"partialFingerprints":{"codehealthFindingId/v1":"6641cfafea551f05e02f658bd75148b99aa0e2ed36b13805fdfc32d25354a81b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ReaderPool.search_pages_with_meta: MethodTooLong \u2014 search_pages_with_meta 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/ai-memory-store/src/reader.rs"},"region":{"startLine":3547}}}],"partialFingerprints":{"codehealthFindingId/v1":"064bca1e278f335a4764c6e60319f8377b33d5981541fce5ea56d2d8bea9990c"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_eval::retrieval::run_config: FunctionTooLong \u2014 ai_memory_eval::retrieval::run_config 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":"evals/src/retrieval/mod.rs"},"region":{"startLine":600}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce2aae461e180527f99d1d1b7eb6f886b2b9f4cbed77ba645d517e9a7c4b5101"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/bidi.rs: FileTooLong \u2014 735 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 235 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":"companions/ai-memory-wikisync/src/bidi.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"722d4361b8636052dbb58d26cfbb6a7df1933dc8882810bf01a8b49f57f0bea0"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_store::ops::purge_project: FunctionTooLong \u2014 ai_memory_store::ops::purge_project 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/ai-memory-store/src/ops.rs"},"region":{"startLine":8070}}}],"partialFingerprints":{"codehealthFindingId/v1":"a357b6e691989016a95cdd5dec9c6ea3e1c2335f9ebac57cd33a8a8430963d21"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: Consolidator: ClassTooLong \u2014 587 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted), 20 methods, 2 blocks, lines 175-1162. The bar is 400 significant lines; this is 187 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/ai-memory-consolidate/src/consolidator.rs"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a8d1cb75e6762194720388f552bc83019637cdcb0f972ea9a704cac0f03e83d"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_cli::dispatch: FunctionTooLong \u2014 ai_memory_cli::dispatch 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/ai-memory-cli/src/lib.rs"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ac8340b551ab412869c627414680307e245b6376858604ea064427a88861585"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ReaderPool.briefing_for_workspace_with_slot_visibility: MethodTooLong \u2014 briefing_for_workspace_with_slot_visibility 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/ai-memory-store/src/reader.rs"},"region":{"startLine":10586}}}],"partialFingerprints":{"codehealthFindingId/v1":"302f8f64eda1a61608832843a0e334898dbc5ee9bd16bcbf7b73f6ebd8c87a51"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_eval::retrieval::run: FunctionTooLong \u2014 ai_memory_eval::retrieval::run 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":"evals/src/retrieval/mod.rs"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"548ea034dfa601dd74d64b23fd105fd40d47cafe7ef44e23e940659067c044e0"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_consolidate::dream::run_dream_pass: FunctionTooLong \u2014 ai_memory_consolidate::dream::run_dream_pass 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/ai-memory-consolidate/src/dream.rs"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"5535ba4e76d27eaaef5b6e7665b20306f50757529288e9666d0eaef4f01637db"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_cli::commands::doctor::presentation::render: FunctionTooLong \u2014 ai_memory_cli::commands::doctor::presentation::render 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/ai-memory-cli/src/commands/doctor/presentation.rs"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"b98963a78ef8c978f9fae89fca12484ad66b6e120ed6795e2f104bea3717c239"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/hook_capture.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), declaring 37 free functions. 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/ai-memory-cli/src/commands/hook_capture.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2793cf9964377383584cb9aa1d509f3586d6a350d41baacb6b95b0bb793a9cd3"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_importer::agentmemory::apply_pages_batched: FunctionTooLong \u2014 ai_memory_importer::agentmemory::apply_pages_batched 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":"companions/ai-memory-importer/src/agentmemory/mod.rs"},"region":{"startLine":487}}}],"partialFingerprints":{"codehealthFindingId/v1":"6726ae2479f9f35e73e4043e6fcfe03782346a5bbe9e7692092e707ce767d4c0"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AiMemoryServer.memory_read_session_observations: MethodTooLong \u2014 memory_read_session_observations 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/ai-memory-mcp/src/server.rs"},"region":{"startLine":6286}}}],"partialFingerprints":{"codehealthFindingId/v1":"89d37deed0d8b91cdbc0ca8fb79ac3e8948b7c66c38c7244efe9a2b4529429a2"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ReaderPool.search_page_candidates_for_project_at: MethodTooLong \u2014 search_page_candidates_for_project_at 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/ai-memory-store/src/reader.rs"},"region":{"startLine":3910}}}],"partialFingerprints":{"codehealthFindingId/v1":"d13df5ae04e596d55d9907361e0727db749d5a39fc5929392d60679c9da95d94"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/markdown.rs: FileTooLong \u2014 682 significant 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 182 over it, 1.36\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-wiki/src/markdown.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c76340797ae1a5f663471933ba12a6a1e5c95b9f97ccfffc28ed84d3b1276352"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_web::routes::session::handler: FunctionTooLong \u2014 ai_memory_web::routes::session::handler 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/ai-memory-web/src/routes/session.rs"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"742c57a60a938280170d7f8a69eb9c194f2a296b9ad2449f4ff50b085bc5f491"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_consolidate::curator::run_curator_report_with_breadth: FunctionTooLong \u2014 ai_memory_consolidate::curator::run_curator_report_with_breadth 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/ai-memory-consolidate/src/curator.rs"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac7a9ba79dd65ffc6724e712797a21be150fc1c1103a92d4740e04f19e79def1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/setup_agent.rs: FileTooLong \u2014 671 significant 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 171 over it, 1.34\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/setup_agent.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8683986ef27e066e30f64153f1906b7f763fae81283fb7420b41a792512fa44e"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Consolidator.consolidate_session_in_scope: MethodTooLong \u2014 consolidate_session_in_scope 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/ai-memory-consolidate/src/consolidator.rs"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"82a45171b1bc0bf95f0be3c7acaea2ca435f6ee4525e7818b49c79fb3a7580ac"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_cli::commands::run_autowire::ensure_wired_with_env: FunctionTooLong \u2014 ai_memory_cli::commands::run_autowire::ensure_wired_with_env 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/ai-memory-cli/src/commands/run_autowire.rs"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"91044e6df52588cb17362d8add9584ba61c0fcec515b29b5643643765f8e625e"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_consolidate::consolidator_frozen_oracle::project_observations: FunctionTooLong \u2014 ai_memory_consolidate::consolidator_frozen_oracle::project_observations 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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5cc13481a532a34efde360c4c1725015c02e43a0d35358ac1c51dde17641f3f"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ReaderPool.search_page_candidates_for_project: MethodTooLong \u2014 search_page_candidates_for_project 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/ai-memory-store/src/reader.rs"},"region":{"startLine":3750}}}],"partialFingerprints":{"codehealthFindingId/v1":"e57339085d7624cefbec04702cc55bc8023b3999fe31827ceb6b0910c4a31835"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_workstream::harness::build_launch_plan_with_env_lookup: FunctionTooLong \u2014 ai_memory_workstream::harness::build_launch_plan_with_env_lookup 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/ai-memory-workstream/src/harness.rs"},"region":{"startLine":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce0495df5dc929fc722b525bc0b5c0b77e6e99db3730e39dc85a67b0b518ce7e"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_cli::commands::restore::stage_then_swap: FunctionTooLong \u2014 ai_memory_cli::commands::restore::stage_then_swap runs 130 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 30 over it, 1.30\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/restore.rs"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfdd8a3b8ce9571ca4375c9c83cc64a8b5bf4d6210f3ca588152d7e32bdaefcd"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_web::operations::usage_panel: FunctionTooLong \u2014 ai_memory_web::operations::usage_panel 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/ai-memory-web/src/operations.rs"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"4413e97b1721a91e6290491ca612fa29b3090a49ecbbde044e4987fa53810146"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_cli::commands::run::journal_degraded_run: FunctionTooLong \u2014 ai_memory_cli::commands::run::journal_degraded_run 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/ai-memory-cli/src/commands/run.rs"},"region":{"startLine":2184}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7af0e2d1d0eaaad2d9c2f901f4701dac1b95c7387f9a1c4e2164e203b513536"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_consolidate::projection::project_from_rows: FunctionTooLong \u2014 ai_memory_consolidate::projection::project_from_rows 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/ai-memory-consolidate/src/projection.rs"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cc8ab4ef3af61c880b277ab7e7e1526053599e33195226176df218f79c8f313"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AiMemoryServer.memory_message_send: MethodTooLong \u2014 memory_message_send 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/ai-memory-mcp/src/server.rs"},"region":{"startLine":7389}}}],"partialFingerprints":{"codehealthFindingId/v1":"dad257170d7664f713f4caabcc7ad87107d0322670e7af2e1b0f1035509e5e7e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/jail_folders.rs: FileTooLong \u2014 632 significant 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 132 over it, 1.26\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/jail_folders.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"54df93f0bc34d17bbc79b131265228ed5ff976ed35e623d0f42b563a98e79644"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_cli::commands::move_project::run: FunctionTooLong \u2014 ai_memory_cli::commands::move_project::run 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/ai-memory-cli/src/commands/move_project.rs"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbd758a542b8a96f5402fe998e23f9b74976d60b490fd819d377699803d674db"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ReaderPool.entity_hits_filtered: MethodTooLong \u2014 entity_hits_filtered 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/ai-memory-store/src/reader.rs"},"region":{"startLine":7859}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ee39da7d7ad23fe064621f6f53eed94fad833b3c83903493bfde60e87e01ed3"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_eval::retrieval::compare::compare: FunctionTooLong \u2014 ai_memory_eval::retrieval::compare::compare 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":"evals/src/retrieval/compare.rs"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd4be339f670f1e1f9f84812e78b4342094185372f22bf04c8409cd37d393f39"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_hooks::workstream::finish_run_inner: FunctionTooLong \u2014 ai_memory_hooks::workstream::finish_run_inner 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/ai-memory-hooks/src/workstream.rs"},"region":{"startLine":1183}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdb68e718890827f5e024bcae3c4d9c4754e28ab5fdc000d17aee2026ff29403"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_store::ops::idle_end_sessions_inner: FunctionTooLong \u2014 ai_memory_store::ops::idle_end_sessions_inner 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/ai-memory-store/src/ops.rs"},"region":{"startLine":3961}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b7116a792085d210ef189a4dac97ad87e7b2b27ab4a6d19a65bffc67be3f550"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_web::routes::index::handler: FunctionTooLong \u2014 ai_memory_web::routes::index::handler 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/ai-memory-web/src/routes/index.rs"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"1362b3bc4a01b4f463bb8cd7e2b562df7e10bc4c15e07fc12a8353d443207799"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_cli::commands::run::degraded_launch: FunctionTooLong \u2014 ai_memory_cli::commands::run::degraded_launch 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/ai-memory-cli/src/commands/run.rs"},"region":{"startLine":2011}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f5a6514c89a625166d4e02528fd18cf8199d553a889abc1928f3e3e27c77cf6"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_consolidate::profile::converge_target: FunctionTooLong \u2014 ai_memory_consolidate::profile::converge_target 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/ai-memory-consolidate/src/profile.rs"},"region":{"startLine":2552}}}],"partialFingerprints":{"codehealthFindingId/v1":"fce8011b64bd74992781b848ef988459a0f428eaa58e8b8f84bb6ee601a0f476"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ReaderPool.search_observations_for_project_as: MethodTooLong \u2014 search_observations_for_project_as 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/ai-memory-store/src/reader.rs"},"region":{"startLine":4276}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa6706b8235fe4f77df75874c738aedbac62a650a91c3500aad9e5e007b7dc31"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_cli::commands::run::confirm_yolo_and_maybe_reexec: FunctionTooLong \u2014 ai_memory_cli::commands::run::confirm_yolo_and_maybe_reexec 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/ai-memory-cli/src/commands/run.rs"},"region":{"startLine":3559}}}],"partialFingerprints":{"codehealthFindingId/v1":"28614d5b501e655ff51bed52d4ce16e6e43f289107514fd41639b81fddbd0898"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_store::workstream::prepare_run: FunctionTooLong \u2014 ai_memory_store::workstream::prepare_run 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/ai-memory-store/src/workstream.rs"},"region":{"startLine":671}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a15f4d2f121dac36ab0776fb88a98af4eca423808448f0d160621cbc58723db"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/health.rs: FileTooLong \u2014 612 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 112 over it, 1.22\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-llm/src/health.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"39e0389565585c90cd6c76b7c4ba91f73b6a56c292eec23903a7ec6644cfdf85"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/ab.rs: FileTooLong \u2014 612 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 112 over it, 1.22\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"evals/src/ab.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fcdaa61ed69075fca6e9bb1f484724666d465ade6dd6c0612e971a65567c9ff"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_mcp::admin::handle_merge_project: FunctionTooLong \u2014 ai_memory_mcp::admin::handle_merge_project runs 122 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 22 over it, 1.22\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/admin.rs"},"region":{"startLine":6847}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6d72e6ec9b100123203141618c87a2308108f5d777e646fd65f9d8dd0a27e74"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ReaderPool.diagnose_project_coordinate: MethodTooLong \u2014 diagnose_project_coordinate runs 122 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 22 over it, 1.22\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/reader.rs"},"region":{"startLine":13270}}}],"partialFingerprints":{"codehealthFindingId/v1":"75c5aa668fe552190f50b8f8d758ddf867a223c69d4f5f6db92f7ec02b8e0248"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ReaderPool.search_pages: MethodTooLong \u2014 search_pages 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/ai-memory-store/src/reader.rs"},"region":{"startLine":3394}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ddfa7366dc5adb0ebd010d188304d1b606bfb02f7fec85a53c554d3c1493c14"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/templates.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":"crates/ai-memory-web/src/templates.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ebacb9a15187eabf9ed3ffc25ad7062b9713bb76ca405ce8dfd501ca4234bbf0"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/consolidator_frozen_oracle.rs: FileTooLong \u2014 601 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 101 over it, 1.20\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ff3deb9ca31ad224cdd55b4ec6e6818992c5817615017ba69376d0e20b5b7e8"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_consolidate::profile::harvest_project: FunctionTooLong \u2014 ai_memory_consolidate::profile::harvest_project 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/ai-memory-consolidate/src/profile.rs"},"region":{"startLine":2235}}}],"partialFingerprints":{"codehealthFindingId/v1":"1891a00ecbdf7b1d949cd23cec42ed465d4a30e0a560fac4c5e15b44e6463585"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_mcp::admin::move_session_batch: FunctionTooLong \u2014 ai_memory_mcp::admin::move_session_batch 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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":8323}}}],"partialFingerprints":{"codehealthFindingId/v1":"858141cc74c9aed62b2c5744d94dec0187b78627198bb47dd9d772feac863f01"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ReaderPool.derived_index_status_inner: MethodTooLong \u2014 derived_index_status_inner 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/ai-memory-store/src/reader.rs"},"region":{"startLine":14215}}}],"partialFingerprints":{"codehealthFindingId/v1":"9df314dd3cefcfc7048d9bc030371b818c7da6013bda3b68cb5bed7b829abba5"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: HookEnvelope.from_query_and_body: MethodTooLong \u2014 from_query_and_body 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/ai-memory-hooks/src/payload.rs"},"region":{"startLine":664}}}],"partialFingerprints":{"codehealthFindingId/v1":"daca55f9e1a91406eeea0bc12b17203b1f740bcee83ada342a126c69371cf8a1"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_store::ops::adopt_project_identity: FunctionTooLong \u2014 ai_memory_store::ops::adopt_project_identity 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/ai-memory-store/src/ops.rs"},"region":{"startLine":6818}}}],"partialFingerprints":{"codehealthFindingId/v1":"509a3e8ccaaa0bd3eb787607073580029612481c823a27ef64a4b9d338e28bb6"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/user_service.rs: FileTooLong \u2014 590 significant 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 90 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/ai-memory-cli/src/commands/user_service.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f377896f8cb4d28f2410c4ad42fae46124b2acbaffad353e6081015f6312b094"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_hooks::synth::build_digest: FunctionTooLong \u2014 ai_memory_hooks::synth::build_digest 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/ai-memory-hooks/src/synth.rs"},"region":{"startLine":411}}}],"partialFingerprints":{"codehealthFindingId/v1":"949b95335321d7bcce00b31c2ee076b31f29464abb1219a46ebd651614a384ca"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_store::workstream::list_operational: FunctionTooLong \u2014 ai_memory_store::workstream::list_operational 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/ai-memory-store/src/workstream.rs"},"region":{"startLine":1958}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f3e3784a21a0ebb90f642dc671a8d4de1487019415aeeb00edb6966d45ad7ab"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_mcp::admin::move_planned_session: FunctionTooLong \u2014 ai_memory_mcp::admin::move_planned_session 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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":8114}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b573bd7b2577ab55ffe11f71771d47d3e2c8e31c1e55bb394a3854efdde12d0"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_consolidate::projection::project_session_observations: FunctionTooLong \u2014 ai_memory_consolidate::projection::project_session_observations 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/ai-memory-consolidate/src/projection.rs"},"region":{"startLine":573}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b3b642ec6c80eac54134168fcc4d3a7294a857398855f9ac60f1458ad847609"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_mcp::admin::admin_router_with_sweep_tuning: FunctionTooLong \u2014 ai_memory_mcp::admin::admin_router_with_sweep_tuning 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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":750}}}],"partialFingerprints":{"codehealthFindingId/v1":"5829b832bb11f483fa8c9c6c98b8f8d5643ca45582d6a485f50862dc0e7c2096"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/auth.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/ai-memory-cli/src/commands/auth.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba630010861408fdad90829b843320cfd0fb04c90ca2125ddcdbb69fa7b48911"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/profile.rs: FileTooLong \u2014 571 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 71 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/ai-memory-cli/src/commands/profile.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bbe078bd9a4e92a5dc70012c042f2e3c1b0c79576c73f66092fbedf8dfc10cf"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: commands/restore_agents.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/ai-memory-cli/src/commands/restore_agents.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9a34a9be329a9980bf9876b9384bae52f591f3c8eea46d1b46bb7722a2711a6"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_cli::commands::install_skills::resolve_target_roots_for_platform: FunctionTooLong \u2014 ai_memory_cli::commands::install_skills::resolve_target_roots_for_platform 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/ai-memory-cli/src/commands/install_skills.rs"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"3773e2021725b8a0c8b05eecabb7d71d762ed840b5a3447db809eac6bf0ebbd0"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ReaderPool.sessions_for_scope_filtered: MethodTooLong \u2014 sessions_for_scope_filtered 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/ai-memory-store/src/reader.rs"},"region":{"startLine":6224}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7e6ca43e0e1adb7fb9ec2eff7c69bb73c877bf877bd09cf463f7b9ef720ddee"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_consolidate::embed::run_embedding_backfill: FunctionTooLong \u2014 ai_memory_consolidate::embed::run_embedding_backfill 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/ai-memory-consolidate/src/embed.rs"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8fe377f87cb7010940d7f2c4c321105923647c9c0d90e9a439e192b0080daed"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ReaderPool.auto_improve_telemetry_aggregate: MethodTooLong \u2014 auto_improve_telemetry_aggregate 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/ai-memory-store/src/reader.rs"},"region":{"startLine":13121}}}],"partialFingerprints":{"codehealthFindingId/v1":"4499dba0651a0a9797e9e534ff1038e5ef3bd236730131528ad2b115c14f3207"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_web::routes::page::handler: FunctionTooLong \u2014 ai_memory_web::routes::page::handler 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/ai-memory-web/src/routes/page.rs"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a1b0ae0286e7f795ef9ae1185a23d5cb849efe9adc9b7f9e444c9e0c5982cad"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_mcp::session_management::purge: FunctionTooLong \u2014 ai_memory_mcp::session_management::purge 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/ai-memory-mcp/src/session_management.rs"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"1176d332dc8824e0cff655e80252273f7baab5b16a8b729748d802966d107e3f"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_store::ops::repair_session_times: FunctionTooLong \u2014 ai_memory_store::ops::repair_session_times 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/ai-memory-store/src/ops.rs"},"region":{"startLine":3166}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b74120eeaa384b28df1d7de2dd100e8c6150cc5547dcb478557a9ee83c886f2"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ReaderPool.project_link_graph: MethodTooLong \u2014 project_link_graph 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/ai-memory-store/src/reader.rs"},"region":{"startLine":11618}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b41bfbf6486706210d0e00a0fc2c99ad56ef4b157b9450721e03e387e452d3c"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_store::workstream::link_native_session_in_transaction: FunctionTooLong \u2014 ai_memory_store::workstream::link_native_session_in_transaction 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/ai-memory-store/src/workstream.rs"},"region":{"startLine":1013}}}],"partialFingerprints":{"codehealthFindingId/v1":"1accdd9001c29c13c205011d358f84f9bd2062f491ab386062cd7dacf5c90cef"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_consolidate::consolidator::batch_request_plan: FunctionTooLong \u2014 ai_memory_consolidate::consolidator::batch_request_plan 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/ai-memory-consolidate/src/consolidator.rs"},"region":{"startLine":1549}}}],"partialFingerprints":{"codehealthFindingId/v1":"032bdab6ee6c55c69fd2807360e6ce500e717c04af518ea76e3eaf7c47c8036c"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_mcp::admin::handle_auto_improve: FunctionTooLong \u2014 ai_memory_mcp::admin::handle_auto_improve 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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":2810}}}],"partialFingerprints":{"codehealthFindingId/v1":"18bf3ef23928da4878bf58be3bca52c40d4fa8905d60cb4ce2651b4dcef59851"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/profile.rs: FileTooLong \u2014 553 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted). The bar is 500 significant lines; this is 53 over it, 1.11\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-core/src/profile.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca26a0039e8d2632232e34d94ea44fb0fadc572d5fc915703f1d3416abeac65e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: retrieval/mod.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":"evals/src/retrieval/mod.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0574cb73527c3caca787bd6f65a5ed38bce511c37f490eda3c43d6df690dd475"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/watcher.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/ai-memory-wiki/src/watcher.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"44b1d2ed3c3b84a43c372c5d521352ecf32dd8eb08a5d37abcd9a69fc9ad09ee"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_cli::commands::show::run: FunctionTooLong \u2014 ai_memory_cli::commands::show::run 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/ai-memory-cli/src/commands/show.rs"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c38ee436d3c995eb16dfa307f478d0e3c8f9febb9ccdaf5472aa9631c85fcfc"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ReaderPool.auto_improve_proposal_detail_with_owner: MethodTooLong \u2014 auto_improve_proposal_detail_with_owner 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/ai-memory-store/src/reader.rs"},"region":{"startLine":12929}}}],"partialFingerprints":{"codehealthFindingId/v1":"00e102c32c4c16ca6ff4e83e1949494ae9e8a231bf9f14a32ac8bc77e043a68a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/profile.rs: FileTooLong \u2014 548 significant 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 48 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/ai-memory-store/src/profile.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"536d31e92f4db150dd5ab658b961312c2e1f8c8b4ff7beda966c1daf2273896b"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_cli::commands::bootstrap::print_human_report: FunctionTooLong \u2014 ai_memory_cli::commands::bootstrap::print_human_report 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/ai-memory-cli/src/commands/bootstrap.rs"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d42f0e567870c6f6b57f882f2bfa11821714ad443171376861b38c077fc25eb"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_cli::commands::install_mcp::build_mcp_entry: FunctionTooLong \u2014 ai_memory_cli::commands::install_mcp::build_mcp_entry runs 109 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code \u2014 #[cfg(test)] modules and bare #[test] functions \u2014 not counted) in one body. The bar is 100 significant lines; this is 9 over it, 1.09\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/install_mcp.rs"},"region":{"startLine":1802}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8fb1255811b23803811983647d4ae1f401bf3f9d238fbd0d0e6241db5578a49"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_mcp::page_patch::apply: FunctionTooLong \u2014 ai_memory_mcp::page_patch::apply 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/ai-memory-mcp/src/page_patch.rs"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"22b6c4a547e4409239cef9e7d743041050c41b7f191e7ff441770fe59d3fa2c6"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_web::routes::history::render: FunctionTooLong \u2014 ai_memory_web::routes::history::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":"crates/ai-memory-web/src/routes/history.rs"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa0d5de7a8af81554091b437b90120908f6a109c8c14ccf3156f8a381aa207fc"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: routes/inbox.rs: FileTooLong \u2014 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). The bar is 500 significant lines; this is 43 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/ai-memory-web/src/routes/inbox.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"238e0fadaee80715a42b8cb54e9ecd764879b8a53a94b769ec8b4b2c0216ba59"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/jail.rs: FileTooLong \u2014 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). The bar is 500 significant lines; this is 43 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/ai-memory-workstream/src/jail.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc8c9cf3bd54a7cf382e8f722492d24e9bca26aaaf8f1b1327cadc02e4ada5be"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: agentmemory/mod.rs: FileTooLong \u2014 541 significant 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 41 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":"companions/ai-memory-importer/src/agentmemory/mod.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0dbc95e80b262ea04ad56279691d2d479532a9a9ce8391753cdb3480ccfa0b96"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_cli::commands::setup::execute: FunctionTooLong \u2014 ai_memory_cli::commands::setup::execute 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/ai-memory-cli/src/commands/setup.rs"},"region":{"startLine":833}}}],"partialFingerprints":{"codehealthFindingId/v1":"5042ccf632db4a4363f5832e7bf99420da0e8e0b9e631a0b788b464ba47b51ce"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AiMemoryServer.memory_consolidate: MethodTooLong \u2014 memory_consolidate 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/ai-memory-mcp/src/server.rs"},"region":{"startLine":4401}}}],"partialFingerprints":{"codehealthFindingId/v1":"583fb80863993027d415f3d7d94236832d3d5e303bed50aff16790e48a23b3af"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ReaderPool.search_pages_for_project_at_filtered: MethodTooLong \u2014 search_pages_for_project_at_filtered 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/ai-memory-store/src/reader.rs"},"region":{"startLine":4106}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa570e776cc78b9758fe02319036230224b81b23812eea169ce018dc3db50ec9"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_importer::document::extract_xlsx_sheet_with_limit: FunctionTooLong \u2014 ai_memory_importer::document::extract_xlsx_sheet_with_limit 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":"companions/ai-memory-importer/src/document.rs"},"region":{"startLine":872}}}],"partialFingerprints":{"codehealthFindingId/v1":"1efa6aad98fd85b2458fb05859de367e9a313219050f7638a46df6a0b14c5612"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ReaderPool.briefing_with_slot_visibility: MethodTooLong \u2014 briefing_with_slot_visibility 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/ai-memory-store/src/reader.rs"},"region":{"startLine":9902}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b7fb0e39a2843c1f53d3f78a7dba9cff9a76d44f48f2dc4e1d1ba8090309be9"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: AiMemoryServer: TooManyFields \u2014 32 stored fields beside 108 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/ai-memory-mcp/src/server.rs"},"region":{"startLine":573}}}],"partialFingerprints":{"codehealthFindingId/v1":"c401dde2306023eeaa1c025bb58175a587d66e1d02967e3c2e04ca3fa52a40b0"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFunctions: ai_memory_cli::commands::install_instructions: 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/ai-memory-cli/src/commands/install_instructions.rs"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fb7cc687f7df2f7448b07d28eb324a7fa012c8c912c5b748532e723c2b391d4"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: RuntimeEnv: TooManyFields \u2014 32 stored fields beside 15 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/ai-memory-cli/src/config.rs"},"region":{"startLine":777}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1f8ba1f9caeb3bbd3c726d59692cd6bb224a76046e3e5f588d788ab42873190"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_consolidate::lint::run_lint: FunctionTooLong \u2014 ai_memory_consolidate::lint::run_lint 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/ai-memory-consolidate/src/lint.rs"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"6611ba2ce2089d35c5c09417c2f25ded2fea573f217a07f2caa2956c2a04b953"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_store::ops::move_project_workspace: FunctionTooLong \u2014 ai_memory_store::ops::move_project_workspace 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/ai-memory-store/src/ops.rs"},"region":{"startLine":8656}}}],"partialFingerprints":{"codehealthFindingId/v1":"5560cdd84b052531d1b5755a6363fad1d0de891901b7bfd37a895f0307c42957"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ReaderPool.token_usage_report_page: MethodTooLong \u2014 token_usage_report_page 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/ai-memory-store/src/reader.rs"},"region":{"startLine":5614}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff38f7b5f394ab44b05c630d22ee318b28865684083304cdc570ab10fde8db6b"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_cli::commands::auth::status: FunctionTooLong \u2014 ai_memory_cli::commands::auth::status 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/ai-memory-cli/src/commands/auth.rs"},"region":{"startLine":350}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ab76751409e61800980de5cba287dcea6a5ba1608b47f12049006ae4fe7d028"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ReaderPool.page_provenance: MethodTooLong \u2014 page_provenance 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/ai-memory-store/src/provenance.rs"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"240cf1f9973afea069b5dfa48332f2095711bb6e0ba9f53c433bf717e2a4fd39"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_eval::abstention::run: FunctionTooLong \u2014 ai_memory_eval::abstention::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":"evals/src/abstention.rs"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"3749e1aa070023117365d02dd438acd13c86ba534d6bbd3b7c5bf6bf9e73529e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/synth.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). The bar is 500 significant lines; this is 20 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/ai-memory-hooks/src/synth.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b8b1cac5becbabc97ef58f08ae2224c1d42745115962fa64eb1b98a452993fe"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_cli::commands::uninstall::run: FunctionTooLong \u2014 ai_memory_cli::commands::uninstall::run 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/ai-memory-cli/src/commands/uninstall.rs"},"region":{"startLine":864}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e9c42a205750179e6135b8bb0a0875d293e65962fd9ccca055527dbb600f469"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_mcp::admin::handle_write_page: FunctionTooLong \u2014 ai_memory_mcp::admin::handle_write_page 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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":9230}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad4ee8a254601fae870e41de7c1f1f6a489608db739fe1a82d0721b5d7cd30a2"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ConsoleView.load_sessions: MethodTooLong \u2014 load_sessions 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/ai-memory-web/src/management/views.rs"},"region":{"startLine":179}}}],"partialFingerprints":{"codehealthFindingId/v1":"a77ea5a248dceada4ee75a0578cb602e3b164dbf3ac8c4dee63533c9a7faa036"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/queue.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), about 65% of them inside a single declaration: Queue (3 blocks, 161-703). The bar is 500 significant lines; this is 18 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":"companions/ai-memory-relay/src/queue.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d4fdb75c63f97cf57c6eafcfed68577b8781687895fc908ade053f3c9884e79"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyFields: HookState: TooManyFields \u2014 31 stored fields. The bar is 30 stored fields; this is 1 over it, 1.03\u00D7 the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member \u2014 each reader then names only the group it uses."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/router.rs"},"region":{"startLine":608}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b9f2b1047f1e765192611cd4f88423217adde92c8d6f353989400fb51f49d02"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_importer::document::run: FunctionTooLong \u2014 ai_memory_importer::document::run 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":"companions/ai-memory-importer/src/document.rs"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"0752760de2a46710abea564e095842b34bfa9a1fbebae3529039c5d662ad423b"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Queue.enqueue: MethodTooLong \u2014 enqueue 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":"companions/ai-memory-relay/src/queue.rs"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"24acfa7593b3bb3cc718f55f330caaca0c55364f42565635eb089fe52b696699"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AiMemoryServer.memory_patch_page: MethodTooLong \u2014 memory_patch_page 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/ai-memory-mcp/src/server.rs"},"region":{"startLine":5750}}}],"partialFingerprints":{"codehealthFindingId/v1":"d26e04efec088b0af73cc192cb882a5636d0bb4e70655b4191a16562c80d5bf2"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: AiMemoryServer.memory_restore_page: MethodTooLong \u2014 memory_restore_page 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/ai-memory-mcp/src/server.rs"},"region":{"startLine":6509}}}],"partialFingerprints":{"codehealthFindingId/v1":"eddd91513123e944be5b0819be57180145cdd0a1678e89faf87b9011a0123b4f"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_store::auto_improve::approve_proposal: FunctionTooLong \u2014 ai_memory_store::auto_improve::approve_proposal 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/ai-memory-store/src/auto_improve.rs"},"region":{"startLine":1141}}}],"partialFingerprints":{"codehealthFindingId/v1":"caa1ba4ed0b49674d2e01d7f1d537ecb0d902214d9e7367d40fc9c8a6764793e"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ReaderPool.session_brief_pages_with_slot_visibility: MethodTooLong \u2014 session_brief_pages_with_slot_visibility 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/ai-memory-store/src/reader.rs"},"region":{"startLine":10330}}}],"partialFingerprints":{"codehealthFindingId/v1":"d543e75456076ea3f62124c3fee2947c885c7b6fbb49291997f9bc51dd8e2739"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/types.ts: FileTooLong \u2014 514 significant lines (blank, comment-only and punctuation-only lines excluded). 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":"companions/ai-memory-ts/src/types.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"91bd53ae7c3007f9a3bbac9fa82a587b245ed30b9e1c5fc51c2d4db565193d8a"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_importer::agentmemory::export::replay_session: FunctionTooLong \u2014 ai_memory_importer::agentmemory::export::replay_session 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":"companions/ai-memory-importer/src/agentmemory/export.rs"},"region":{"startLine":1323}}}],"partialFingerprints":{"codehealthFindingId/v1":"04de87886ea246a6fade8b7cd38e45cfcc6fcbfc613280758e131fcbc474c091"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_store::ops::delete_workspace: FunctionTooLong \u2014 ai_memory_store::ops::delete_workspace 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/ai-memory-store/src/ops.rs"},"region":{"startLine":8382}}}],"partialFingerprints":{"codehealthFindingId/v1":"528d5430bfdc0b9963467105d6870664bf58bc98f9c5eca6ec0d97d736437d08"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: ReaderPool.graph_neighbors_for_project_explained: MethodTooLong \u2014 graph_neighbors_for_project_explained 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/ai-memory-store/src/reader.rs"},"region":{"startLine":8114}}}],"partialFingerprints":{"codehealthFindingId/v1":"7dc7347c6ba8945010c77d7f999c0c76461c380b6fbce70f71e7d91f2e84827a"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/recap.rs: FileTooLong \u2014 508 significant 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 8 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/ai-memory-hooks/src/recap.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e83198d38aa108d88b808b3d4d5f7bd94aac25ae8b3532a37a4f3df86ac61185"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_hooks::idle_end::run_idle_end_tick: FunctionTooLong \u2014 ai_memory_hooks::idle_end::run_idle_end_tick 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/ai-memory-hooks/src/idle_end.rs"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad6085e620a63ae17827dd9434596f9cd3d569ea4eb88946af52d2c691329f1d"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_mcp::admin::handle_purge_session: FunctionTooLong \u2014 ai_memory_mcp::admin::handle_purge_session 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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":5015}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e5a328afca9671ee94183c596fbf136257a2e27885a7710e9d52c1e5fefbffe"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: ai_memory_mcp::admin::move_project_core: FunctionTooLong \u2014 ai_memory_mcp::admin::move_project_core 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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":7431}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b74d72c3c61cbb5517d656253b769b60cafa44d84a73e7498002f22304cd848"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/abstention.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":"evals/src/abstention.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"56e350fefc723de6b2b5ea5729e748255f15325a22707e07fd825403609779db"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (3 members, 63 shared lines): crates/ai-memory-store/src/reader.rs:3399-3533 | crates/ai-memory-store/src/reader.rs:3759-3900 | crates/ai-memory-store/src/reader.rs:3918-4064 \u2014 These 3 members are variants of one another: a block of 63 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/ai-memory-store/src/reader.rs"},"region":{"startLine":3399}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ce95e04e22a41bf7c6f2efe75096212f2b4845bc71b4b23c5e6d3b31af5a692"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (68 shared lines): crates/ai-memory-workstream/src/transcript.rs:3464-3557 | crates/ai-memory-workstream/src/transcript.rs:5918-6004 \u2014 These two members are variants of one another: 68 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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":3464}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ca09cdf38dc02f041450741a1f01cf2c8c2f2f6da7ce5401dbcbc78e5406e1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (60 shared lines): crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:112-284 | crates/ai-memory-consolidate/src/projection.rs:224-381 \u2014 These two members are variants of one another: 60 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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2a7fb4f11facfdb308356a1d8941b7918437b0cf05d3cd9273a65fb557e5f6c"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (50 shared lines): crates/ai-memory-store/src/reader.rs:9907-10036 | crates/ai-memory-store/src/reader.rs:10593-10756 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":9907}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a3606e2fe30e0721a2eb273b4c582e60c4fba7dc836fef0538e1e05ecaa1c54"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (36 shared lines): crates/ai-memory-mcp/src/admin.rs:2043-2092 | crates/ai-memory-mcp/src/admin.rs:2172-2218 \u2014 These two members are variants of one another: 36 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/admin.rs"},"region":{"startLine":2043}}}],"partialFingerprints":{"codehealthFindingId/v1":"92c878049fe0b3120b807912d61b69d9ca26d9225bd6ecc682903af474bddcee"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): crates/ai-memory-store/src/reader.rs:4773-4812 | crates/ai-memory-store/src/reader.rs:4849-4898 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":4773}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c18aeb161064b0b171c0713ea057d4bd4f862922d5afa21a79d3babe6844966"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (6 members, 50\u002B identical tokens): crates/ai-memory-store/src/grants.rs:355-406 | crates/ai-memory-store/src/profile.rs:136-173 | crates/ai-memory-store/src/profile.rs:474-531 | crates/ai-memory-store/src/profile.rs:765-801 | crates/ai-memory-store/src/reader.rs:3554-3713 | crates/ai-memory-store/src/reader.rs:12537-12588 \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/ai-memory-store/src/grants.rs"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"5216f5c337bf62860e69ee5c85e9682e5503e90a527cd6494d20769191bd9be8"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): crates/ai-memory-cli/src/commands/install_hooks.rs:8062-8099 | crates/ai-memory-cli/src/commands/install_hooks.rs:8144-8180 | crates/ai-memory-cli/src/commands/install_hooks.rs:8225-8262 | crates/ai-memory-cli/src/commands/install_hooks.rs:8311-8348 | crates/ai-memory-cli/src/commands/install_hooks.rs:8398-8437 \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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":8062}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ec109cd63f33a30abff4f1cdff9f3e388474c2e620b679dead6245ac28d777a"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/ai-memory-cli/src/commands/uninstall.rs:1398-1417 | crates/ai-memory-cli/src/commands/uninstall.rs:1491-1540 | crates/ai-memory-cli/src/commands/uninstall.rs:1542-1579 | crates/ai-memory-cli/src/commands/uninstall.rs:1627-1660 \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/ai-memory-cli/src/commands/uninstall.rs"},"region":{"startLine":1398}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f9e9cf5588ee30a4ab1a500db155235a473471138d0976c95fc98e5d7041650"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/ai-memory-llm/src/fallback.rs:234-258 | crates/ai-memory-llm/src/fallback.rs:264-293 | crates/ai-memory-llm/src/fallback.rs:299-328 | crates/ai-memory-llm/src/fallback.rs:335-368 \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/ai-memory-llm/src/fallback.rs"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3e9ce90289ddb91857b9558cb2477514423eba0fa1932d009e5c626a3cdfbf2"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/ai-memory-store/src/reader.rs:738-768 | crates/ai-memory-store/src/reader.rs:774-804 | crates/ai-memory-store/src/reader.rs:4115-4243 | crates/ai-memory-store/src/reader.rs:8745-9283 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":738}}}],"partialFingerprints":{"codehealthFindingId/v1":"68cf36330ec9e33680f1b5eea157ffdd20be28e3689d19c6799840b4d28d4c46"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (4 members, 50\u002B identical tokens): crates/ai-memory-workstream/src/transcript.rs:5631-5666 | crates/ai-memory-workstream/src/transcript.rs:5674-5746 | crates/ai-memory-workstream/src/transcript.rs:5776-5809 | crates/ai-memory-workstream/src/transcript.rs:6238-6273 \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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":5631}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f65cd1236c572c7bd5e4f8d68178bbf6be0ce5a0249cd38ffa20c4b6fabbe87"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (46 corresponding lines): crates/ai-memory-store/src/reader.rs:8310-8355 | crates/ai-memory-store/src/reader.rs:8386-8441 \u2014 These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/reader.rs"},"region":{"startLine":8310}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b0e3c11b1d492a8b186e8f3a0ccb9ff43fa37d1564a54589f5ed43352d9bd52"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (37 corresponding lines): crates/ai-memory-hooks/src/antigravity.rs:650-694 | crates/ai-memory-workstream/src/transcript.rs:5206-5242 \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/ai-memory-hooks/src/antigravity.rs"},"region":{"startLine":650}}}],"partialFingerprints":{"codehealthFindingId/v1":"f60fa507e3ca5ae7333632b4fa70af9fd6a4dfcc13f9022e973450bb27f8a429"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (56 corresponding lines): crates/ai-memory-llm/src/copilot.rs:593-648 | crates/ai-memory-llm/src/embedding.rs:356-411 \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/ai-memory-llm/src/copilot.rs"},"region":{"startLine":593}}}],"partialFingerprints":{"codehealthFindingId/v1":"154a9d4b9e9f977c58628ff52e57c801297f0f85e293c475ebde6c7a858497f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (52 corresponding lines): crates/ai-memory-store/src/ops.rs:1542-1593 | crates/ai-memory-store/src/ops.rs:1626-1679 \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/ai-memory-store/src/ops.rs"},"region":{"startLine":1542}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ad92bcc447ec98f9bcf858b5e71761be4a65865b61ab4517e0383ddc1c14c8d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (35 corresponding lines): crates/ai-memory-store/src/reader.rs:12629-12663 | crates/ai-memory-store/src/reader.rs:12684-12726 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":12629}}}],"partialFingerprints":{"codehealthFindingId/v1":"75c17cf6f6502d8981255f0f0c9d11e4997e8130d91fc295c2b994c234e5b2aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (69 corresponding lines): crates/ai-memory-mcp/src/admin.rs:5848-5916 | crates/ai-memory-mcp/src/admin.rs:6412-6484 \u2014 These two members are one piece of code written twice and then edited apart: 69 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/admin.rs"},"region":{"startLine":5848}}}],"partialFingerprints":{"codehealthFindingId/v1":"6623685240a0a17f72ea454d9354b744f60522e27ccb1cf8b1dc0c404172246f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (42 corresponding lines): companions/ai-memory-importer/src/mcp.rs:361-402 | companions/ai-memory-wikisync/src/mcp.rs:194-245 \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":"companions/ai-memory-importer/src/mcp.rs"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d06fe39f17e2b1bf2944f8118b76bb562397442d8184b6c6342e586b836d494"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (33 corresponding lines): crates/ai-memory-workstream/src/transcript.rs:4643-4678 | crates/ai-memory-workstream/src/transcript.rs:4683-4715 \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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":4643}}}],"partialFingerprints":{"codehealthFindingId/v1":"b39c1fad3844125ade37a255715474a0e8b408d24e01acca121aaf435df8ca9b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (38 corresponding lines): crates/ai-memory-consolidate/src/auto_improve_schedule.rs:625-662 | crates/ai-memory-mcp/src/admin.rs:3041-3087 \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/ai-memory-consolidate/src/auto_improve_schedule.rs"},"region":{"startLine":625}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d98c5a2531e2b3642907256caddd872f9ed4fc32c8491a250127babfb881a77"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (37 corresponding lines): crates/ai-memory-wiki/src/markdown.rs:618-654 | crates/ai-memory-wiki/src/markdown.rs:727-768 \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/ai-memory-wiki/src/markdown.rs"},"region":{"startLine":618}}}],"partialFingerprints":{"codehealthFindingId/v1":"78e495f244540ed601c00d06f3983fca36a1a1d38e584a682dc9fe69596b5c11"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (48 corresponding lines): crates/ai-memory-store/src/reader.rs:4909-4956 | crates/ai-memory-store/src/reader.rs:4977-5032 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":4909}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac077b4f45663f18752e772d96755c4b4206e2b3c8ff99ffc3980b391f2e76d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (34 corresponding lines): companions/ai-memory-importer/src/main.rs:1108-1141 | crates/ai-memory-wiki/src/markdown.rs:65-102 \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":"companions/ai-memory-importer/src/main.rs"},"region":{"startLine":1108}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a82ebe02aaec24eb6bf0c39cfdf7135b7f1c205ab6ac40a046fa7b7385736db"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (37 corresponding lines): crates/ai-memory-cli/src/commands/auto_improve_report.rs:41-77 | crates/ai-memory-cli/src/commands/curator.rs:36-73 \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/ai-memory-cli/src/commands/auto_improve_report.rs"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"53bdd29e0c1e4a1f2f6ac6a5cf55c426ae304c4f7c386001455cd32342d2f891"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 27\u002B corresponding lines): crates/ai-memory-consolidate/src/code_fence.rs:20-48 | crates/ai-memory-core/src/excerpt.rs:131-157 | crates/ai-memory-wiki/src/markdown.rs:181-208 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 27 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/ai-memory-consolidate/src/code_fence.rs"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"bef279d9f762274008b249851e2df5b05ce1366c1a22365ed39cddc00e6644c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (42 corresponding lines): crates/ai-memory-cli/src/commands/render_shared.rs:1070-1111 | crates/ai-memory-cli/src/commands/render_shared.rs:1156-1203 \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/ai-memory-cli/src/commands/render_shared.rs"},"region":{"startLine":1070}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bd3a463b9554658f39d5302c9b66a961fb0554b5b233b00d11d792090386394"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:677-710 | crates/ai-memory-consolidate/src/projection.rs:1220-1245 \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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":677}}}],"partialFingerprints":{"codehealthFindingId/v1":"f48afd831e395a68cd0d6afa38fa602d63e1edb93d60b7cb1976380ca37ea918"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): crates/ai-memory-cli/src/commands/recent.rs:37-59 | crates/ai-memory-cli/src/commands/search.rs:37-56 \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/ai-memory-cli/src/commands/recent.rs"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"025327181c19c87b2519eb3e7b7e4b41d9a8724f26384cbd21d3496a11243625"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (57 corresponding lines): crates/ai-memory-store/src/ops.rs:4942-4998 | crates/ai-memory-store/src/ops.rs:5016-5083 \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/ai-memory-store/src/ops.rs"},"region":{"startLine":4942}}}],"partialFingerprints":{"codehealthFindingId/v1":"54bf38fbd6c9f994e3798405707b93b4c6a6e8e1d213e65852c25c037351f08f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (37 corresponding lines): crates/ai-memory-store/src/auto_improve.rs:1045-1083 | crates/ai-memory-store/src/auto_improve.rs:1094-1130 \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/ai-memory-store/src/auto_improve.rs"},"region":{"startLine":1045}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dad9a8cc99c6c049f4de817529012aa1ca387d7e562666f5501399916578beb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (46 corresponding lines): crates/ai-memory-cli/src/commands/delete_page.rs:37-82 | crates/ai-memory-cli/src/commands/message.rs:458-503 \u2014 These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/delete_page.rs"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"21ac139ef8386cac9cc9ff445fb2a3a6507b71bc272da2f7624e0a191b26f016"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): crates/ai-memory-hooks/src/workstream.rs:691-719 | crates/ai-memory-hooks/src/workstream.rs:1068-1108 \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/ai-memory-hooks/src/workstream.rs"},"region":{"startLine":691}}}],"partialFingerprints":{"codehealthFindingId/v1":"909f421efbc8dea68312c39409eebb777ac591370e7ffaf62ceb7720934a38a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): crates/ai-memory-store/src/api_credentials.rs:300-327 | crates/ai-memory-store/src/users.rs:586-617 \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/ai-memory-store/src/api_credentials.rs"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"f338ab08a7430c4fa1c0c5a2042281eb2a62df176df8d2f54a1bbef9025b019c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): crates/ai-memory-wiki/src/markdown.rs:585-611 | crates/ai-memory-wiki/src/markdown.rs:689-720 \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/ai-memory-wiki/src/markdown.rs"},"region":{"startLine":585}}}],"partialFingerprints":{"codehealthFindingId/v1":"0753c6123abd7b76c0ee826b060844cd9163bf4cf459c7c93106d0aaeb9a50e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 35\u002B corresponding lines): crates/ai-memory-cli/src/commands/install_hooks.rs:2747-2791 | crates/ai-memory-cli/src/commands/install_hooks.rs:2950-2984 | crates/ai-memory-cli/src/commands/install_hooks.rs:3051-3088 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 35 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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":2747}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d1feba4ca4dc8a30c33e42328fc44bae3fe134a58759894358d83b292a68cc5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): crates/ai-memory-store/src/reader.rs:9293-9322 | crates/ai-memory-store/src/reader.rs:9339-9367 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":9293}}}],"partialFingerprints":{"codehealthFindingId/v1":"38be8f40bbe63d3b1e61c7f3591722e4f4bf188e595803a613251e9979a2d49c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (39 corresponding lines): crates/ai-memory-llm/src/openai.rs:444-495 | crates/ai-memory-llm/src/opencode.rs:398-436 \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/ai-memory-llm/src/openai.rs"},"region":{"startLine":444}}}],"partialFingerprints":{"codehealthFindingId/v1":"496601d5d4d506d7adc8a6d2870b402aeb88691372140d9519a498cce23df039"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (38 corresponding lines): crates/ai-memory-cli/src/commands/api_key.rs:109-146 | crates/ai-memory-cli/src/commands/grant.rs:67-107 \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/ai-memory-cli/src/commands/api_key.rs"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"23639bdc5cb983655f90ec1fced48e1e57e964314d888e88dbee2a884a574edd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (31 corresponding lines): crates/ai-memory-web/src/markdown.rs:218-248 | crates/ai-memory-wiki/src/markdown.rs:533-565 \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/ai-memory-web/src/markdown.rs"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3562ed21a1d8aaf16452f9d4e756f8e34236801578ec81b67edbdd4f18ab3e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (32 corresponding lines): crates/ai-memory-mcp/src/admin.rs:9791-9822 | crates/ai-memory-mcp/src/admin.rs:9844-9877 \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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":9791}}}],"partialFingerprints":{"codehealthFindingId/v1":"45999c64f7af652503f9edd998a1f852059c416d103140abf34f98078d810855"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): crates/ai-memory-mcp/src/admin.rs:4174-4199 | crates/ai-memory-store/src/reader.rs:7056-7095 \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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":4174}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8da60be521fae2dccefc59f9023f4fe85f2a7425cbe9149d9b896caa7e3eb4d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): crates/ai-memory-store/src/reader.rs:15767-15792 | crates/ai-memory-store/src/reader.rs:15977-16002 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":15767}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb69964936293c7db450339ab9b4190c335ead2498583875d437a38ae94bebf7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (35 corresponding lines): crates/ai-memory-store/src/reader.rs:11418-11462 | crates/ai-memory-store/src/reader.rs:11491-11525 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":11418}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5d671e04d64ad0d660a619a4d301849557100c943b325c3cd20b8b8d3577a81"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): crates/ai-memory-workstream/src/transcript.rs:5602-5624 | crates/ai-memory-workstream/src/transcript.rs:6208-6231 \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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":5602}}}],"partialFingerprints":{"codehealthFindingId/v1":"11d45a03ec65c17d2c73c624fde2ddf739c7ac0167877c3e3ab5c1a2f7cab9bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): crates/ai-memory-cli/src/commands/backup.rs:19-45 | crates/ai-memory-cli/src/commands/export_okf.rs:25-58 \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/ai-memory-cli/src/commands/backup.rs"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"564692c1f10862922580728122542c19de861c17b3b3c6eeace931aa6a43a907"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (33 corresponding lines): crates/ai-memory-mcp/src/admin.rs:887-927 | crates/ai-memory-mcp/src/admin_profile.rs:67-99 \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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":887}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0a9dd5788c766d76fd484f0b8b54233c7dbb825a204a7ed8a90ffe26a9b9020"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 35\u002B corresponding lines): crates/ai-memory-store/src/profile.rs:419-464 | crates/ai-memory-store/src/reader.rs:6726-6762 | crates/ai-memory-store/src/reader.rs:14074-14108 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 35 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/ai-memory-store/src/profile.rs"},"region":{"startLine":419}}}],"partialFingerprints":{"codehealthFindingId/v1":"9de16992bae260a81c3719bf04fb148bae7a79f8578a1f30a91bb8a4bca9ce5b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): companions/ai-memory-desktop/src/lib.rs:175-191 | crates/ai-memory-cli/src/commands/upgrade.rs:864-878 \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":"companions/ai-memory-desktop/src/lib.rs"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"845906419d5cc598607442d5fca5d6752ecb342af3bce38f049dfa644dbde498"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/ai-memory-store/src/reader.rs:6778-6795 | crates/ai-memory-store/src/reader.rs:7011-7040 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":6778}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c1057c56abb57351ab35c19862c670790a2870213a8e9047f3ddbd9b2c84236"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): crates/ai-memory-web/src/routes/inbox.rs:585-613 | crates/ai-memory-web/src/routes/inbox.rs:679-702 \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/ai-memory-web/src/routes/inbox.rs"},"region":{"startLine":585}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6f00415034924f3951d6c2d9a7a21fea80ac2e008e2e727da117a4423d0c959"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): crates/ai-memory-store/src/reader.rs:5160-5188 | crates/ai-memory-store/src/reader.rs:5213-5241 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":5160}}}],"partialFingerprints":{"codehealthFindingId/v1":"7dc9441525d9a8e4f45a78e90a45afeb614ee19d8808e1c6d94bba09ade79097"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (30 corresponding lines): crates/ai-memory-cli/src/commands/install_hooks.rs:8723-8752 | crates/ai-memory-cli/src/commands/install_hooks.rs:9037-9069 \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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":8723}}}],"partialFingerprints":{"codehealthFindingId/v1":"c58cbd5883b9ef3988e771d6d7e9e4a19b9b0728bb30319bb29284cf6bbf6427"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 35\u002B corresponding lines): crates/ai-memory-cli/src/commands/install_hooks.rs:4171-4206 | crates/ai-memory-cli/src/commands/install_hooks.rs:4399-4440 | crates/ai-memory-cli/src/commands/install_hooks.rs:6193-6227 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 35 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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":4171}}}],"partialFingerprints":{"codehealthFindingId/v1":"73a05436676c277fef0d27b40677f02a31c8deff83752a1ba10b5547d4b8d1eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (35 corresponding lines): crates/ai-memory-cli/src/commands/install_hooks.rs:8589-8632 | crates/ai-memory-cli/src/commands/install_hooks.rs:8640-8674 \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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":8589}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb7bb55389acc2ea784307f473ea96e7f47a885905e3a34c461d0d94f55515fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 28\u002B corresponding lines): crates/ai-memory-store/src/reader.rs:16619-16646 | crates/ai-memory-store/src/reader.rs:16655-16697 | crates/ai-memory-store/src/reader.rs:16708-16742 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":16619}}}],"partialFingerprints":{"codehealthFindingId/v1":"3afef9acc435ff4be5a3f79932fea80c4ff686aeb479d03ea25cd66a4af2cdc0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): crates/ai-memory-store/src/users.rs:109-139 | crates/ai-memory-store/src/users.rs:153-179 \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/ai-memory-store/src/users.rs"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"16aa2517d396d64e7610316c7b521f6ac5fcd5a83f4023ccc1e5d087788cb739"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): companions/ai-memory-importer/src/document.rs:641-665 | companions/ai-memory-importer/src/document.rs:667-695 \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":"companions/ai-memory-importer/src/document.rs"},"region":{"startLine":641}}}],"partialFingerprints":{"codehealthFindingId/v1":"300a5e527fdf8b8b206ad93898f4837e8d2c465cfb5b9b81361826d72339fcda"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 19\u002B corresponding lines): crates/ai-memory-store/src/reader.rs:6434-6455 | crates/ai-memory-store/src/reader.rs:7423-7441 | crates/ai-memory-store/src/reader.rs:7464-7489 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":6434}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1e6e3cec832c2811ed48d64efa178483fd50919bda334e9268b5ffefaf2ada7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 39\u002B corresponding lines): crates/ai-memory-cli/src/commands/install_hooks.rs:7340-7387 | crates/ai-memory-cli/src/commands/install_hooks.rs:8489-8531 | crates/ai-memory-cli/src/commands/install_hooks.rs:8543-8581 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 39 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":7340}}}],"partialFingerprints":{"codehealthFindingId/v1":"86d8123b01cbee1ea3eeb960037cef6b757a0bfbf8a1f3122ab261f3bc210839"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): crates/ai-memory-cli/src/commands/pending_writes.rs:137-163 | crates/ai-memory-cli/src/commands/pending_writes.rs:165-191 \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/ai-memory-cli/src/commands/pending_writes.rs"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"6da7333486041e309bb311190974a618b4a2ac42c38f758019e6ce01ec6af13d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/ai-memory-cli/src/commands/render_plugins.rs:293-316 | crates/ai-memory-cli/src/commands/user_service.rs:802-818 \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/ai-memory-cli/src/commands/render_plugins.rs"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"e82a740defe084cb1026d7af34f98de8b12800cce602a9f6cd815f3c1a8a5a5a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): crates/ai-memory-store/src/users.rs:324-349 | crates/ai-memory-store/src/users.rs:361-394 \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/ai-memory-store/src/users.rs"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"9aa4577251ab9d175ca46b483082f92ef1d209c6c92fa3cbb5188444f828e80f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): companions/ai-memory-importer/src/mcp.rs:342-358 | companions/ai-memory-wikisync/src/mcp.rs:175-191 \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":"companions/ai-memory-importer/src/mcp.rs"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2bda033092bcbbdb9cc194a3cbe6d3bb5896702f8a72fcc74c292ef6e0537df"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): crates/ai-memory-cli/src/commands/install_hooks.rs:332-360 | crates/ai-memory-cli/src/commands/install_hooks.rs:468-493 \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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a14dbffb4ecba473ed4dcb6d2e5630e89e25db66d516a14ae0a8385cb6038fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 28\u002B corresponding lines): crates/ai-memory-cli/src/commands/install_hooks.rs:3298-3326 | crates/ai-memory-cli/src/commands/install_hooks.rs:3506-3533 | crates/ai-memory-cli/src/commands/install_hooks.rs:3592-3621 | crates/ai-memory-cli/src/commands/install_hooks.rs:3685-3712 \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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":3298}}}],"partialFingerprints":{"codehealthFindingId/v1":"715d52679d7d769d6672fd6f33dc506c7b55c9823360720487daef489b5595ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/ai-memory-hooks/src/antigravity.rs:698-717 | crates/ai-memory-workstream/src/transcript.rs:5244-5260 \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/ai-memory-hooks/src/antigravity.rs"},"region":{"startLine":698}}}],"partialFingerprints":{"codehealthFindingId/v1":"92cee29f5ab7432b669d930c47b9c52f58854d3ca04082be317ca81a2fcf8bdb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): crates/ai-memory-llm/src/copilot.rs:1079-1102 | crates/ai-memory-llm/src/copilot.rs:1104-1133 \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/ai-memory-llm/src/copilot.rs"},"region":{"startLine":1079}}}],"partialFingerprints":{"codehealthFindingId/v1":"a685027bfa34b4d3622ff0b10a8003915067a8cee660396ede047a598417f579"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 29\u002B corresponding lines): crates/ai-memory-cli/src/commands/install_hooks.rs:3445-3482 | crates/ai-memory-cli/src/commands/install_hooks.rs:3542-3574 | crates/ai-memory-cli/src/commands/install_hooks.rs:3637-3665 \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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":3445}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f5db93f684d22f6b770a7f53b001a56e1699c3a6a8f66a0ec876d2d1d5baaf9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:468-490 | crates/ai-memory-consolidate/src/projection.rs:999-1021 \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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":468}}}],"partialFingerprints":{"codehealthFindingId/v1":"1df67d28c2ee95c7413aeff7af97ac0e4d731f8efe658d632e9b9a41f46d0706"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 43\u002B corresponding lines): crates/ai-memory-store/src/ops.rs:4776-4819 | crates/ai-memory-store/src/ops.rs:4853-4895 | crates/ai-memory-store/src/ops.rs:6488-6534 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 43 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/ops.rs"},"region":{"startLine":4776}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ba230b136b842c1ce73d72e8aa173b3c503acf2aa82397e04a6019e7d68488b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): crates/ai-memory-consolidate/src/bootstrap.rs:359-386 | crates/ai-memory-consolidate/src/consolidator.rs:146-170 \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/ai-memory-consolidate/src/bootstrap.rs"},"region":{"startLine":359}}}],"partialFingerprints":{"codehealthFindingId/v1":"28792355cfdfd7e3de6753f05ec7b13e21c35ae9b8ef161d43eac52810805092"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): crates/ai-memory-wiki/src/wiki.rs:388-412 | crates/ai-memory-wiki/src/wiki.rs:456-477 \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/ai-memory-wiki/src/wiki.rs"},"region":{"startLine":388}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c40a33a95112bcd3e2a83e87726c80fda6782ccfb9b93014840f844133e3854"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): crates/ai-memory-wiki/src/wiki.rs:1701-1726 | crates/ai-memory-wiki/src/wiki.rs:1742-1764 \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/ai-memory-wiki/src/wiki.rs"},"region":{"startLine":1701}}}],"partialFingerprints":{"codehealthFindingId/v1":"680f3631947c24e9d05db69fc8ffbe39578db893c953d83ab956ab3807c90220"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): companions/ai-memory-importer/src/agentmemory/export.rs:169-181 | companions/ai-memory-importer/src/claude_mem.rs:154-172 \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":"companions/ai-memory-importer/src/agentmemory/export.rs"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"430b3cab02694109474704064a7a4fd73ebeed481d727c9331159221c3fcdc2a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): crates/ai-memory-consolidate/src/auto_improve.rs:203-230 | crates/ai-memory-mcp/src/server.rs:55-88 \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/ai-memory-consolidate/src/auto_improve.rs"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce6073538552fd90c8594ae44ae49f4570569a950eb331822ad9e5fa0a142d61"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/ai-memory-hooks/src/workstream.rs:593-610 | crates/ai-memory-hooks/src/workstream.rs:619-635 \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/ai-memory-hooks/src/workstream.rs"},"region":{"startLine":593}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a33dd7b9cd7ef1046eb6d01d8ad59c4b48eed7b2633bdf88e049ac449b60e9b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): crates/ai-memory-store/src/reader.rs:9787-9813 | crates/ai-memory-store/src/reader.rs:9833-9858 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":9787}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6bc62b27a151ea101d0166b58233580541d41bda09eba59517325e6c1738347"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 11\u002B corresponding lines): crates/ai-memory-cli/src/commands/install_mcp.rs:1992-2007 | crates/ai-memory-cli/src/commands/install_mcp.rs:2031-2045 | crates/ai-memory-cli/src/commands/install_mcp.rs:2047-2057 \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/ai-memory-cli/src/commands/install_mcp.rs"},"region":{"startLine":1992}}}],"partialFingerprints":{"codehealthFindingId/v1":"250ea98d66add05dcb324408a9bc7ac90f099bc0447bf53df984891cac74b2ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/ai-memory-cli/src/commands/hook_spool.rs:2275-2294 | crates/ai-memory-workstream/src/transcript.rs:4511-4528 \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/ai-memory-cli/src/commands/hook_spool.rs"},"region":{"startLine":2275}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe5a1fd472e2526fc45555708bf020ca486bded4468116fadd793c292db88b03"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (24 corresponding lines): companions/ai-memory-importer/src/main.rs:779-802 | crates/ai-memory-cli/src/commands/backfill.rs:1306-1329 \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":"companions/ai-memory-importer/src/main.rs"},"region":{"startLine":779}}}],"partialFingerprints":{"codehealthFindingId/v1":"1704ca346671f22ec10d4dd79b86ff4f68e0c9545b68e51319edbc6025af0897"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (22 corresponding lines): crates/ai-memory-cli/src/commands/install_mcp.rs:697-718 | crates/ai-memory-llm/src/stored_token.rs:31-52 \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/ai-memory-cli/src/commands/install_mcp.rs"},"region":{"startLine":697}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd044af6670835695bdf9d6f8fe3451b366d28cc6410ada53054c82df13303c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 17\u002B corresponding lines): crates/ai-memory-llm/src/copilot.rs:384-400 | crates/ai-memory-llm/src/copilot.rs:406-422 | crates/ai-memory-llm/src/gemini.rs:260-279 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 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/ai-memory-llm/src/copilot.rs"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"6531419b26ff57c46249177b2aec6a87c5ef99af7b52108e633684b8042f4a25"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 19\u002B corresponding lines): crates/ai-memory-mcp/src/admin.rs:9684-9702 | crates/ai-memory-mcp/src/admin.rs:9743-9761 | crates/ai-memory-mcp/src/admin.rs:9767-9785 \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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":9684}}}],"partialFingerprints":{"codehealthFindingId/v1":"0743f66fdbcfd190586ac40f1bea1f38d4dfd678603307614a6a3a0f10a2ca93"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): crates/ai-memory-store/src/reader.rs:7158-7183 | crates/ai-memory-store/src/reader.rs:7193-7228 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":7158}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f30a2f9218c0ec7904e9a7ed4cf868decd95c68cff1f6eabf4d22f873232bb8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): companions/ai-memory-wikisync/src/hook.rs:246-258 | companions/ai-memory-wikisync/src/state.rs:231-246 \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":"companions/ai-memory-wikisync/src/hook.rs"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"a20832be64395340f3267e7a9e45c3bd7ab5959c77dac8712e397c9efc3e5595"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/ai-memory-llm/src/redirect.rs:17-34 | crates/ai-memory-wiki/src/admission.rs:797-814 \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/ai-memory-llm/src/redirect.rs"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"912495b836be2ea66e6710017b8aac7062942fa88992a828c1340dec0e57f911"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 14\u002B corresponding lines): crates/ai-memory-store/src/reader.rs:5392-5412 | crates/ai-memory-store/src/reader.rs:6395-6420 | crates/ai-memory-store/src/reader.rs:16584-16597 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":5392}}}],"partialFingerprints":{"codehealthFindingId/v1":"c53dabad758f6f67948a1da70347873859039e49d313ab47dcf44be6590a3ca7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 19\u002B corresponding lines): crates/ai-memory-workstream/src/transcript.rs:5816-5834 | crates/ai-memory-workstream/src/transcript.rs:5852-5870 | crates/ai-memory-workstream/src/transcript.rs:6279-6297 \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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":5816}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d33db146db3bbcd40f4f035d9174f6f8b19bbe94a8c351dda1adce328029873"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/ai-memory-cli/src/commands/api_key.rs:86-100 | crates/ai-memory-cli/src/commands/user.rs:128-142 \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/ai-memory-cli/src/commands/api_key.rs"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c1680ec952cdc496c0aaf72a6b1d68a7ddf2bdc3b9ea9797861be94d9a23a35"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 13\u002B corresponding lines): crates/ai-memory-cli/src/http_client.rs:424-440 | crates/ai-memory-cli/src/http_client.rs:450-462 | crates/ai-memory-cli/src/http_client.rs:515-528 \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/ai-memory-cli/src/http_client.rs"},"region":{"startLine":424}}}],"partialFingerprints":{"codehealthFindingId/v1":"b89614b37fbe379b695720d207aac88edb59466bfd1b61579f222a9a84d1811f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/ai-memory-consolidate/src/consolidator.rs:1695-1714 | crates/ai-memory-consolidate/src/consolidator.rs:1843-1860 \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/ai-memory-consolidate/src/consolidator.rs"},"region":{"startLine":1695}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ca2b72dce81d58ee8d15135e51b4beec15bcbaa0dcff14e0a4e689aa0c7a225"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/ai-memory-mcp/src/human_auth.rs:459-471 | crates/ai-memory-mcp/src/human_auth.rs:493-504 \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/ai-memory-mcp/src/human_auth.rs"},"region":{"startLine":459}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a916f8d9ea77a7cbfe72380443299bdf13e8328665db8bf5744bf67f4e493ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): crates/ai-memory-hooks/src/router.rs:4860-4885 | crates/ai-memory-hooks/src/router.rs:4892-4917 \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/ai-memory-hooks/src/router.rs"},"region":{"startLine":4860}}}],"partialFingerprints":{"codehealthFindingId/v1":"0862dc2fab10a7eb45b4db7f084721087207e3fdfeda5a6d5e72a4e038cb3b5e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): crates/ai-memory-workstream/src/transcript.rs:182-201 | crates/ai-memory-workstream/src/transcript.rs:322-349 \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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"387a1fd8717c6806f2a13bfa5dfcf95e9b051c6895f92bec37312b6a29071dce"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/ai-memory-cli/src/marker.rs:1400-1417 | crates/ai-memory-workstream/src/harness.rs:1493-1512 \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/ai-memory-cli/src/marker.rs"},"region":{"startLine":1400}}}],"partialFingerprints":{"codehealthFindingId/v1":"72fa128955317334b733999ee90346e95b4fc527e02bfcb056047886f2823cf2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/ai-memory-wiki/src/wiki.rs:2235-2244 | crates/ai-memory-wiki/src/wiki.rs:2252-2261 \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/ai-memory-wiki/src/wiki.rs"},"region":{"startLine":2235}}}],"partialFingerprints":{"codehealthFindingId/v1":"2918323638cf2348dd8a6dcfd6adcb91f19ec5f373a1114e86b58ccb7442dcf8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (17 corresponding lines): crates/ai-memory-cli/src/commands/forget_sweep.rs:26-42 | crates/ai-memory-cli/src/commands/lint.rs:24-41 \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/ai-memory-cli/src/commands/forget_sweep.rs"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"959b6b55435841b00b3a84212b0b07f47500daf948ed7259597324db2a665bd0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (7 members, 20\u002B corresponding lines): crates/ai-memory-cli/src/commands/setup_agent.rs:323-346 | crates/ai-memory-cli/src/commands/setup_agent.rs:354-377 | crates/ai-memory-cli/src/commands/setup_agent.rs:424-443 | crates/ai-memory-cli/src/commands/setup_agent.rs:449-469 | crates/ai-memory-cli/src/commands/setup_agent.rs:474-493 | crates/ai-memory-cli/src/commands/setup_agent.rs:497-516 | crates/ai-memory-cli/src/commands/setup_agent.rs:520-539 \u2014 These 7 members are one piece of code written 7 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 7 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/setup_agent.rs"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"416249eb01590730abf8f18921068949b2ba0344d5214ef5e2bfa1e3bd6958c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): companions/ai-memory-importer/src/document.rs:1392-1410 | companions/ai-memory-importer/src/main.rs:1269-1287 \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":"companions/ai-memory-importer/src/document.rs"},"region":{"startLine":1392}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f9cfc4a5f85188daba8aa171b9f3fc0e26009ed646211adb802786d391d5078"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (379 corresponding lines): crates/ai-memory-cli/src/commands/install_hooks.rs:5478-5963 | crates/ai-memory-cli/src/commands/install_hooks.rs:6399-6777 \u2014 These two members are one piece of code written twice and then edited apart: 379 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":5478}}}],"partialFingerprints":{"codehealthFindingId/v1":"171ad2c64910dfd3d2ede2c7f88a539f6ecc544169fe59d2cd443a64f5eabe6f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): crates/ai-memory-store/src/reader.rs:15545-15567 | crates/ai-memory-store/src/reader.rs:15707-15725 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":15545}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f6a6b41d87a3e106da78436396a2fdf2519845a6f36540fb90ec2f8c8760479"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (6 members, 22\u002B corresponding lines): crates/ai-memory-cli/src/commands/install_hooks.rs:7495-7516 | crates/ai-memory-cli/src/commands/install_hooks.rs:8027-8051 | crates/ai-memory-cli/src/commands/install_hooks.rs:8114-8136 | crates/ai-memory-cli/src/commands/install_hooks.rs:8193-8215 | crates/ai-memory-cli/src/commands/install_hooks.rs:8279-8300 | crates/ai-memory-cli/src/commands/install_hooks.rs:8363-8385 \u2014 These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":7495}}}],"partialFingerprints":{"codehealthFindingId/v1":"af181af3e027c0f9fee437017f97583d684a34d7e75d2e1e668dcce2801be23a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/ai-memory-store/src/ops.rs:7931-7945 | crates/ai-memory-store/src/reader.rs:6497-6522 \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/ai-memory-store/src/ops.rs"},"region":{"startLine":7931}}}],"partialFingerprints":{"codehealthFindingId/v1":"a15cc1c57c957484ac480b7a71866498e5715d6ffd4e06b5b5e200d8743565b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): companions/ai-memory-relay/src/fsguard.rs:241-254 | companions/ai-memory-relay/src/fsguard.rs:258-268 \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":"companions/ai-memory-relay/src/fsguard.rs"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b9b59bc97fc99a0f2a92102aa6c0a186c504bdc46b82b26061d8c5a6aa429bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 10\u002B corresponding lines): crates/ai-memory-core/src/active_project.rs:810-821 | crates/ai-memory-core/src/active_project.rs:824-833 | crates/ai-memory-core/src/active_project.rs:836-845 \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/ai-memory-core/src/active_project.rs"},"region":{"startLine":810}}}],"partialFingerprints":{"codehealthFindingId/v1":"86beabf1cb524ca5b2ed07dfb4e9c7d94d3acbfde1860de024eb76134a3511be"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): companions/ai-memory-wikisync/src/client.rs:122-146 | companions/ai-memory-wikisync/src/client.rs:279-298 \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":"companions/ai-memory-wikisync/src/client.rs"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"f97dda2d95c21a1d853768b64ac2b3eb3bbd5473ec337a7bcbbf0d08fcf66560"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/ai-memory-cli/src/commands/render_shared.rs:450-465 | crates/ai-memory-cli/src/commands/user_service.rs:177-191 \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/ai-memory-cli/src/commands/render_shared.rs"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"84ea42d97244f1615d4b532271332eff9c678d574fdca09262a88313d10cc6b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): crates/ai-memory-mcp/src/admin.rs:2453-2475 | crates/ai-memory-mcp/src/server.rs:2771-2795 \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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":2453}}}],"partialFingerprints":{"codehealthFindingId/v1":"aaff2fb3a773a67375d80f8c1da303b586288861d4e771abf682ad1d3412caa3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/ai-memory-store/src/reader.rs:694-709 | crates/ai-memory-store/src/reader.rs:714-729 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":694}}}],"partialFingerprints":{"codehealthFindingId/v1":"f19a9aa7478dbb53c07e1b01e7c5ab0c482d4e93b9c7fc0776bc87bb477186f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): crates/ai-memory-store/src/auto_improve.rs:665-713 | crates/ai-memory-store/src/auto_improve.rs:737-765 \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/ai-memory-store/src/auto_improve.rs"},"region":{"startLine":665}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc9f2dcfe3cb1a7fc7dfb6d5054098372315fbfaa498412adf6d6affee0609c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/ai-memory-cli/src/commands/api_key.rs:153-163 | crates/ai-memory-cli/src/commands/user.rs:193-203 \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/ai-memory-cli/src/commands/api_key.rs"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f80401a2acbde2110045d0b4ce0bf457d6d13c43de5c6ce4c549ee25869d70b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 10\u002B corresponding lines): crates/ai-memory-cli/src/commands/project_registry.rs:481-493 | crates/ai-memory-cli/src/commands/recovery.rs:296-309 | crates/ai-memory-cli/src/commands/recovery.rs:379-388 \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/ai-memory-cli/src/commands/project_registry.rs"},"region":{"startLine":481}}}],"partialFingerprints":{"codehealthFindingId/v1":"833d5c2d9ed008a9fb04431f626d89bfa3e158726fd2fe9789a35a813ed221e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/ai-memory-cli/src/marker.rs:337-352 | crates/ai-memory-cli/src/marker.rs:380-395 \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/ai-memory-cli/src/marker.rs"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"93ab9f7c32685091144182a0ecd1f52b3f9419234496ff39617ba3e88b5ef925"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 15\u002B corresponding lines): crates/ai-memory-cli/src/commands/api_key.rs:165-182 | crates/ai-memory-cli/src/commands/user.rs:205-222 | crates/ai-memory-cli/src/commands/user.rs:224-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 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/ai-memory-cli/src/commands/api_key.rs"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"8843e3e9879fcda696a7a315417dd00dbb230ca8fd7dba71ddfde5cbb9af2438"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/ai-memory-cli/src/commands/run.rs:5846-5858 | crates/ai-memory-cli/src/commands/run.rs:6143-6153 \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/ai-memory-cli/src/commands/run.rs"},"region":{"startLine":5846}}}],"partialFingerprints":{"codehealthFindingId/v1":"a220020a99b4fd12f95706c1ba9825832684f94da4bc1cb1eaefc71bd8692dbf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/ai-memory-cli/src/http_client.rs:481-491 | crates/ai-memory-cli/src/http_client.rs:494-504 \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/ai-memory-cli/src/http_client.rs"},"region":{"startLine":481}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba8470a6748abcc36b0879e7e611e91128dba5b6a51e49464a1ca61f49321c4f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/ai-memory-store/src/reader.rs:13246-13263 | crates/ai-memory-store/src/reader.rs:13421-13438 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":13246}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ae33377fa7ae3563b8ad3cbbba31d3c1d80cfb49f8cc494b2347d94367be5bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/ai-memory-cli/src/commands/hook_spool.rs:418-430 | crates/ai-memory-cli/src/commands/run.rs:5398-5413 \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/ai-memory-cli/src/commands/hook_spool.rs"},"region":{"startLine":418}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1edef12654311a0ac263a2d5ab85faf9c6f0548065707537142e739e6e58cf5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/ai-memory-web/src/markdown.rs:339-372 | crates/ai-memory-web/src/templates.rs:135-149 \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/ai-memory-web/src/markdown.rs"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"a992b27659099d7ed7efd8fae0c8a4fb0a357d6f3b17b70dbb9e52eee987808f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 15\u002B corresponding lines): companions/ai-memory-importer/src/mcp.rs:135-151 | companions/ai-memory-importer/src/mcp.rs:156-172 | companions/ai-memory-wikisync/src/mcp.rs:107-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 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":"companions/ai-memory-importer/src/mcp.rs"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5a07fe6130a8fb99803ebc657cc9109585e364b4665252f59a395474a5bd982"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/ai-memory-core/src/active_project.rs:849-857 | crates/ai-memory-core/src/active_project.rs:861-869 \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/ai-memory-core/src/active_project.rs"},"region":{"startLine":849}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5fd7a0b5cc11e965ef7e7239b9756ffe6a151ace527b3a0a917808c1c533cad"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/ai-memory-workstream/src/harness.rs:222-244 | crates/ai-memory-workstream/src/harness.rs:248-265 \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/ai-memory-workstream/src/harness.rs"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"43807a487249cec67eefba3e81b949743543fd63424ac65176474fa72b60239e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:582-599 | crates/ai-memory-consolidate/src/projection.rs:1114-1131 \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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":582}}}],"partialFingerprints":{"codehealthFindingId/v1":"4de2c37554bb9515af3496e1e4d5d369cc483318b3ac70b455752b99d111865c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 14\u002B corresponding lines): crates/ai-memory-cli/src/commands/auth.rs:211-224 | crates/ai-memory-cli/src/commands/auth.rs:285-298 | crates/ai-memory-cli/src/commands/auth.rs:335-348 \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/ai-memory-cli/src/commands/auth.rs"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"a78381fdfe38fcef376c29c24f3a7f552dacda9ec3c3c223de76694444d2f600"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 17\u002B corresponding lines): crates/ai-memory-cli/src/commands/backup.rs:48-65 | crates/ai-memory-cli/src/commands/compact.rs:64-80 | crates/ai-memory-web/src/routes/index.rs:194-210 \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/ai-memory-cli/src/commands/backup.rs"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"e45db0c554409097b6ea026ccd121ae004eabf23f192d0ed463ee282e180dfa1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/ai-memory-consolidate/src/embed.rs:256-268 | crates/ai-memory-consolidate/src/embed.rs:274-286 \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/ai-memory-consolidate/src/embed.rs"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c90cf11a4ead90fff3d6db00b006f19d5e925d5c538f11ec446e3f4ed1d4392"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/ai-memory-wiki/src/git.rs:1412-1424 | crates/ai-memory-wiki/src/git.rs:1524-1538 \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/ai-memory-wiki/src/git.rs"},"region":{"startLine":1412}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7681dafb3f1e185e1af9c0dc6fdda0f2efc440cc8a13ab90874e4e3d861ed95"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/ai-memory-cli/src/commands/doctor.rs:1071-1082 | crates/ai-memory-web/src/routes/health.rs:153-164 \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/ai-memory-cli/src/commands/doctor.rs"},"region":{"startLine":1071}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d6cf3559d89811d1d300d81a9e500da74b6bcf4262249145dcb05c54971cec2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): crates/ai-memory-llm/src/codex.rs:197-219 | crates/ai-memory-llm/src/openai_oauth.rs:251-274 \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/ai-memory-llm/src/codex.rs"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9c1c41e563218078a877273a29a784b46914e39f7b55204ad9a359857fec793"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 13\u002B corresponding lines): crates/ai-memory-wiki/src/wiki.rs:2062-2074 | crates/ai-memory-wiki/src/wiki.rs:2087-2099 | crates/ai-memory-wiki/src/wiki.rs:2111-2123 \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/ai-memory-wiki/src/wiki.rs"},"region":{"startLine":2062}}}],"partialFingerprints":{"codehealthFindingId/v1":"5feb14cb28465275291ec67348ce3e5a2404a2e042393c047fff570e5ae9262c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 17\u002B corresponding lines): crates/ai-memory-cli/src/commands/auth.rs:546-563 | crates/ai-memory-cli/src/commands/auth.rs:611-632 | crates/ai-memory-cli/src/commands/auth.rs:637-653 \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/ai-memory-cli/src/commands/auth.rs"},"region":{"startLine":546}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3fdfb983e559da7f3d2f2827a5f07adb1ed4aac468e2eac4afe90d0ca207869"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): crates/ai-memory-cli/src/commands/install_hooks.rs:8688-8715 | crates/ai-memory-cli/src/commands/install_hooks.rs:9002-9029 \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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":8688}}}],"partialFingerprints":{"codehealthFindingId/v1":"a63be9da40d429d04934c5e9bee7b63a8b127ca8a10cde960238bc874c04607b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/ai-memory-cli/src/commands/backfill.rs:1275-1289 | crates/ai-memory-cli/src/commands/hook_spool.rs:1068-1084 \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/ai-memory-cli/src/commands/backfill.rs"},"region":{"startLine":1275}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecc1cccecf3957407107911db3eaedebc9d7bfe142fa109fdef4db85d5412d98"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): crates/ai-memory-store/src/reader.rs:11104-11129 | crates/ai-memory-store/src/reader.rs:12330-12360 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":11104}}}],"partialFingerprints":{"codehealthFindingId/v1":"786054fb886726685a6a45761f7cdc4d05b79cbda2bc8b0629f77a92fe3eff33"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/ai-memory-web/src/routes/api.rs:758-773 | crates/ai-memory-web/src/routes/api.rs:1216-1234 \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/ai-memory-web/src/routes/api.rs"},"region":{"startLine":758}}}],"partialFingerprints":{"codehealthFindingId/v1":"41dccbefadb85467d84b2e167e8eda714a696425ac4bf64dacf4fbe26cafe051"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/ai-memory-core/src/active_project.rs:548-564 | crates/ai-memory-core/src/active_project.rs:699-709 \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/ai-memory-core/src/active_project.rs"},"region":{"startLine":548}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfad9deae000af7f6757536b401af4fbc37b8a2de6a1fd69bd388ee7e0c8ffd2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): crates/ai-memory-store/src/reader.rs:5042-5059 | crates/ai-memory-store/src/reader.rs:7388-7407 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":5042}}}],"partialFingerprints":{"codehealthFindingId/v1":"181ad3d42b645d5c87cb53348e856073be1834f74a07bbb8f7b6a9c5cbe78719"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/ai-memory-web/src/markdown.rs:180-190 | crates/ai-memory-wiki/src/markdown.rs:517-526 \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/ai-memory-web/src/markdown.rs"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fc61c33875322e133dff460cbb2ad8364f3fa12522d388cdd4d8e61588e53d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): companions/ai-memory-importer/src/mcp.rs:534-542 | companions/ai-memory-wikisync/src/mcp.rs:271-279 \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":"companions/ai-memory-importer/src/mcp.rs"},"region":{"startLine":534}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b9e49826930c07e239483572bb9734dd8eb269082681ebeccd851c04bed049c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/ai-memory-hooks/src/antigravity.rs:721-729 | crates/ai-memory-workstream/src/transcript.rs:5262-5270 \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/ai-memory-hooks/src/antigravity.rs"},"region":{"startLine":721}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8ebf9e801842e16cb29831ea90c49b1abf48def1a0b20027d060861fda8a91b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 13\u002B corresponding lines): crates/ai-memory-llm/src/anthropic.rs:70-84 | crates/ai-memory-llm/src/anthropic.rs:95-109 | crates/ai-memory-llm/src/gemini.rs:43-55 | crates/ai-memory-llm/src/openai.rs:141-159 \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/ai-memory-llm/src/anthropic.rs"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"edfd2a2e6f0efb9e75333057643c963cd7b1b6b37d11b9d7cb63b6016d598300"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): companions/ai-memory-macos/Sources/AIMemoryMenu/AppModel.swift:192-207 | companions/ai-memory-macos/Sources/AIMemoryMenu/AppModel.swift:217-231 \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":"companions/ai-memory-macos/Sources/AIMemoryMenu/AppModel.swift"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"05b6ae20d623e53ae9735ef93b7a82ae0dc44bee49fa8f91c8682a24861bb777"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 15\u002B corresponding lines): crates/ai-memory-store/src/ops.rs:353-368 | crates/ai-memory-store/src/reader.rs:5425-5441 | crates/ai-memory-store/src/reader.rs:5456-5480 | crates/ai-memory-store/src/reader.rs:12599-12613 \u2014 These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/ops.rs"},"region":{"startLine":353}}}],"partialFingerprints":{"codehealthFindingId/v1":"505334aee10bc812ef448d3ecd20e50ffa57208acf9c3240760a04c1c830b535"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): companions/ai-memory-importer/src/agentmemory/vault.rs:363-372 | companions/ai-memory-importer/src/main.rs:1169-1178 \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":"companions/ai-memory-importer/src/agentmemory/vault.rs"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"92fa6151dd68a94c858e3ea089d506fcc4448911ab9cec70157a1c9f9adc7857"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:550-558 | crates/ai-memory-consolidate/src/projection.rs:1081-1089 \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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":550}}}],"partialFingerprints":{"codehealthFindingId/v1":"6533e3381ba450a313d6813f99b33695b584a66c7edd0aab7959b3fb0054fdf5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/ai-memory-store/src/profile.rs:111-123 | crates/ai-memory-store/src/profile.rs:711-727 \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/ai-memory-store/src/profile.rs"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3b1fb6bbb15627015c09c5e328b6f72d0b2c81cec8e062e60bf286dc5bafbf9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 15\u002B corresponding lines): crates/ai-memory-cli/src/commands/codex_hook_trust.rs:83-97 | crates/ai-memory-cli/src/commands/opencode_dialect.rs:136-150 | crates/ai-memory-llm/src/cursor_agent.rs:410-424 \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/ai-memory-cli/src/commands/codex_hook_trust.rs"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"7006579dcb8a8cc7cd467ef84edabb90d356366d62a8a4bbd5354b312d3d9027"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 24\u002B corresponding lines): crates/ai-memory-store/src/reader.rs:16042-16065 | crates/ai-memory-store/src/reader.rs:16105-16129 | crates/ai-memory-store/src/reader.rs:16137-16161 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/reader.rs"},"region":{"startLine":16042}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d1801341456535d2d381365aba4ed886431bb6843695adb75e219c4a55bf6f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/ai-memory-store/src/scope.rs:393-406 | crates/ai-memory-store/src/scope.rs:885-902 \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/ai-memory-store/src/scope.rs"},"region":{"startLine":393}}}],"partialFingerprints":{"codehealthFindingId/v1":"428a64bd9da96b872fd9ae70baf490aab0c2dce46eaef0c46df39494ba96cc48"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): companions/ai-memory-importer/src/claude_mem.rs:441-452 | crates/ai-memory-wiki/src/watcher.rs:427-438 \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":"companions/ai-memory-importer/src/claude_mem.rs"},"region":{"startLine":441}}}],"partialFingerprints":{"codehealthFindingId/v1":"b26ef7bf9905f97e6e756768d8ba470d825f8a6603a7ff11312f81d7ab2f674c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:733-741 | crates/ai-memory-consolidate/src/projection.rs:1270-1276 \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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":733}}}],"partialFingerprints":{"codehealthFindingId/v1":"36e634337acba0030dcd7ae84cd5e95d1c3be72a5efad6bfb5fcb0dcbea90fe0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/ai-memory-llm/src/health.rs:400-409 | crates/ai-memory-llm/src/health.rs:411-420 \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/ai-memory-llm/src/health.rs"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe96a0a334feb26adf98a6ea3d8e3b2b565454900bd203056e3d45900915f0da"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/ai-memory-mcp/src/self_service_keys.rs:33-47 | crates/ai-memory-mcp/src/session_management.rs:42-55 \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/ai-memory-mcp/src/self_service_keys.rs"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf1f828c06cb2b9308998795134b14d715f9ebd55b137721e582c163bbf1bfcf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/ai-memory-cli/src/commands/restore.rs:584-591 | crates/ai-memory-wiki/src/confinement.rs:292-300 \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/ai-memory-cli/src/commands/restore.rs"},"region":{"startLine":584}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd7e39aaf73a0fa55645bc763a1059854b1c9ad37e4945e27bfbcabf0a081dad"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/ai-memory-cli/src/commands/user.rs:379-389 | crates/ai-memory-mcp/src/launch_scope.rs:63-73 \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/ai-memory-cli/src/commands/user.rs"},"region":{"startLine":379}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fbc2b0d8c31058f872d06c38d3b7d7207052fe6dac9ad9ec3bcdba888289083"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/ai-memory-hooks/src/capture_policy.rs:3185-3199 | crates/ai-memory-hooks/src/capture_policy.rs:3297-3308 \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/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":3185}}}],"partialFingerprints":{"codehealthFindingId/v1":"096edf32a1b61cf1d1fa38ea33f1e64b96028b96589c9d21967d94c038bd22f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/ai-memory-cli/src/commands/install_skills.rs:507-529 | crates/ai-memory-cli/src/commands/install_skills.rs:531-545 \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/ai-memory-cli/src/commands/install_skills.rs"},"region":{"startLine":507}}}],"partialFingerprints":{"codehealthFindingId/v1":"af2478d2679c5784960967f023223d3888dc60d9d58f5a42bace407a828af5a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/ai-memory-consolidate/src/auto_improve.rs:418-431 | crates/ai-memory-consolidate/src/auto_improve.rs:443-455 \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/ai-memory-consolidate/src/auto_improve.rs"},"region":{"startLine":418}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf31af12f0c2557fef6c408a6e1bb714b3378ef0ff5c0c343da6e7f4bd4d12ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:646-653 | crates/ai-memory-consolidate/src/projection.rs:1178-1185 \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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":646}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd960f6e6171f06a4e0676da42626df5bf21c1a522826d3bf809d0fb24e0371c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/ai-memory-store/src/reader.rs:16240-16256 | crates/ai-memory-store/src/reader.rs:16261-16272 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":16240}}}],"partialFingerprints":{"codehealthFindingId/v1":"49e008bfdf5fd9231a25ec9bbcd43ed16dd2b0dc980379b53a79c10123691958"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:786-792 | crates/ai-memory-consolidate/src/projection.rs:1321-1327 \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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":786}}}],"partialFingerprints":{"codehealthFindingId/v1":"00ec463737ea67567b3a6bda1879dc560d72622a3bea0147d4451c586d035cf4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 17\u002B corresponding lines): crates/ai-memory-llm/src/embedding.rs:161-180 | crates/ai-memory-llm/src/embedding.rs:510-526 | crates/ai-memory-llm/src/embedding.rs:620-637 \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/ai-memory-llm/src/embedding.rs"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4232c2308d8a9ce9c69f3ca828f5a7a1c5c95c341d44b2ec4ace10f298316bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/ai-memory-llm/src/embedding_capacity.rs:128-137 | crates/ai-memory-llm/src/embedding_capacity.rs:139-148 \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/ai-memory-llm/src/embedding_capacity.rs"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"20b5bc0e96ef59d8bbd44319811a43abf81e13b3253a8d0b2429a8c53f623462"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): crates/ai-memory-llm/src/types.rs:85-98 | crates/ai-memory-llm/src/types.rs:102-115 \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/ai-memory-llm/src/types.rs"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"00b7d183cb0006fb0b3f594c7f24a1ce9d741a67953f2cd4c02be43251c494ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): companions/ai-memory-client/src/scrub.rs:122-129 | crates/ai-memory-core/src/sanitize.rs:104-111 \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":"companions/ai-memory-client/src/scrub.rs"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"98bab46afe7c26fe23147c2ddb60ae04b619c7a070e80bae2e78bd90d6ba76e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): crates/ai-memory-store/src/reader.rs:8481-8503 | crates/ai-memory-store/src/reader.rs:8560-8588 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":8481}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1b4dd674b0613b3403b823181f9627cd5c70c65b25913e3ba0c471c2ef09a54"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/ai-memory-store/src/reader.rs:6810-6822 | crates/ai-memory-store/src/reader.rs:6836-6848 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":6810}}}],"partialFingerprints":{"codehealthFindingId/v1":"545c3cd5f9718977085296fc953211d8766e0d97e9ed409c453cf537ab844f5e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/ai-memory-hooks/src/workstream.rs:228-238 | crates/ai-memory-web/src/routes/api.rs:1433-1443 \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/ai-memory-hooks/src/workstream.rs"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a94bdccd7112496dfe42f2c9fabb9a6085273177c2447810a24b7fe9840fb1c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/ai-memory-mcp/src/admin.rs:9666-9677 | crates/ai-memory-mcp/src/admin.rs:9827-9838 \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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":9666}}}],"partialFingerprints":{"codehealthFindingId/v1":"962a0abf84b4f4a2c252ee1f752c25311664e333465f0dbef99369b5dfcddeaf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/ai-memory-cli/src/config.rs:3794-3800 | crates/ai-memory-wiki/src/wiki.rs:4338-4344 \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/ai-memory-cli/src/config.rs"},"region":{"startLine":3794}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c4c8befae134853e390b511650ba15b7cea1e45a026c60f6a554457abfeec66"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/ai-memory-hooks/src/payload.rs:1262-1273 | crates/ai-memory-hooks/src/payload.rs:1307-1322 \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/ai-memory-hooks/src/payload.rs"},"region":{"startLine":1262}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fd127e125291cfe35bbfb8d7dbab7f2087dbd5e6dc670ac636c51d92b07174e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/ai-memory-store/src/reader.rs:10515-10527 | crates/ai-memory-store/src/reader.rs:10539-10551 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":10515}}}],"partialFingerprints":{"codehealthFindingId/v1":"2380fd402bbaef72a4b0cb27f79e3b149bf323a60e6b8d7cfc0979c351ffa18b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/ai-memory-store/src/writer.rs:1047-1058 | crates/ai-memory-store/src/writer.rs:1394-1406 \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/ai-memory-store/src/writer.rs"},"region":{"startLine":1047}}}],"partialFingerprints":{"codehealthFindingId/v1":"04d2d89954d27b4729488b2dda6132ec00ebfc8b5c07c1ab8404dd2afbfe695c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/ai-memory-cli/src/commands/setup_web.rs:131-136 | crates/ai-memory-cli/src/commands/setup_web.rs:138-144 \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/ai-memory-cli/src/commands/setup_web.rs"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"434a437846e9a6abe16a8762831760ed1cec2499db26c3684aced733285eec0d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (19 corresponding lines): crates/ai-memory-store/src/reader.rs:5075-5098 | crates/ai-memory-store/src/reader.rs:5116-5134 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":5075}}}],"partialFingerprints":{"codehealthFindingId/v1":"dde7e6ccb55910d744987d6bb352bc8d0b00ec370b14a2b01b3db99d6e27c7b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/ai-memory-cli/src/commands/install_hooks.rs:75-88 | crates/ai-memory-cli/src/commands/install_hooks.rs:8799-8810 \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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"400e4761f9fc430f8552a7f4da7732edf3d2ac7bdf3e767aceb834cbadbc75b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/ai-memory-cli/src/commands/purge_project.rs:111-120 | crates/ai-memory-cli/src/commands/purge_session.rs:80-86 \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/ai-memory-cli/src/commands/purge_project.rs"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"047fc24fdca18bea4e94fca617812c831579175f5585afa0db0896e8c93b74b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/ai-memory-consolidate/src/auto_improve_schedule.rs:472-484 | crates/ai-memory-consolidate/src/auto_improve_schedule.rs:491-512 \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/ai-memory-consolidate/src/auto_improve_schedule.rs"},"region":{"startLine":472}}}],"partialFingerprints":{"codehealthFindingId/v1":"601ca7176ea6ed42b1a6ce09cf3b25a948a2a6af319677b8587a9dbe6fee40c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): companions/ai-memory-importer/src/agentmemory/export.rs:1247-1256 | crates/ai-memory-hooks/src/router.rs:3330-3337 \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":"companions/ai-memory-importer/src/agentmemory/export.rs"},"region":{"startLine":1247}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab1eff4f329c7ffc28ebfe35396a0fdb4b7ff5e15af9c5f77e220600c1344a3f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/ai-memory-llm/src/anthropic.rs:586-600 | crates/ai-memory-llm/src/anthropic.rs:612-627 \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/ai-memory-llm/src/anthropic.rs"},"region":{"startLine":586}}}],"partialFingerprints":{"codehealthFindingId/v1":"c91c2a26aa0686eb1ea8149dff3d996b9305bf0d4f4bea7b988108386239bc16"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/ai-memory-mcp/src/server.rs:9158-9167 | crates/ai-memory-mcp/src/admin.rs:4711-4720 \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/ai-memory-mcp/src/server.rs"},"region":{"startLine":9158}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f0f610ff57c33e0f824bd3f7e38e1d5c2e7e47f0a4f63dc591f3f446f99edec"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (7 members, 13\u002B corresponding lines): crates/ai-memory-store/src/writer.rs:1217-1232 | crates/ai-memory-store/src/writer.rs:1270-1283 | crates/ai-memory-store/src/writer.rs:1326-1338 | crates/ai-memory-store/src/writer.rs:1747-1759 | crates/ai-memory-store/src/writer.rs:2388-2402 | crates/ai-memory-store/src/writer.rs:2602-2616 | crates/ai-memory-store/src/writer.rs:2696-2710 \u2014 These 7 members are one piece of code written 7 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 7 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/writer.rs"},"region":{"startLine":1217}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa3a2069ed91f1e58f6bf64695e0aac3c9305ac6f27294d977f31c9e7fe3d81c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): evals/src/abstention.rs:538-546 | evals/src/retrieval/score.rs:183-193 \u2014 These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"evals/src/abstention.rs"},"region":{"startLine":538}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca681ac0068125a1f0b80782637bbc76c84aad4fcc1cf3b74d11c6a922f0fe90"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): crates/ai-memory-cli/src/commands/install_mcp.rs:663-673 | crates/ai-memory-cli/src/commands/install_mcp.rs:678-693 \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/ai-memory-cli/src/commands/install_mcp.rs"},"region":{"startLine":663}}}],"partialFingerprints":{"codehealthFindingId/v1":"74914b73159cd9ff30f2994b1de527e8ea72c1273ff49c22491fc957dde010f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): crates/ai-memory-llm/src/openai_oauth.rs:555-568 | crates/ai-memory-llm/src/opencode.rs:379-391 \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/ai-memory-llm/src/openai_oauth.rs"},"region":{"startLine":555}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c1e63cc7de6d74f280df6b35b25f5858eea66460b705812cfb840f57dff083d"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/ai-memory-cli/src/commands/render_shared.rs:2807-2816 | crates/ai-memory-web/src/routes/pending.rs:232-241 \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/ai-memory-cli/src/commands/render_shared.rs"},"region":{"startLine":2807}}}],"partialFingerprints":{"codehealthFindingId/v1":"890b3ef395d944f3550849bbd881d06f1a7130c716bde0355e3e76a5d3d2bac1"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/ai-memory-cli/src/commands/show.rs:1090-1103 | crates/ai-memory-store/src/reader.rs:415-422 \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/ai-memory-cli/src/commands/show.rs"},"region":{"startLine":1090}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fee924e7f4c4418631773e8afe8a5fe3a7f1814053c299812e0826f0be62056"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): crates/ai-memory-cli/src/commands/run.rs:5573-5580 | companions/ai-memory-client/src/lib.rs:16-23 \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/ai-memory-cli/src/commands/run.rs"},"region":{"startLine":5573}}}],"partialFingerprints":{"codehealthFindingId/v1":"347fcc00c9a7b844129abbf63f263597bc8abb54ae9ed707799e76ec358d8dff"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 9\u002B corresponding lines): crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:96-104 | crates/ai-memory-consolidate/src/projection.rs:97-105 | crates/ai-memory-web/src/routes/api.rs:1348-1359 \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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"865f25d1e4668f2f2d460c260f8a09310b062abb28663cc018f3833ca6f9abf4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/ai-memory-store/src/grants.rs:97-113 | crates/ai-memory-store/src/api_credentials.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/ai-memory-store/src/grants.rs"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"c07fc3c82134a761f83e1632253500dccc7cadbefdd1ac5e4c2edf196b15cb35"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 10\u002B corresponding lines): crates/ai-memory-store/src/ops.rs:7904-7915 | crates/ai-memory-store/src/project_authz.rs:343-357 | crates/ai-memory-store/src/reader.rs:16520-16529 \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/ai-memory-store/src/ops.rs"},"region":{"startLine":7904}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8aef4992f8148c68cd70f9ac9fe9f7aa2519d32386022e721520bbbb57df455"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 10\u002B corresponding lines): crates/ai-memory-store/src/reader.rs:6981-6993 | crates/ai-memory-store/src/reader.rs:14425-14434 | crates/ai-memory-store/src/users.rs:470-480 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":6981}}}],"partialFingerprints":{"codehealthFindingId/v1":"af3c6925db432142225f642d2af916aae1ac4f144e798c40f3dbc35f9375bb7e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/ai-memory-cli/src/commands/hook.rs:1236-1244 | crates/ai-memory-hooks/src/recap.rs:768-778 \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/ai-memory-cli/src/commands/hook.rs"},"region":{"startLine":1236}}}],"partialFingerprints":{"codehealthFindingId/v1":"9984de98a06bba4c8cc67e764b72fe8f2b272567582ad46778d0c1d6b536ca30"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/ai-memory-core/src/sanitize.rs:966-975 | crates/ai-memory-hooks/src/router.rs:6411-6419 \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/ai-memory-core/src/sanitize.rs"},"region":{"startLine":966}}}],"partialFingerprints":{"codehealthFindingId/v1":"f26ae3960b612d64648da4e63f80136d63c6d4e57fe2c0aa497a5a86a27e2ecb"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 14\u002B corresponding lines): crates/ai-memory-llm/src/health.rs:739-752 | crates/ai-memory-llm/src/health.rs:762-778 | crates/ai-memory-llm/src/health.rs:784-797 \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/ai-memory-llm/src/health.rs"},"region":{"startLine":739}}}],"partialFingerprints":{"codehealthFindingId/v1":"716d1175a5cb9a9a8ef74f6e09144e8b90bcccf8be50ab506c1d06fc6faebcf4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/ai-memory-cli/src/commands/install_hooks.rs:725-733 | crates/ai-memory-cli/src/commands/install_mcp.rs:1026-1034 \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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":725}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e596812c2a3292150ca544e33b8d4ce9dfc0ee9473a01421a21e81ce85ca7ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/ai-memory-store/src/api_credentials.rs:17-25 | crates/ai-memory-store/src/web_sessions.rs:30-38 \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/ai-memory-store/src/api_credentials.rs"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a7d1a4320e77b6531ec711cbd1bb31132b182061b38c876fa59e780d671a3f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (15 corresponding lines): crates/ai-memory-cli/src/commands/hook.rs:594-609 | crates/ai-memory-cli/src/commands/hook.rs:1220-1234 \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/ai-memory-cli/src/commands/hook.rs"},"region":{"startLine":594}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b3faeeed06070d458105ff138c64e5c7e63c840d89721a52a1568b78ccc6ffa"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (16 corresponding lines): crates/ai-memory-cli/src/commands/install_hooks.rs:2632-2647 | crates/ai-memory-cli/src/commands/install_hooks.rs:3156-3172 \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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":2632}}}],"partialFingerprints":{"codehealthFindingId/v1":"717af713820c345e2b995a3a7ffddc8fee39fc9e8ccc06a57698b72a43df7aa0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/ai-memory-llm/src/health.rs:893-901 | crates/ai-memory-web/src/routes/graph.rs:267-275 \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/ai-memory-llm/src/health.rs"},"region":{"startLine":893}}}],"partialFingerprints":{"codehealthFindingId/v1":"3dca747d1cb8ebe12af2389f23cc52900b7f4d8579b7f2ce6567da94823afe0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (12 corresponding lines): crates/ai-memory-cli/src/commands/install_hooks.rs:2416-2430 | crates/ai-memory-cli/src/commands/install_mcp.rs:2845-2856 \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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":2416}}}],"partialFingerprints":{"codehealthFindingId/v1":"41e575ae79603f0275f4e63dfe7bced78c233ca469ed555bb380f1efcf37cfdd"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): companions/ai-memory-relay/src/identity.rs:80-86 | crates/ai-memory-hooks/src/capture_policy.rs:261-267 \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":"companions/ai-memory-relay/src/identity.rs"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"b20953a556cffb3c7a977fe868c69c7c426093bbff5634c8bed6f96bae6dfc30"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): companions/ai-memory-wikisync/src/state.rs:36-44 | crates/ai-memory-store/src/auto_improve.rs:1550-1558 \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":"companions/ai-memory-wikisync/src/state.rs"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"891261c7811223c687d4dbc921359101363d2490db21e5d000867a98eea84723"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/ai-memory-store/src/password.rs:105-110 | crates/ai-memory-store/src/web_sessions.rs:44-49 \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/ai-memory-store/src/password.rs"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"a47a19b865e8d5308c25b016f6f0f97e6278a0bccdf49e501e55f374f32a9329"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/ai-memory-cli/src/commands/backfill.rs:303-311 | crates/ai-memory-cli/src/commands/hook.rs:437-443 \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/ai-memory-cli/src/commands/backfill.rs"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"49572dd12641f0e47d541a83de2c28acce8c2a93affed6818b6a3613c8f70e34"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): crates/ai-memory-mcp/src/admin.rs:4705-4709 | crates/ai-memory-mcp/src/server.rs:9152-9156 \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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":4705}}}],"partialFingerprints":{"codehealthFindingId/v1":"634f0429956ea7a91758c77e8802d9522c93b8a4c5de965b589c9dee406e5148"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): crates/ai-memory-cli/src/commands/hook.rs:430-435 | crates/ai-memory-cli/src/config.rs:3839-3843 \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/ai-memory-cli/src/commands/hook.rs"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5d8512008a5c50b29f178a1d19af19236be564fe86c9288f540d0d76bfd3150"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 8\u002B corresponding lines): crates/ai-memory-store/src/api_credentials.rs:126-133 | crates/ai-memory-store/src/users.rs:400-407 | crates/ai-memory-store/src/workstream.rs:977-985 \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/ai-memory-store/src/api_credentials.rs"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"04f76aa679979d50bea80f6af2879aed657be9f82a9c214d990f7a21979aba91"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): companions/ai-memory-relay/src/relay.rs:619-627 | crates/ai-memory-cli/src/commands/hook_spool.rs:2222-2228 \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":"companions/ai-memory-relay/src/relay.rs"},"region":{"startLine":619}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fa897aae689eb8359471ba0ed63b6f363ef22383d6e0fde78b22d8255844257"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/ai-memory-hooks/src/capture_policy.rs:253-259 | crates/ai-memory-hooks/src/payload.rs:950-956 \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/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"055695cae41214421135d385333e322fd37e3bf988f9eeabe5810fd124a00939"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/ai-memory-cli/src/commands/hook_capture.rs:933-939 | crates/ai-memory-cli/src/http_client.rs:408-413 \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/ai-memory-cli/src/commands/hook_capture.rs"},"region":{"startLine":933}}}],"partialFingerprints":{"codehealthFindingId/v1":"d168409b797d49612eaeefbd516dec06c93a015bec8a5d6a63881c40149b56d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/ai-memory-cli/src/commands/project_init.rs:146-151 | crates/ai-memory-cli/src/commands/show.rs:579-588 \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/ai-memory-cli/src/commands/project_init.rs"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf5dcee71a55e12b740b250434732eb0e0633a37ba6d5c75df9137c9deca555f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/ai-memory-workstream/src/transcript.rs:6448-6457 | evals/src/retrieval/ingest.rs:137-146 \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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":6448}}}],"partialFingerprints":{"codehealthFindingId/v1":"80cdb710ea09022d3c96827c705ecdc2e0f0073bb43e9efbd51443ac1a6f3a5b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (10 corresponding lines): crates/ai-memory-cli/src/config.rs:1833-1842 | crates/ai-memory-consolidate/src/auto_improve.rs:139-148 \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/ai-memory-cli/src/config.rs"},"region":{"startLine":1833}}}],"partialFingerprints":{"codehealthFindingId/v1":"73224243210d106e99d547734bf086a0f402e0a4bfb55ac7e465d4095dcfb69e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/ai-memory-cli/src/commands/run.rs:4356-4365 | crates/ai-memory-cli/src/commands/setup.rs:348-356 \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/ai-memory-cli/src/commands/run.rs"},"region":{"startLine":4356}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0e358b581c2f2757abc1d9650737def558370cef28d1c1b6fa9da303a5664ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/ai-memory-core/src/excerpt.rs:173-179 | crates/ai-memory-store/src/auto_improve.rs:1430-1437 \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/ai-memory-core/src/excerpt.rs"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"97d512cfaa7f03540d3c88fcc7e80fe365a1a09b8eb490a951a19baa35c6c346"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): companions/ai-memory-importer/src/agentmemory/mod.rs:402-405 | companions/ai-memory-importer/src/document.rs:201-204 \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":"companions/ai-memory-importer/src/agentmemory/mod.rs"},"region":{"startLine":402}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bf9aeb97aa7ebd38503fc3f795e991cb133373635a468a11ca2863d6a0c5339"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): crates/ai-memory-consolidate/src/profile.rs:1164-1167 | crates/ai-memory-consolidate/src/slug_digest.rs:52-59 \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/ai-memory-consolidate/src/profile.rs"},"region":{"startLine":1164}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf2d1fa53a804afdb19f8e5e803ac70488d2071400e12873a2c02c332f02540e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/ai-memory-store/src/ops.rs:5255-5260 | crates/ai-memory-store/src/workstream.rs:1331-1336 \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/ai-memory-store/src/ops.rs"},"region":{"startLine":5255}}}],"partialFingerprints":{"codehealthFindingId/v1":"258bb78716ac5e90231cb95dc8a6baf9425fe24024ca32df41103ae4cc45aaca"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/ai-memory-store/src/ops.rs:6278-6283 | crates/ai-memory-store/src/session_consolidation.rs:115-120 \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/ai-memory-store/src/ops.rs"},"region":{"startLine":6278}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d1daf1bfdafb6dc2de1fb12783ab8b0848517b2e882eca78ce4281ad5d5befa"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): crates/ai-memory-cli/src/commands/hook.rs:1278-1282 | crates/ai-memory-hooks/src/router.rs:876-880 \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/ai-memory-cli/src/commands/hook.rs"},"region":{"startLine":1278}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d4c8e00d35f3dfb5dee9b09f07631888a45b3340acb355930d002aee8a3c46e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): crates/ai-memory-wiki/src/git.rs:1100-1106 | crates/ai-memory-wiki/src/watcher.rs:1049-1053 \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/ai-memory-wiki/src/git.rs"},"region":{"startLine":1100}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e1db94b8ec20d94af3c420d703204621492c3234ddbe8ba5cc9faa5e116164a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (4 members, 4\u002B corresponding lines): crates/ai-memory-cli/src/commands/api_key.rs:148-151 | crates/ai-memory-cli/src/commands/grant.rs:109-112 | crates/ai-memory-cli/src/commands/list_projects.rs:194-197 | crates/ai-memory-cli/src/commands/user.rs:188-191 \u2014 These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\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/ai-memory-cli/src/commands/api_key.rs"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b5eedbd08bb82a22cfd8b00bba20f7eb583ab8005ff1d70a45805941e7214c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (9 corresponding lines): crates/ai-memory-store/src/api_credentials.rs:268-276 | crates/ai-memory-store/src/maintenance.rs:30-38 \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/ai-memory-store/src/api_credentials.rs"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"237909e957ff809abde339b647bedfdf1b81ef8949a8947361d56f71b8e183f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): crates/ai-memory-store/src/ops.rs:625-631 | crates/ai-memory-store/src/project_coordinates.rs:104-114 \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/ai-memory-store/src/ops.rs"},"region":{"startLine":625}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8460efd253f5866574511d0423da4afbe4ce09a036c534243f85672252f7af2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): crates/ai-memory-cli/src/commands/install_hooks.rs:6180-6185 | crates/ai-memory-cli/src/commands/install_mcp.rs:1138-1143 \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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":6180}}}],"partialFingerprints":{"codehealthFindingId/v1":"abd6e60c678450aad47bccb46abc429eb0cf3b89e61120a298ddb57e19066626"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): crates/ai-memory-cli/src/commands/jail_folders.rs:866-869 | crates/ai-memory-cli/src/commands/show.rs:747-750 \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/ai-memory-cli/src/commands/jail_folders.rs"},"region":{"startLine":866}}}],"partialFingerprints":{"codehealthFindingId/v1":"715a8cf2b6db56644635bf37857ddce406b7cbb73b8dc6b9e19bc9fe628c3c22"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (44 lines \u00D7 2): crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:497-540 | crates/ai-memory-consolidate/src/projection.rs:1028-1071 \u2014 before extracting anything, compare \u0060crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs\u0060 and \u0060crates/ai-memory-consolidate/src/projection.rs\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 354 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":497}}}],"partialFingerprints":{"codehealthFindingId/v1":"08ccd17c57e618edede7e4016062c8d2c5aac36838a0dd1d57eae4da90c23bee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (43 lines \u00D7 2): crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:234-276 | crates/ai-memory-consolidate/src/projection.rs:331-373 \u2014 before extracting anything, compare \u0060crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs\u0060 and \u0060crates/ai-memory-consolidate/src/projection.rs\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 354 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:234\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f273a05fe03b7097d0ecdcd85817a8f3698ff732f7d8227d2ab8fd1bb3c343d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (35\u201337 lines \u00D7 2): crates/ai-memory-consolidate/src/consolidator.rs:313-349 | crates/ai-memory-consolidate/src/consolidator.rs:854-888 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-consolidate/src/consolidator.rs:313\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/consolidator.rs"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd6ea51fc63beb93956a8b2907f84299dc31d87504242a5706fc948632159883"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (37 lines \u00D7 2): crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:748-784 | crates/ai-memory-consolidate/src/projection.rs:1283-1319 \u2014 before extracting anything, compare \u0060crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs\u0060 and \u0060crates/ai-memory-consolidate/src/projection.rs\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 354 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":748}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d5f7fe785103d8d68d8ee700d8257e5107456c7a794b47eb0ca28abf074f27b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u201336 lines \u00D7 5): crates/ai-memory-store/src/reader.rs:3436-3471 | crates/ai-memory-store/src/reader.rs:3594-3597 | crates/ai-memory-store/src/reader.rs:3801-3836 | crates/ai-memory-store/src/reader.rs:3963-3998 | crates/ai-memory-store/src/reader.rs:8423-8426 \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/ai-memory-store/src/reader.rs:3436\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/ai-memory-store/src/reader.rs"},"region":{"startLine":3436}}}],"partialFingerprints":{"codehealthFindingId/v1":"72c8c3af513f3136924192af64968a87e40340f39c8a59797450021b9ac1d23e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31 lines \u00D7 2): crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:614-644 | crates/ai-memory-consolidate/src/projection.rs:1146-1176 \u2014 before extracting anything, compare \u0060crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs\u0060 and \u0060crates/ai-memory-consolidate/src/projection.rs\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 354 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":614}}}],"partialFingerprints":{"codehealthFindingId/v1":"14df912a39a63c709c6c3a667a33c86f6455feae9264cb73ca721d93337d258e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29\u201330 lines \u00D7 2): crates/ai-memory-store/src/ops.rs:4777-4806 | crates/ai-memory-store/src/ops.rs:4854-4882 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/ops.rs:4777\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/ops.rs"},"region":{"startLine":4777}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a4d79073771b9b4673c47944d1bf7911efda277742c4eea59f247d3a667ba8b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (30 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:10007-10036 | crates/ai-memory-store/src/reader.rs:10727-10756 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-store/src/reader.rs"},"region":{"startLine":10007}}}],"partialFingerprints":{"codehealthFindingId/v1":"16c50d94670eb1693fb4f1425fae870b7c4065fe68d30cb0e2ba593804cb1c4b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (29 lines \u00D7 2): crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:802-830 | crates/ai-memory-consolidate/src/projection.rs:1337-1365 \u2014 before extracting anything, compare \u0060crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs\u0060 and \u0060crates/ai-memory-consolidate/src/projection.rs\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 354 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":802}}}],"partialFingerprints":{"codehealthFindingId/v1":"42c7e074a59a8b92bc5e7fbdc178bb5e20ec30dc91c59609ccf4c41a56f9251a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (27\u201328 lines \u00D7 2): crates/ai-memory-cli/src/commands/hook_spool.rs:1879-1906 | crates/ai-memory-cli/src/commands/hook_spool.rs:1973-1999 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-cli/src/commands/hook_spool.rs:1879\u0060 it begins part-way through the construct above it, so those exact 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/ai-memory-cli/src/commands/hook_spool.rs:1909\u0060 calls \u0060insert\u0060 and \u0060crates/ai-memory-cli/src/commands/hook_spool.rs:2002\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/ai-memory-cli/src/commands/hook_spool.rs"},"region":{"startLine":1879}}}],"partialFingerprints":{"codehealthFindingId/v1":"9715f035e3582d8c33a5e894c657ed785cd35dc844167ee23c0118590d2befb6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26\u201328 lines \u00D7 2): crates/ai-memory-cli/src/commands/move_project.rs:94-119 | crates/ai-memory-cli/src/commands/purge_project.rs:191-218 \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/ai-memory-cli/src/commands/move_project.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. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060args\u0060 to \u0060MoveProjectArgs\u0060 in one and \u0060PurgeProjectArgs\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/ai-memory-cli/src/commands/move_project.rs"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4f217ac459376ecfedf4b8a32aebe02177414ee73259eb508a240ac93b3db2b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:743-768 | crates/ai-memory-store/src/reader.rs:779-804 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/reader.rs:743\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060auxiliary\u0060 to \u0060Vec\u003C(PageHit, PageAuthority)\u003E\u0060 in one and \u0060Vec\u003C(PageHitWithMeta, PageAuthority)\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/ai-memory-store/src/reader.rs"},"region":{"startLine":743}}}],"partialFingerprints":{"codehealthFindingId/v1":"65987d1c4286838cbc6add345858b2a8a432db3eda7c43cb6bb4d14b3ee42303"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): crates/ai-memory-cli/src/commands/auto_improve_report.rs:169-193 | crates/ai-memory-cli/src/commands/curator.rs:111-135 \u2014 before extracting anything, compare \u0060crates/ai-memory-cli/src/commands/auto_improve_report.rs\u0060 and \u0060crates/ai-memory-cli/src/commands/curator.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-cli/src/commands/auto_improve_report.rs:169\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060report\u0060 to \u0060\u0026AutoImproveTelemetryReport\u0060 in one and \u0060\u0026CuratorReport\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/ai-memory-cli/src/commands/auto_improve_report.rs"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"4841219e1843ecae6608f686c9b07130520d5abf2fc05c483e1d09f5868f76e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24\u201325 lines \u00D7 2): crates/ai-memory-mcp/src/server.rs:5331-5354 | crates/ai-memory-mcp/src/server.rs:5624-5648 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-mcp/src/server.rs:5331\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/server.rs"},"region":{"startLine":5331}}}],"partialFingerprints":{"codehealthFindingId/v1":"16a975b207a268273e8e6d825b6887c48acc55b89edbd6202e9cc057721491d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u201325 lines \u00D7 4): crates/ai-memory-store/src/ops.rs:9484-9487 | crates/ai-memory-store/src/profile.rs:369-372 | crates/ai-memory-store/src/reader.rs:13710-13733 | crates/ai-memory-store/src/reader.rs:13738-13762 \u2014 before extracting anything, compare \u0060crates/ai-memory-store/src/ops.rs\u0060 and \u0060crates/ai-memory-store/src/reader.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-store/src/ops.rs:9484\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/ops.rs"},"region":{"startLine":9484}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e1d96d0dca8e7704d216896f774ed1802a4b92e551e67d37774c87ea75b3108"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 3): crates/ai-memory-store/src/reader.rs:3500-3522 | crates/ai-memory-store/src/reader.rs:3870-3892 | crates/ai-memory-store/src/reader.rs:4034-4056 \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/ai-memory-store/src/reader.rs:3500\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/ai-memory-store/src/reader.rs"},"region":{"startLine":3500}}}],"partialFingerprints":{"codehealthFindingId/v1":"c24a8cfa84064e4d0bda5c729ac440c80fc28b358bccf0c3a0ed7a26ab17c987"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): crates/ai-memory-workstream/src/transcript.rs:3465-3487 | crates/ai-memory-workstream/src/transcript.rs:5919-5941 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-workstream/src/transcript.rs:3465\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":3465}}}],"partialFingerprints":{"codehealthFindingId/v1":"4dd17ef38c45c7f22e1c96594cb4aa12909892592e1fe259df3e9e603a02d6ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): crates/ai-memory-workstream/src/transcript.rs:3494-3516 | crates/ai-memory-workstream/src/transcript.rs:5946-5968 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-workstream/src/transcript.rs:3494\u0060 it begins part-way through the construct above it, so those exact 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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":3494}}}],"partialFingerprints":{"codehealthFindingId/v1":"982c7acc4441861501360ce28947d11c1c6a6c22c33af978749ff16618f4bf57"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26\u201336 lines \u00D7 2): crates/ai-memory-hooks/src/router.rs:1374-1399 | crates/ai-memory-hooks/src/router.rs:4790-4825 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-hooks/src/router.rs:1374\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/ai-memory-hooks/src/router.rs"},"region":{"startLine":1374}}}],"partialFingerprints":{"codehealthFindingId/v1":"1885b0f9a875f4cb49bfb9a368fa55cbcce010bf16f163b3383654c37f137e6f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): crates/ai-memory-mcp/src/admin.rs:5895-5916 | crates/ai-memory-mcp/src/admin.rs:6463-6484 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-mcp/src/admin.rs:5895\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/ai-memory-mcp/src/admin.rs:6460\u0060 calls \u0060to_string\u0060 and \u0060crates/ai-memory-mcp/src/admin.rs:5892\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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":5895}}}],"partialFingerprints":{"codehealthFindingId/v1":"97c81c0b74ca8738c6cbb1f43c2604a29d639a148bb75cb1ccf01f3a5f7c98da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): crates/ai-memory-mcp/src/server.rs:3518-3538 | crates/ai-memory-mcp/src/server.rs:3598-3618 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-mcp/src/server.rs"},"region":{"startLine":3518}}}],"partialFingerprints":{"codehealthFindingId/v1":"220d3708664f593d3ce78721e101e6b4b45d93eb6b182ca99a58f31ab02ab99e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:5168-5188 | crates/ai-memory-store/src/reader.rs:5221-5241 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/reader.rs:5168\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/ai-memory-store/src/reader.rs"},"region":{"startLine":5168}}}],"partialFingerprints":{"codehealthFindingId/v1":"80d1aa5d863e80b6a4706cb48b9752ef4acbd3ba15352cb80101c02ef1641051"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201320 lines \u00D7 2): companions/ai-memory-importer/src/document.rs:219-238 | companions/ai-memory-importer/src/main.rs:435-450 \u2014 before extracting anything, compare \u0060companions/ai-memory-importer/src/document.rs\u0060 and \u0060companions/ai-memory-importer/src/main.rs\u0060 as WHOLE FILES: this scan already matched 4 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. If that is what happened, the fix is to keep one copy and have the other 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 \u0060companions/ai-memory-importer/src/document.rs:219\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-importer/src/document.rs"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff05af63e40d9dfaf1cbb3c384255a87cda9ea1de55b1c0ac8439b78a8c6f532"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): companions/ai-memory-importer/src/mcp.rs:383-402 | companions/ai-memory-wikisync/src/mcp.rs:226-245 \u2014 before extracting anything, compare \u0060companions/ai-memory-importer/src/mcp.rs\u0060 and \u0060companions/ai-memory-wikisync/src/mcp.rs\u0060 as WHOLE FILES: this scan already matched 5 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 \u0060companions/ai-memory-importer/src/mcp.rs:383\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":"companions/ai-memory-importer/src/mcp.rs"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"44d7345a2b2029ece3edfacf40bf60ec24920fd9ad48b71d34170320fcba92be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19\u201320 lines \u00D7 2): crates/ai-memory-cli/src/commands/api_key.rs:218-236 | crates/ai-memory-cli/src/commands/user.rs:358-377 \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/ai-memory-cli/src/commands/api_key.rs"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"7bfd4a32e0fe55b41db07be8ec3cdd634e558c8e824309c4bccb04083b5f8501"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201320 lines \u00D7 2): crates/ai-memory-cli/src/commands/install_hooks.rs:7168-7187 | crates/ai-memory-cli/src/commands/setup_agent.rs:962-979 \u2014 before extracting anything, compare \u0060crates/ai-memory-cli/src/commands/install_hooks.rs\u0060 and \u0060crates/ai-memory-cli/src/commands/setup_agent.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-cli/src/commands/install_hooks.rs:7168\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":7168}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3c8fbc9a106185e8df8b778def874d84b8331e8a51510e3ee179f59387d80c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): crates/ai-memory-consolidate/src/consolidator.rs:382-401 | crates/ai-memory-consolidate/src/consolidator.rs:919-938 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-consolidate/src/consolidator.rs"},"region":{"startLine":382}}}],"partialFingerprints":{"codehealthFindingId/v1":"a877124bd03999bb2accb17dc632307949f67f85f70a07fad2cc26bd55a6bad4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:471-490 | crates/ai-memory-consolidate/src/projection.rs:1002-1021 \u2014 before extracting anything, compare \u0060crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs\u0060 and \u0060crates/ai-memory-consolidate/src/projection.rs\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 354 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:471\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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":471}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b262089bfd9d193a0e7f262ddbd99062e5422ee25f620612db15b566050a30f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): crates/ai-memory-store/src/ops.rs:2180-2199 | crates/ai-memory-store/src/ops.rs:2271-2290 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/ops.rs:2180\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/ai-memory-store/src/ops.rs"},"region":{"startLine":2180}}}],"partialFingerprints":{"codehealthFindingId/v1":"21ce6cce0413608117df76a4af38aa71f66b7896a9bf8c6c0fbc2c69f8b2a3f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u201320 lines \u00D7 4): crates/ai-memory-workstream/src/transcript.rs:5647-5666 | crates/ai-memory-workstream/src/transcript.rs:5691-5694 | crates/ai-memory-workstream/src/transcript.rs:5792-5795 | crates/ai-memory-workstream/src/transcript.rs:6254-6273 \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/ai-memory-workstream/src/transcript.rs:5647\u0060 it begins part-way through the construct above it, so those exact 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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":5647}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2162f3f8d8335d7954383c403b1a8fedeab5759e869fdcea18b9aec9d3ed3cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201319 lines \u00D7 4): crates/ai-memory-llm/src/fallback.rs:243-258 | crates/ai-memory-llm/src/fallback.rs:276-293 | crates/ai-memory-llm/src/fallback.rs:311-328 | crates/ai-memory-llm/src/fallback.rs:350-368 \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/ai-memory-llm/src/fallback.rs:243\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/ai-memory-llm/src/fallback.rs"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4c18e281447e0f3dc0af9c1bd31c088e66928022ad4dc342fc63f8f2d559d14"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 3): crates/ai-memory-cli/src/commands/install_hooks.rs:3515-3533 | crates/ai-memory-cli/src/commands/install_hooks.rs:3694-3712 | crates/ai-memory-cli/src/commands/install_hooks.rs:3972-3990 \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/ai-memory-cli/src/commands/install_hooks.rs:3515\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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":3515}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b5f8a6ae01e864b31ed1532f98433ca4de3c199eb0afb2aa5e0d864eb5905a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): crates/ai-memory-cli/src/commands/auth.rs:365-383 | crates/ai-memory-cli/src/commands/auth.rs:471-489 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-cli/src/commands/auth.rs:365\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/ai-memory-cli/src/commands/auth.rs"},"region":{"startLine":365}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c887a49e28bd3df2104eb4aed3f7910d1793be9f9af675d5c2d086dbb19d9d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201319 lines \u00D7 2): crates/ai-memory-cli/src/commands/hook_spool.rs:1802-1820 | crates/ai-memory-cli/src/commands/hook_spool.rs:2089-2106 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-cli/src/commands/hook_spool.rs:1802\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/ai-memory-cli/src/commands/hook_spool.rs"},"region":{"startLine":1802}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a53a160eda9c440087f96ea532d1ff7133d2b08ff62906cf964e11fdfea948c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201319 lines \u00D7 2): crates/ai-memory-llm/src/copilot.rs:668-686 | crates/ai-memory-llm/src/stored_token.rs:174-191 \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/ai-memory-llm/src/copilot.rs:668\u0060 it begins part-way through the construct above it, so those exact 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/ai-memory-llm/src/copilot.rs"},"region":{"startLine":668}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c627236428d96de61bd9c66d3ad7ec97f0ac5117ba5d8e9437f4a9b3e5296b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 3): crates/ai-memory-consolidate/src/code_fence.rs:23-39 | crates/ai-memory-core/src/excerpt.rs:134-150 | crates/ai-memory-wiki/src/markdown.rs:184-201 \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/ai-memory-consolidate/src/code_fence.rs:23\u0060 it does not close everything it opens, so those exact 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 \u0060line\u0060 to \u0060\u0026str) -\u003E (Option\u003CSelf\u003E\u0060 in one and \u0060\u0026str) -\u003E (Option\u003C(char, usize)\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/ai-memory-consolidate/src/code_fence.rs"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"5426a50fa62190bce301b5584aa42b222e00e70186252c5188d00906342176a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/ai-memory-consolidate/src/dream.rs:773-790 | crates/ai-memory-consolidate/src/sweep.rs:1402-1419 \u2014 before extracting anything, compare \u0060crates/ai-memory-consolidate/src/dream.rs\u0060 and \u0060crates/ai-memory-consolidate/src/sweep.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-consolidate/src/dream.rs:773\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/dream.rs"},"region":{"startLine":773}}}],"partialFingerprints":{"codehealthFindingId/v1":"437d104986705fe2d59419b1a30d260afc41141c34379fc13b7c1aa1c4ff731a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201318 lines \u00D7 2): crates/ai-memory-mcp/src/admin.rs:3690-3707 | crates/ai-memory-mcp/src/admin.rs:3807-3821 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":3690}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b2c259c02f5ac26466e68d145e57be4c5c265dbc9f41c79273277f444fdbb84"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/ai-memory-workstream/src/transcript.rs:3733-3750 | crates/ai-memory-workstream/src/transcript.rs:5960-5977 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-workstream/src/transcript.rs:3733\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":3733}}}],"partialFingerprints":{"codehealthFindingId/v1":"2db491475d750c90a4c3b61bde94800c3c7c122a4b6c2b92c567ebf37b0bba10"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201317 lines \u00D7 2): crates/ai-memory-mcp/src/server.rs:6988-7000 | crates/ai-memory-mcp/src/server.rs:7089-7105 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-mcp/src/server.rs:6988\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/ai-memory-mcp/src/server.rs"},"region":{"startLine":6988}}}],"partialFingerprints":{"codehealthFindingId/v1":"b808af3bbf5d2d6e9f33c055c3337e69efff28b4d2f9791c5e015a9b6210510b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/ai-memory-store/src/ops.rs:2162-2178 | crates/ai-memory-store/src/ops.rs:2253-2269 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/ops.rs:2162\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/ops.rs"},"region":{"startLine":2162}}}],"partialFingerprints":{"codehealthFindingId/v1":"68538a0781d4eb7431cd21b33a34dadac9a9afb96f96633e8ca37b473cdfdb62"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/ai-memory-wiki/src/markdown.rs:586-602 | crates/ai-memory-wiki/src/markdown.rs:690-706 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-wiki/src/markdown.rs:586\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-wiki/src/markdown.rs"},"region":{"startLine":586}}}],"partialFingerprints":{"codehealthFindingId/v1":"85a56202257c9bfdf986a49b42054b744c97b04a582c2aa11bf5ee71185b4eb4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201316 lines \u00D7 3): companions/ai-memory-importer/src/agentmemory/vault.rs:83-95 | companions/ai-memory-importer/src/document.rs:214-229 | companions/ai-memory-importer/src/main.rs:430-442 \u2014 before extracting anything, compare \u0060companions/ai-memory-importer/src/document.rs\u0060 and \u0060companions/ai-memory-importer/src/main.rs\u0060 as WHOLE FILES: this scan already matched 4 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. If that is what happened, the fix is to keep one copy and have the other 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":"companions/ai-memory-importer/src/agentmemory/vault.rs"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d4e01d8eaec4f630916509a9c4d1b081e4c87860678c4d4d50d303b500eef34"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): companions/ai-memory-importer/src/agentmemory/export.rs:151-166 | companions/ai-memory-importer/src/claude_mem.rs:137-152 \u2014 before extracting anything, compare \u0060companions/ai-memory-importer/src/agentmemory/export.rs\u0060 and \u0060companions/ai-memory-importer/src/claude_mem.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060companions/ai-memory-importer/src/agentmemory/export.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-importer/src/agentmemory/export.rs"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"04f77b040230692adc9140a53052c9672de1e8c698227448e769add4ddc91d45"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): companions/ai-memory-wikisync/src/atomic.rs:143-158 | crates/ai-memory-wiki/src/atomic.rs:62-76 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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":"companions/ai-memory-wikisync/src/atomic.rs"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c0d7385849ef29ec8f413b33954f084ca6014cc066ae40fcc55dd587629031e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/ai-memory-cli/src/commands/install_instructions.rs:359-374 | crates/ai-memory-cli/src/marker.rs:1402-1417 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/ai-memory-cli/src/marker.rs:1402\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/ai-memory-cli/src/commands/install_instructions.rs"},"region":{"startLine":359}}}],"partialFingerprints":{"codehealthFindingId/v1":"95b51da6fcd321289f17085dc8e205d3f42825d65a32581b7ac9e11f753c1091"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/ai-memory-cli/src/commands/run.rs:5049-5064 | crates/ai-memory-workstream/src/jail.rs:111-126 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/ai-memory-cli/src/commands/run.rs"},"region":{"startLine":5049}}}],"partialFingerprints":{"codehealthFindingId/v1":"36698081aa50d552da048bda42ccffd2a59564e36109eccf63608c9e1ba1fe94"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:656-671 | crates/ai-memory-consolidate/src/projection.rs:1188-1203 \u2014 before extracting anything, compare \u0060crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs\u0060 and \u0060crates/ai-memory-consolidate/src/projection.rs\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 354 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":656}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a75f17a6cb85e3851e66b69952d6b4b661c9767517546f3fe0e0dba3efbb7b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/ai-memory-mcp/src/admin.rs:2056-2071 | crates/ai-memory-mcp/src/admin.rs:2188-2203 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-mcp/src/admin.rs:2056\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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":2056}}}],"partialFingerprints":{"codehealthFindingId/v1":"f288da4ffb8db3016bc178a786a915ca89e16084d1894a7f1935800da08f73e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201316 lines \u00D7 2): crates/ai-memory-mcp/src/server.rs:4409-4424 | crates/ai-memory-mcp/src/server.rs:4735-4746 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-mcp/src/server.rs:4409\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/ai-memory-mcp/src/server.rs"},"region":{"startLine":4409}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ce49d066fe7316d2b9257ce6c2a4511141ecb46d17fe9f98297f547eaf0efe5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/ai-memory-mcp/src/server.rs:7884-7899 | crates/ai-memory-mcp/src/server.rs:7963-7978 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-mcp/src/server.rs:7884\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/ai-memory-mcp/src/server.rs"},"region":{"startLine":7884}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae05db5a27de60d99a2c7e47eb4ffa92e9ee23675c8da32276c4b5d9aa86ec74"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:8963-8978 | crates/ai-memory-store/src/reader.rs:8982-8997 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/reader.rs:8963\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/reader.rs"},"region":{"startLine":8963}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3d2ada662c037e181c106bcec90feef2a053e0e898fb1e7663a8b9d06889a0a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:10195-10210 | crates/ai-memory-store/src/reader.rs:10410-10425 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-store/src/reader.rs"},"region":{"startLine":10195}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab3eafe25af621b1542c17ac568dcda1a2602479abee60842151df369b0a5648"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:16115-16129 | crates/ai-memory-store/src/reader.rs:16146-16161 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-store/src/reader.rs"},"region":{"startLine":16115}}}],"partialFingerprints":{"codehealthFindingId/v1":"0442dbdd685d9690ba335c5eb76a7ed9ef4fc45d40f12b45457d94c334bbb61a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/ai-memory-wiki/src/wiki.rs:691-706 | crates/ai-memory-wiki/src/wiki.rs:762-777 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-wiki/src/wiki.rs"},"region":{"startLine":691}}}],"partialFingerprints":{"codehealthFindingId/v1":"57d3cf1238ba1aeca33a3c6071a2fbca492310bc1e8ed6ea14a3a32b13d1ea89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): crates/ai-memory-cli/src/commands/install_hooks.rs:2777-2791 | crates/ai-memory-cli/src/commands/install_hooks.rs:2970-2984 | crates/ai-memory-cli/src/commands/install_hooks.rs:3074-3088 \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/ai-memory-cli/src/commands/install_hooks.rs:2777\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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":2777}}}],"partialFingerprints":{"codehealthFindingId/v1":"a622685938469ef00528742d2fd2d1c34fbb3b72c2f327d02cca7a60561de40d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201315 lines \u00D7 3): crates/ai-memory-store/src/reader.rs:9911-9925 | crates/ai-memory-store/src/reader.rs:10081-10092 | crates/ai-memory-store/src/reader.rs:10600-10611 \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/ai-memory-store/src/reader.rs:9911\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/reader.rs"},"region":{"startLine":9911}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbb006bcc1feb3c273fea019efad8a5e0c0cf5e390385db982ead596e6ea7520"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/ai-memory-cli/src/commands/compact.rs:66-80 | crates/ai-memory-web/src/routes/index.rs:196-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/ai-memory-cli/src/commands/compact.rs:66\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/ai-memory-cli/src/commands/compact.rs"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"45dc382becbf2bbb3a004e10a554c7a3f717edf09f78b75017158e4961f3a0df"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201315 lines \u00D7 2): crates/ai-memory-cli/src/commands/install_hooks.rs:2961-2971 | crates/ai-memory-cli/src/commands/install_hooks.rs:3559-3573 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-cli/src/commands/install_hooks.rs:3559\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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":2961}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcdefc9f7c10aefa99d0219062dd4bc9d83956e808083bdecf31ca919918160a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/ai-memory-cli/src/commands/install_hooks.rs:4181-4195 | crates/ai-memory-cli/src/commands/install_hooks.rs:4415-4429 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-cli/src/commands/install_hooks.rs:4181\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":4181}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f550b57ad857402d35b442ed9b8b47c213f8146fddda2e475604a29450711be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:713-727 | crates/ai-memory-consolidate/src/projection.rs:1248-1262 \u2014 before extracting anything, compare \u0060crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs\u0060 and \u0060crates/ai-memory-consolidate/src/projection.rs\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 354 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":713}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9275a6261f454dc7b9f239535b46a16e65d67f6f5865906f9eeec02416d3823"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/ai-memory-hooks/src/workstream.rs:852-866 | crates/ai-memory-hooks/src/workstream.rs:971-985 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-hooks/src/workstream.rs:852\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/ai-memory-hooks/src/workstream.rs"},"region":{"startLine":852}}}],"partialFingerprints":{"codehealthFindingId/v1":"44e42cd4e3151fab8be78c6df831833eb93bc39e093c9e37659958095e29c16a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/ai-memory-mcp/src/admin.rs:5745-5759 | crates/ai-memory-mcp/src/admin.rs:5876-5890 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-mcp/src/admin.rs:5745\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/admin.rs"},"region":{"startLine":5745}}}],"partialFingerprints":{"codehealthFindingId/v1":"4be4d50eccd3dcf398a51c9ec5c0f1c2fe5aba8173cc9679d8bb4ca8f2944d7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14\u201315 lines \u00D7 2): crates/ai-memory-mcp/src/admin.rs:8737-8751 | crates/ai-memory-mcp/src/admin.rs:8764-8777 \u2014 both copies are in the same file, so extract the block 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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":8737}}}],"partialFingerprints":{"codehealthFindingId/v1":"13de051dd80dbd3431edff4f93fb9086e26fad5354b03f0e174ed8a57adbd399"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:4350-4364 | crates/ai-memory-store/src/reader.rs:4397-4411 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-store/src/reader.rs"},"region":{"startLine":4350}}}],"partialFingerprints":{"codehealthFindingId/v1":"5230fec9c94d5a252e3caa41b34368e41d5c0dcf7124f0e3d54313d16dc047e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:4798-4812 | crates/ai-memory-store/src/reader.rs:4942-4956 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/reader.rs:4798\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/ai-memory-store/src/reader.rs"},"region":{"startLine":4798}}}],"partialFingerprints":{"codehealthFindingId/v1":"4502f870db857bf379663650d0fca668b471684c49beb7c9fbce1d5cc68fed12"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201315 lines \u00D7 2): crates/ai-memory-wiki/src/admission.rs:433-447 | crates/ai-memory-wiki/src/admission.rs:619-631 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-wiki/src/admission.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/ai-memory-wiki/src/admission.rs"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"276e334bcac2f68714488d1e81cb70b981fc06b6cbe3980612af6e8c6d21dacf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/ai-memory-workstream/src/transcript.rs:3543-3557 | crates/ai-memory-workstream/src/transcript.rs:5990-6004 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-workstream/src/transcript.rs:3543\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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":3543}}}],"partialFingerprints":{"codehealthFindingId/v1":"5561e3998d09448386eba37e98cd33675c1db00ccc98f1c5abda3ddb5f49bfdc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201314 lines \u00D7 3): crates/ai-memory-cli/src/commands/install_hooks.rs:2664-2677 | crates/ai-memory-cli/src/commands/install_hooks.rs:2961-2969 | crates/ai-memory-cli/src/commands/install_hooks.rs:3559-3570 \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/ai-memory-cli/src/commands/install_hooks.rs:2664\u0060 it does not close everything it opens, so those exact 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/ai-memory-cli/src/commands/install_hooks.rs:2679\u0060 calls \u0060remove_ai_memory_event_hooks\u0060 and \u0060crates/ai-memory-cli/src/commands/install_hooks.rs:2970\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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":2664}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc89944092b26eb90d8f144be69bbc6de3853010f224150227485517cc6ec8df"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): companions/ai-memory-importer/src/mcp.rs:345-358 | companions/ai-memory-wikisync/src/mcp.rs:178-191 \u2014 before extracting anything, compare \u0060companions/ai-memory-importer/src/mcp.rs\u0060 and \u0060companions/ai-memory-wikisync/src/mcp.rs\u0060 as WHOLE FILES: this scan already matched 5 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 \u0060companions/ai-memory-importer/src/mcp.rs:345\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-importer/src/mcp.rs"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"295eb9f79a23510c7fd0d2b0c940b1dc8b55e979a53499eba88a6b1e241a064c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/ai-memory-cli/src/commands/hook_spool.rs:1761-1774 | crates/ai-memory-cli/src/commands/hook_spool.rs:2051-2064 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-cli/src/commands/hook_spool.rs:1761\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/hook_spool.rs"},"region":{"startLine":1761}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1e2e5fb2afabca29e27382d0b449186c18fb7c0484b8c31885ca0b1bcf67ef5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201314 lines \u00D7 2): crates/ai-memory-cli/src/commands/install_hooks.rs:3252-3262 | crates/ai-memory-cli/src/commands/install_hooks.rs:3553-3566 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-cli/src/commands/install_hooks.rs:3252\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":3252}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb9eb7c8d5181f14badd1d40297dc4acf9784d41425113f453067f23bf2257e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/ai-memory-cli/src/commands/serve.rs:3001-3014 | crates/ai-memory-mcp/src/server.rs:4771-4784 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/ai-memory-cli/src/commands/serve.rs"},"region":{"startLine":3001}}}],"partialFingerprints":{"codehealthFindingId/v1":"78ce512fa9925488433d50ea87c6b5441b615e648a6244b79f5b3dd96a649a79"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/ai-memory-cli/src/config.rs:1899-1916 | crates/ai-memory-mcp/src/server.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/config.rs"},"region":{"startLine":1899}}}],"partialFingerprints":{"codehealthFindingId/v1":"9821c24f51ac17c62359fbf83fca56bcbe8e1e040f0a082092e6c54f1bc93192"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/ai-memory-cli/src/marker.rs:339-352 | crates/ai-memory-cli/src/marker.rs:382-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/ai-memory-cli/src/marker.rs:339\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/ai-memory-cli/src/marker.rs"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"cab97fe8161c89ffd307273beec61d7c84fdd288ccb1d25f135c338694ff2dc0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/ai-memory-mcp/src/server.rs:5253-5266 | crates/ai-memory-mcp/src/server.rs:5282-5295 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-mcp/src/server.rs:5253\u0060 it does not close everything it opens, so those exact 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/ai-memory-mcp/src/server.rs"},"region":{"startLine":5253}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d1b3384b86adc2249cc7f2e3a7a853495ad725d1b1cdd7de3e2fd15f5af5a2e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/ai-memory-store/src/auto_improve.rs:1055-1068 | crates/ai-memory-store/src/auto_improve.rs:1104-1117 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/auto_improve.rs:1055\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060input\u0060 to \u0060\u0026FailAutoImproveProposal\u0060 in one and \u0060\u0026RejectAutoImproveProposal\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/ai-memory-store/src/auto_improve.rs"},"region":{"startLine":1055}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f0692c28385021fcd8236aa647fd5e6907dffd4e7da771d7208de29b93c4402"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): crates/ai-memory-store/src/ops.rs:1549-1562 | crates/ai-memory-store/src/ops.rs:1636-1648 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/ops.rs:1549\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/ops.rs"},"region":{"startLine":1549}}}],"partialFingerprints":{"codehealthFindingId/v1":"816ed718bc7391796905290a52c971d80544200e67733800a952b402e42049e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:696-709 | crates/ai-memory-store/src/reader.rs:716-729 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/reader.rs:696\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/reader.rs"},"region":{"startLine":696}}}],"partialFingerprints":{"codehealthFindingId/v1":"e032c42313c203121f5a4b1d140d8ea81056a4223519654096620e382d2cf726"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201314 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:3853-3864 | crates/ai-memory-store/src/reader.rs:4661-4674 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/reader.rs:3853\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/reader.rs"},"region":{"startLine":3853}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c97eb4ee331b1be625d47fa16e7488fbc9055d468b36eb67e2141e69960d564"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:7171-7183 | crates/ai-memory-store/src/reader.rs:7215-7228 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/reader.rs:7171\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/ai-memory-store/src/reader.rs"},"region":{"startLine":7171}}}],"partialFingerprints":{"codehealthFindingId/v1":"07891c23de7e82c51eb67e47b9534b90c24d0ee7a40d148ce86f3e87f5269cc3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:8311-8325 | crates/ai-memory-store/src/reader.rs:8387-8401 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/reader.rs:8311\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/reader.rs"},"region":{"startLine":8311}}}],"partialFingerprints":{"codehealthFindingId/v1":"32b7097fff002b82d4c6f85ab52b3f8eb20fd92b6e4f88c7104b271a7d4b347f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): crates/ai-memory-wiki/src/wiki.rs:1570-1583 | crates/ai-memory-wiki/src/wiki.rs:2880-2892 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-wiki/src/wiki.rs:1570\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/ai-memory-wiki/src/wiki.rs"},"region":{"startLine":1570}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1429ad1019c90f8b31c6deb03e9d5ab263f147bc1be0570b26774f53f9a78ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 9): crates/ai-memory-cli/src/commands/install_hooks.rs:2777-2789 | crates/ai-memory-cli/src/commands/install_hooks.rs:2970-2982 | crates/ai-memory-cli/src/commands/install_hooks.rs:3074-3086 | crates/ai-memory-cli/src/commands/install_hooks.rs:7966-7978 | crates/ai-memory-cli/src/commands/install_hooks.rs:8084-8096 | crates/ai-memory-cli/src/commands/install_hooks.rs:8165-8177 | crates/ai-memory-cli/src/commands/install_hooks.rs:8247-8259 | crates/ai-memory-cli/src/commands/install_hooks.rs:8333-8345 | crates/ai-memory-cli/src/commands/install_hooks.rs:8422-8434 \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/ai-memory-cli/src/commands/install_hooks.rs:2777\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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":2777}}}],"partialFingerprints":{"codehealthFindingId/v1":"08437ec7c481a7a614c8f0230971a3f1e4a50983edcd64c6ac5ca98ff31e6f8b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): crates/ai-memory-consolidate/src/auto_improve_schedule.rs:632-644 | crates/ai-memory-mcp/src/admin.rs:3055-3067 | crates/ai-memory-mcp/src/server.rs:4827-4839 \u2014 before extracting anything, compare \u0060crates/ai-memory-consolidate/src/auto_improve_schedule.rs\u0060 and \u0060crates/ai-memory-mcp/src/admin.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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-consolidate/src/auto_improve_schedule.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/auto_improve_schedule.rs"},"region":{"startLine":632}}}],"partialFingerprints":{"codehealthFindingId/v1":"223f9740798d04ea276ef7826b9d92294f4be5c00cd785be3250efc50211c23e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): crates/ai-memory-wiki/src/markdown.rs:534-546 | crates/ai-memory-wiki/src/markdown.rs:619-631 | crates/ai-memory-wiki/src/markdown.rs:728-740 \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/ai-memory-wiki/src/markdown.rs:534\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-wiki/src/markdown.rs"},"region":{"startLine":534}}}],"partialFingerprints":{"codehealthFindingId/v1":"04a82139a1fe2e5e57dc6b5eeee31807dd974e84bbcfee0e97a287e8c9426ea9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201313 lines \u00D7 2): companions/ai-memory-importer/src/agentmemory/export.rs:171-178 | companions/ai-memory-importer/src/claude_mem.rs:157-169 \u2014 before extracting anything, compare \u0060companions/ai-memory-importer/src/agentmemory/export.rs\u0060 and \u0060companions/ai-memory-importer/src/claude_mem.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060companions/ai-memory-importer/src/agentmemory/export.rs:171\u0060 it begins part-way through the construct above it, so those exact 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":"companions/ai-memory-importer/src/agentmemory/export.rs"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"001050bac2a02cf17ecd573a55a00ac34c1630999fb379a472d05b635aab0ab3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): companions/ai-memory-importer/src/agentmemory/export.rs:458-470 | companions/ai-memory-importer/src/claude_mem.rs:299-310 \u2014 before extracting anything, compare \u0060companions/ai-memory-importer/src/agentmemory/export.rs\u0060 and \u0060companions/ai-memory-importer/src/claude_mem.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060companions/ai-memory-importer/src/agentmemory/export.rs:458\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-importer/src/agentmemory/export.rs"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"30e2fe5633184ab3851713edec55ffabc1ab4063981dea3ce9ec0cb42419d4c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/ai-memory-cli/src/commands/render_shared.rs:1087-1099 | crates/ai-memory-cli/src/commands/render_shared.rs:1172-1184 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-cli/src/commands/render_shared.rs:1087\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/render_shared.rs"},"region":{"startLine":1087}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b31cc7b182773fc11960912be2dceba359172a5cad95a103622e19ffd7e877e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/ai-memory-llm/src/copilot.rs:626-638 | crates/ai-memory-llm/src/embedding.rs:389-401 \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/ai-memory-llm/src/copilot.rs:626\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-llm/src/copilot.rs"},"region":{"startLine":626}}}],"partialFingerprints":{"codehealthFindingId/v1":"2496f01f05e1ec67a223a8ffa4f044e2a73e85d72159beae6378a176d7192675"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/ai-memory-mcp/src/human_auth.rs:627-639 | crates/ai-memory-mcp/src/human_auth.rs:724-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/ai-memory-mcp/src/human_auth.rs:627\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/human_auth.rs"},"region":{"startLine":627}}}],"partialFingerprints":{"codehealthFindingId/v1":"06954fdefe6317cfb2bbdadb170336f00cb806289294015d71042d45ea686b3d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/ai-memory-mcp/src/self_service_keys.rs:73-85 | crates/ai-memory-mcp/src/session_management.rs:82-94 \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/ai-memory-mcp/src/self_service_keys.rs"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"8832e4a8a09a5edece66f8ba1cc791ad9443b8e8595980fb7e9f598a8b7368c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/ai-memory-mcp/src/server.rs:7651-7663 | crates/ai-memory-mcp/src/server.rs:7754-7766 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-mcp/src/server.rs:7651\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/server.rs"},"region":{"startLine":7651}}}],"partialFingerprints":{"codehealthFindingId/v1":"655454ca3646b073df7e880cdf83b8b37b4e145fabbd136ebf352d6ddc92f2ef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:4338-4351 | crates/ai-memory-store/src/reader.rs:5006-5018 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/reader.rs:4338\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/ai-memory-store/src/reader.rs"},"region":{"startLine":4338}}}],"partialFingerprints":{"codehealthFindingId/v1":"899017011ce7d1e0d849409bfe7eb7d0bde7e328d9f0a2c503afc5db1c49ba5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u201313 lines \u00D7 3): crates/ai-memory-store/src/reader.rs:3041-3044 | crates/ai-memory-store/src/reader.rs:4615-4627 | crates/ai-memory-store/src/reader.rs:4673-4685 \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/ai-memory-store/src/reader.rs:3041\u0060 it does not close everything it opens, so those exact 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/ai-memory-store/src/reader.rs"},"region":{"startLine":3041}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a6cce3feb30bfad8298f1774b4bc9a5edbada37c1f07d20a4db5d0aa8b34418"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:9310-9322 | crates/ai-memory-store/src/reader.rs:9355-9367 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/reader.rs:9310\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/reader.rs"},"region":{"startLine":9310}}}],"partialFingerprints":{"codehealthFindingId/v1":"2884787adbed2ec1f4e39ff90fe4ce18d6fd2b87fdc51d0122d6cf526322c57d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/ai-memory-web/src/markdown.rs:236-248 | crates/ai-memory-wiki/src/markdown.rs:553-565 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/ai-memory-web/src/markdown.rs:236\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/ai-memory-web/src/markdown.rs"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7252da6a1efb49a0cdbb633cecd54812469d06cd8105671b778e02c7e24a6b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/ai-memory-workstream/src/transcript.rs:2451-2463 | crates/ai-memory-workstream/src/transcript.rs:2471-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/ai-memory-workstream/src/transcript.rs:2451\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":2451}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b1a97c596b269ca7ac577b2579a02b6a7ff9dfcbb457d544728981df29a6791"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/ai-memory-workstream/src/transcript.rs:5603-5615 | crates/ai-memory-workstream/src/transcript.rs:6209-6221 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-workstream/src/transcript.rs:5603\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":5603}}}],"partialFingerprints":{"codehealthFindingId/v1":"2254bf70c99cc555aa39b255f00d16961a14d5abfc2bba990261994718abbb13"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): crates/ai-memory-cli/src/commands/auto_improve.rs:86-97 | crates/ai-memory-cli/src/commands/serve.rs:3003-3014 | crates/ai-memory-mcp/src/server.rs:4773-4784 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/ai-memory-cli/src/commands/auto_improve.rs:99\u0060 calls \u0060clone\u0060 and \u0060crates/ai-memory-mcp/src/server.rs:4785\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/ai-memory-cli/src/commands/auto_improve.rs"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"4dc47e20b759c1fe281731e8a3cdda57a9f5edf9aa0a7cc1fd0f76e74b3b1bb3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201312 lines \u00D7 3): crates/ai-memory-cli/src/commands/hook_spool.rs:1728-1739 | crates/ai-memory-cli/src/commands/hook_spool.rs:1901-1908 | crates/ai-memory-cli/src/commands/hook_spool.rs:1994-2001 \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/ai-memory-cli/src/commands/hook_spool.rs:1728\u0060 it does not close everything it opens, so those exact 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/ai-memory-cli/src/commands/hook_spool.rs:1909\u0060 calls \u0060insert\u0060 and \u0060crates/ai-memory-cli/src/commands/hook_spool.rs:1740\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/ai-memory-cli/src/commands/hook_spool.rs"},"region":{"startLine":1728}}}],"partialFingerprints":{"codehealthFindingId/v1":"f41856a3bc3a7c70334e31c4a4ac926eebf597a6c610d093d750be4a7b1d55b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): crates/ai-memory-hooks/src/router.rs:1755-1767 | crates/ai-memory-hooks/src/router.rs:5137-5149 | crates/ai-memory-hooks/src/router.rs:5345-5356 \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/ai-memory-hooks/src/router.rs:1755\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/ai-memory-hooks/src/router.rs"},"region":{"startLine":1755}}}],"partialFingerprints":{"codehealthFindingId/v1":"850a86241f1d2ade809a0c47ba7f25cb057d35433d886678ebfc9e03ce8f3855"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 2): companions/ai-memory-importer/src/agentmemory/mod.rs:537-548 | companions/ai-memory-importer/src/agentmemory/mod.rs:694-703 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-importer/src/agentmemory/mod.rs"},"region":{"startLine":537}}}],"partialFingerprints":{"codehealthFindingId/v1":"1af32d3111326e26482fc8c18d6bf5c9ef5dbfaad6dbd620c9e2273663d18bc8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): companions/ai-memory-wikisync/src/client.rs:123-133 | companions/ai-memory-wikisync/src/client.rs:280-291 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060companions/ai-memory-wikisync/src/client.rs:123\u0060 it does not close everything it opens, so those exact 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":"companions/ai-memory-wikisync/src/client.rs"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d17de5b9eb93297121a0c4e601bd33955a73ee35cd24b107f7321f712d93427"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/ai-memory-cli/src/commands/mod.rs:165-176 | crates/ai-memory-hooks/src/router.rs:2663-2674 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/ai-memory-cli/src/commands/mod.rs"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"f830458f9d1cb5432e1065f8fefc06793589913264ebdb6f9a18347126f4143d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:378-389 | crates/ai-memory-consolidate/src/projection.rs:886-897 \u2014 before extracting anything, compare \u0060crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs\u0060 and \u0060crates/ai-memory-consolidate/src/projection.rs\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 354 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:378\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":378}}}],"partialFingerprints":{"codehealthFindingId/v1":"524ae614f6fc9b6d37199a5f4788e026d287ad3013a75a44b7da4a04ddd0d286"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): crates/ai-memory-consolidate/src/dream.rs:436-451 | crates/ai-memory-consolidate/src/sweep.rs:1296-1312 \u2014 before extracting anything, compare \u0060crates/ai-memory-consolidate/src/dream.rs\u0060 and \u0060crates/ai-memory-consolidate/src/sweep.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-consolidate/src/dream.rs:436\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under 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/ai-memory-consolidate/src/dream.rs:451\u0060 calls \u0060push\u0060, \u0060clone\u0060 and \u0060crates/ai-memory-consolidate/src/sweep.rs:1312\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/ai-memory-consolidate/src/dream.rs"},"region":{"startLine":436}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ce2f58ddb346deef150391141514b1e243620ae4a27dedaf3416a3fd861f980"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/ai-memory-llm/src/copilot.rs:387-398 | crates/ai-memory-llm/src/copilot.rs:409-420 \u2014 both copies are in the same file, so extract the block 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 first that the copies are not typed on the same thing: the declarations holding them bind \u0060body\u0060 to \u0060\u0026CopilotChatRequest\u003C\u0027_\u003E\u0060 in one and \u0060\u0026CopilotResponsesRequest\u003C\u0027_\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/ai-memory-llm/src/copilot.rs"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"b64125fbf0abc5377d127a7b4256994701905b6a6a97894faf20b01779dceabc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201312 lines \u00D7 2): crates/ai-memory-mcp/src/admin.rs:2524-2533 | crates/ai-memory-mcp/src/admin.rs:2573-2584 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-mcp/src/admin.rs:2524\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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":2524}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1827d914f54abc8bbfb284d73eb7187ec1ed592d4746befd85a2bc086c544a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/ai-memory-mcp/src/admin.rs:3261-3272 | crates/ai-memory-mcp/src/admin.rs:3386-3398 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-mcp/src/admin.rs:3261\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/admin.rs"},"region":{"startLine":3261}}}],"partialFingerprints":{"codehealthFindingId/v1":"b95cca98b15b490a468bb11db4c30f9cae9b2a0aefc9aea3ecbd34058a3b2ff1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): crates/ai-memory-mcp/src/admin.rs:3298-3309 | crates/ai-memory-mcp/src/admin.rs:3423-3433 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-mcp/src/admin.rs:3298\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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":3298}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcdcd5d6384fb29c8e2dbde627f918a66d496d8b70345cfec331ca8c2d1d0aba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/ai-memory-store/src/ops.rs:671-682 | crates/ai-memory-store/src/ops.rs:765-776 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/ops.rs:671\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/ops.rs"},"region":{"startLine":671}}}],"partialFingerprints":{"codehealthFindingId/v1":"899ce14e89ed378c72c24683580abf5cb6627fdeed0b487ee8ed48685b9d9dbd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:10681-10692 | crates/ai-memory-store/src/reader.rs:10698-10709 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-store/src/reader.rs"},"region":{"startLine":10681}}}],"partialFingerprints":{"codehealthFindingId/v1":"3822ec2c3aee40ce7cc05347323f728830bff295df807b5bc083d0c8aa5d819c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/ai-memory-workstream/src/transcript.rs:4077-4088 | crates/ai-memory-workstream/src/transcript.rs:4110-4121 \u2014 both copies are in the same file, so extract the block 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/ai-memory-workstream/src/transcript.rs:4122\u0060 calls \u0060Ok\u0060 and \u0060crates/ai-memory-workstream/src/transcript.rs:4089\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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":4077}}}],"partialFingerprints":{"codehealthFindingId/v1":"95f7dcd7e9dac0bf2a9a908c21f1ecaea5993c5deadc44f8744c8ec5b2e1922c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201311 lines \u00D7 3): crates/ai-memory-llm/src/copilot.rs:616-624 | crates/ai-memory-llm/src/embedding.rs:377-387 | crates/ai-memory-llm/src/google.rs:106-114 \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/ai-memory-llm/src/copilot.rs:616\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-llm/src/copilot.rs"},"region":{"startLine":616}}}],"partialFingerprints":{"codehealthFindingId/v1":"139d9f1f4f5ab479d7cece265afd6c8577330a0373204dfa117b7597973a0cac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 3): crates/ai-memory-mcp/src/admin.rs:1598-1607 | crates/ai-memory-mcp/src/admin.rs:6131-6141 | crates/ai-memory-mcp/src/admin.rs:6224-6234 \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/ai-memory-mcp/src/admin.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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/ai-memory-mcp/src/admin.rs:6130\u0060 calls \u0060bytes_reclaimed\u0060 and \u0060crates/ai-memory-mcp/src/admin.rs:6223\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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":1598}}}],"partialFingerprints":{"codehealthFindingId/v1":"9770fa5e7a861547870326fc6506bc8a42e7aa09f2a59a26b6222b587f0dfee5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): crates/ai-memory-store/src/ops.rs:1359-1369 | crates/ai-memory-store/src/reader.rs:11912-11922 | crates/ai-memory-store/src/workstream.rs:1694-1704 \u2014 before extracting anything, compare \u0060crates/ai-memory-store/src/ops.rs\u0060 and \u0060crates/ai-memory-store/src/reader.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-store/src/ops.rs:1359\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/ai-memory-store/src/workstream.rs:1693\u0060 calls \u0060get\u0060 and \u0060crates/ai-memory-store/src/ops.rs:1358\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/ai-memory-store/src/ops.rs"},"region":{"startLine":1359}}}],"partialFingerprints":{"codehealthFindingId/v1":"b76361dd2c5cef455ab3df6b0d9b9ef78c4e71d55a51bc57e32ffcb8f1a8e12a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 3): crates/ai-memory-store/src/reader.rs:4796-4805 | crates/ai-memory-store/src/reader.rs:4882-4891 | crates/ai-memory-store/src/reader.rs:4939-4949 \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/ai-memory-store/src/reader.rs:4796\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/reader.rs"},"region":{"startLine":4796}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f610019ecedc219f9b9dbf5e821f0527be5c6613510f71376b75bfb0095bdbf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): crates/ai-memory-workstream/src/transcript.rs:3506-3516 | crates/ai-memory-workstream/src/transcript.rs:3731-3741 | crates/ai-memory-workstream/src/transcript.rs:5958-5968 \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/ai-memory-workstream/src/transcript.rs:3506\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":3506}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dbb9d37e21a52ba58b7055fe0076c9059fd750b175b272e21c0ba3f616c314b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): companions/ai-memory-importer/src/document.rs:1393-1403 | companions/ai-memory-importer/src/main.rs:1270-1280 \u2014 before extracting anything, compare \u0060companions/ai-memory-importer/src/document.rs\u0060 and \u0060companions/ai-memory-importer/src/main.rs\u0060 as WHOLE FILES: this scan already matched 4 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. If that is what happened, the fix is to keep one copy and have the other 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":"companions/ai-memory-importer/src/document.rs"},"region":{"startLine":1393}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb712689923c8d0481014382fd4bbf4c6dc5bd6860ced7615c00bd184b0bcce6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): crates/ai-memory-cli/src/commands/install_hooks.rs:7076-7085 | crates/ai-memory-cli/src/commands/setup_agent.rs:906-916 \u2014 before extracting anything, compare \u0060crates/ai-memory-cli/src/commands/install_hooks.rs\u0060 and \u0060crates/ai-memory-cli/src/commands/setup_agent.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-cli/src/commands/install_hooks.rs:7076\u0060 it does not close everything it opens, so those exact 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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":7076}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e7c9c918efa616a37c0efa4565ac8c2849482e3f470b079124cae6ed298b7b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/ai-memory-cli/src/commands/render_shared.rs:1075-1085 | crates/ai-memory-cli/src/commands/render_shared.rs:1160-1170 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-cli/src/commands/render_shared.rs:1075\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/render_shared.rs"},"region":{"startLine":1075}}}],"partialFingerprints":{"codehealthFindingId/v1":"68e2511a0126e496fb41ef45b70b05a54436263da75999a81ec0eb884883c798"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/ai-memory-cli/src/commands/run.rs:2323-2333 | crates/ai-memory-cli/src/commands/run.rs:2575-2585 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-cli/src/commands/run.rs:2323\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/ai-memory-cli/src/commands/run.rs"},"region":{"startLine":2323}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d7508c97756dd14808142e1d93f39c129e61839f7783750978e0867fc8760af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/ai-memory-cli/src/commands/show.rs:1043-1053 | crates/ai-memory-cli/src/commands/show.rs:1121-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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/ai-memory-cli/src/commands/show.rs:1118\u0060 calls \u0060viewport_rows\u0060, \u0060min\u0060, \u0060scroll_offset\u0060 and \u0060crates/ai-memory-cli/src/commands/show.rs:1042\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/ai-memory-cli/src/commands/show.rs"},"region":{"startLine":1043}}}],"partialFingerprints":{"codehealthFindingId/v1":"c374c279d04d7a5df9b939ebb6f41538c75b46a2df4cc6069792766fc25b4a04"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/ai-memory-cli/src/commands/uninstall.rs:1400-1410 | crates/ai-memory-cli/src/commands/uninstall.rs:1634-1644 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-cli/src/commands/uninstall.rs:1400\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/uninstall.rs"},"region":{"startLine":1400}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cab1338deff9c749e1222e5248b2aa153e0fae390412d4c4c6f1584a0132e68"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/ai-memory-mcp/src/admin.rs:2082-2092 | crates/ai-memory-mcp/src/admin.rs:2208-2218 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-mcp/src/admin.rs:2082\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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":2082}}}],"partialFingerprints":{"codehealthFindingId/v1":"7eaf9c343a0584dd3640793205dc381166ba3435ea9b4bbede508c15ffd09c62"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u201311 lines \u00D7 2): crates/ai-memory-mcp/src/admin.rs:4814-4820 | crates/ai-memory-mcp/src/admin.rs:9417-9427 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":4814}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb2ad2323b9317d89937183143fd28344fd46a2fac8984cd216168f84e5b1bbf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/ai-memory-mcp/src/admin.rs:5791-5801 | crates/ai-memory-mcp/src/admin.rs:5892-5902 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-mcp/src/admin.rs:5791\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/admin.rs"},"region":{"startLine":5791}}}],"partialFingerprints":{"codehealthFindingId/v1":"79b261f06195638dab14e806bfc7681a5ae397fc3fa03900fdf0e230e4219cd7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): crates/ai-memory-mcp/src/server.rs:1032-1042 | crates/ai-memory-web/src/recall.rs:103-112 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/ai-memory-mcp/src/server.rs:1032\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/ai-memory-mcp/src/server.rs"},"region":{"startLine":1032}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6b0cf9824ffa790ed081df2aa147be3e4a5d438a380b687c0d7570ab54578fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/ai-memory-store/src/ops.rs:646-656 | crates/ai-memory-store/src/ops.rs:747-757 \u2014 both copies are in the same file, so extract the block 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/ai-memory-store/src/ops.rs:758\u0060 calls \u0060path_style_name\u0060, \u0060as_deref\u0060, \u0060Some\u0060 and \u0060crates/ai-memory-store/src/ops.rs:657\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/ai-memory-store/src/ops.rs"},"region":{"startLine":646}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e88973e7ed68ee63f51ae6504fe9e5b628b8f041887e092325034aec8fa08b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/ai-memory-store/src/ops.rs:8204-8217 | crates/ai-memory-store/src/ops.rs:8461-8474 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/ops.rs:8204\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/ai-memory-store/src/ops.rs:8219\u0060 calls \u0060to_string\u0060 and \u0060crates/ai-memory-store/src/ops.rs:8476\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/ai-memory-store/src/ops.rs"},"region":{"startLine":8204}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae2437148bec34326fc5e3b01e65a725cf9814a9c8e5868fd43c2acd8ace188d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:9004-9016 | crates/ai-memory-store/src/reader.rs:9024-9036 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/reader.rs:9004\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/reader.rs"},"region":{"startLine":9004}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dadd991525d45865cd5387b1561e9cd982ec3ad7815be28e087ee080f3aea96"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u201311 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:10219-10229 | crates/ai-memory-store/src/reader.rs:10725-10731 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-store/src/reader.rs"},"region":{"startLine":10219}}}],"partialFingerprints":{"codehealthFindingId/v1":"d04c311fef56ec49363eaa53d73aec17c73d13d04600b39445fad150d555241c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:10847-10857 | crates/ai-memory-store/src/reader.rs:10866-10876 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-store/src/reader.rs"},"region":{"startLine":10847}}}],"partialFingerprints":{"codehealthFindingId/v1":"01c78a6e567fe8845625a8528ab3826419092e80167939c03e79ae6e36630706"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:12630-12640 | crates/ai-memory-store/src/reader.rs:12685-12694 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-store/src/reader.rs"},"region":{"startLine":12630}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ba0fc4589494ac529449620ed1ebb50493d74cf438c63bcd891bd4b9ce15a0d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/ai-memory-wiki/src/watcher.rs:879-889 | crates/ai-memory-wiki/src/watcher.rs:896-906 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-wiki/src/watcher.rs:879\u0060 it begins part-way through the construct above it, so those exact 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/ai-memory-wiki/src/watcher.rs"},"region":{"startLine":879}}}],"partialFingerprints":{"codehealthFindingId/v1":"7082a1203ce805ee0c985ad5f09983881c3ddf4a97805a450f4e70c53c25ca01"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): crates/ai-memory-hooks/src/workstream.rs:595-604 | crates/ai-memory-hooks/src/workstream.rs:621-630 | crates/ai-memory-hooks/src/workstream.rs:693-702 | crates/ai-memory-hooks/src/workstream.rs:1070-1079 \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/ai-memory-hooks/src/workstream.rs:595\u0060 it begins part-way through the construct above it, so those exact 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/ai-memory-hooks/src/workstream.rs:1067\u0060 calls \u0060Json\u0060 and \u0060crates/ai-memory-hooks/src/workstream.rs:592\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/ai-memory-hooks/src/workstream.rs"},"region":{"startLine":595}}}],"partialFingerprints":{"codehealthFindingId/v1":"110e88e3234165005a2b75ec5d36edd5073b0cfc0b5f9b8ec0c005e566d37c3f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 4): crates/ai-memory-llm/src/factory.rs:393-402 | crates/ai-memory-llm/src/factory.rs:406-415 | crates/ai-memory-llm/src/factory.rs:418-425 | crates/ai-memory-llm/src/factory.rs:485-494 \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/ai-memory-llm/src/factory.rs:393\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/ai-memory-llm/src/factory.rs:425\u0060 calls \u0060with_extra_headers\u0060 and \u0060crates/ai-memory-llm/src/factory.rs:494\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/ai-memory-llm/src/factory.rs"},"region":{"startLine":393}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ce1eff5d08dc21476d9a5cba85bc012fe563a91786e97abcbc7412a2b87a066"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): crates/ai-memory-mcp/src/admin.rs:5793-5802 | crates/ai-memory-mcp/src/admin.rs:5894-5903 | crates/ai-memory-mcp/src/admin.rs:6462-6471 \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/ai-memory-mcp/src/admin.rs:6460\u0060 calls \u0060to_string\u0060 and \u0060crates/ai-memory-mcp/src/admin.rs:5892\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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":5793}}}],"partialFingerprints":{"codehealthFindingId/v1":"868c17522f4c441b7976e9acaabd802644a8564eb74ffa93211b1ea684dfb26f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): crates/ai-memory-store/src/reader.rs:11187-11196 | crates/ai-memory-store/src/reader.rs:11310-11319 | crates/ai-memory-store/src/reader.rs:12600-12609 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":11187}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c6e45ce92ad4b0b158626feb5bf447080c8130af3bc5f3f35686c07916e2558"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): crates/ai-memory-store/src/reader.rs:13565-13574 | crates/ai-memory-store/src/reader.rs:13717-13726 | crates/ai-memory-store/src/reader.rs:13745-13754 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":13565}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c23f7975a87c24775529e737bd792eaadd45ebe41ae8381fee0f026f63661d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): crates/ai-memory-wiki/src/markdown.rs:484-493 | crates/ai-memory-wiki/src/markdown.rs:590-599 | crates/ai-memory-wiki/src/markdown.rs:694-703 \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/ai-memory-wiki/src/markdown.rs:484\u0060 it does not close everything it opens, so those exact 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/ai-memory-wiki/src/markdown.rs"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"37231dd2e55d1fd3c3a913d860772db125060380b871710e022c33e8339a88e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): companions/ai-memory-importer/src/agentmemory/mod.rs:630-638 | companions/ai-memory-importer/src/agentmemory/mod.rs:746-755 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060companions/ai-memory-importer/src/agentmemory/mod.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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060companions/ai-memory-importer/src/agentmemory/mod.rs:629\u0060 calls \u0060Err\u0060, \u0060fail\u0060 and \u0060companions/ai-memory-importer/src/agentmemory/mod.rs:746\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":"companions/ai-memory-importer/src/agentmemory/mod.rs"},"region":{"startLine":630}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d82f677dfc525838dbfa98edc5b56a5f8b040a6cf4c0153c0d4abd75021c392"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): companions/ai-memory-importer/src/mcp.rs:195-204 | companions/ai-memory-importer/src/mcp.rs:236-245 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-importer/src/mcp.rs"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"c37d67a606aa5e9d2c90b0f6c7cce968b0381eb78669712cbe9a076ef9233310"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/ai-memory-cli/src/commands/hook_capture.rs:996-1005 | crates/ai-memory-cli/src/commands/hook_capture.rs:1086-1095 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-cli/src/commands/hook_capture.rs:996\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/hook_capture.rs"},"region":{"startLine":996}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d4a0fcfa48bd0d377467552d0923fc2bcb7784d23e96d70357efdde25edddb9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): crates/ai-memory-cli/src/commands/install_hooks.rs:3259-3268 | crates/ai-memory-cli/src/commands/install_hooks.rs:3468-3476 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-cli/src/commands/install_hooks.rs:3259\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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":3259}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad2cf9d196db3b6ab90204d06a59a71a19cb4fa1751ae2c3df593ecd0072c2b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/ai-memory-cli/src/commands/install_mcp.rs:702-711 | crates/ai-memory-llm/src/stored_token.rs:34-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/install_mcp.rs"},"region":{"startLine":702}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d56848b28429a2f09a09d39b7ede1551eca8d5536ddd31bdb38eddeb4a85b80"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:325-334 | crates/ai-memory-consolidate/src/projection.rs:763-772 \u2014 before extracting anything, compare \u0060crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs\u0060 and \u0060crates/ai-memory-consolidate/src/projection.rs\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 354 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":325}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab3f410cf05ac7b74907a6e2d2cc71db4e048d4336222a031e60154aacd699e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:700-710 | crates/ai-memory-consolidate/src/projection.rs:1235-1245 \u2014 before extracting anything, compare \u0060crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs\u0060 and \u0060crates/ai-memory-consolidate/src/projection.rs\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 354 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:700\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":700}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecd1731e1987cbdfe3e57cc134dc47d114fee0496fdf5f697bc793e1ce8dc0ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/ai-memory-consolidate/src/dream.rs:485-494 | crates/ai-memory-consolidate/src/sweep.rs:1344-1353 \u2014 before extracting anything, compare \u0060crates/ai-memory-consolidate/src/dream.rs\u0060 and \u0060crates/ai-memory-consolidate/src/sweep.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-consolidate/src/dream.rs:483\u0060 calls \u0060cluster_surprisal\u0060 and \u0060crates/ai-memory-consolidate/src/sweep.rs:1343\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/ai-memory-consolidate/src/dream.rs"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7460b1cd986589f0e17fa18131bf7a2cb72f3c7a885bc8e938b3773401690f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/ai-memory-hooks/src/antigravity.rs:674-683 | crates/ai-memory-workstream/src/transcript.rs:5227-5236 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/ai-memory-hooks/src/antigravity.rs"},"region":{"startLine":674}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fe9622bfe8722fabff614c15659b08dde9175eba0aee06c9ae374f294fd8b4e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/ai-memory-hooks/src/capture_policy.rs:1928-1937 | crates/ai-memory-hooks/src/capture_policy.rs:1957-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/ai-memory-hooks/src/capture_policy.rs:1928\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/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":1928}}}],"partialFingerprints":{"codehealthFindingId/v1":"21e3d79ba2c6689472f9430563a6174aab307ac35424a0aa057a155c08532f7b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/ai-memory-hooks/src/workstream.rs:554-563 | crates/ai-memory-hooks/src/workstream.rs:644-653 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-hooks/src/workstream.rs:554\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/workstream.rs"},"region":{"startLine":554}}}],"partialFingerprints":{"codehealthFindingId/v1":"08dfff7eb209f857808fe36b04dc0bb853298cc7e3beee91d811180db712fb7e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/ai-memory-llm/src/redirect.rs:18-27 | crates/ai-memory-wiki/src/admission.rs:798-807 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/ai-memory-llm/src/redirect.rs:18\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-llm/src/redirect.rs"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed889946c16374b06185c98cc35f6b9d131fbed6fffa1902d4af889608668432"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/ai-memory-mcp/src/admin.rs:4431-4440 | crates/ai-memory-mcp/src/admin.rs:4480-4489 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-mcp/src/admin.rs:4431\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/admin.rs"},"region":{"startLine":4431}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d5b7bc99405545a9015ea16589991b28531e96be73e28de3444e5e7b1531310"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 2): crates/ai-memory-mcp/src/admin.rs:5038-5047 | crates/ai-memory-mcp/src/admin.rs:5187-5194 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-mcp/src/admin.rs:5038\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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":5038}}}],"partialFingerprints":{"codehealthFindingId/v1":"4615064fddce02a433d22231eb8b0a6f730c88854aa5dd2bd82b226be69e25a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): crates/ai-memory-mcp/src/server.rs:6291-6300 | crates/ai-memory-mcp/src/server.rs:6985-6993 \u2014 both copies are in the same file, so extract the block 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/ai-memory-mcp/src/server.rs"},"region":{"startLine":6291}}}],"partialFingerprints":{"codehealthFindingId/v1":"a52ae8279647300aada0c1eb4a81d0ca6cdeacd14f9d30d2e990fd9b20a283b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:4197-4206 | crates/ai-memory-store/src/reader.rs:9014-9023 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/reader.rs:4197\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/reader.rs"},"region":{"startLine":4197}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1f067578cc4684b343f5e1c3d61f240428aea404591cf4a6e07b3be2f33e472"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:5432-5441 | crates/ai-memory-store/src/reader.rs:5471-5480 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/reader.rs:5432\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/ai-memory-store/src/reader.rs"},"region":{"startLine":5432}}}],"partialFingerprints":{"codehealthFindingId/v1":"790bd68e0c343c94e6b2c9bc13c54e36324211da5cf0d9642efbb6c9dee8e580"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): crates/ai-memory-store/src/workstream.rs:1166-1175 | crates/ai-memory-store/src/workstream.rs:1280-1288 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/workstream.rs:1166\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060input\u0060 to \u0060\u0026LinkOrAdoptManagedRunSession\u0060 in one and \u0060\u0026LinkManagedRunSessionInScope\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/ai-memory-store/src/workstream.rs"},"region":{"startLine":1166}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ae980fe4eda191c251a2312ee8acbcc8e7e7d8089a793bcb8053fe0aa4807da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/ai-memory-workstream/src/transcript.rs:2718-2728 | crates/ai-memory-workstream/src/transcript.rs:2744-2754 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-workstream/src/transcript.rs:2718\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":2718}}}],"partialFingerprints":{"codehealthFindingId/v1":"321ee36d15d052516f09b3814e931fca3dcb66403588a623a285bea2cf031502"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 6): crates/ai-memory-store/src/reader.rs:3453-3461 | crates/ai-memory-store/src/reader.rs:3505-3512 | crates/ai-memory-store/src/reader.rs:3818-3826 | crates/ai-memory-store/src/reader.rs:3875-3882 | crates/ai-memory-store/src/reader.rs:3980-3988 | crates/ai-memory-store/src/reader.rs:4039-4046 \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/ai-memory-store/src/reader.rs:3453\u0060 it does not close everything it opens, so those exact 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/ai-memory-store/src/reader.rs:3513\u0060 calls \u0060page_descriptor\u0060 and \u0060crates/ai-memory-store/src/reader.rs:3462\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/ai-memory-store/src/reader.rs"},"region":{"startLine":3453}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c55b452d8102d6e5d44db5ecb0c5f3f8f04e13936a2fbeb866e1a674fd96b76"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20139 lines \u00D7 4): crates/ai-memory-store/src/reader.rs:761-766 | crates/ai-memory-store/src/reader.rs:797-802 | crates/ai-memory-store/src/reader.rs:4236-4241 | crates/ai-memory-store/src/reader.rs:9260-9268 \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/ai-memory-store/src/reader.rs:761\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/ai-memory-store/src/reader.rs"},"region":{"startLine":761}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd3b31f89d2dd5895a22a7e7ceba47abd18bd41875991da3bf85fb50791940d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/ai-memory-mcp/src/server.rs:4277-4285 | crates/ai-memory-mcp/src/server.rs:5768-5776 | crates/ai-memory-mcp/src/server.rs:7086-7094 \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/ai-memory-mcp/src/server.rs:4276\u0060 calls \u0060require_admin_capability\u0060 and \u0060crates/ai-memory-mcp/src/server.rs:7085\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/ai-memory-mcp/src/server.rs"},"region":{"startLine":4277}}}],"partialFingerprints":{"codehealthFindingId/v1":"e48a2e423af2c8ceb1cba9b9abf546cabb37d22a62e5a762f9dfb52db6b27c3a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/ai-memory-web/src/routes/inbox.rs:586-594 | crates/ai-memory-web/src/routes/inbox.rs:625-633 | crates/ai-memory-web/src/routes/inbox.rs:680-688 \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/ai-memory-web/src/routes/inbox.rs"},"region":{"startLine":586}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2e70ef5e042552ea5eb111fdd88ba1df43e5009f82cbb640b052a133df9ceae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/ai-memory-cli/src/commands/doctor.rs:1074-1082 | crates/ai-memory-web/src/routes/health.rs:156-164 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/ai-memory-cli/src/commands/doctor.rs:1074\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/doctor.rs"},"region":{"startLine":1074}}}],"partialFingerprints":{"codehealthFindingId/v1":"56e3daa07055e5c9b8ef559e44e8326c337dcf04d247bd7447d66a8fe264c985"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/ai-memory-cli/src/commands/hook_spool.rs:1011-1019 | crates/ai-memory-cli/src/commands/hook_spool.rs:1121-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-cli/src/commands/hook_spool.rs:1011\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/hook_spool.rs"},"region":{"startLine":1011}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5cfafd2976542df01f8622da2fd8d84fb38a2fa62adce98c4a1a1cc9bc28b38"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:213-221 | crates/ai-memory-consolidate/src/projection.rs:311-319 \u2014 before extracting anything, compare \u0060crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs\u0060 and \u0060crates/ai-memory-consolidate/src/projection.rs\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 354 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:213\u0060 it begins part-way through the construct above it, so those exact 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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"8be19ccf178a9bb2b1a188b4913251461c4426d9b0209aee7b48bdd3d073e3ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/ai-memory-hooks/src/router.rs:1547-1555 | crates/ai-memory-hooks/src/router.rs:1646-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. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060protocol\u0060 to \u0060\u0026CaptureProtocol\u0060 in one and \u0060Option\u003C\u0026CaptureProtocol\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/ai-memory-hooks/src/router.rs"},"region":{"startLine":1547}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e2fe9e674c553be1bd1c85a9ca609c07b93a210bb03e06b8461f1d1cdc80ec9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/ai-memory-mcp/src/admin.rs:2044-2052 | crates/ai-memory-mcp/src/admin.rs:2173-2181 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-mcp/src/admin.rs:2044\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/admin.rs"},"region":{"startLine":2044}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdd22952d4189111dd26204e59b48beab02f6e5a227b518993bfc6aceaabc24f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5\u20139 lines \u00D7 3): crates/ai-memory-mcp/src/admin.rs:4184-4191 | crates/ai-memory-store/src/reader.rs:7077-7081 | crates/ai-memory-store/src/reader.rs:7307-7315 \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/ai-memory-mcp/src/admin.rs:4184\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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":4184}}}],"partialFingerprints":{"codehealthFindingId/v1":"89f03d825d04ce426d1020d9434add5e5cf629875b1aaba78bea355900fcb262"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/ai-memory-mcp/src/server.rs:7581-7589 | crates/ai-memory-mcp/src/server.rs:7814-7822 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-mcp/src/server.rs"},"region":{"startLine":7581}}}],"partialFingerprints":{"codehealthFindingId/v1":"05bb7d9ac181c55b0772888649531c5bbb606bbdbeba60258020fcb85b777f71"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/ai-memory-mcp/src/server.rs:7667-7675 | crates/ai-memory-mcp/src/server.rs:7769-7777 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-mcp/src/server.rs:7667\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/server.rs"},"region":{"startLine":7667}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e504c1b71a4235a324cbda09207307836fcfb85ba78544896f54ba37e4a3e91"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): crates/ai-memory-store/src/ops.rs:1639-1646 | crates/ai-memory-store/src/ops.rs:1897-1905 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/ops.rs:1639\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/ai-memory-store/src/ops.rs"},"region":{"startLine":1639}}}],"partialFingerprints":{"codehealthFindingId/v1":"044fee08657e24d76caec78dfd313c1813b18921abc1a905ee694136b84d092b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/ai-memory-store/src/ops.rs:9409-9417 | crates/ai-memory-store/src/reader.rs:6401-6409 \u2014 before extracting anything, compare \u0060crates/ai-memory-store/src/ops.rs\u0060 and \u0060crates/ai-memory-store/src/reader.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-store/src/ops.rs:9409\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/ai-memory-store/src/ops.rs"},"region":{"startLine":9409}}}],"partialFingerprints":{"codehealthFindingId/v1":"d28e8c3cae1fb0f8d759accfe65b1ed742bffe45b52f394b26685d4db0fba651"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:3419-3427 | crates/ai-memory-store/src/reader.rs:3482-3490 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/reader.rs:3419\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/ai-memory-store/src/reader.rs"},"region":{"startLine":3419}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5f9f75fef9a557d719c5fd756bd614086fa4d272a7a9265c4f52cfe898a2548"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:9521-9530 | crates/ai-memory-store/src/reader.rs:9731-9740 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-store/src/reader.rs"},"region":{"startLine":9521}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbca7fffcc9d545746561413292a8829d98989bf3961c078c49d22397b2ddf3a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:9970-9978 | crates/ai-memory-store/src/reader.rs:9984-9992 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-store/src/reader.rs"},"region":{"startLine":9970}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1802bfb91e2f7a9cf213045751f883d8731d33a1b044bdeb926bc909f90f3cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:10799-10810 | crates/ai-memory-store/src/reader.rs:10947-10957 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-store/src/reader.rs"},"region":{"startLine":10799}}}],"partialFingerprints":{"codehealthFindingId/v1":"752555f58b593bf16134ce3e6ce915b23d8e48e794c6c1aa9218f1e335978980"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:11000-11008 | crates/ai-memory-store/src/reader.rs:11026-11034 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-store/src/reader.rs"},"region":{"startLine":11000}}}],"partialFingerprints":{"codehealthFindingId/v1":"de4b1f1a9bc1627b68ba98d307a75b885b36bf8f32ecfbc8d58894609dbff14a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20139 lines \u00D7 2): crates/ai-memory-wiki/src/confinement.rs:207-215 | crates/ai-memory-wiki/src/migrations/m2026_09_okf_conformance.rs:213-218 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/ai-memory-wiki/src/confinement.rs:207\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-wiki/src/confinement.rs"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5fbc4500eefd9e3c376a1faf91e7876f9e7de4f139e2c209bc9db2498ed15e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/ai-memory-wiki/src/wiki.rs:61-69 | crates/ai-memory-wiki/src/wiki.rs:85-93 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-wiki/src/wiki.rs:61\u0060 it does not close everything it opens, so those exact 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/ai-memory-wiki/src/wiki.rs"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"230ae967f5a160bb177c2ddd23579585e6125ace851188cd41681412ba9f8a9e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 5): crates/ai-memory-store/src/ops.rs:1358-1365 | crates/ai-memory-store/src/reader.rs:11911-11918 | crates/ai-memory-store/src/reader.rs:11977-11984 | crates/ai-memory-store/src/workstream.rs:1692-1699 | crates/ai-memory-store/src/workstream.rs:2376-2383 \u2014 before extracting anything, compare \u0060crates/ai-memory-store/src/ops.rs\u0060 and \u0060crates/ai-memory-store/src/reader.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-store/src/ops.rs:1358\u0060 it does not close everything it opens, so those exact 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/ai-memory-store/src/workstream.rs:1700\u0060 calls \u0060get\u0060 and \u0060crates/ai-memory-store/src/ops.rs:1366\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/ai-memory-store/src/ops.rs"},"region":{"startLine":1358}}}],"partialFingerprints":{"codehealthFindingId/v1":"22ba57d5ba73c2fb84d659f54516f40f760ba18075b111703d3d23d9f7054f4f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 3): crates/ai-memory-store/src/reader.rs:9944-9950 | crates/ai-memory-store/src/reader.rs:10137-10144 | crates/ai-memory-store/src/reader.rs:10654-10661 \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/ai-memory-store/src/reader.rs:9944\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/reader.rs"},"region":{"startLine":9944}}}],"partialFingerprints":{"codehealthFindingId/v1":"035c1ebb4f6acbb2843cfe92707974fd888999389604dfddb1e4b74ca2b90a20"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/ai-memory-workstream/src/transcript.rs:5827-5834 | crates/ai-memory-workstream/src/transcript.rs:5863-5870 | crates/ai-memory-workstream/src/transcript.rs:6290-6297 \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/ai-memory-workstream/src/transcript.rs:5827\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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":5827}}}],"partialFingerprints":{"codehealthFindingId/v1":"7836fd1ed60cbb66f3f1d484fb5594cabfee2dad027656be4583c61822dffd6f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): companions/ai-memory-importer/src/agentmemory/export.rs:860-867 | companions/ai-memory-importer/src/agentmemory/export.rs:878-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 \u0060companions/ai-memory-importer/src/agentmemory/export.rs:860\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-importer/src/agentmemory/export.rs"},"region":{"startLine":860}}}],"partialFingerprints":{"codehealthFindingId/v1":"7222870d65dda3c7f3fe278b2bec3f58d4deeecd256991bfd0b1413ee4cad7ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): companions/ai-memory-importer/src/claude_mem.rs:654-661 | companions/ai-memory-importer/src/claude_mem.rs:759-765 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060companions/ai-memory-importer/src/claude_mem.rs:654\u0060 it begins part-way through the construct above it, so those exact 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":"companions/ai-memory-importer/src/claude_mem.rs"},"region":{"startLine":654}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7eda7450202a1c3e7912a955bf7aeac048a5876c8b9176b7f44da954e058753"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): companions/ai-memory-importer/src/mcp.rs:535-542 | companions/ai-memory-wikisync/src/mcp.rs:272-279 \u2014 before extracting anything, compare \u0060companions/ai-memory-importer/src/mcp.rs\u0060 and \u0060companions/ai-memory-wikisync/src/mcp.rs\u0060 as WHOLE FILES: this scan already matched 5 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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":"companions/ai-memory-importer/src/mcp.rs"},"region":{"startLine":535}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f886bfefb718800455bc04f4009dd3a5496cf3866777848b483fab405d90e79"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/ai-memory-cli/src/commands/hook.rs:178-186 | crates/ai-memory-cli/src/commands/hook.rs:323-331 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-cli/src/commands/hook.rs:178\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/hook.rs"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f39207049bdd1a96fdddc1b20e1e370e4c7f737bae6113d2b88b838970ccae2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-cli/src/commands/hook_spool.rs:1000-1007 | crates/ai-memory-cli/src/commands/hook_spool.rs:1110-1117 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-cli/src/commands/hook_spool.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/ai-memory-cli/src/commands/hook_spool.rs"},"region":{"startLine":1000}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6eb140cffc9d2c15933c28ae4248003abb83030b907aa1c5eb270350b6bb173"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-cli/src/commands/hook_spool.rs:1909-1916 | crates/ai-memory-cli/src/commands/hook_spool.rs:2001-2008 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-cli/src/commands/hook_spool.rs:1909\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/ai-memory-cli/src/commands/hook_spool.rs"},"region":{"startLine":1909}}}],"partialFingerprints":{"codehealthFindingId/v1":"155b8eaed1c497ae8ec2570581e49eea8438af767b0a6a89210224071b2a3528"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-cli/src/commands/install_hooks.rs:2504-2511 | crates/ai-memory-cli/src/commands/install_hooks.rs:2544-2551 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-cli/src/commands/install_hooks.rs:2504\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":2504}}}],"partialFingerprints":{"codehealthFindingId/v1":"25a6d0f3daca85d43e2ebf2d51d8422af17184d85937ca126418c200a6b539ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-cli/src/commands/install_hooks.rs:5479-5486 | crates/ai-memory-cli/src/commands/install_hooks.rs:6400-6407 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-cli/src/commands/install_hooks.rs:5479\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":5479}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed5f313f6195e42a86506c583a607fa0b8cfff0b1803369ad144ec55ec6c223a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-cli/src/commands/purge_project.rs:279-286 | crates/ai-memory-cli/src/commands/purge_session.rs:179-186 \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/ai-memory-cli/src/commands/purge_project.rs:279\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/ai-memory-cli/src/commands/purge_project.rs"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"35b3b7e20147ea7522d8e12bea3adfe4d4e03ccc057305c7c16018eb13f9a2d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:97-104 | crates/ai-memory-consolidate/src/projection.rs:98-105 \u2014 before extracting anything, compare \u0060crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs\u0060 and \u0060crates/ai-memory-consolidate/src/projection.rs\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 354 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"1890533881b876fb95ac1ecb56caf0af5941f556606470776de130e7fbf97d9b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:194-203 | crates/ai-memory-consolidate/src/projection.rs:289-296 \u2014 before extracting anything, compare \u0060crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs\u0060 and \u0060crates/ai-memory-consolidate/src/projection.rs\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 354 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:194\u0060 it begins part-way through the construct above it, so those exact 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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"e39fd5050adbc3cfbbd2a2058e955ff17fbe87e9586ea542589c9a773f48c80a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-consolidate/src/embed.rs:194-201 | crates/ai-memory-consolidate/src/embed.rs:220-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 \u0060crates/ai-memory-consolidate/src/embed.rs:194\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/embed.rs"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe3c54ce3d9c951d4f54549826350fd5d59d74d25ea2afaec07cc8ba4128bc6d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-core/src/active_project.rs:501-508 | crates/ai-memory-core/src/active_project.rs:549-556 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/ai-memory-core/src/active_project.rs:499\u0060 calls \u0060write_single\u0060, \u0060write_single_default_global\u0060 and \u0060crates/ai-memory-core/src/active_project.rs:548\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/ai-memory-core/src/active_project.rs"},"region":{"startLine":501}}}],"partialFingerprints":{"codehealthFindingId/v1":"0122967ee431e90f33d3882a4d118d4b2c86b164950d5fe870eb43a507273efc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-hooks/src/antigravity.rs:722-729 | crates/ai-memory-workstream/src/transcript.rs:5263-5270 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/ai-memory-hooks/src/antigravity.rs"},"region":{"startLine":722}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3ebdb0fe69c3feefd7751f027d5c1113c5f9f745ae077b89231e1ae62d957af"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/ai-memory-hooks/src/workstream.rs:438-446 | crates/ai-memory-hooks/src/workstream.rs:846-854 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-hooks/src/workstream.rs"},"region":{"startLine":438}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0005bc3a130ec3bc2ce854029825079bc393ba5cdee9d61e7ab5323ff6a4142"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): crates/ai-memory-mcp/src/admin.rs:2361-2367 | crates/ai-memory-mcp/src/server.rs:6176-6183 \u2014 before extracting anything, compare \u0060crates/ai-memory-mcp/src/admin.rs\u0060 and \u0060crates/ai-memory-mcp/src/server.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/admin.rs"},"region":{"startLine":2361}}}],"partialFingerprints":{"codehealthFindingId/v1":"b96fdcfbde505fded7df4838b3dba702ab635e4f48a2beb6ddfb4e7f8655961b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-mcp/src/admin.rs:3798-3805 | crates/ai-memory-mcp/src/admin.rs:3868-3875 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":3798}}}],"partialFingerprints":{"codehealthFindingId/v1":"f723111c690da1cba1f7778a1892454ad912049fd0141f92801873d5639f5c8d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-mcp/src/admin.rs:4021-4028 | crates/ai-memory-mcp/src/admin.rs:4088-4095 \u2014 both copies are in the same file, so extract the block 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/ai-memory-mcp/src/admin.rs:4085\u0060 calls \u0060Err\u0060, \u0060pending_detail\u0060 and \u0060crates/ai-memory-mcp/src/admin.rs:4020\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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":4021}}}],"partialFingerprints":{"codehealthFindingId/v1":"e28e8546e311344df5b04fd207024f38ce0cf6e2cd9c4654fb21fcad12eb05e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-mcp/src/admin.rs:5220-5227 | crates/ai-memory-mcp/src/admin.rs:6450-6457 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-mcp/src/admin.rs:5220\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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":5220}}}],"partialFingerprints":{"codehealthFindingId/v1":"deb7e8afb98bd40a091ecd8d09ecbc1123e51a8985343c95edac21b3939a97d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-mcp/src/admin.rs:6556-6563 | crates/ai-memory-mcp/src/admin.rs:6695-6702 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-mcp/src/admin.rs:6556\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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":6556}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a2fff3cf8274c9e7d560062e2f61a1913b3ef78a7b434b0106ec2511a6da3dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): crates/ai-memory-mcp/src/server.rs:4438-4445 | crates/ai-memory-mcp/src/server.rs:6377-6383 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-mcp/src/server.rs:4438\u0060 it begins part-way through the construct above it, so those exact 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/ai-memory-mcp/src/server.rs"},"region":{"startLine":4438}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ca9b5c449b4361b96b96f5577250541b0bd99b93de64b64b9cd3ab91b566a3d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-mcp/src/server.rs:6153-6160 | crates/ai-memory-mcp/src/server.rs:6186-6193 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-mcp/src/server.rs:6153\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/server.rs"},"region":{"startLine":6153}}}],"partialFingerprints":{"codehealthFindingId/v1":"2aa0a17e9bee18472877bee7d5aea8aa1839dd4dfffec09cc15e0eb982158562"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-mcp/src/server.rs:6986-6994 | crates/ai-memory-mcp/src/server.rs:7961-7968 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/ai-memory-mcp/src/server.rs:7960\u0060 calls \u0060unwrap_or\u0060 and \u0060crates/ai-memory-mcp/src/server.rs:6985\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/ai-memory-mcp/src/server.rs"},"region":{"startLine":6986}}}],"partialFingerprints":{"codehealthFindingId/v1":"b15b74acb4b37d499e8095c6587d7aa05f99967579e4e72fa99672ceb4cc791b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-store/src/api_credentials.rs:166-173 | crates/ai-memory-store/src/api_credentials.rs:301-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/ai-memory-store/src/api_credentials.rs"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"482e98734cc305d3da51b8e6adcb0c6ea2ffd2327a47851f575faf6bf00344a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): crates/ai-memory-store/src/ops.rs:1551-1558 | crates/ai-memory-store/src/reader.rs:11977-11983 \u2014 before extracting anything, compare \u0060crates/ai-memory-store/src/ops.rs\u0060 and \u0060crates/ai-memory-store/src/reader.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-store/src/ops.rs:1551\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/ops.rs"},"region":{"startLine":1551}}}],"partialFingerprints":{"codehealthFindingId/v1":"c561d589ced72c807a10f1015d017c38da1bb9ea07bff274a11de79112241792"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): crates/ai-memory-store/src/ops.rs:7938-7945 | crates/ai-memory-store/src/reader.rs:6513-6519 \u2014 before extracting anything, compare \u0060crates/ai-memory-store/src/ops.rs\u0060 and \u0060crates/ai-memory-store/src/reader.rs\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-store/src/ops.rs:7938\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/ai-memory-store/src/ops.rs"},"region":{"startLine":7938}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a37c8fbac5600404cf1e2d4b652473ecb1719b588e2c9f0550dfd9e64102674"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-store/src/profile.rs:157-164 | crates/ai-memory-store/src/profile.rs:783-790 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/profile.rs:157\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/ai-memory-store/src/profile.rs"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7bd063d28a5b272d5cfec70f3cd607888d3ba92e5a18b79d70b3ec5f5d5e672"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-store/src/profile.rs:152-159 | crates/ai-memory-store/src/profile.rs:503-510 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/profile.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/ai-memory-store/src/profile.rs"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"024126b467b5de8b631a6c097f95661912b56eb97340df7b7de1ce6664f44fc9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:3630-3638 | crates/ai-memory-store/src/reader.rs:3687-3694 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/reader.rs:3630\u0060 it begins part-way through the construct above it, so those exact 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/ai-memory-store/src/reader.rs:3695\u0060 calls \u0060page_descriptor\u0060 and \u0060crates/ai-memory-store/src/reader.rs:3639\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/ai-memory-store/src/reader.rs"},"region":{"startLine":3630}}}],"partialFingerprints":{"codehealthFindingId/v1":"01ed88e7598ed4858c8b869ac77455ab8cf055de75182fbaf601743b7bd48eb8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:4323-4330 | crates/ai-memory-store/src/reader.rs:4379-4386 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/reader.rs:4323\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/reader.rs"},"region":{"startLine":4323}}}],"partialFingerprints":{"codehealthFindingId/v1":"81e768108124bf728837a44bba29987d4e8aed744d5d6dcaebc78d779d22ed30"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:9799-9806 | crates/ai-memory-store/src/reader.rs:9844-9851 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-store/src/reader.rs"},"region":{"startLine":9799}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ba5b8adc946f47197e38c312c9c67f00cabccefcf9c0e90757fbbc1cf4ed73e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:11016-11023 | crates/ai-memory-store/src/reader.rs:11043-11050 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-store/src/reader.rs"},"region":{"startLine":11016}}}],"partialFingerprints":{"codehealthFindingId/v1":"ceabc846c874515a4bc1de418f0548e9836a7a47060e6b7582db7ff26504e1c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-workstream/src/transcript.rs:2224-2231 | crates/ai-memory-workstream/src/transcript.rs:3050-3057 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-workstream/src/transcript.rs:2224\u0060 it begins part-way through the construct above it, so those exact 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/ai-memory-workstream/src/transcript.rs:2223\u0060 calls \u0060or_else\u0060, \u0060get\u0060 and \u0060crates/ai-memory-workstream/src/transcript.rs:3049\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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":2224}}}],"partialFingerprints":{"codehealthFindingId/v1":"c465bb907f2b8e3bf91c0c6e08bdabf765a3e70872bd36712e3670eade248662"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): crates/ai-memory-hooks/src/workstream.rs:594-600 | crates/ai-memory-hooks/src/workstream.rs:620-626 | crates/ai-memory-hooks/src/workstream.rs:643-649 | crates/ai-memory-hooks/src/workstream.rs:692-698 | crates/ai-memory-hooks/src/workstream.rs:1069-1075 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/ai-memory-hooks/src/workstream.rs:1067\u0060 calls \u0060Json\u0060 and \u0060crates/ai-memory-hooks/src/workstream.rs:592\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/ai-memory-hooks/src/workstream.rs"},"region":{"startLine":594}}}],"partialFingerprints":{"codehealthFindingId/v1":"e898df89fb37d0dbd765891e464f2f327aa3913df2c350e3d8f841e2a1d4c9a2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20137 lines \u00D7 3): crates/ai-memory-cli/src/commands/delete_page.rs:38-43 | crates/ai-memory-cli/src/commands/restore_page.rs:41-47 | crates/ai-memory-cli/src/commands/write_page.rs:51-56 \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/ai-memory-cli/src/commands/delete_page.rs:38\u0060 it does not close everything it opens, so those exact 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 \u0060DeletePageArgs\u0060 in one and \u0060RestorePageArgs\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/ai-memory-cli/src/commands/delete_page.rs"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"528f1df92dc38973ee917bbff32a04cfb23588d84131a7870c8ce5f1f0b3d487"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/ai-memory-cli/src/commands/hook.rs:2398-2404 | crates/ai-memory-cli/src/commands/hook.rs:2494-2500 | crates/ai-memory-cli/src/commands/hook.rs:2539-2545 \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/ai-memory-cli/src/commands/hook.rs"},"region":{"startLine":2398}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb3a136710ef029119a35a39e64a2cb24ab03df67200158de683a5a642d8de3a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/ai-memory-cli/src/commands/uninstall.rs:1399-1405 | crates/ai-memory-cli/src/commands/uninstall.rs:1502-1508 | crates/ai-memory-cli/src/commands/uninstall.rs:1633-1639 \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/ai-memory-cli/src/commands/uninstall.rs:1399\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/uninstall.rs"},"region":{"startLine":1399}}}],"partialFingerprints":{"codehealthFindingId/v1":"49c08f9f8ee04dca36ac7936b2a5da9cf337d6859da5a0c43b5b34a59e49dceb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/ai-memory-consolidate/src/auto_improve_schedule.rs:646-652 | crates/ai-memory-mcp/src/admin.rs:3069-3076 | crates/ai-memory-mcp/src/server.rs:4846-4853 \u2014 before extracting anything, compare \u0060crates/ai-memory-consolidate/src/auto_improve_schedule.rs\u0060 and \u0060crates/ai-memory-mcp/src/admin.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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-consolidate/src/auto_improve_schedule.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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/ai-memory-consolidate/src/auto_improve_schedule.rs"},"region":{"startLine":646}}}],"partialFingerprints":{"codehealthFindingId/v1":"efa157d72a2f810405989016b1b68fe186219aaf326f9fa523d3ce82a57eb658"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/ai-memory-store/src/reader.rs:684-690 | crates/ai-memory-store/src/reader.rs:8317-8323 | crates/ai-memory-store/src/reader.rs:8393-8399 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":684}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3dfda3b0d35f5325de69a98cb6900e5e652fcc1822d143ad19e970304ae85f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): companions/ai-memory-client/src/scrub.rs:17-24 | crates/ai-memory-core/src/sanitize.rs:884-891 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060companions/ai-memory-client/src/scrub.rs:17\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"companions/ai-memory-client/src/scrub.rs"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"92eff322cab072e03286fb02280d178c348ca11b1b254069bb894eb738d1d79c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): companions/ai-memory-client/src/scrub.rs:123-129 | crates/ai-memory-core/src/sanitize.rs:105-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. 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":"companions/ai-memory-client/src/scrub.rs"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"c553068680c6c9c45cfd5b8f3abb921861cb19d6f5bb83addcc6174c9519789b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): companions/ai-memory-importer/src/claude_mem.rs:681-688 | companions/ai-memory-importer/src/claude_mem.rs:771-777 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-importer/src/claude_mem.rs"},"region":{"startLine":681}}}],"partialFingerprints":{"codehealthFindingId/v1":"52a0d0f71881f78b14993453986aab2b4b7deb2cf2d2d03f5966476962e0aeb5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): companions/ai-memory-importer/src/main.rs:1109-1115 | crates/ai-memory-wiki/src/markdown.rs:66-72 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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":"companions/ai-memory-importer/src/main.rs"},"region":{"startLine":1109}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5e8b6582745868e527d29344dbe7c4ec8473cd2cd77cc0789490dab7c02ad0d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): companions/ai-memory-wikisync/src/bidi.rs:779-785 | companions/ai-memory-wikisync/src/bidi.rs:832-838 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060companions/ai-memory-wikisync/src/bidi.rs:779\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-wikisync/src/bidi.rs"},"region":{"startLine":779}}}],"partialFingerprints":{"codehealthFindingId/v1":"68b8feee072c768d2ea27ac6ce81ba82a5e61c5d4c3179e75a870ad7d32965f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/ai-memory-cli/src/commands/auto_improve_report.rs:69-75 | crates/ai-memory-cli/src/commands/curator.rs:64-70 \u2014 before extracting anything, compare \u0060crates/ai-memory-cli/src/commands/auto_improve_report.rs\u0060 and \u0060crates/ai-memory-cli/src/commands/curator.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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 \u0060args\u0060 to \u0060AutoImproveReportArgs\u0060 in one and \u0060CuratorArgs\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/ai-memory-cli/src/commands/auto_improve_report.rs"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4ff027f78d2f7e4012ac8b6347501ad9bb355923f9c1e0fd2a780f7c93d7f53"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/ai-memory-cli/src/commands/install_hooks.rs:2766-2772 | crates/ai-memory-cli/src/commands/install_hooks.rs:2959-2965 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-cli/src/commands/install_hooks.rs:2766\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":2766}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f58f1ea92d18ed7716d6499fdf3e340ec690b797800e86067499b73672a7b43"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/ai-memory-cli/src/commands/install_hooks.rs:7051-7057 | crates/ai-memory-cli/src/commands/setup_agent.rs:183-189 \u2014 before extracting anything, compare \u0060crates/ai-memory-cli/src/commands/install_hooks.rs\u0060 and \u0060crates/ai-memory-cli/src/commands/setup_agent.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":7051}}}],"partialFingerprints":{"codehealthFindingId/v1":"0474e198d3d57aab557710e3e92e051060dd32dedadd55827076e91fd9986ae9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/ai-memory-cli/src/commands/install_instructions.rs:634-640 | crates/ai-memory-cli/src/commands/uninstall.rs:1297-1303 \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/ai-memory-cli/src/commands/install_instructions.rs"},"region":{"startLine":634}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fa3b9e88260f2a99489bf8e2c76db5eb0f55c4614ba62a9c214041d11e89847"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/ai-memory-cli/src/commands/render_shared.rs:2523-2529 | crates/ai-memory-cli/src/commands/render_shared.rs:2561-2567 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-cli/src/commands/render_shared.rs"},"region":{"startLine":2523}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bac3044441ba88b17e5104dab1236dc68d5821d4afa513d4640077402906632"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/ai-memory-cli/src/http_client.rs:495-501 | crates/ai-memory-cli/src/http_client.rs:673-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/http_client.rs"},"region":{"startLine":495}}}],"partialFingerprints":{"codehealthFindingId/v1":"89bade20ebd8aba41f3ba4c53191105a036b467655794ddc87f0ed44845a1f37"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:551-558 | crates/ai-memory-consolidate/src/projection.rs:1082-1089 \u2014 before extracting anything, compare \u0060crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs\u0060 and \u0060crates/ai-memory-consolidate/src/projection.rs\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 354 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":551}}}],"partialFingerprints":{"codehealthFindingId/v1":"b446e2cb566b74396f85c95c9bb06e1d6b25451c04c1429b2e891e9220261171"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:647-653 | crates/ai-memory-consolidate/src/projection.rs:1179-1185 \u2014 before extracting anything, compare \u0060crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs\u0060 and \u0060crates/ai-memory-consolidate/src/projection.rs\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 354 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":647}}}],"partialFingerprints":{"codehealthFindingId/v1":"7644cf3dbe6e1be854de42da8349c5ebc0df74fa1681b76a51c9eb6e59659562"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/ai-memory-hooks/src/recap.rs:412-418 | crates/ai-memory-hooks/src/recap.rs:686-695 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-hooks/src/recap.rs"},"region":{"startLine":412}}}],"partialFingerprints":{"codehealthFindingId/v1":"d68a287329e635f23a6ac500f9fcf7f30590fb474384583b571283c1a2a729db"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/ai-memory-hooks/src/router.rs:2948-2954 | crates/ai-memory-hooks/src/router.rs:3839-3845 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-hooks/src/router.rs"},"region":{"startLine":2948}}}],"partialFingerprints":{"codehealthFindingId/v1":"0166ec64be6ae155f106377d0a6ef1935101863cf889a738feb0d173b48d4387"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/ai-memory-store/src/api_credentials.rs:303-309 | crates/ai-memory-store/src/web_sessions.rs:195-201 \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/ai-memory-store/src/api_credentials.rs:303\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/ai-memory-store/src/api_credentials.rs"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"33e56be51b679b460f24dbf4f474ffbfcfb65a870c87a470cc1d758b6e28a502"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/ai-memory-store/src/ops.rs:1753-1759 | crates/ai-memory-store/src/ops.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 \u0060crates/ai-memory-store/src/ops.rs:1753\u0060 it begins part-way through the construct above it, so those exact 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/ai-memory-store/src/ops.rs"},"region":{"startLine":1753}}}],"partialFingerprints":{"codehealthFindingId/v1":"e73d7fa52959db5aac01f19c80ed86896f53571d89bd1787f7032135b32e2270"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/ai-memory-store/src/profile.rs:779-785 | crates/ai-memory-store/src/reader.rs:12556-12562 \u2014 before extracting anything, compare \u0060crates/ai-memory-store/src/profile.rs\u0060 and \u0060crates/ai-memory-store/src/reader.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/ai-memory-store/src/profile.rs:779\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/ai-memory-store/src/profile.rs"},"region":{"startLine":779}}}],"partialFingerprints":{"codehealthFindingId/v1":"1873f2dc43f59e5444908b917ecd40cc976f4b86e7cd60b9a3c9307b53b0fa25"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:11439-11445 | crates/ai-memory-store/src/reader.rs:11504-11510 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-store/src/reader.rs"},"region":{"startLine":11439}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d8cb614850e1df8d675caecfef276e71240f487671740db29e71eedac1f6a28"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/ai-memory-web/src/markdown.rs:388-394 | crates/ai-memory-wiki/src/markdown.rs:440-446 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/ai-memory-web/src/markdown.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/ai-memory-web/src/markdown.rs"},"region":{"startLine":388}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae93ed7b3941556955de14219b328c567a894838d8df0a43e4a1780846cb8fd5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-workstream/src/transcript.rs:1304-1311 | crates/ai-memory-workstream/src/transcript.rs:4932-4939 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":1304}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef1a4a1608d09076cb7b38b07f16ba4c4a330aac3cb1119f387ea8a983dc62e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/ai-memory-workstream/src/transcript.rs:3528-3534 | crates/ai-memory-workstream/src/transcript.rs:5979-5985 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-workstream/src/transcript.rs:3528\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":3528}}}],"partialFingerprints":{"codehealthFindingId/v1":"3aaa1974f9247bb27d7c7c3236a58513c7c944859060df56fd02f428cffb5063"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): evals/src/ab.rs:517-523 | evals/src/retrieval/qa.rs:457-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 \u0060evals/src/ab.rs:517\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":"evals/src/ab.rs"},"region":{"startLine":517}}}],"partialFingerprints":{"codehealthFindingId/v1":"96ca133d785b2ef31c9fc5993da748fea47829b39a79942911d56ca1254714ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): evals/src/abstention.rs:405-411 | evals/src/retrieval/grep.rs:77-83 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060evals/src/abstention.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":"evals/src/abstention.rs"},"region":{"startLine":405}}}],"partialFingerprints":{"codehealthFindingId/v1":"5182ce966d0e1cae1cd957fbfe86ec352175b23d9309b33f065e2cd4e7b5dd41"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): evals/src/retrieval/mod.rs:444-450 | evals/src/retrieval/mod.rs:557-563 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"evals/src/retrieval/mod.rs"},"region":{"startLine":444}}}],"partialFingerprints":{"codehealthFindingId/v1":"6687556e1ffa4267bd924655457b10b3c5498ab32b932f9ba19eb74f6d2bf251"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5): crates/ai-memory-cli/src/commands/hook_spool.rs:1733-1738 | crates/ai-memory-cli/src/commands/hook_spool.rs:1887-1892 | crates/ai-memory-cli/src/commands/hook_spool.rs:1902-1907 | crates/ai-memory-cli/src/commands/hook_spool.rs:1980-1985 | crates/ai-memory-cli/src/commands/hook_spool.rs:1995-2000 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/ai-memory-cli/src/commands/hook_spool.rs:1909\u0060 calls \u0060insert\u0060 and \u0060crates/ai-memory-cli/src/commands/hook_spool.rs:1740\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/ai-memory-cli/src/commands/hook_spool.rs"},"region":{"startLine":1733}}}],"partialFingerprints":{"codehealthFindingId/v1":"08e0bc71b774800feb895f2910f1dd02b0bbf02f6386396256d613cbb1b7f5fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 4): crates/ai-memory-store/src/profile.rs:154-159 | crates/ai-memory-store/src/profile.rs:505-510 | crates/ai-memory-store/src/profile.rs:780-785 | crates/ai-memory-store/src/reader.rs:12557-12562 \u2014 before extracting anything, compare \u0060crates/ai-memory-store/src/profile.rs\u0060 and \u0060crates/ai-memory-store/src/reader.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/ai-memory-store/src/profile.rs:154\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/profile.rs"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8074a0a3c5e15451446fffedc778791b9c332a0c7f895bd6c97180ba5b31c8b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/ai-memory-cli/src/commands/uninstall.rs:1500-1506 | crates/ai-memory-cli/src/commands/uninstall.rs:1549-1555 | crates/ai-memory-cli/src/commands/uninstall.rs:1631-1637 \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/ai-memory-cli/src/commands/uninstall.rs:1500\u0060 it begins part-way through the construct above it, so those exact 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/ai-memory-cli/src/commands/uninstall.rs"},"region":{"startLine":1500}}}],"partialFingerprints":{"codehealthFindingId/v1":"69abf454e0ca2974a1329ae81a9113c461c41eff6d5a73d21609a8260471db46"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/ai-memory-store/src/reader.rs:11000-11005 | crates/ai-memory-store/src/reader.rs:11026-11031 | crates/ai-memory-store/src/reader.rs:11051-11056 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":11000}}}],"partialFingerprints":{"codehealthFindingId/v1":"4747c97ffd37b0a286303b13c36effdaf55975475009e3b154bccaf70eb61fc3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): companions/ai-memory-importer/src/mcp.rs:137-142 | companions/ai-memory-wikisync/src/mcp.rs:109-114 \u2014 before extracting anything, compare \u0060companions/ai-memory-importer/src/mcp.rs\u0060 and \u0060companions/ai-memory-wikisync/src/mcp.rs\u0060 as WHOLE FILES: this scan already matched 5 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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":"companions/ai-memory-importer/src/mcp.rs"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"5da0076ca8f23239a55c1cd3f441e3d40984b0567392e06a0b395d82d1f56b35"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/ai-memory-cli/src/commands/install_mcp.rs:2063-2072 | crates/ai-memory-cli/src/commands/install_mcp.rs:2080-2089 \u2014 both copies are in the same file, so extract the block 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/ai-memory-cli/src/commands/install_mcp.rs"},"region":{"startLine":2063}}}],"partialFingerprints":{"codehealthFindingId/v1":"f54580f951f8eef6f16081b48018e7cc81de8e1eae6c122ac3c9f8788198166d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201314 lines \u00D7 2): crates/ai-memory-cli/src/commands/recent.rs:41-54 | crates/ai-memory-cli/src/commands/search.rs:41-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/ai-memory-cli/src/commands/recent.rs:41\u0060 it does not close everything it opens, so those exact 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 \u0060RecentArgs\u0060 in one and \u0060SearchArgs\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/ai-memory-cli/src/commands/recent.rs"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"612b50e7fb590ff9628d0815e16aa924d69ccc19b037f95ffaedf6ffdedb077c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/ai-memory-cli/src/commands/render_shared.rs:451-456 | crates/ai-memory-cli/src/commands/user_service.rs:178-183 \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/ai-memory-cli/src/commands/render_shared.rs:451\u0060 it does not close everything it opens, so those exact 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/ai-memory-cli/src/commands/render_shared.rs:459\u0060 calls \u0060push_str\u0060 and \u0060crates/ai-memory-cli/src/commands/user_service.rs:186\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/ai-memory-cli/src/commands/render_shared.rs"},"region":{"startLine":451}}}],"partialFingerprints":{"codehealthFindingId/v1":"afc2e34fd661d0a8b76d903cef8ea979bd10946df06bcf8493a9a23588b74899"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/ai-memory-mcp/src/admin.rs:4025-4030 | crates/ai-memory-mcp/src/admin.rs:9309-9315 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-mcp/src/admin.rs:4025\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/admin.rs"},"region":{"startLine":4025}}}],"partialFingerprints":{"codehealthFindingId/v1":"286b28f1668791e36df23e4d2373bcaf5fc67de9ff78d5be97cbaeac0931bb93"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/ai-memory-mcp/src/auth.rs:358-363 | crates/ai-memory-mcp/src/human_auth.rs:1145-1150 \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/ai-memory-mcp/src/auth.rs"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"def4c4af41860b89f0e7d3193cec652fd7223de8893cb59fb795ed622624ada9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/ai-memory-store/src/dashboard.rs:78-83 | crates/ai-memory-store/src/reader.rs:5622-5627 \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/ai-memory-store/src/dashboard.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/ai-memory-store/src/dashboard.rs"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"463e03ad31600b73099875cd762aae632a1c61d73028018287f39434d1e5dbeb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:3555-3560 | crates/ai-memory-store/src/reader.rs:3760-3765 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-store/src/reader.rs"},"region":{"startLine":3555}}}],"partialFingerprints":{"codehealthFindingId/v1":"a277a9af481de36f6a517e1d30dbd36cfaaf0544f83762b1e9c628f8cc5685f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:4383-4388 | crates/ai-memory-store/src/reader.rs:4484-4489 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/reader.rs:4383\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/reader.rs"},"region":{"startLine":4383}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca48822a506ae58b1145127bc74c8139ea003fd14d6577a5594d52ff27a10d95"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:4937-4942 | crates/ai-memory-store/src/reader.rs:8057-8062 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/reader.rs:4937\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/ai-memory-store/src/reader.rs:4944\u0060 calls \u0060from_slice\u0060 and \u0060crates/ai-memory-store/src/reader.rs:8064\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/ai-memory-store/src/reader.rs"},"region":{"startLine":4937}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1bb8e85b1de3ce7905ef0dfea960c00c58956ed1edc7bbda657a751029a9d71"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:6782-6787 | crates/ai-memory-store/src/reader.rs:7021-7026 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-store/src/reader.rs"},"region":{"startLine":6782}}}],"partialFingerprints":{"codehealthFindingId/v1":"f412efe59837076bce0e82ceaf9e36e7028bb7a7a91f8c01c0331b9510ddb079"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (3\u20136 lines \u00D7 8): crates/ai-memory-store/src/reader.rs:3429-3431 | crates/ai-memory-store/src/reader.rs:3794-3796 | crates/ai-memory-store/src/reader.rs:4789-4791 | crates/ai-memory-store/src/reader.rs:4875-4877 | crates/ai-memory-store/src/reader.rs:4931-4934 | crates/ai-memory-store/src/reader.rs:7977-7982 | crates/ai-memory-store/src/reader.rs:8187-8192 | crates/ai-memory-store/src/reader.rs:8336-8339 \u2014 all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/reader.rs:3429\u0060 it does not close everything it opens, so those exact 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/ai-memory-store/src/reader.rs:7982\u0060 calls \u0060get\u0060 and \u0060crates/ai-memory-store/src/reader.rs:3431\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/ai-memory-store/src/reader.rs"},"region":{"startLine":3429}}}],"partialFingerprints":{"codehealthFindingId/v1":"184ab7609ace92575dbba5bdca4242558edcc74154296d47a19d76f9b63b8be4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:9294-9299 | crates/ai-memory-store/src/reader.rs:9340-9345 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/reader.rs:9294\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/reader.rs"},"region":{"startLine":9294}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ac09d3b0826dd1312ca53c92092d1f936a631b3eff44083dbfc82df087bc5da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/ai-memory-store/src/workstream.rs:910-915 | crates/ai-memory-store/src/workstream.rs:2118-2123 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/workstream.rs:910\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060input\u0060 to \u0060\u0026PrepareWorkstreamRun\u0060 in one and \u0060\u0026RenameWorkstream\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/ai-memory-store/src/workstream.rs"},"region":{"startLine":910}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2a5a8cda6d29aa84dccfb39719a34cfb35d58268f128bf28fc13e997d9c925c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/ai-memory-workstream/src/transcript.rs:703-708 | crates/ai-memory-workstream/src/transcript.rs:962-967 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":703}}}],"partialFingerprints":{"codehealthFindingId/v1":"578209487acb1437a00e7743d52325b4ef0ff0cf0ee486c051dc9630ee6909be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/ai-memory-workstream/src/transcript.rs:4650-4656 | crates/ai-memory-workstream/src/transcript.rs:4691-4697 \u2014 both copies are in the same file, so extract the block 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/ai-memory-workstream/src/transcript.rs:4647\u0060 calls \u0060parse_str\u0060, \u0060is_err\u0060, \u0060Ok\u0060 and \u0060crates/ai-memory-workstream/src/transcript.rs:4690\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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":4650}}}],"partialFingerprints":{"codehealthFindingId/v1":"d688789dfe57c788e8f8c073f53bfb06f6aedcbe094b9d5a37a72adfc6edb7cd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): evals/src/projection.rs:67-72 | evals/src/projection.rs:90-97 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060evals/src/projection.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":"evals/src/projection.rs"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc7ac0669557e344cddedda43997d8b3c79f57ef90c452f9ec8c5046d9b6cee7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 6): crates/ai-memory-store/src/grants.rs:377-381 | crates/ai-memory-store/src/profile.rs:156-160 | crates/ai-memory-store/src/profile.rs:507-511 | crates/ai-memory-store/src/profile.rs:782-786 | crates/ai-memory-store/src/reader.rs:3671-3675 | crates/ai-memory-store/src/reader.rs:12559-12563 \u2014 before extracting anything, compare \u0060crates/ai-memory-store/src/profile.rs\u0060 and \u0060crates/ai-memory-store/src/reader.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/ai-memory-store/src/grants.rs:377\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/grants.rs"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"38771cc1d11edf76d60139b2bd3e4802ae8e7161468f107f451aa77cb81e435d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): crates/ai-memory-cli/src/commands/install_mcp.rs:1830-1834 | crates/ai-memory-cli/src/commands/install_mcp.rs:1924-1928 | crates/ai-memory-cli/src/commands/install_mcp.rs:1936-1940 | crates/ai-memory-cli/src/commands/install_mcp.rs:1941-1951 \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/ai-memory-cli/src/commands/install_mcp.rs:1830\u0060 it begins part-way through the construct above it, so those exact 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/ai-memory-cli/src/commands/install_mcp.rs:1952\u0060 calls \u0060insert\u0060, \u0060into\u0060 and \u0060crates/ai-memory-cli/src/commands/install_mcp.rs:1835\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/ai-memory-cli/src/commands/install_mcp.rs"},"region":{"startLine":1830}}}],"partialFingerprints":{"codehealthFindingId/v1":"448a1f138c258719db0a64dbd7eefe5e0f2d4aed68e250ed87957da2b9c38f67"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): crates/ai-memory-consolidate/src/auto_improve_schedule.rs:665-674 | crates/ai-memory-mcp/src/admin.rs:687-696 | crates/ai-memory-mcp/src/server.rs:8189-8198 \u2014 before extracting anything, compare \u0060crates/ai-memory-consolidate/src/auto_improve_schedule.rs\u0060 and \u0060crates/ai-memory-mcp/src/admin.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. 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/ai-memory-consolidate/src/auto_improve_schedule.rs"},"region":{"startLine":665}}}],"partialFingerprints":{"codehealthFindingId/v1":"711f38c3a43d2a0967176db587adbe0eb11b675325a79872d2ab0587cbf200d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/ai-memory-mcp/src/admin.rs:2920-2924 | crates/ai-memory-mcp/src/admin.rs:4026-4030 | crates/ai-memory-mcp/src/admin.rs:9311-9315 \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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":2920}}}],"partialFingerprints":{"codehealthFindingId/v1":"94ed6740fa8a7ea26c81ebb43110a30f9f9c3943a2c4c1fdfa16ca2eb570d937"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/ai-memory-store/src/reader.rs:4186-4190 | crates/ai-memory-store/src/reader.rs:9001-9005 | crates/ai-memory-store/src/reader.rs:9021-9025 \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/ai-memory-store/src/reader.rs:4186\u0060 it begins part-way through the construct above it, so those exact 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/ai-memory-store/src/reader.rs:9019\u0060 calls \u0060clone\u0060 and \u0060crates/ai-memory-store/src/reader.rs:4184\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/ai-memory-store/src/reader.rs"},"region":{"startLine":4186}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5a45c2860da3e820b6faeb93518c563156c289a557e8ccb630558f52ee5d7c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): crates/ai-memory-store/src/reader.rs:10173-10179 | crates/ai-memory-store/src/reader.rs:10187-10193 | crates/ai-memory-store/src/reader.rs:10270-10276 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":10173}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4cfc185cb35dc898c5c3889289b10c18118c3b428b57bfaab2159686a51e8f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): companions/ai-memory-importer/src/agentmemory/export.rs:139-144 | companions/ai-memory-importer/src/claude_mem.rs:99-104 \u2014 before extracting anything, compare \u0060companions/ai-memory-importer/src/agentmemory/export.rs\u0060 and \u0060companions/ai-memory-importer/src/claude_mem.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-importer/src/agentmemory/export.rs"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bc76f11c9460f25abc1fafda1e03093c4a2f31272e3250433fd158778ffc628"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/ai-memory-cli/src/commands/hook_spool.rs:892-896 | crates/ai-memory-cli/src/server_profiles.rs:535-539 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/ai-memory-cli/src/commands/hook_spool.rs"},"region":{"startLine":892}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee3f6df0ac15bb9d943e40827ad6216352c51f185b9c941b5c0a55e3cc1c7076"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/ai-memory-cli/src/commands/install_hooks.rs:3062-3069 | crates/ai-memory-cli/src/commands/install_hooks.rs:3467-3471 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-cli/src/commands/install_hooks.rs:3062\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":3062}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ef5d1d7b74627cbb916286d5f2c4e817f46f608a0269f6fcfc759c0a300a470"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/ai-memory-cli/src/commands/install_mcp.rs:1859-1863 | crates/ai-memory-cli/src/commands/install_mcp.rs:1874-1878 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-cli/src/commands/install_mcp.rs:1859\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/ai-memory-cli/src/commands/install_mcp.rs"},"region":{"startLine":1859}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d877c56e91e440cea6545128eb6504b56226164f1cfee9781631e2f76e28c0f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/ai-memory-cli/src/commands/show.rs:838-843 | crates/ai-memory-cli/src/commands/show.rs:965-970 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-cli/src/commands/show.rs"},"region":{"startLine":838}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ad69dd1c0b9ec807fc895f3c6db0b4ffe4cff6bac02bd610b6cea84aa987a7c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/ai-memory-consolidate/src/bootstrap.rs:675-679 | crates/ai-memory-consolidate/src/consolidator.rs:1118-1122 \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/ai-memory-consolidate/src/bootstrap.rs:675\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/bootstrap.rs"},"region":{"startLine":675}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b9570d25b40ab94ccdd685e02d21b3a1f2204b692ba19dde3fac2086665cb48"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/ai-memory-consolidate/src/bootstrap.rs:887-891 | crates/ai-memory-consolidate/src/bootstrap.rs:898-902 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-consolidate/src/bootstrap.rs:887\u0060 it begins part-way through the construct above it, so those exact 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/ai-memory-consolidate/src/bootstrap.rs"},"region":{"startLine":887}}}],"partialFingerprints":{"codehealthFindingId/v1":"429fa25ff1c2972ad88c362d8acaf5b01829931bf1143675c4549d0b9e20746c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:787-792 | crates/ai-memory-consolidate/src/projection.rs:1322-1327 \u2014 before extracting anything, compare \u0060crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs\u0060 and \u0060crates/ai-memory-consolidate/src/projection.rs\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 354 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":787}}}],"partialFingerprints":{"codehealthFindingId/v1":"79b79f9efc9f1b131ddc8bd6a5b57ca2eefada19d6d7fde70883878657c78bcc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/ai-memory-hooks/src/router.rs:4392-4397 | crates/ai-memory-mcp/src/admin.rs:4265-4270 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/ai-memory-hooks/src/router.rs"},"region":{"startLine":4392}}}],"partialFingerprints":{"codehealthFindingId/v1":"0086d2e35d477df6d8dcc56a22dda622536b1e89d91a32ab150977d717ec9303"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/ai-memory-mcp/src/admin.rs:994-998 | crates/ai-memory-mcp/src/admin.rs:1165-1169 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-mcp/src/admin.rs:994\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/admin.rs"},"region":{"startLine":994}}}],"partialFingerprints":{"codehealthFindingId/v1":"30b6ccb6490bca9296359b1ee3ea5dc4b1ecb8c12a687df023fe5e1ffa4a3e5b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/ai-memory-store/src/project_coordinates.rs:193-198 | crates/ai-memory-store/src/workstream.rs:1834-1838 \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/ai-memory-store/src/project_coordinates.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/project_coordinates.rs"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"88a3595d0c860fc6571f34af3421d64af74bcfac196138b6e925fdb66a4842c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (4\u20135 lines \u00D7 6): crates/ai-memory-store/src/reader.rs:3490-3494 | crates/ai-memory-store/src/reader.rs:3860-3864 | crates/ai-memory-store/src/reader.rs:4027-4030 | crates/ai-memory-store/src/reader.rs:4728-4731 | crates/ai-memory-store/src/reader.rs:9401-9404 | crates/ai-memory-store/src/workstream.rs:2012-2015 \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/ai-memory-store/src/reader.rs:3490\u0060 it begins part-way through the construct above it, so those exact 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/ai-memory-store/src/reader.rs"},"region":{"startLine":3490}}}],"partialFingerprints":{"codehealthFindingId/v1":"51f65d72364b9e6bd80a00d2fb3d407c83a6b48d2c72e7dd96e60bb34f4ecb2b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/ai-memory-store/src/reader.rs:7632-7636 | crates/ai-memory-store/src/reader.rs:11825-11831 | crates/ai-memory-store/src/reader.rs:12122-12126 \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/ai-memory-store/src/reader.rs:7632\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/ai-memory-store/src/reader.rs"},"region":{"startLine":7632}}}],"partialFingerprints":{"codehealthFindingId/v1":"b484413527b3543106aa53c96935c988446fe5f74c4aebd46478a4c777545fb3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-wiki/src/watcher.rs:930-937 | crates/ai-memory-wiki/src/watcher.rs:953-960 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-wiki/src/watcher.rs"},"region":{"startLine":930}}}],"partialFingerprints":{"codehealthFindingId/v1":"b84c04c1019a49e988d1527a19957a9eff6df8398cb8b5e68750fd2b014db90a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/ai-memory-wiki/src/wiki.rs:584-588 | crates/ai-memory-wiki/src/wiki.rs:609-613 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-wiki/src/wiki.rs"},"region":{"startLine":584}}}],"partialFingerprints":{"codehealthFindingId/v1":"024feee3b214031aacffd40857dec63dc49bcc9adcadd231a11d4dbbc27ee462"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): crates/ai-memory-wiki/src/wiki.rs:1702-1719 | crates/ai-memory-wiki/src/wiki.rs:1743-1760 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-wiki/src/wiki.rs:1702\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-wiki/src/wiki.rs"},"region":{"startLine":1702}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ce3e493b79a3a6bd735af08269f178a8b894d4a4b6b4a2655f2e01ac40cb729"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/ai-memory-wiki/src/wiki.rs:2239-2244 | crates/ai-memory-wiki/src/wiki.rs:2256-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/ai-memory-wiki/src/wiki.rs:2239\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/ai-memory-wiki/src/wiki.rs"},"region":{"startLine":2239}}}],"partialFingerprints":{"codehealthFindingId/v1":"f423308d1e21c200ca71fdd8867009440b8c95c46af9fbae443e01e9867e27e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/ai-memory-workstream/src/jail.rs:902-906 | crates/ai-memory-workstream/src/jail_contract.rs:245-249 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-workstream/src/jail.rs"},"region":{"startLine":902}}}],"partialFingerprints":{"codehealthFindingId/v1":"55e03787fa3400a9c85fcde1ec93f9a62ecb40cc8b4933ed4c58703c9e291675"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/ai-memory-workstream/src/transcript.rs:3043-3049 | crates/ai-memory-workstream/src/transcript.rs:3179-3183 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-workstream/src/transcript.rs:3043\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":3043}}}],"partialFingerprints":{"codehealthFindingId/v1":"56f73f78036571254cb265b7dd915c608f91cebe1360ee62a7985439e37431c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-workstream/src/transcript.rs:5617-5624 | crates/ai-memory-workstream/src/transcript.rs:6224-6231 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-workstream/src/transcript.rs:5617\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":5617}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bf45d45e044085a5417567ee82da32e48b40839046333e0f64a117df080ecae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): companions/ai-memory-client/src/scrub.rs:133-143 | crates/ai-memory-core/src/sanitize.rs:116-126 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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":"companions/ai-memory-client/src/scrub.rs"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bd8c8ed5622d88712f5832764b4d2ee8b2903c54656ccf4fbe29b4dcc97d9cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): companions/ai-memory-importer/src/mcp.rs:546-551 | companions/ai-memory-wikisync/src/mcp.rs:283-288 \u2014 before extracting anything, compare \u0060companions/ai-memory-importer/src/mcp.rs\u0060 and \u0060companions/ai-memory-wikisync/src/mcp.rs\u0060 as WHOLE FILES: this scan already matched 5 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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":"companions/ai-memory-importer/src/mcp.rs"},"region":{"startLine":546}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b8592dd64523efc24cbfe7449d0a62612bfa1015d3d39746289f08057934fc5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): companions/ai-memory-wikisync/src/atomic.rs:166-172 | crates/ai-memory-wiki/src/atomic.rs:123-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-wikisync/src/atomic.rs"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7d7ef7ce00fed80566abf7819ac76613d50788f7effaf8f7e02c84ea9d34baf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-cli/src/commands/hook_spool.rs:262-269 | crates/ai-memory-llm/src/auth_file.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/hook_spool.rs"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a41e248905e704d8881ca57160acdd137f5dab8606e807343439527954c76ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/ai-memory-cli/src/commands/install_hooks.rs:2139-2144 | crates/ai-memory-workstream/src/transcript.rs:6504-6509 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":2139}}}],"partialFingerprints":{"codehealthFindingId/v1":"4716a3d42642990c76cf8680e35b0e1b61d422b4e5098afbbc3a0cfbb6b88164"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/ai-memory-cli/src/commands/install_hooks.rs:7106-7111 | crates/ai-memory-cli/src/commands/setup_agent.rs:880-885 \u2014 before extracting anything, compare \u0060crates/ai-memory-cli/src/commands/install_hooks.rs\u0060 and \u0060crates/ai-memory-cli/src/commands/setup_agent.rs\u0060 as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":7106}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd720cb5ef0246586c57ca7d7d18c230c189a5a26ce6ebf51799833125c88d70"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/ai-memory-cli/src/commands/project_registry.rs:496-500 | crates/ai-memory-cli/src/commands/recovery.rs:391-395 \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/ai-memory-cli/src/commands/project_registry.rs"},"region":{"startLine":496}}}],"partialFingerprints":{"codehealthFindingId/v1":"4398e4d95b1dd974c43dbeb633148a12e819763f00debc8a8ee96451bb97f07d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/ai-memory-cli/src/commands/serve.rs:618-623 | crates/ai-memory-wiki/src/backup.rs:65-70 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/ai-memory-cli/src/commands/serve.rs"},"region":{"startLine":618}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ef2ef0547623b117c45e7ff405ec6ec4d8597dedd5318c8bff4f110317f65b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:286-295 | crates/ai-memory-consolidate/src/projection.rs:724-733 \u2014 before extracting anything, compare \u0060crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs\u0060 and \u0060crates/ai-memory-consolidate/src/projection.rs\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 354 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"93794c4622dbd2036f9c0b0f8a90d07cf1cfb2fbfc8386b92a976246223248a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:312-322 | crates/ai-memory-consolidate/src/projection.rs:750-760 \u2014 before extracting anything, compare \u0060crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs\u0060 and \u0060crates/ai-memory-consolidate/src/projection.rs\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 354 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":312}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a0d8951ebd7a76966d8d95bc7ca45d65fc05ab6cc41117ef7d3ed8da46292f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:336-346 | crates/ai-memory-consolidate/src/projection.rs:774-784 \u2014 before extracting anything, compare \u0060crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs\u0060 and \u0060crates/ai-memory-consolidate/src/projection.rs\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 354 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f620243b301069b1401be9f79a96af69a47ff505acc9c4b6c7a8aa068a78e26"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs:566-571 | crates/ai-memory-consolidate/src/projection.rs:1097-1102 \u2014 before extracting anything, compare \u0060crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs\u0060 and \u0060crates/ai-memory-consolidate/src/projection.rs\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 354 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":566}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f60d19167c8d751c2e45402d3aca69f9c224314d510d23bf2b009895dcc4fd9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/ai-memory-consolidate/src/embed.rs:244-250 | crates/ai-memory-wiki/src/wiki.rs:4207-4213 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/ai-memory-consolidate/src/embed.rs"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"96e87456a695f3983d299707ca8b251f1db7150e292562cb67ab1bbaee2f6cd2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/ai-memory-consolidate/src/profile.rs:1147-1156 | crates/ai-memory-hooks/src/router.rs:3727-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/profile.rs"},"region":{"startLine":1147}}}],"partialFingerprints":{"codehealthFindingId/v1":"45462873f6209ffef664872751d9842d002e9fca867815d3f1b1932010077d89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/ai-memory-hooks/src/workstream.rs:1527-1533 | crates/ai-memory-store/src/lib.rs:344-350 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/ai-memory-hooks/src/workstream.rs"},"region":{"startLine":1527}}}],"partialFingerprints":{"codehealthFindingId/v1":"7edef063b6ca6e6ec500e7f678d58a920be29b5969b3f039b54324e2b03bbecf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/ai-memory-llm/src/codex.rs:181-191 | crates/ai-memory-llm/src/openai_oauth.rs:235-245 \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/ai-memory-llm/src/codex.rs"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a753dae6d7a47901aed01ef3e8197a5c4facf7c583053c6c0f09f8acb4650b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-mcp/src/self_service_keys.rs:48-55 | crates/ai-memory-mcp/src/session_management.rs:57-64 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/self_service_keys.rs"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"fad6c26c05ad559e3b4d640855ab74e57fb2be7635a19208974cf835c9ea0b99"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-web/src/markdown.rs:257-264 | crates/ai-memory-wiki/src/markdown.rs:881-888 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/ai-memory-web/src/markdown.rs"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe4eff594a03d043216e9704b71c48dd258927e1a4c2a38df49658427c514912"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/ai-memory-web/src/routes/pending.rs:152-158 | crates/ai-memory-web/src/routes/workstreams.rs:123-129 \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/ai-memory-web/src/routes/pending.rs"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffb453501829f2078331e8d0678efd7ad48a1433ab37597e6591355775133e72"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/ai-memory-cli/src/commands/backfill.rs:550-554 | crates/ai-memory-cli/src/commands/mod.rs:14-18 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/backfill.rs"},"region":{"startLine":550}}}],"partialFingerprints":{"codehealthFindingId/v1":"943ad6d1dc50b5c0f7f7fecd3fb6be639affcfc46fb36bbf14e1f28e5552423e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/ai-memory-cli/src/commands/continue_session.rs:141-146 | crates/ai-memory-cli/src/commands/list_projects.rs:91-99 \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/ai-memory-cli/src/commands/continue_session.rs"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"fbe4c28edefedcade90e0c860ed4683282e346d8e9797c36ab1926fe1724194d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26 lines \u00D7 2): crates/ai-memory-store/src/workstream.rs:1879-1904 | crates/ai-memory-store/src/workstream.rs:1964-2010 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/workstream.rs:1879\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/ai-memory-store/src/workstream.rs"},"region":{"startLine":1879}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5db1749e78c5d7f8c9c083103e2f9234b8b64141e670c99ffeb51655a0d073f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:5750-5762 | crates/ai-memory-store/src/reader.rs:6153-6179 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-store/src/reader.rs"},"region":{"startLine":5750}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5fdc05877ea8fa66c7b350be9d6678b76385c39c7803b857d1960dfbad61b4d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:3769-3792 | crates/ai-memory-store/src/reader.rs:3839-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/reader.rs"},"region":{"startLine":3769}}}],"partialFingerprints":{"codehealthFindingId/v1":"4639bcbd9cd11d99af99bb5cd948fefc3d1a1ad454a02631096675d6f2024dfe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:7513-7532 | crates/ai-memory-store/src/reader.rs:16078-16094 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/reader.rs:7513\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/ai-memory-store/src/reader.rs"},"region":{"startLine":7513}}}],"partialFingerprints":{"codehealthFindingId/v1":"39f6a2e8b9ab226ae1848b82688d8fea00e7953d0f1844da1e04a27f4788545b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/ai-memory-store/src/provenance.rs:67-85 | crates/ai-memory-store/src/reader.rs:5623-5631 \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/ai-memory-store/src/provenance.rs"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"4073aa7368b1ca69f0c9d9bb5b9e10cb12c759c916bc6e39a1468c63ab335c59"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): crates/ai-memory-wiki/src/wiki.rs:3917-3934 | crates/ai-memory-wiki/src/wiki.rs:3964-3977 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-wiki/src/wiki.rs:3917\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-wiki/src/wiki.rs"},"region":{"startLine":3917}}}],"partialFingerprints":{"codehealthFindingId/v1":"6889c5bd330fb90a74adeb60cbbc009154a5d804eb2fe65283c0f7c8e2052254"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:3468-3483 | crates/ai-memory-store/src/reader.rs:3643-3660 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/reader.rs:3468\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/ai-memory-store/src/reader.rs"},"region":{"startLine":3468}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea2bc86270f8a3886df3060903068dd790637205250356b1fb892532c1495340"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/ai-memory-cli/src/commands/auto_improve_report.rs:103-118 | crates/ai-memory-cli/src/commands/curator.rs:97-112 \u2014 before extracting anything, compare \u0060crates/ai-memory-cli/src/commands/auto_improve_report.rs\u0060 and \u0060crates/ai-memory-cli/src/commands/curator.rs\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/ai-memory-cli/src/commands/auto_improve_report.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. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060report\u0060 to \u0060\u0026AutoImproveTelemetryReport\u0060 in one and \u0060\u0026CuratorReport\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/ai-memory-cli/src/commands/auto_improve_report.rs"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce38c9354f93565bc22e7b975cd3ef0381cf0807e1ef3c6db14e8ad760d49b69"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): crates/ai-memory-cli/src/commands/purge_project.rs:61-75 | crates/ai-memory-cli/src/commands/purge_session.rs:51-66 \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/ai-memory-cli/src/commands/purge_project.rs:61\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/purge_project.rs"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"03e9a6144e780bf80bc912d1bae3564636a0473c165c8cf21380925632c5d146"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/ai-memory-hooks/src/router.rs:1401-1411 | crates/ai-memory-hooks/src/router.rs:4828-4843 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-hooks/src/router.rs:1401\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/ai-memory-hooks/src/router.rs"},"region":{"startLine":1401}}}],"partialFingerprints":{"codehealthFindingId/v1":"c00bf7551a6079659b029b9fca53972d6c137ca562fed8fe44dff10fda13f31e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): crates/ai-memory-cli/src/commands/install_hooks.rs:3185-3200 | crates/ai-memory-cli/src/commands/install_hooks.rs:4182-4194 | crates/ai-memory-cli/src/commands/install_hooks.rs:4416-4428 \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/ai-memory-cli/src/commands/install_hooks.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":3185}}}],"partialFingerprints":{"codehealthFindingId/v1":"31f4bd96c6d33de576815509b060221cf1594510509006909c662dba8b799170"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/ai-memory-store/src/ops.rs:2783-2796 | crates/ai-memory-store/src/ops.rs:5324-5330 | crates/ai-memory-store/src/ops.rs:5389-5394 \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/ai-memory-store/src/ops.rs:2783\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/ops.rs"},"region":{"startLine":2783}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5ad16f0bba938012bfe2b3f13e10e5421a94bf668948fe08920258e7c94672e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): crates/ai-memory-cli/src/commands/auth.rs:380-393 | crates/ai-memory-cli/src/commands/auth.rs:445-458 | crates/ai-memory-cli/src/commands/auth.rs:486-499 \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/ai-memory-cli/src/commands/auth.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/ai-memory-cli/src/commands/auth.rs"},"region":{"startLine":380}}}],"partialFingerprints":{"codehealthFindingId/v1":"066a176c9e971334203b340141ba40584137ace4896d4223404b96659f13a39f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/ai-memory-cli/src/commands/pending_writes.rs:149-161 | crates/ai-memory-cli/src/commands/pending_writes.rs:177-189 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-cli/src/commands/pending_writes.rs:149\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060args\u0060 to \u0060PendingWriteIdArgs\u0060 in one and \u0060PendingWriteRejectArgs\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/ai-memory-cli/src/commands/pending_writes.rs"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"d95c549b544ffef074888d569d571ab81d50dc8a11427642bd6dbc282a96199b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/ai-memory-store/src/profile.rs:139-151 | crates/ai-memory-store/src/profile.rs:766-778 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/profile.rs:139\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/profile.rs"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3bd4ba1c22410e400e0699c5e213ea3e8a30a171a3210fca12c320589a3e694"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:7621-7631 | crates/ai-memory-store/src/reader.rs:8409-8421 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/reader.rs:7621\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/reader.rs"},"region":{"startLine":7621}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a3a8b5c66de8d97c06bf4bb2a7fabbe8b4945e11b851a74261c9770e3623eaf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/ai-memory-cli/src/commands/delete_page.rs:42-54 | crates/ai-memory-cli/src/commands/read_page.rs:71-79 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-cli/src/commands/delete_page.rs:42\u0060 it begins part-way through the construct above it, so those exact 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 \u0060DeletePageArgs\u0060 in one and \u0060ReadPageArgs\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/ai-memory-cli/src/commands/delete_page.rs"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f4b46c3744fa54e7ba74904076b83c5b502633d40dfab46f5db3b1f13b9a00b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/ai-memory-cli/src/commands/delete_page.rs:42-54 | crates/ai-memory-cli/src/commands/message.rs:465-472 | crates/ai-memory-cli/src/commands/read_page.rs:71-79 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-cli/src/commands/delete_page.rs:42\u0060 it begins part-way through the construct above it, so those exact 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 \u0060DeletePageArgs\u0060 in one and \u0060MessageCancelArgs\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/ai-memory-cli/src/commands/delete_page.rs"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"7346528e8e7d008c9c9d7ddb6d6c76e3f88bd4d7fbab05e409b5b61de1c1eb65"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): companions/ai-memory-importer/src/document.rs:221-233 | companions/ai-memory-importer/src/main.rs:329-341 | companions/ai-memory-importer/src/main.rs:437-445 \u2014 before extracting anything, compare \u0060companions/ai-memory-importer/src/document.rs\u0060 and \u0060companions/ai-memory-importer/src/main.rs\u0060 as WHOLE FILES: this scan already matched 4 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. If that is what happened, the fix is to keep one copy and have the other 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 \u0060companions/ai-memory-importer/src/document.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. Note first that the copies are not typed on the same thing: the declarations holding them bind \u0060args\u0060 to \u0060ConversationArgs\u0060 in one and \u0060OmcArgs\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":"companions/ai-memory-importer/src/document.rs"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ede2abe6e239e43c65a42e162ccd50e93c6526614e157a6883b73e9af263062"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): crates/ai-memory-store/src/users.rs:123-135 | crates/ai-memory-store/src/users.rs:162-174 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/users.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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060crates/ai-memory-store/src/users.rs:175\u0060 calls \u0060revoke_user_sessions\u0060 and \u0060crates/ai-memory-store/src/users.rs:136\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/ai-memory-store/src/users.rs"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"71d83f52ba87b50310bd7e68eb9e7111b277b84309cce31d46b2f808afc71c3a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): crates/ai-memory-store/src/reader.rs:9299-9310 | crates/ai-memory-store/src/reader.rs:9345-9355 | crates/ai-memory-store/src/reader.rs:9390-9399 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":9299}}}],"partialFingerprints":{"codehealthFindingId/v1":"5385315b7706ffc89fb361b30b8c90c593f894b7d9ba6b428d952ca8f1983b9f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/ai-memory-store/src/workstream.rs:1828-1837 | crates/ai-memory-store/src/workstream.rs:2194-2205 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/workstream.rs:1828\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/workstream.rs"},"region":{"startLine":1828}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f8a55f91c96d82cb3e2a35d564d46af229a9fa247134fdcf825893158078b24"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/ai-memory-mcp/src/admin.rs:9640-9651 | crates/ai-memory-mcp/src/admin.rs:9726-9737 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-mcp/src/admin.rs:9640\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/admin.rs"},"region":{"startLine":9640}}}],"partialFingerprints":{"codehealthFindingId/v1":"5aa815e6334029e040315bfdeaade8acabf4936d13101d00a0e79f8df3715959"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): crates/ai-memory-cli/src/commands/install_hooks.rs:2756-2767 | crates/ai-memory-cli/src/commands/install_hooks.rs:2837-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/ai-memory-cli/src/commands/install_hooks.rs:2756\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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":2756}}}],"partialFingerprints":{"codehealthFindingId/v1":"354526bea9cd65237bfbeb2243717420fb9a0f6690258a8745fb0ec97691aa4a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/ai-memory-cli/src/commands/checkpoints.rs:42-51 | crates/ai-memory-cli/src/commands/workstream_search.rs:29-39 \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/ai-memory-cli/src/commands/checkpoints.rs:42\u0060 it begins part-way through the construct above it, so those exact 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/ai-memory-cli/src/commands/workstream_search.rs:40\u0060 calls \u0060display_label\u0060 and \u0060crates/ai-memory-cli/src/commands/checkpoints.rs:52\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/ai-memory-cli/src/commands/checkpoints.rs"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"c0fb9a6d8d13c313b17eccf9144285ed1c73e6417faacdb689856278c2828e77"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/ai-memory-mcp/src/admin.rs:910-920 | crates/ai-memory-mcp/src/admin_profile.rs:81-89 \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/ai-memory-mcp/src/admin.rs:910\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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":910}}}],"partialFingerprints":{"codehealthFindingId/v1":"69e14404efcbf651a45890133824877555d4f0c9a38f1208fb95e65b33d9c7a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): crates/ai-memory-cli/src/commands/install_hooks.rs:8066-8076 | crates/ai-memory-cli/src/commands/install_hooks.rs:8229-8239 | crates/ai-memory-cli/src/commands/install_hooks.rs:8315-8325 \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/ai-memory-cli/src/commands/install_hooks.rs:8066\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":8066}}}],"partialFingerprints":{"codehealthFindingId/v1":"8353e3ce537107f4e3af8cbb96466111b11afd9942a23be63eac4fb8afbf4a33"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): crates/ai-memory-workstream/src/transcript.rs:5634-5649 | crates/ai-memory-workstream/src/transcript.rs:6241-6256 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-workstream/src/transcript.rs:5634\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":5634}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ad02e5695705f47ff9e08c8a03d4d3e14aa5504015230d0114665bf936255cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/ai-memory-mcp/src/admin.rs:5099-5109 | crates/ai-memory-mcp/src/admin.rs:5723-5733 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":5099}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a68182c8c8b29e31b2fd72e4eeda065107e5df9ed7cc9c1fe1d9f32915dee31"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/ai-memory-cli/src/commands/auth.rs:641-647 | crates/ai-memory-cli/src/commands/auth.rs:669-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 \u0060crates/ai-memory-cli/src/commands/auth.rs:641\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/auth.rs"},"region":{"startLine":641}}}],"partialFingerprints":{"codehealthFindingId/v1":"93bac0de4ceb100719fe45f46f6d2b66c83cc82782c2c06ba7de979fef408713"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): companions/ai-memory-importer/src/agentmemory/export.rs:888-898 | companions/ai-memory-importer/src/agentmemory/export.rs:901-910 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060companions/ai-memory-importer/src/agentmemory/export.rs:888\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":"companions/ai-memory-importer/src/agentmemory/export.rs"},"region":{"startLine":888}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a8f9a6a7f9822038c211e2af83d141ce9938c62af2747ea1c51e8992ce808de"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/ai-memory-mcp/src/server.rs:3258-3268 | crates/ai-memory-mcp/src/server.rs:6694-6704 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-mcp/src/server.rs:3258\u0060 it begins part-way through the construct above it, so those exact 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/ai-memory-mcp/src/server.rs"},"region":{"startLine":3258}}}],"partialFingerprints":{"codehealthFindingId/v1":"2079b21cdead974520807fb2dc6fa20c02b4a36df2e448795660d0ab6d2b45d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): crates/ai-memory-workstream/src/harness.rs:509-519 | crates/ai-memory-workstream/src/harness.rs:563-573 \u2014 both copies are in the same file, so extract the block 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/ai-memory-workstream/src/harness.rs"},"region":{"startLine":509}}}],"partialFingerprints":{"codehealthFindingId/v1":"8af1cb3bb70c5b8716d91b01642aea5614af6d8c789f8c7abc51b9dcad0fc0f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/ai-memory-cli/src/commands/install_hooks.rs:6102-6111 | crates/ai-memory-cli/src/commands/install_hooks.rs:6199-6208 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":6102}}}],"partialFingerprints":{"codehealthFindingId/v1":"2837978255c7a36f3e10d08dc50f6a4ee889c6eab0623ae255844e9f9265826d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/ai-memory-mcp/src/server.rs:6528-6537 | crates/ai-memory-mcp/src/server.rs:7288-7293 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-mcp/src/server.rs:6528\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/server.rs"},"region":{"startLine":6528}}}],"partialFingerprints":{"codehealthFindingId/v1":"05d27be1327faf832c2aa6cdfe709a1f8cac1658d9b896482e08cc83bd40d2cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): crates/ai-memory-cli/src/commands/auth.rs:215-224 | crates/ai-memory-cli/src/commands/auth.rs:289-298 | crates/ai-memory-cli/src/commands/auth.rs:324-333 | crates/ai-memory-cli/src/commands/auth.rs:339-348 \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/ai-memory-cli/src/commands/auth.rs:215\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/auth.rs"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"304e2cfac1f59164d4b0c63cc92bd1792faf0ba4bdef3a3f258ff2223f03334b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/ai-memory-mcp/src/admin.rs:7231-7240 | crates/ai-memory-mcp/src/admin.rs:8839-8847 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-mcp/src/admin.rs:7231\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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":7231}}}],"partialFingerprints":{"codehealthFindingId/v1":"916587018153e3a401d0ee2eca3ffef29b208c0d16d40b217fe32da64732a2c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): crates/ai-memory-cli/src/commands/move_project.rs:192-201 | crates/ai-memory-cli/src/commands/move_project.rs:215-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/ai-memory-cli/src/commands/move_project.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/ai-memory-cli/src/commands/move_project.rs"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"8df9464ea883d51bc50bfbb19d6b4ef383f54b153ed01b2af3779ebbca249c05"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/ai-memory-store/src/profile.rs:553-562 | crates/ai-memory-store/src/reader.rs:7764-7768 \u2014 before extracting anything, compare \u0060crates/ai-memory-store/src/profile.rs\u0060 and \u0060crates/ai-memory-store/src/reader.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/ai-memory-store/src/profile.rs:553\u0060 it begins part-way through the construct above it, so those exact 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/ai-memory-store/src/reader.rs:7762\u0060 calls \u0060with_conn\u0060 and \u0060crates/ai-memory-store/src/profile.rs:551\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/ai-memory-store/src/profile.rs"},"region":{"startLine":553}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3af4ee7989101e2948e74927aae55f4cad97f63b58ac60a8c5356584bcc6dcd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 4): crates/ai-memory-mcp/src/admin.rs:9692-9699 | crates/ai-memory-mcp/src/admin.rs:9721-9729 | crates/ai-memory-mcp/src/admin.rs:9751-9758 | crates/ai-memory-mcp/src/admin.rs:9775-9782 \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/ai-memory-mcp/src/admin.rs:9692\u0060 it does not close everything it opens, so those exact 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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":9692}}}],"partialFingerprints":{"codehealthFindingId/v1":"01d935a27e6392b30d72537f8f45866a8387a620add89ee0ee196bf790b2872b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): crates/ai-memory-store/src/provenance.rs:56-63 | crates/ai-memory-store/src/reader.rs:11188-11196 | crates/ai-memory-store/src/reader.rs:11311-11319 \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/ai-memory-store/src/provenance.rs"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"53b791caac03f53efdae5c1350a7182cdb9a4b9eed450d865ac116aa3d7d41fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/ai-memory-mcp/src/admin.rs:9814-9822 | crates/ai-memory-mcp/src/admin.rs:9869-9877 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-mcp/src/admin.rs:9814\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/admin.rs"},"region":{"startLine":9814}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d5bb7622e5b3922edbd257200aa93060d70c0e68c7af704db05248516ab7449"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): companions/ai-memory-importer/src/mcp.rs:116-124 | companions/ai-memory-importer/src/mcp.rs:302-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":"companions/ai-memory-importer/src/mcp.rs"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"72c6868230e2f3147c74a1c5afb5128dbb57e17311a791b163ccf8b22eb8ce9d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/ai-memory-cli/src/commands/pending_writes.rs:139-147 | crates/ai-memory-cli/src/commands/pending_writes.rs:167-175 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-cli/src/commands/pending_writes.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 first that the copies are not typed on the same thing: the declarations holding them bind \u0060args\u0060 to \u0060PendingWriteIdArgs\u0060 in one and \u0060PendingWriteRejectArgs\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/ai-memory-cli/src/commands/pending_writes.rs"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"e997c0e35775fce73cc3dca4e1e0aadb93b45160d4c469fdc73fe2db1453251c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-store/src/auto_improve.rs:578-585 | crates/ai-memory-store/src/reader.rs:6647-6655 \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/ai-memory-store/src/auto_improve.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/ai-memory-store/src/auto_improve.rs"},"region":{"startLine":578}}}],"partialFingerprints":{"codehealthFindingId/v1":"656b228aecc7ec686807bc5a8fe9924c852653e6a8356e97db0b696eee6b5bc2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/ai-memory-mcp/src/admin.rs:1365-1373 | crates/ai-memory-mcp/src/admin.rs:1748-1756 | crates/ai-memory-mcp/src/admin.rs:1884-1892 \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/ai-memory-mcp/src/admin.rs:1365\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/admin.rs"},"region":{"startLine":1365}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7bd89a7814474528aa2eeb979f5c35921dc8b2e61518f59cd1471c537b9e3fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): crates/ai-memory-cli/src/commands/install_hooks.rs:3262-3270 | crates/ai-memory-cli/src/commands/install_hooks.rs:3566-3574 | crates/ai-memory-cli/src/commands/install_hooks.rs:3657-3665 \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/ai-memory-cli/src/commands/install_hooks.rs:3262\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":3262}}}],"partialFingerprints":{"codehealthFindingId/v1":"080a206e0f7f31394c467388fd565adaafc258760cf8bbe5342533e4e07b0d06"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): crates/ai-memory-cli/src/commands/install_hooks.rs:8069-8077 | crates/ai-memory-cli/src/commands/install_hooks.rs:8150-8158 | crates/ai-memory-cli/src/commands/install_hooks.rs:8232-8240 | crates/ai-memory-cli/src/commands/install_hooks.rs:8318-8326 \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/ai-memory-cli/src/commands/install_hooks.rs:8069\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":8069}}}],"partialFingerprints":{"codehealthFindingId/v1":"eca6c9534836739866c2c305b64c1f3fa8741c269cd360aff5b8fef663b5ccd6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/ai-memory-llm/src/embedding.rs:168-176 | crates/ai-memory-llm/src/embedding.rs:627-635 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-llm/src/embedding.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/ai-memory-llm/src/embedding.rs"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"966126e409e2e6bc213d71659d7a5d5f7f6debde82fa59b170c4732e26dfb07b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 7): crates/ai-memory-cli/src/commands/install_hooks.rs:2771-2778 | crates/ai-memory-cli/src/commands/install_hooks.rs:2862-2870 | crates/ai-memory-cli/src/commands/install_hooks.rs:2964-2971 | crates/ai-memory-cli/src/commands/install_hooks.rs:3068-3075 | crates/ai-memory-cli/src/commands/install_hooks.rs:3261-3268 | crates/ai-memory-cli/src/commands/install_hooks.rs:3565-3572 | crates/ai-memory-cli/src/commands/install_hooks.rs:3656-3663 \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/ai-memory-cli/src/commands/install_hooks.rs:2771\u0060 it begins part-way through the construct above it, so those exact 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/ai-memory-cli/src/commands/install_hooks.rs:3065\u0060 calls \u0060insert\u0060, \u0060into\u0060 and \u0060crates/ai-memory-cli/src/commands/install_hooks.rs:2768\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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":2771}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e1e9be72892ef29bd92fa414f85573525560f0ff46f745ec84d46bc5321b44c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): crates/ai-memory-consolidate/src/auto_improve.rs:1988-1996 | crates/ai-memory-consolidate/src/auto_improve.rs:2004-2012 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-consolidate/src/auto_improve.rs:1988\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/ai-memory-consolidate/src/auto_improve.rs"},"region":{"startLine":1988}}}],"partialFingerprints":{"codehealthFindingId/v1":"e291774ed0e5ad97ea51b3973343eee2dae25e53efaca3483b064c6160cb0630"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-consolidate/src/auto_improve.rs:761-768 | crates/ai-memory-consolidate/src/experience.rs:254-261 \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/ai-memory-consolidate/src/auto_improve.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/auto_improve.rs"},"region":{"startLine":761}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f16026f3130ad8d7f3a57889181e9e19a77ac9adc2c4b360a54fc8c5a581f67"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-hooks/src/workstream.rs:663-670 | crates/ai-memory-hooks/src/workstream.rs:706-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/ai-memory-hooks/src/workstream.rs:663\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/ai-memory-hooks/src/workstream.rs"},"region":{"startLine":663}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dd8bae428adac441bfa9acd83374aa086edcac6cdd7aa4250bf4037164327d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-mcp/src/admin.rs:949-956 | crates/ai-memory-mcp/src/admin.rs:1051-1058 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":949}}}],"partialFingerprints":{"codehealthFindingId/v1":"36b4518324f40e9c5a641f0a83e6c5fa11d21fab9c77c603fc2db508ce8906d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-hooks/src/router.rs:1991-1998 | crates/ai-memory-hooks/src/router.rs:2512-2519 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-hooks/src/router.rs:1991\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/router.rs"},"region":{"startLine":1991}}}],"partialFingerprints":{"codehealthFindingId/v1":"3741d2fff01b59e76153ae989261a0ce47d283a8ac99fd322ebb0d37e780459a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/ai-memory-cli/src/commands/install_hooks.rs:8941-8947 | crates/ai-memory-cli/src/commands/restore_agents.rs:443-450 \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/ai-memory-cli/src/commands/install_hooks.rs:8941\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":8941}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0c0a9206400a1b195675b11c64f95e0e3e8bf7ab0755fe5f6b8dc27a76e1f5a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 5): crates/ai-memory-cli/src/commands/install_hooks.rs:8076-8083 | crates/ai-memory-cli/src/commands/install_hooks.rs:8157-8164 | crates/ai-memory-cli/src/commands/install_hooks.rs:8239-8246 | crates/ai-memory-cli/src/commands/install_hooks.rs:8325-8332 | crates/ai-memory-cli/src/commands/install_hooks.rs:8414-8421 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060crates/ai-memory-cli/src/commands/install_hooks.rs:8412\u0060 calls \u0060entry\u0060, \u0060or_insert_with\u0060, \u0060from\u0060 and \u0060crates/ai-memory-cli/src/commands/install_hooks.rs:8075\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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":8076}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8fc560422d7d64c6446efba219d5e23b1d5b9022b103d33fc4e0d1708b208d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): crates/ai-memory-cli/src/commands/reclaim_ledger_versions.rs:64-71 | crates/ai-memory-cli/src/commands/reclaim_ledger_versions.rs:89-96 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-cli/src/commands/reclaim_ledger_versions.rs"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"92bad315e0612aaf3ecd8a9ed139d4621c0c294bccff00e91f2c1afd63d94d2f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): companions/ai-memory-importer/src/document.rs:643-649 | companions/ai-memory-importer/src/document.rs:669-675 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060companions/ai-memory-importer/src/document.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":"companions/ai-memory-importer/src/document.rs"},"region":{"startLine":643}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f9bda73410e9394ae3c13abbc167ce07e9ba7dd62ca33dc6ef1b5040cca27ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/ai-memory-wiki/src/wiki.rs:1819-1825 | crates/ai-memory-wiki/src/wiki.rs:1972-1978 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-wiki/src/wiki.rs"},"region":{"startLine":1819}}}],"partialFingerprints":{"codehealthFindingId/v1":"a869ce3abad2cdd05c898dad032faa1956f89e78d53c25c1f7d097d28b96a7a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): crates/ai-memory-consolidate/src/bootstrap.rs:1267-1273 | crates/ai-memory-consolidate/src/bootstrap.rs:1313-1319 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-consolidate/src/bootstrap.rs:1267\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/bootstrap.rs"},"region":{"startLine":1267}}}],"partialFingerprints":{"codehealthFindingId/v1":"05200cc3a7170a1ac5ac9f0ea7f696008d77a23c515dafdc7b6fbef22fb6d806"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): companions/ai-memory-wikisync/src/bidi.rs:671-676 | companions/ai-memory-wikisync/src/hook.rs:173-178 \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 \u0060companions/ai-memory-wikisync/src/bidi.rs:671\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":"companions/ai-memory-wikisync/src/bidi.rs"},"region":{"startLine":671}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb3926efa4c4e28b6eba457c564488c645fa474851d1d41a2ea237530dc17233"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:5565-5570 | crates/ai-memory-store/src/reader.rs:6266-6271 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/reader.rs:5565\u0060 it begins part-way through the construct above it, so those exact 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/ai-memory-store/src/reader.rs:6272\u0060 calls \u0060get\u0060 and \u0060crates/ai-memory-store/src/reader.rs:5571\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/ai-memory-store/src/reader.rs"},"region":{"startLine":5565}}}],"partialFingerprints":{"codehealthFindingId/v1":"9342419c654c77bbe731a99b8da0c18fcec527add62102754b9401bedf249662"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/ai-memory-cli/src/commands/install_mcp.rs:1378-1383 | crates/ai-memory-cli/src/commands/install_mcp.rs:1410-1414 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-cli/src/commands/install_mcp.rs:1410\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/install_mcp.rs"},"region":{"startLine":1378}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ac58035b875b27d6aac711ce45298c62f9e232dfaeaa474482cfd2cf02dae1e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/ai-memory-store/src/ops.rs:8698-8703 | crates/ai-memory-store/src/ops.rs:8706-8711 | crates/ai-memory-store/src/ops.rs:8714-8719 \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/ai-memory-store/src/ops.rs:8698\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/ops.rs"},"region":{"startLine":8698}}}],"partialFingerprints":{"codehealthFindingId/v1":"25cd0c10d746b17c7787c77c612961f99b86e623b07465c69530db8f6f960c2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/ai-memory-cli/src/commands/restore.rs:502-507 | crates/ai-memory-cli/src/commands/restore.rs:510-515 \u2014 both copies are in the same file, so extract the block into one function there 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/ai-memory-cli/src/commands/restore.rs"},"region":{"startLine":502}}}],"partialFingerprints":{"codehealthFindingId/v1":"86290a80d8351854ad7fd1809b3408c8738648866844b424c988ecf8fe56698b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/ai-memory-cli/src/commands/forget_sweep.rs:27-32 | crates/ai-memory-cli/src/commands/lint.rs:25-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-cli/src/commands/forget_sweep.rs:27\u0060 it does not close everything it opens, so those exact 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 \u0060ForgetSweepArgs\u0060 in one and \u0060LintArgs\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/ai-memory-cli/src/commands/forget_sweep.rs"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a46ee58aff8e5480096ada7cceda11d79f6d3d76a85859321ba8508419bda39"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): crates/ai-memory-store/src/reader.rs:8136-8141 | crates/ai-memory-store/src/reader.rs:8317-8322 | crates/ai-memory-store/src/reader.rs:8393-8398 \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/ai-memory-store/src/reader.rs:8136\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/reader.rs"},"region":{"startLine":8136}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbb352ccb7e0729ad916ce610f8e5890353d343281c206a8f0498b495617648a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): companions/ai-memory-importer/src/agentmemory/mod.rs:191-195 | crates/ai-memory-cli/src/commands/install_hooks.rs:2386-2390 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060companions/ai-memory-importer/src/agentmemory/mod.rs:191\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-importer/src/agentmemory/mod.rs"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"4460064b5d5e3fa05c76afd829dcdc5ec04e12548663fe2bdf2df1498cd69e73"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): evals/src/abstention.rs:306-310 | evals/src/retrieval/mod.rs:431-435 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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":"evals/src/abstention.rs"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f28adf161d494feb347f493d25e65e43d0eb0c50a7358b43649c79d3abb8ea1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): crates/ai-memory-store/src/ops.rs:8697-8701 | crates/ai-memory-store/src/ops.rs:8705-8709 | crates/ai-memory-store/src/ops.rs:8713-8717 | crates/ai-memory-store/src/ops.rs:8721-8725 \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/ai-memory-store/src/ops.rs:8697\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/ai-memory-store/src/ops.rs"},"region":{"startLine":8697}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c3e372041a919c8bfe859977d9bf5ad1cb2a1c8b1c52c837a2e4359d176e9f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): companions/ai-memory-importer/src/agentmemory/mod.rs:600-604 | companions/ai-memory-importer/src/agentmemory/mod.rs:654-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 \u0060companions/ai-memory-importer/src/agentmemory/mod.rs:600\u0060 it begins part-way through the construct above it, so those exact 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":"companions/ai-memory-importer/src/agentmemory/mod.rs"},"region":{"startLine":600}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e342b1cfbc63cf177e41836c1e0f831deacd3273555e2874257526f1cf7d1dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): crates/ai-memory-cli/src/commands/install_hooks.rs:4120-4125 | crates/ai-memory-cli/src/commands/recovery.rs:180-185 \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/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":4120}}}],"partialFingerprints":{"codehealthFindingId/v1":"20ae4499341d1df9df947fe5acfc5d19edcb5c58f2497f72a59c241dfac3f860"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/ai-memory-cli/src/commands/project_registry.rs:489-493 | crates/ai-memory-cli/src/commands/recovery.rs:305-309 \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/ai-memory-cli/src/commands/project_registry.rs:489\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/ai-memory-cli/src/commands/project_registry.rs"},"region":{"startLine":489}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e64ef3be4522c2bea86ddfab06dc34e11d9b25843f8ffb67d7f4d556f4dc27f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): crates/ai-memory-store/src/reader.rs:4331-4335 | crates/ai-memory-store/src/reader.rs:15130-15134 | crates/ai-memory-store/src/reader.rs:15797-15801 \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/ai-memory-store/src/reader.rs"},"region":{"startLine":4331}}}],"partialFingerprints":{"codehealthFindingId/v1":"29ac13f32a4af22f15a26cde3e034923f77ac4e3e556db1d18cfc07d82c131f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/ai-memory-store/src/reader.rs:7431-7435 | crates/ai-memory-store/src/reader.rs:7476-7480 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060crates/ai-memory-store/src/reader.rs:7431\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/ai-memory-store/src/reader.rs"},"region":{"startLine":7431}}}],"partialFingerprints":{"codehealthFindingId/v1":"483035b72b075fe86901b12dbbc665bbd498cd46c9f86b23960b38903bfd52ac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): crates/ai-memory-wiki/src/markdown.rs:634-638 | crates/ai-memory-wiki/src/markdown.rs:744-748 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-wiki/src/markdown.rs"},"region":{"startLine":634}}}],"partialFingerprints":{"codehealthFindingId/v1":"123b907bf270a66fe73ab4fce2c199f8e73497abc8e7dc819148ee1aeab2ae79"}},{"ruleId":"D5","level":"warning","message":{"text":"Unstable project ai-memory-mcp: ai-memory-mcp has instability 0.83 with 1 dependents."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"e58ff2f02e06c69ee833221a14074561e2b5180f6c47b0db499f49baba0d90f5"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: ai-memory-client: ai-memory-client: 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":"c2b6476587624b5aea0fa1c05facbbbb1d1e298c79e2b9e725d742052af5f899"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: ai-memory-core: ai-memory-core: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 10 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"c3566627d0c63d1a740e0ef7a6d24c0ec4f0840b2dda8efe5b05a2b655d2f8a7"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: AIMemoryMenuCore: AIMemoryMenuCore: abstractness 0.09, instability 0.00, distance 0.91 \u2014 zone of pain \u2014 concrete and depended on by 1 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"8a0712bc39315636cffc0f924cee60684e0b2349d1d11432ceb8fda7f9f8f498"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: ai-memory-store: ai-memory-store: abstractness 0.00, instability 0.14, distance 0.86 \u2014 zone of pain \u2014 concrete and depended on by 6 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"94284ab092b234b49baa9ab1aa033cbee7eeb67df066e60c2ef04c2f38126f75"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: ai-memory-llm: ai-memory-llm: abstractness 0.02, instability 0.14, distance 0.84 \u2014 zone of pain \u2014 concrete and depended on by 6 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"93764b42d1d823a04c20e15d82f91b860528dc62f07e183d65ec5a8f6cbf9794"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: DreamConfig (LCOM4 5): DreamConfig\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/ai-memory-consolidate/src/dream.rs"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"108122a4594ee81a16100ea9a0105dc2ac5b7cad210145ab5dd696deea09dce2"}},{"ruleId":"D6","level":"warning","message":{"text":"Low cohesion: AuthState (LCOM4 5): AuthState\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/ai-memory-mcp/src/auth.rs"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"c27d1e80a3f22e4e6e6c1b107331f37cec04b7c6238fe064da5db54a32ff6102"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-hooks/src/router.rs: crates/ai-memory-hooks/src/router.rs changed 173 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 101 in ai_memory_hooks::router::process_authorized at line 4995. 97 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-hooks/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/ai-memory-hooks/src/router.rs"},"region":{"startLine":4995}}}],"partialFingerprints":{"codehealthFindingId/v1":"bca2b1eefd26ca0e5ed5c45c571f5ab9d30c062c1c6421f34e26791bd1e8d886"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-cli/src/commands/install_hooks.rs: crates/ai-memory-cli/src/commands/install_hooks.rs changed 171 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 96 in ai_memory_cli::commands::install_hooks::run_with_hook_connection at line 807. 92 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/install_hooks.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/install_hooks.rs"},"region":{"startLine":807}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0887d6efd3f83f3c7fe75ceb77c899a060018c9b4673d6daa08e19fc341439c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-cli/src/commands/hook.rs: crates/ai-memory-cli/src/commands/hook.rs changed 100 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 151 in ai_memory_cli::commands::hook::run_with_payload_in_home at line 1557. 58 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/hook.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/hook.rs"},"region":{"startLine":1557}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1ea870b2c39879b66d52d6ab5135857757ef3c6e08231d7484b88c798332e9d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-cli/src/commands/run.rs: crates/ai-memory-cli/src/commands/run.rs changed 92 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 146 in ai_memory_cli::commands::run::run_once_with_wiring at line 613. 51 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/run.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/run.rs"},"region":{"startLine":613}}}],"partialFingerprints":{"codehealthFindingId/v1":"d063dba03edfba069f4c6031e71997e1b7a982bed00fb50da5730ded136a049e"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-store/src/writer.rs: crates/ai-memory-store/src/writer.rs changed 73 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 152 in ai_memory_store::writer::worker_loop at line 4030. 30 of those changes were fix/bug commits, and the other 43 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-store/src/writer.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/writer.rs"},"region":{"startLine":4030}}}],"partialFingerprints":{"codehealthFindingId/v1":"36ec21a2466e139d7d4f665ac62d62f54e5d38b6b4e40cf41ff06414bb771b10"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-store/src/reader.rs: crates/ai-memory-store/src/reader.rs changed 172 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 59 in ReaderPool::hybrid_search_inner at line 8730. 87 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-store/src/reader.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/reader.rs"},"region":{"startLine":8730}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fd830e8313c5ba103f5a510bb3142ad5149c2309149174f4f60d08ce18f82c2"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-mcp/src/server.rs: crates/ai-memory-mcp/src/server.rs changed 171 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in AiMemoryServer::memory_query at line 3216. 74 of those changes were fix/bug commits, and the other 97 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-mcp/src/server.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/server.rs"},"region":{"startLine":3216}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1f2be20c1c1101e65fb99267f29ee177b86efd86ff26a307505d4edb0e7941d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-cli/src/commands/serve.rs: crates/ai-memory-cli/src/commands/serve.rs changed 118 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 61 in ai_memory_cli::commands::serve::run at line 1221. 44 of those changes were fix/bug commits, and the other 74 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/serve.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/serve.rs"},"region":{"startLine":1221}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee8632ffca6802977f04a3434d00c8eb71a61a3a2d7c6a1e8b85214fca04e3f7"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-cli/src/config.rs: crates/ai-memory-cli/src/config.rs changed 121 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in Config::load_with_runtime_env at line 2477. 40 of those changes were fix/bug commits, and the other 81 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/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/ai-memory-cli/src/config.rs"},"region":{"startLine":2477}}}],"partialFingerprints":{"codehealthFindingId/v1":"1216ad65d55207908ab00a815087c3008beeab92c546ca677b450f7352701252"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-store/src/ops.rs: crates/ai-memory-store/src/ops.rs changed 124 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in ai_memory_store::ops::admit_hook_session_event at line 3471. 57 of those changes were fix/bug commits, and the other 67 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-store/src/ops.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/ops.rs"},"region":{"startLine":3471}}}],"partialFingerprints":{"codehealthFindingId/v1":"27ab1919423d7aec6bb6e562ae2b8dc377e100454e7143ac5abc884ad5764dca"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-cli/src/commands/hook_spool.rs: crates/ai-memory-cli/src/commands/hook_spool.rs changed 35 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 82 in ai_memory_cli::commands::hook_spool::drain_with_live_token at line 1462. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/hook_spool.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/hook_spool.rs"},"region":{"startLine":1462}}}],"partialFingerprints":{"codehealthFindingId/v1":"585f9ff1a798d2e6e5fb4d63a693b3b56834b94d558956bc4b0e2c66c3973f22"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-hooks/src/capture_policy.rs: crates/ai-memory-hooks/src/capture_policy.rs changed 79 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in ai_memory_hooks::capture_policy::has_unevaluated_expansion at line 3526. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-hooks/src/capture_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/ai-memory-hooks/src/capture_policy.rs"},"region":{"startLine":3526}}}],"partialFingerprints":{"codehealthFindingId/v1":"8254a287aea0eda9a92ab262601d2a57480b2a52de293708cc4212f33539639f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-mcp/src/admin.rs: crates/ai-memory-mcp/src/admin.rs changed 119 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in ai_memory_mcp::admin::copy_purge_merge at line 8609. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-mcp/src/admin.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/admin.rs"},"region":{"startLine":8609}}}],"partialFingerprints":{"codehealthFindingId/v1":"e476beecade7a9faf2909438048866e1c258008b10df2c7141c16cd090c23d90"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-cli/src/lib.rs: crates/ai-memory-cli/src/lib.rs changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 88 in ai_memory_cli::dispatch at line 68. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/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/ai-memory-cli/src/lib.rs"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"88fe01e8ed249b6fc454703f956ad15837451b2d0d5136f248d19293db34423b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-workstream/src/transcript.rs: crates/ai-memory-workstream/src/transcript.rs changed 58 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in ai_memory_workstream::transcript::export_jsonl_range at line 1247. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-workstream/src/transcript.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":1247}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3d594838ca22268e18a73e015f4cf0f18f5b5901c84a86859f8dd4bb813b21f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-cli/src/commands/uninstall.rs: crates/ai-memory-cli/src/commands/uninstall.rs changed 51 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in ai_memory_cli::commands::uninstall::build_plan at line 206. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/uninstall.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/uninstall.rs"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"168125fb56e307c8a840aebc58af9ceec9eb70ae4a2a868f4008cd5b57ae2b07"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-cli/src/commands/install_mcp.rs: crates/ai-memory-cli/src/commands/install_mcp.rs changed 60 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in ai_memory_cli::commands::install_mcp::build_mcp_entry at line 1802. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/install_mcp.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/install_mcp.rs"},"region":{"startLine":1802}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb5b48460c9244702a5cd51c47098d535a65d734bae17daaf534b90982e1399f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-wiki/src/wiki.rs: crates/ai-memory-wiki/src/wiki.rs changed 76 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in Wiki::apply_batch_inner at line 3328. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-wiki/src/wiki.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-wiki/src/wiki.rs"},"region":{"startLine":3328}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad21ec83f0287ca956a4d1d2d52e08b6dda24e86036b68865ddfeb1fdf5df7f0"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-cli/src/commands/setup_agent.rs: crates/ai-memory-cli/src/commands/setup_agent.rs changed 33 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in ai_memory_cli::commands::setup_agent::run at line 57. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/setup_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/ai-memory-cli/src/commands/setup_agent.rs"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"68cb6fe47c942ccf11a4da9ffad5f67e5234d293bfa333bafc0ab9c7c139f50b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-consolidate/src/consolidator.rs: crates/ai-memory-consolidate/src/consolidator.rs changed 53 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in Consolidator::consolidate_session_multi_in_scope at line 844. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-consolidate/src/consolidator.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/consolidator.rs"},"region":{"startLine":844}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9b58eb77d5686373e371da53a36bf4433e3862a771e198faa05ef05d258a007"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-workstream/src/harness.rs: crates/ai-memory-workstream/src/harness.rs changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in ai_memory_workstream::harness::build_launch_plan_with_env_lookup at line 409. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-workstream/src/harness.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-workstream/src/harness.rs"},"region":{"startLine":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e4cfd76693cea481b4e14438e3b373a886ad8f13e0412ae02168853f6ca280d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-cli/src/commands/hook_capture.rs: crates/ai-memory-cli/src/commands/hook_capture.rs changed 41 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in ai_memory_cli::commands::hook_capture::build_marker_query_suffix at line 765. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/hook_capture.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/hook_capture.rs"},"region":{"startLine":765}}}],"partialFingerprints":{"codehealthFindingId/v1":"30f48280715b39b747084c53149322ef8631125a89d8516466754c19c1bb7fe5"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-hooks/src/workstream.rs: crates/ai-memory-hooks/src/workstream.rs changed 25 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in ai_memory_hooks::workstream::prepare_run at line 324. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-hooks/src/workstream.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/workstream.rs"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f41d57c7cdb1da612f833440023a9e0ae10d31f047a8638f4be92b25f7ae9b0"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-consolidate/src/bootstrap.rs: crates/ai-memory-consolidate/src/bootstrap.rs changed 33 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in Bootstrap::process_sources at line 436. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-consolidate/src/bootstrap.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/bootstrap.rs"},"region":{"startLine":436}}}],"partialFingerprints":{"codehealthFindingId/v1":"849c1e95145d2c34887a9046e90ac4a60b83481f35ebc545fcec0c7174edd6dc"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-cli/src/commands/show.rs: crates/ai-memory-cli/src/commands/show.rs changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in ai_memory_cli::commands::show::select_inner at line 827. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/show.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/show.rs"},"region":{"startLine":827}}}],"partialFingerprints":{"codehealthFindingId/v1":"140ce159e96a323cdd362ac8ed4cc1052d3503ca1f411fbba39fa429afa35be2"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-cli/src/commands/backup_agents.rs: crates/ai-memory-cli/src/commands/backup_agents.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 52 in ai_memory_cli::commands::backup_agents::discover_assets at line 173. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/backup_agents.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/backup_agents.rs"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"4688681e8deb5c58ff8b9c32672ac8fd3f24e7eef908289ac4bf187b9f2bab23"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-consolidate/src/sweep.rs: crates/ai-memory-consolidate/src/sweep.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in ai_memory_consolidate::sweep::run_sweep_at at line 604. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-consolidate/src/sweep.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/sweep.rs"},"region":{"startLine":604}}}],"partialFingerprints":{"codehealthFindingId/v1":"768bdfb5236def5670c702bb227347117e098b603c4276d26dc38e33f3a2e719"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-wiki/src/watcher.rs: crates/ai-memory-wiki/src/watcher.rs changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in ai_memory_wiki::watcher::handle_event at line 243. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-wiki/src/watcher.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-wiki/src/watcher.rs"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"60e7beae13606b5dba8c36d9ee6b2d631ca868375ca2cdb195269bae806dfb95"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-consolidate/src/profile.rs: crates/ai-memory-consolidate/src/profile.rs changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in ai_memory_consolidate::profile::converge at line 1448. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-consolidate/src/profile.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/profile.rs"},"region":{"startLine":1448}}}],"partialFingerprints":{"codehealthFindingId/v1":"47a2dba607141782c11e3a0061218e78dac6af9b281f84f5124e54e9f1bb0665"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-store/src/workstream.rs: crates/ai-memory-store/src/workstream.rs changed 25 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in ai_memory_store::workstream::finish_run_inner at line 1396. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-store/src/workstream.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/workstream.rs"},"region":{"startLine":1396}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa8df29d67eab0874be48f37f2060e3db8e6f8530afe724f69049ea203025113"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-core/src/page.rs: crates/ai-memory-core/src/page.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in PageWriteMetadata::into_frontmatter at line 246. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-core/src/page.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-core/src/page.rs"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"05c52a0b7b4dc2096c5ab852e811d3a79b207ea09cc9119dbdea9240aa3c57c4"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-consolidate/src/auto_improve.rs: crates/ai-memory-consolidate/src/auto_improve.rs changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in ai_memory_consolidate::auto_improve::apply_eval_gate_with_before_bodies 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-consolidate/src/auto_improve.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/auto_improve.rs"},"region":{"startLine":918}}}],"partialFingerprints":{"codehealthFindingId/v1":"217bad3386a2656ee143ce29ed394ed0535c8f8145d620d285b3ff6d77e985e9"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: companions/ai-memory-ts/src/client.ts: companions/ai-memory-ts/src/client.ts changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in client.metadataFromFrontmatter at line 143. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- companions/ai-memory-ts/src/client.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/src/client.ts"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"711795580ef717a873266a1d25151f62e09a45bef47b9ddfc7c58ab1df26aa14"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-cli/src/marker.rs: crates/ai-memory-cli/src/marker.rs changed 25 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in ai_memory_cli::marker::inspect_scope_for at line 640. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/marker.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/marker.rs"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"e69c9c270a8db79ea25adce8dd2c01428aecedf2f8c7f0fddf946c53c9db08b6"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: evals/src/retrieval/mod.rs: evals/src/retrieval/mod.rs changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in ai_memory_eval::retrieval::run at line 387. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- evals/src/retrieval/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":"evals/src/retrieval/mod.rs"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"3762acc5982de5d4785df1b38b554861b2e5f00e1a8110067ea329879e514c3c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-cli/src/commands/run_autowire.rs: crates/ai-memory-cli/src/commands/run_autowire.rs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in ai_memory_cli::commands::run_autowire::ensure_wired_with_env at line 466. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/run_autowire.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/run_autowire.rs"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"b67fa61679b1989a3e3becd48965eb9e4af0ad23091b6b710876cf21455fe61b"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-web/src/routes/search.rs: crates/ai-memory-web/src/routes/search.rs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in ai_memory_web::routes::search::handler 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-web/src/routes/search.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-web/src/routes/search.rs"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"faf09c291e281e41987024f5666263bf741df835f2635eff91b17b7db415cc92"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-cli/src/commands/restore.rs: crates/ai-memory-cli/src/commands/restore.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in ai_memory_cli::commands::restore::stage_then_swap at line 281. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/restore.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/restore.rs"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"98c0db7437b384b737d777e0d15ddebd5d9d86b477c5638b46fc8f5fd7d7d0ff"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: companions/ai-memory-importer/src/document.rs: companions/ai-memory-importer/src/document.rs changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in ai_memory_importer::document::xlsx_shared_strings at line 807. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- companions/ai-memory-importer/src/document.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-importer/src/document.rs"},"region":{"startLine":807}}}],"partialFingerprints":{"codehealthFindingId/v1":"a60ede4321fbed4bfb9072678624794ff5d3759e4f48996eda1ea966ca626f5e"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-llm/src/factory.rs: crates/ai-memory-llm/src/factory.rs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in ai_memory_llm::factory::build_provider at line 386. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-llm/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/ai-memory-llm/src/factory.rs"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"d52e3b3b9c3e8221409299e1c6a9ffa6e92ab9b69e045707195a3a1e46523086"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: companions/ai-memory-wikisync/src/bidi.rs: companions/ai-memory-wikisync/src/bidi.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in ai_memory_wikisync::bidi::build_plan at line 408. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- companions/ai-memory-wikisync/src/bidi.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-wikisync/src/bidi.rs"},"region":{"startLine":408}}}],"partialFingerprints":{"codehealthFindingId/v1":"feec47244326fb0fa21fd689cb7fb13251f7ecd05d58e95006b361c9be136584"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-consolidate/src/auto_improve_schedule.rs: crates/ai-memory-consolidate/src/auto_improve_schedule.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in ai_memory_consolidate::auto_improve_schedule::run_auto_improve_scheduler_tick at line 153. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-consolidate/src/auto_improve_schedule.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/auto_improve_schedule.rs"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"2444f983499836d85050e01a0612147dfcf4fe549981cd917a47185d457011f8"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: companions/ai-memory-importer/src/main.rs: companions/ai-memory-importer/src/main.rs changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in ai_memory_importer::plan_external_conversation at line 545. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- companions/ai-memory-importer/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":"companions/ai-memory-importer/src/main.rs"},"region":{"startLine":545}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec3800892f276de48684522c9ddb8b8b38c307478f50ee6d443f2ebcb958236c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-llm/src/openai_oauth.rs: crates/ai-memory-llm/src/openai_oauth.rs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in ai_memory_llm::openai_oauth::parse_sse_response at line 341. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-llm/src/openai_oauth.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-llm/src/openai_oauth.rs"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"de7dab09d4bfc35787db7e73bf3c818027474efc2d75ef5779abaef98e1c6c66"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-cli/src/commands/recovery.rs: crates/ai-memory-cli/src/commands/recovery.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in ai_memory_cli::commands::recovery::recover at line 553. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/recovery.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/recovery.rs"},"region":{"startLine":553}}}],"partialFingerprints":{"codehealthFindingId/v1":"93c8864fb1e2995ac2a4744d54c1d24cf4229ca9bb5cefa0a53ee06ff724ec0e"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-cli/src/commands/session_usage.rs: crates/ai-memory-cli/src/commands/session_usage.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in ai_memory_cli::commands::session_usage::read_live_calls at line 161. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/session_usage.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/session_usage.rs"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"677e46b83a49247a1243f0603311be40ddde3e1f6fe1aae9f6e91ddb5a993054"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-mcp/src/page_patch.rs: crates/ai-memory-mcp/src/page_patch.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in ai_memory_mcp::page_patch::apply at line 127. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-mcp/src/page_patch.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-mcp/src/page_patch.rs"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"f801d7d848ae27712ee6b3a307f02f6c4f371b49f66ca3229bed98b9a1ad9faa"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-cli/src/commands/transcript_capture.rs: crates/ai-memory-cli/src/commands/transcript_capture.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in TranscriptCapture::decide at line 126. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/transcript_capture.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/transcript_capture.rs"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4c74cdb29094d698891a50e09ccb7b2f7b822754dd26803dd05357106345891"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-cli/src/commands/restore_agents.rs: crates/ai-memory-cli/src/commands/restore_agents.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in ai_memory_cli::commands::restore_agents::run at line 56. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/restore_agents.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/restore_agents.rs"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ddb564b26b530a49e0f9dd300a9c7e78e19e21ddcfc3803b42dfc10a04e2d85"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-web/src/routes/inbox.rs: crates/ai-memory-web/src/routes/inbox.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in ai_memory_web::routes::inbox::handler at line 46. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-web/src/routes/inbox.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-web/src/routes/inbox.rs"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"b617f8de62ea63e8395258bc753040377a80eb14c7a07d9df1f00b41be4a892f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: companions/ai-memory-relay/src/relay.rs: companions/ai-memory-relay/src/relay.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in ai_memory_relay::relay::flush_locked at line 281. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- companions/ai-memory-relay/src/relay.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-relay/src/relay.rs"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7e767ba0ba72a36f870078a5c02393a020e6c5ca2f9d75afe02dce75a01637f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: companions/ai-memory-importer/src/agentmemory/vault.rs: companions/ai-memory-importer/src/agentmemory/vault.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in ai_memory_importer::agentmemory::vault::plan at line 151. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- companions/ai-memory-importer/src/agentmemory/vault.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-importer/src/agentmemory/vault.rs"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"031f18b8fe5826f47c9fe9fc7ee50ca80976bb6458d1e5d7326b81e9b5d68bdd"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-consolidate/src/dream.rs: crates/ai-memory-consolidate/src/dream.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in ai_memory_consolidate::dream::run_dream_pass at line 383. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-consolidate/src/dream.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/dream.rs"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fe2d995e1742a642d821d4f7f17639c5eb5a4a74a89e82328a0017e6fd79b86"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-web/src/health.rs: crates/ai-memory-web/src/health.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in ai_memory_web::health::localized_checks 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-web/src/health.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-web/src/health.rs"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"56569157a30efe20e2de4f2d7e45bbc172a1468291e11ca4685b8afd6bb974dc"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-consolidate/src/curator.rs: crates/ai-memory-consolidate/src/curator.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in ai_memory_consolidate::curator::run_curator_report_with_breadth 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-consolidate/src/curator.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/curator.rs"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"084b5087f388a5622dd4abf858e82141a18ad34a92079414aaf8b45ecf5745b5"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-cli/src/commands/doctor/presentation.rs: crates/ai-memory-cli/src/commands/doctor/presentation.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in ai_memory_cli::commands::doctor::presentation::render at line 6. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/doctor/presentation.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/doctor/presentation.rs"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb4da7772680f15389eee04c4000e03a874f24d8da87a6e3b669c2af9b8ac603"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: companions/ai-memory-importer/src/agentmemory/mod.rs: companions/ai-memory-importer/src/agentmemory/mod.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in ai_memory_importer::agentmemory::apply_pages_batched 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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- companions/ai-memory-importer/src/agentmemory/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":"companions/ai-memory-importer/src/agentmemory/mod.rs"},"region":{"startLine":487}}}],"partialFingerprints":{"codehealthFindingId/v1":"61227c54c00e9fc0600c458bb8848be1e588fc4a5e243bee5f400cbb01c84b97"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-cli/src/commands/status/presentation.rs: crates/ai-memory-cli/src/commands/status/presentation.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in ai_memory_cli::commands::status::presentation::render at line 19. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/status/presentation.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/status/presentation.rs"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"735640237ff1c523730a0131a4c2c6d16ce681bb787f1778a16c67f024709617"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-wiki/src/admission.rs: crates/ai-memory-wiki/src/admission.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in AdmissionChain::run at line 405. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-wiki/src/admission.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-wiki/src/admission.rs"},"region":{"startLine":405}}}],"partialFingerprints":{"codehealthFindingId/v1":"b71852b086479d4a339fc8def24585b172bbb166cb929dc53e910882ca4fae54"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-consolidate/src/embed.rs: crates/ai-memory-consolidate/src/embed.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in ai_memory_consolidate::embed::run_embedding_backfill at line 85. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-consolidate/src/embed.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/embed.rs"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"19a478cb1dd78b41405470502f55813320a39a328a9815ffc97d3c5368d3cbf6"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-hooks/src/brief_tiers.rs: crates/ai-memory-hooks/src/brief_tiers.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in ai_memory_hooks::brief_tiers::assign_tiers at line 95. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-hooks/src/brief_tiers.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/brief_tiers.rs"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"41379d824479a6c491a8174e9c6fdbc4001a0c813cbec018489973c9268fda41"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-consolidate/src/link_guard.rs: crates/ai-memory-consolidate/src/link_guard.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in ai_memory_consolidate::link_guard::unresolved_generated_links at line 55. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-consolidate/src/link_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/ai-memory-consolidate/src/link_guard.rs"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b68c58fa75123557d056a7e18f899dc2f805880417d72f3e1b3215a63625715"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-hooks/src/antigravity.rs: crates/ai-memory-hooks/src/antigravity.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in ai_memory_hooks::antigravity::read_transcript_prompts at line 486. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-hooks/src/antigravity.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/antigravity.rs"},"region":{"startLine":486}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2831b00099f7dadf8ae6fd7e1a7f197259b7a684866ca78f0e16f59aead8af9"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: crates/ai-memory-consolidate/src/projection.rs: crates/ai-memory-consolidate/src/projection.rs changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in ai_memory_consolidate::projection::project_from_rows at line 218. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-consolidate/src/projection.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/projection.rs"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"933539d799bf36746cd593756398934e47d39f6e7d2d480e70bb899688e1a9f8"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: tests/e2e/web_dashboard_browser.mjs: tests/e2e/web_dashboard_browser.mjs changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in main at line 141. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- tests/e2e/web_dashboard_browser.mjs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/e2e/web_dashboard_browser.mjs"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d76304908186fbb73617e0abfaabe76ba5e8c7009f77cd102ff37e0e59ce98e"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/render_shared.rs: crates/ai-memory-cli/src/commands/render_shared.rs changed 91 times in last 90 days and 54 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 ai_memory_cli::commands::render_shared::hook_command at line 2515), 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(hermes): resolve the Hermes home the way Hermes does\u201D; \u201Cfix(cli): wire Gemini CLI\u0027s AfterAgent to the stop hook\u201D; \u201Cfix(cli): wire Gemini CLI\u0027s BeforeAgent to the prompt hook\u201D; \u201Cfix(hooks): single-quote PowerShell-run Windows hook commands\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/render_shared.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/render_shared.rs"},"region":{"startLine":2515}}}],"partialFingerprints":{"codehealthFindingId/v1":"5353f8616f778193e958039ecee2a428af2ddf3e1680c01d39cd4797ac2ae829"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-hooks/src/payload.rs: crates/ai-memory-hooks/src/payload.rs changed 64 times in last 90 days and 33 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 HookEnvelope::from_query_and_body at line 664), 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): read Gemini CLI\u0027s BeforeAgent and AfterAgent event names\u201D; \u201Cfix(hooks): cut Gemini CLI\u0027s @ expansion out of a hook prompt\u201D; \u201Cfix(hooks): read a Cline subagent from parent_agent_id, not agent_id\u201D; \u201Cfix(hooks): capture OpenClaw tool observation titles and bodies (#2130)\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-hooks/src/payload.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/payload.rs"},"region":{"startLine":664}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd1ad0295cbed181868e80dcc9efa6b6bb6417a052082c0609c71631bb17b864"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/backfill.rs: crates/ai-memory-cli/src/commands/backfill.rs changed 42 times in last 90 days and 26 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 ai_memory_cli::commands::backfill::run_in at line 372), 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(cli): neutralize scope names in the backfill and repair lines\u201D; \u201Cfix(cli): neutralize the names mid-run lines quote, not only errors\u201D; \u201Cfix(cli): route checkout commands through the marker\u0027s server profile (#2016)\u201D; \u201Cfix(hooks): answer an agent-label mismatch with 409 instead of a silent drop (#2023)\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/backfill.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/backfill.rs"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"fab7ec10b26a0911ddd5fd4b42c5e8e7e299581168906b4fe41bb94197f020b7"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-wiki/src/markdown.rs: crates/ai-memory-wiki/src/markdown.rs changed 28 times in last 90 days and 22 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 ai_memory_wiki::markdown::extract_markdown_links at line 909), 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(wiki): treat a protocol-relative link destination as external\u201D; \u201Cfix(wiki): pin the frontmatter shapes that read differently since serde-saphyr\u201D; \u201Cfix(wiki): keep a literal percent in exported wikilink targets\u201D; \u201Cfix(wiki): recognize an empty frontmatter block\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-wiki/src/markdown.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-wiki/src/markdown.rs"},"region":{"startLine":909}}}],"partialFingerprints":{"codehealthFindingId/v1":"956c909faf76e870ad0580b0f4b7e4614aade764c585bf514c1d2e7876e74404"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-web/src/markdown.rs: crates/ai-memory-web/src/markdown.rs changed 27 times in last 90 days and 21 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 ai_memory_web::markdown::scope_relative_link at line 111), 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(audit): harden integrated bug fixes\u201D; \u201Cfix(web): keep a literal mark tag from page text out of a search snippet\u201D; \u201Cfix(wiki): resolve encoded Markdown destinations once\u201D; \u201Cfix(web): leave directory and stemless wikilinks as literal text\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-web/src/markdown.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-web/src/markdown.rs"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"e01c1ce8fcf661383d42e8a73413e597aec58985367af62e8164358e19bc5cd7"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-core/src/sanitize.rs: crates/ai-memory-core/src/sanitize.rs changed 30 times in last 90 days and 19 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 11 (its worst body is ai_memory_core::sanitize::json_escape_at at line 191), 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(sanitize): redact own-prefix and AWS keys glued onto a word by a stripped character\u201D; \u201Cfix(sanitize): anchor sk- and Stripe keys on a preceding letter (#2025)\u201D; \u201Cfix(sanitize): anchor the api_key rule to a word boundary\u201D; \u201Cfix(sanitize): redact ai-memory\u0027s own credentials\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-core/src/sanitize.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-core/src/sanitize.rs"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"d61a70b19cb01e48bc58b030f5b6781aa5e96a9e2ab637d7b54b231da9f0c341"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-wiki/src/git.rs: crates/ai-memory-wiki/src/git.rs changed 24 times in last 90 days and 19 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 11 (its worst body is ai_memory_wiki::git::stage_paths at line 1166), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(restore): restore only git\u0027s data from the wiki\u0027s .git ([GHSA redacted])\u201D; \u201Cfix(wiki): keep serve running when the wiki git repo is owned by another account\u201D; \u201Cfix(wiki): revalidate root before git staging\u201D; \u201Cfix(wiki): confine reported git staging paths\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-wiki/src/git.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-wiki/src/git.rs"},"region":{"startLine":1166}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a9fb59b72464b085e496c4b60b1edbf1ec9cfe049ecfba50cf7c593f62696bd"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/openclaw_plugin.rs: crates/ai-memory-cli/src/commands/openclaw_plugin.rs changed 28 times in last 90 days and 18 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 ai_memory_cli::commands::openclaw_plugin::install_plugin at line 161), 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(handoff): offer the baton under external capture in every hook bundle\u201D; \u201Cfix(cli): neutralize the names mid-run lines quote, not only errors\u201D; \u201Cfix(openclaw): refuse redirects in the OpenClaw plugin\u201D; \u201Cfix(hooks): keep allowlist plugins from fetching a handoff in unmarked repos\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/openclaw_plugin.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/openclaw_plugin.rs"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f7c1afe8a7c96fc654e68d20316b748853c067a0d45606cad3f957b05fc8234"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-llm/src/opencode.rs: crates/ai-memory-llm/src/opencode.rs changed 22 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 6 (its worst body is ai_memory_llm::opencode::model_api 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(opencode): classify Responses output budget stops\u201D; \u201Cfix(llm): strip unsupported numeric schema formats\u201D; \u201Cfix(llm): include compat schema in tolerant prompts\u201D; \u201Cfix(llm): make compat streaming configurable\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-llm/src/opencode.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-llm/src/opencode.rs"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5c78e8f13323f01f3bb850cba5659127a1217da4fd9e90da5531cb9e1a2f52a"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/setup.rs: crates/ai-memory-cli/src/commands/setup.rs changed 30 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 14 (its worst body is ai_memory_cli::commands::setup::execute at line 833), 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): fall back to the bridge\u0027s launch scope on a pointer miss (#2005)\u201D; \u201Cfix(cli): neutralize the names mid-run lines quote, not only errors\u201D; \u201Cfix(cli): record Scoop\u0027s current junction, refuse self-upgrade under Scoop\u201D; \u201Cfix(cli): strip URL userinfo from the startup log and thin-client errors\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/setup.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/setup.rs"},"region":{"startLine":833}}}],"partialFingerprints":{"codehealthFindingId/v1":"756c14ca0be319a9e803b9081009ec364ab9115eed8ca4967ef2180d7ca5e2b0"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-hooks/src/synth.rs: crates/ai-memory-hooks/src/synth.rs changed 24 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 13 (its worst body is ai_memory_hooks::synth::render_body at line 824), 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(core): keep Claude Code machine turns out of session titles and prompt lists\u201D; \u201Cfix(hooks): stamp an idle end with the whole session\u0027s count\u201D; \u201Cfix(hooks): keep bare tool-family labels out of session titles and summaries\u201D; \u201Cfix(hooks): capture Claude Code tool failures via PostToolUseFailure\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-hooks/src/synth.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/synth.rs"},"region":{"startLine":824}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ea726eecd30776345bc761b9ea1d871a607db4044fce46bfba044d590202659"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-store/src/fts_query.rs: crates/ai-memory-store/src/fts_query.rs changed 19 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 13 (its worst body is ai_memory_store::fts_query::prepare_fts5_token at line 404), 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(store): keep accented Latin words whole in query-signal similarity\u201D; \u201Cfix(store): let title:/body: filters reach the hyphen-split columns (#2013)\u201D; \u201Cfix(store): index the parts of hyphenated words so \u0060alpha\u0060 finds \u0060foo-bar-alpha\u0060\u201D; \u201Cfix(store): split paths on \u0060/\u0060 in full-text search (#1921)\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-store/src/fts_query.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/fts_query.rs"},"region":{"startLine":404}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ea976841a3eb4a5ca7a131f3e87b0ee04a8263e2ff66d954d94dd34c80b750d"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/upgrade.rs: crates/ai-memory-cli/src/commands/upgrade.rs changed 26 times in last 90 days and 15 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 ai_memory_cli::commands::upgrade::validate_release_path at line 640), 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(upgrade): preserve installed Claude Code hook endpoints\u201D; \u201Cfix(upgrade): refresh the OpenCode plugin in the installed major (#1887)\u201D; \u201Cfix(cli): neutralize the names mid-run lines quote, not only errors\u201D; \u201Cfix(cli): record Scoop\u0027s current junction, refuse self-upgrade under Scoop\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/upgrade.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/upgrade.rs"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"55fba3a48ac87c1cd395063e40700d4ae6c9348c98bb2a48752dcd7b98eac29e"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/mcp_bridge.rs: crates/ai-memory-cli/src/commands/mcp_bridge.rs changed 25 times in last 90 days and 15 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 ai_memory_cli::commands::mcp_bridge::wait_for_server at line 664), 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): fall back to the bridge\u0027s launch scope on a pointer miss (#2005)\u201D; \u201Cfix(mcp-bridge): restore resultType on forwarded results for 2026-07-28 clients (#2022)\u201D; \u201Cfix(hooks): never repeat inbox-notice query keys; compaction starts claim nothing\u201D; \u201Cfix(cli): strip URL userinfo from the startup log and thin-client errors\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/mcp_bridge.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/mcp_bridge.rs"},"region":{"startLine":664}}}],"partialFingerprints":{"codehealthFindingId/v1":"6750795a70e0d4f25597b056b803f1c289afa96fb3a8edc41943584b551c9e10"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/http_client.rs: crates/ai-memory-cli/src/http_client.rs changed 22 times in last 90 days and 15 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 ai_memory_cli::http_client::error_chain_indicates_no_answer at line 581), 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(backup): verify the downloaded gzip stream before replacing the archive\u201D; \u201Cfix(cli): preserve archives on non-gzip download responses\u201D; \u201Cfix: route selected checkouts and bind only admitted hook agents\u201D; \u201Cfix(cli): match profile roots against the shell\u0027s logical cwd (#2016)\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/http_client.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/http_client.rs"},"region":{"startLine":581}}}],"partialFingerprints":{"codehealthFindingId/v1":"798923f34cad6b2f70dc3610c84aaf4e20c5441838b4034039cd6fadad8445ba"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-web/src/routes/page.rs: crates/ai-memory-web/src/routes/page.rs changed 19 times in last 90 days and 11 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 ai_memory_web::routes::page::handler 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(web): show a project refusal instead of redirecting to change-password\u201D; \u201Cfix(web): sort recent pages by timestamp\u201D; \u201Cfix(web): show exact timestamps on the page view\u201D; \u201Cfix(web): mark an expired page on the page view\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-web/src/routes/page.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-web/src/routes/page.rs"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"f29995d3bef180111377fbeb6b65d580bdd7d1f284979aeca3954147191515ed"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-store/src/scope.rs: crates/ai-memory-store/src/scope.rs changed 18 times in last 90 days and 11 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 ScopeResolutionError::fmt at line 242), 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(scope): name the workspace when a write hits an ambiguous project\u201D; \u201Cfix(mcp): refuse an inferred scope for message pop, cancel and send\u201D; \u201Cfix(store): try the exact name first and never create a slashed project\u201D; \u201Cfix(store): auto-split a \u0060workspace/project\u0060 label passed as the project\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-store/src/scope.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/scope.rs"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"0637fe1995a41383e1a1d8f71d683d2be5603d95ff6f5566ad6e6ee309aaad66"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/purge_project.rs: crates/ai-memory-cli/src/commands/purge_project.rs changed 16 times in last 90 days and 11 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 ai_memory_cli::commands::purge_project::run at line 172), 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(cli): neutralize scope names in the project administration lines\u201D; \u201Cfix(cli): send the purge previews to the server the purge will use\u201D; \u201Cfix(cli): route checkout commands through the marker\u0027s server profile (#2016)\u201D; \u201Cfix(cli): neutralize server text in the exit report and purge listings\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/purge_project.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/purge_project.rs"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7d88abc09a0fe84f226a6b4df23a2f0412e025d99ae087cd361eb5448f15cae"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-store/src/error.rs: crates/ai-memory-store/src/error.rs changed 16 times in last 90 days and 11 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 AmbiguousProjectHolders::fmt at line 45), 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): answer an agent-label mismatch with 409 instead of a silent drop (#2023)\u201D; \u201Cfix(store): resolve a remote-derived name past an empty twin (#2018)\u201D; \u201Cfix(workstream): retry renewable lease lapses\u201D; \u201Cfix(hooks): drop a spooled event its managed run boundary refuses\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-store/src/error.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/error.rs"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"63bede0c472dd12b576389589aec76d60a76ad455a6009640bc9f1070e3ccd30"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-wiki/src/migrations/m2026_09_okf_conformance.rs: crates/ai-memory-wiki/src/migrations/m2026_09_okf_conformance.rs changed 15 times in last 90 days and 11 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 ai_memory_wiki::migrations::m2026_09_okf_conformance::nonconformant_files 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(wiki): keep serve running when the wiki git repo is owned by another account\u201D; \u201Cfix(okf): conform a nested index.md instead of skipping it as the bundle index\u201D; \u201Cfix(okf): encode directory links in generated bundle indexes\u201D; \u201Cfix(wiki): confine page I/O to the project tree\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-wiki/src/migrations/m2026_09_okf_conformance.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-wiki/src/migrations/m2026_09_okf_conformance.rs"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c5acf56b79ebbaabc3ca341b16bcb75ecebef57c9d6a3c345dc442dd33e23bb"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-llm/src/copilot.rs: crates/ai-memory-llm/src/copilot.rs changed 17 times in last 90 days and 10 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 ai_memory_llm::copilot::response_text at line 944), 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(copilot): reject structured token-budget stops\u201D; \u201Cfix(llm): honor provider retry hints\u201D; \u201Cfix(copilot): report an incomplete /responses answer as a truncated response\u201D; \u201Cfix(llm): treat a throttled or overloaded token endpoint as transient\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-llm/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/ai-memory-llm/src/copilot.rs"},"region":{"startLine":944}}}],"partialFingerprints":{"codehealthFindingId/v1":"12973a9458a03273537da5fb0b5859cb60b4a278c036be31d80fc02188375c4b"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-llm/src/openai_compat.rs: crates/ai-memory-llm/src/openai_compat.rs changed 16 times in last 90 days and 10 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 OpenAiCompatProvider::complete_structured at line 301), 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(llm): find the JSON answer after braced prose\u201D; \u201Cfix(llm): include compat schema in tolerant prompts\u201D; \u201Cfix(llm): reject unsupported compat streaming\u201D; \u201Cfix(llm): make compat streaming configurable\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-llm/src/openai_compat.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-llm/src/openai_compat.rs"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"de438c896d92de2cc11ad8b98d7f3be92942a1849980891e3ccb15aa2444b2a8"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-llm/src/openai.rs: crates/ai-memory-llm/src/openai.rs changed 17 times in last 90 days and 9 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 ai_memory_llm::openai::enforce_strict_object_schemas at line 695), 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(profile): split a truncated classification batch instead of dropping it\u201D; \u201Cfix(llm): strip unsupported numeric schema formats\u201D; \u201Cfix(llm): make compat streaming configurable\u201D; \u201Cfix(llm): honor provider retry hints\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-llm/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/ai-memory-llm/src/openai.rs"},"region":{"startLine":695}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ae67ceaa43e10cbf1c4910a4e850056e447b6d3173567b21503bf7823627f75"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/finalize_session.rs: crates/ai-memory-cli/src/commands/finalize_session.rs changed 15 times in last 90 days and 9 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 ai_memory_cli::commands::finalize_session::fetch_open_sessions at line 212), 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(cli): neutralize the names mid-run lines quote, not only errors\u201D; \u201Cfix(cli): route checkout commands through the marker\u0027s server profile (#2016)\u201D; \u201Cfix(cli): prevent server text from injecting terminal controls\u201D; \u201Cfix(cli): refuse redirects across thin-client call sites\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/finalize_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/ai-memory-cli/src/commands/finalize_session.rs"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"6634cf43fc14fc1e07234deb5c172cefdacab7a1eed0ee3c30e576f16ebf2308"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-llm/src/embedding.rs: crates/ai-memory-llm/src/embedding.rs changed 14 times in last 90 days and 9 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 ai_memory_llm::embedding::openai_style_embed at line 349), 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(llm): honor provider retry hints\u201D; \u201Cfix(embeddings): size local capacity from the CPU and bound the query wait\u201D; \u201Cfix(embed): leave the Voyage input to Voyage\u0027s own truncation\u201D; \u201Cfix(embed): bound the embedding input on the Gemini and Voyage embedders\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-llm/src/embedding.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-llm/src/embedding.rs"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"354763c86ca081d29532694b93e8e68fda7bcc8be441f43326f30f53fc09dea6"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-hooks/src/recap.rs: crates/ai-memory-hooks/src/recap.rs changed 12 times in last 90 days and 9 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 ai_memory_hooks::recap::select_window at line 514), 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(recap): say \u00221 earlier prompt\u0022 when one prompt is omitted\u201D; \u201Cfix(recap): escape fence markers in the recap\u0027s session id\u201D; \u201Cfix(hooks): count a recap prompt with no room for its text as omitted\u201D; \u201Cfix(hooks): budget the anchor body against the heading it emits (#1983)\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-hooks/src/recap.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/recap.rs"},"region":{"startLine":514}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ba1b5f20cb2a125406413b7623aac6d530a089f1902e0115418e82d0bfab286"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/move_project.rs: crates/ai-memory-cli/src/commands/move_project.rs changed 12 times in last 90 days and 9 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 ai_memory_cli::commands::move_project::run 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(cli): neutralize scope names in the project administration lines\u201D; \u201Cfix(cli): neutralize the names mid-run lines quote, not only errors\u201D; \u201Cfix(cli): route checkout commands through the marker\u0027s server profile (#2016)\u201D; \u201Cfix(cli): prevent server text from injecting terminal controls\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/move_project.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/move_project.rs"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bb2187e843adeabbcaf5f1e77369769efafc76d46accc384aa01285a033dca1"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-llm/src/cursor_agent.rs: crates/ai-memory-llm/src/cursor_agent.rs changed 11 times in last 90 days and 9 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 ai_memory_llm::cursor_agent::render_request at line 307), 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(cursor-agent): scrub the non-JSON answer excerpt too and cover both paths\u201D; \u201Cfix(security): scrub cursor agent stderr with built-in Sanitizer before surfacing errors\u201D; \u201Cfix(llm): honor provider retry hints\u201D; \u201Cfix(llm): find the Cursor agent\u0027s JSON answer inside bracketed prose\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-llm/src/cursor_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/ai-memory-llm/src/cursor_agent.rs"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"59693a9508f316c5c8ffcc50f826d4956af990ea7b0a2ec382cc982ac8c44dfa"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-llm/src/anthropic.rs: crates/ai-memory-llm/src/anthropic.rs changed 13 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 6 (its worst body is AnthropicProvider::complete_structured_raw_with_operation_id at line 297), 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(llm): honor provider retry hints\u201D; \u201Cfix(anthropic): refuse a structured tool_use cut off at max_tokens\u201D; \u201Cfix(llm): keep provider credentials on their origin\u201D; \u201Cfix(llm): stop forcing the structured tool on Claude models that reject it\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-llm/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/ai-memory-llm/src/anthropic.rs"},"region":{"startLine":297}}}],"partialFingerprints":{"codehealthFindingId/v1":"82ed44a326e396d4729e328db53d17f83a673462dc746ac0d11e6a0f1185bba1"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/user_service.rs: crates/ai-memory-cli/src/commands/user_service.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 ai_memory_cli::commands::user_service::install at line 739), 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(windows): launch the service host with plain paths\u201D; \u201Cfix(setup): write plain paths into the Windows logon entry\u201D; \u201Cfix(setup): let a volume GUID data dir own its logon entry\u201D; \u201Cfix(setup): compare only absolute Windows data dirs\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/user_service.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/user_service.rs"},"region":{"startLine":739}}}],"partialFingerprints":{"codehealthFindingId/v1":"52654ce328ce8147eabd49344f0dd098ab15940e73b6cb78eb802b95c37d177d"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/rename_project.rs: crates/ai-memory-cli/src/commands/rename_project.rs changed 10 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 4 (its worst body is ai_memory_cli::commands::rename_project::run at line 22), 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(cli): neutralize scope names in the project administration lines\u201D; \u201Cfix(cli): neutralize the names mid-run lines quote, not only errors\u201D; \u201Cfix(cli): route checkout commands through the marker\u0027s server profile (#2016)\u201D; \u201Cfix(cli): prevent server text from injecting terminal controls\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/rename_project.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/rename_project.rs"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b0e97b8c1e7f51c104f93e30b5c51022ff962356076a8ecafabe6b7310e544e"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: companions/ai-memory-wikisync/src/sync.rs: companions/ai-memory-wikisync/src/sync.rs changed 10 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 10 (its worst body is ai_memory_wikisync::sync::run_batch at line 401), 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(wikisync): stage every atomic write under an unpredictable name\u201D; \u201Cfix(wikisync): serialize mutating runs\u201D; \u201Cfix(wikisync): normalize scope warning spacing\u201D; \u201Cfix(audit): close recent review gaps\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- companions/ai-memory-wikisync/src/sync.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-wikisync/src/sync.rs"},"region":{"startLine":401}}}],"partialFingerprints":{"codehealthFindingId/v1":"5248472702e16ac3c1d81c7303d1a22f9bc0f0af52a22d4ee93b689bcdc0ecc6"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-wiki/src/backup.rs: crates/ai-memory-wiki/src/backup.rs changed 10 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 13 (its worst body is ai_memory_wiki::backup::create_pre_migration_backup_inner at line 133), 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(backup): reserve distinct pre-migration archive paths\u201D; \u201Cfix(backup): test the archive\u0027s final flush and fsync its directory\u201D; \u201Cfix(backup): flush and fsync the pre-migration archive before verifying it\u201D; \u201Cfix(wiki): confine page I/O to the project tree\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-wiki/src/backup.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-wiki/src/backup.rs"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"933ca61e1b1fcbd9777f2ec29e74fe139501ba4ed8c0ec1967a0464c9fab3dcd"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/message.rs: crates/ai-memory-cli/src/commands/message.rs changed 13 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 6 (its worst body is ai_memory_cli::commands::message::list at line 171), 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(cli): neutralize scope names in the handoff and message lines\u201D; \u201Cfix(cli): neutralize the names mid-run lines quote, not only errors\u201D; \u201Cfix(cli): route checkout commands through the marker\u0027s server profile (#2016)\u201D; \u201Cfix(cli): prevent server text from injecting terminal controls\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/message.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/message.rs"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"25d97aaecd66ce652a477161a0e77e2d3d066aa5014aab991c82259c0b55fdda"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-hooks/src/drop_list.rs: crates/ai-memory-hooks/src/drop_list.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 7 (its worst body is IngestDropList::matches at line 66), 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): capture OpenClaw tool observation titles and bodies (#2130)\u201D; \u201Cfix(hooks): capture Devin CLI tool observation titles and bodies (#2128)\u201D; \u201Cfix(hooks): capture Kimi Code tool observation titles and bodies (#2126)\u201D; \u201Cfix(hooks): classify ClineCore tool names so observations are not unknown\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-hooks/src/drop_list.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-hooks/src/drop_list.rs"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"c77363f182ea591f9ee3d459a5e320d7829c1b04adcc0df792ea4f17fa954122"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/install_instructions.rs: crates/ai-memory-cli/src/commands/install_instructions.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 13 (its worst body is ai_memory_cli::commands::install_instructions::run_inner 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(install-instructions): keep text after a start marker that lost its end\u201D; \u201Cfix(install-instructions): match the HOME comparison through symlinks\u201D; \u201Cfix: harden audited release paths\u201D; \u201Cfix(cli): follow nested @imports up to four hops in the AGENTS.md note\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/install_instructions.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/install_instructions.rs"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6f192c48f9dc1baff4c41c4446c48d89eafedf276fde5d9b189879ba0a34eef"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/grant.rs: crates/ai-memory-cli/src/commands/grant.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 3 (its worst body is ai_memory_cli::commands::grant::print_grants at line 38), 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(cli): neutralize scope names in the project administration lines\u201D; \u201Cfix(cli): neutralize the names mid-run lines quote, not only errors\u201D; \u201Cfix(cli): prevent server text from injecting terminal controls\u201D; \u201Cfix(cli): refuse empty flags on user grant and revoke\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/grant.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/grant.rs"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"536e41878c3725bf4c7cfbd009dd41e348f3ae26b836608451be29c6947605ee"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/localization.rs: crates/ai-memory-cli/src/localization.rs changed 8 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 15 (its worst body is ai_memory_cli::localization::command at line 131), 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(cli): mask printed bearer tokens and URL credentials ([GHSA redacted] items 1-4)\u201D; \u201Cfix(cli): neutralize the names mid-run lines quote, not only errors\u201D; \u201Cfix(cli): neutralize every mid-run diagnostic that quotes foreign text\u201D; \u201Cfix(cli): localize the handoffs expire confirmation\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/localization.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/localization.rs"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"828f6ed4c25c76462a98d71bb6c5be76150c1b4ad3921ede29a3b72d2075b683"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/profile.rs: crates/ai-memory-cli/src/commands/profile.rs changed 10 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 15 (its worst body is ai_memory_cli::commands::profile::review at line 405), 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 profile forget/show path handling and honest delete reporting (#2181)\u201D; \u201Cfix(cli): resolve profile entries with optional Markdown suffixes\u201D; \u201Cfix(cli): neutralize scope names in the profile, curator and report lines\u201D; \u201Cfix(cli): route checkout commands through the marker\u0027s server profile (#2016)\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/profile.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/profile.rs"},"region":{"startLine":405}}}],"partialFingerprints":{"codehealthFindingId/v1":"b882f7806281335255bdfd30a5ebbc0edc5808cb9c99064d463c5b181260c259"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/purge_session.rs: crates/ai-memory-cli/src/commands/purge_session.rs changed 10 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 11 (its worst body is ai_memory_cli::commands::purge_session::run 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(cli): neutralize scope names in the project administration lines\u201D; \u201Cfix(cli): send the purge previews to the server the purge will use\u201D; \u201Cfix(cli): route checkout commands through the marker\u0027s server profile (#2016)\u201D; \u201Cfix(cli): neutralize server text in the exit report and purge listings\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/purge_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/ai-memory-cli/src/commands/purge_session.rs"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"064cd1338a6c39d9262d078c8778765b081e6b754e7e54c5c295dc39cf25eaae"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/handoffs.rs: crates/ai-memory-cli/src/commands/handoffs.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 6 (its worst body is ai_memory_cli::commands::handoffs::run at line 41), 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(cli): neutralize scope names in the handoff and message lines\u201D; \u201Cfix(cli): neutralize the names mid-run lines quote, not only errors\u201D; \u201Cfix(cli): route checkout commands through the marker\u0027s server profile (#2016)\u201D; \u201Cfix(cli): keep the handoffs expire lines under the catalog drift guard\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/handoffs.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/handoffs.rs"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"03a435488352d7f2d494a168a5911b8abf66a21f4f5df994b20ba9de3388ed88"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-store/src/profile.rs: crates/ai-memory-store/src/profile.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 5 (its worst body is ai_memory_store::profile::profile_harvest_projects at line 356), 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(profile): harvest every row of a timestamp group split by the batch\u201D; \u201Cfix(store): bound the session-start profile digest read\u201D; \u201Cfix(store): read every profile page for harvest, list, status, and digest\u201D; \u201Cfix(profile): ignore TTL-expired pages when deciding a project is new\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-store/src/profile.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/profile.rs"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf061616cdf09842d24d4cd45d1be9f6e028fdb06d6beff8318c86858405c647"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/path_util.rs: crates/ai-memory-cli/src/commands/path_util.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 7 (its worst body is ai_memory_cli::commands::path_util::logical_dir 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(hermes): resolve the Hermes home the way Hermes does\u201D; \u201Cfix(cli): match profile roots against the shell\u0027s logical cwd (#2016)\u201D; \u201Cfix(doctor): sanitize Hermes profile diagnostics\u201D; \u201Cfix(cli): harden untrusted terminal rendering\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/path_util.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/path_util.rs"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"1620bc60bb87e5a76982997eac72bd7cc1f669bd5ca3bf035b47d5fda7c1a434"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/restore_page.rs: crates/ai-memory-cli/src/commands/restore_page.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 5 (its worst body is ai_memory_cli::commands::restore_page::run 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(cli): neutralize scope names in the page command lines\u201D; \u201Cfix(cli): route checkout commands through the marker\u0027s server profile (#2016)\u201D; \u201Cfix(cli): prevent server text from injecting terminal controls\u201D; \u201Cfix(cli): reject empty restore-page targets\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/restore_page.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/restore_page.rs"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a6e3f9f11e9aa405790eaa5b0ba02c8d0ab0aebf77091a9efc93ad68b5ccb33"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-workstream/src/jail.rs: crates/ai-memory-workstream/src/jail.rs changed 8 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 12 (its worst body is ai_memory_workstream::jail::parse_jail_toggles at line 776), 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: harden audited release paths\u201D; \u201Cfix(run): make jail preflight path portable\u201D; \u201Cfix(run): preflight ai-jail availability\u201D; \u201Cfix(run): default the jail\u0027s ssh toggle from the push URL and host aliases\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-workstream/src/jail.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-workstream/src/jail.rs"},"region":{"startLine":776}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ec33d090af7474a7a928988eb6ca79de04a2a409d73738b0c8cc0d3304f41a5"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/list_projects.rs: crates/ai-memory-cli/src/commands/list_projects.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 3 (its worst body is ai_memory_cli::commands::list_projects::fetch_project_rows at line 55), 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(cli): prevent server text from injecting terminal controls\u201D; \u201Cfix(cli): align tables by terminal display width\u201D; \u201Cfix(cli): size list-projects columns by characters, not bytes\u201D; \u201Cfix(cli): share the admin-route fallback with show; name --enable-api\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/list_projects.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/list_projects.rs"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b1b7144ac58526233ef47b0ea1f651b901faf805c750aa9f40bd00ac540db32"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-web/templates/pending.html: crates/ai-memory-web/templates/pending.html changed 7 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 1 (its worst body is pending.html.default at line 189), 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(web): add a navigation landmark to the header\u201D; \u201Cfix: harden audited release paths\u201D; \u201Cfix(web): shell-quote the pending-writes commands shown to a read-only browser\u201D; \u201Cfix(web): show CLI commands on /web/pending to a Basic-auth browser\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-web/templates/pending.html\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-web/templates/pending.html"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"1564dcd4b7d7455b0ca9a829b632cb8f52a002e2ae253e998fcb0ed060bb0cbc"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-core/src/scaffolding.rs: crates/ai-memory-core/src/scaffolding.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 5 (its worst body is ai_memory_core::scaffolding::looks_like_scaffolding 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(core): keep Claude Code machine turns out of session titles and prompt lists\u201D; \u201Cfix(profile): reject Codex generated prompts\u201D; \u201Cfix(hooks): accept Codex\u0027s own memory-agent runs and store nothing\u201D; \u201Cfix(workstream): skip Codex\u0027s instructions when no project AGENTS.md contributes\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-core/src/scaffolding.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-core/src/scaffolding.rs"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"554ec988c91b5756ce7c153f9329866909e380d390ff5e164c42b8af3456178c"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/run_project_split.rs: crates/ai-memory-cli/src/commands/run_project_split.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 3 (its worst body is ProjectSplit::from_error at line 42), 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(run): print the exact reconcile commands on a non-repairable project split (#1993)\u201D; \u201Cfix: route selected checkouts and bind only admitted hook agents\u201D; \u201Cfix(cli): neutralize the names mid-run lines quote, not only errors\u201D; \u201Cfix(cli): route checkout commands through the marker\u0027s server profile (#2016)\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/run_project_split.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/run_project_split.rs"},"region":{"startLine":42}}}],"partialFingerprints":{"codehealthFindingId/v1":"81be8e951ada3b40c2698db1edd7569276577c6c9e15e5d3478f4e12554d8831"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-llm/src/gemini.rs: crates/ai-memory-llm/src/gemini.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 12 (its worst body is ai_memory_llm::gemini::normalize_nullable_types at line 459), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(gemini): classify structured output budget stops\u201D; \u201Cfix(llm): honor provider retry hints\u201D; \u201Cfix(llm): keep provider credentials on their origin\u201D; \u201Cfix(llm): disable default thinking for gemini-3.8-flash\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-llm/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/ai-memory-llm/src/gemini.rs"},"region":{"startLine":459}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb59c97ce58008eccea4373d850c8dc87fad38737fb0ec2b8f39e682b19a23c9"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/write_page.rs: crates/ai-memory-cli/src/commands/write_page.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 4 (its worst body is ai_memory_cli::commands::write_page::run 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(cli): neutralize scope names in the page command lines\u201D; \u201Cfix(cli): route checkout commands through the marker\u0027s server profile (#2016)\u201D; \u201Cfix(cli): prevent server text from injecting terminal controls\u201D; \u201Cfix(cli): refuse empty scope flags on write-page\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/write_page.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/write_page.rs"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"af91bfd265415ff60521ef804f077443fd39428601472f8bc546fd8c974024e8"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-workstream/src/repository.rs: crates/ai-memory-workstream/src/repository.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 7 (its worst body is ai_memory_workstream::repository::parse_status_paths at line 165), 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(backfill): hide Windows git probes\u201D; \u201Cfix(cli): avoid working-tree scans before the resume picker\u201D; \u201Cfix(run): default the jail\u0027s ssh toggle from the push URL and host aliases\u201D; \u201Cfix(run): find, layer onto and attribute Crush sessions as Crush does\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-workstream/src/repository.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-workstream/src/repository.rs"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3ced945bbee07ff395476dad9c09afada51be252ce80ca9afb9c9968717b690"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/workstream_search.rs: crates/ai-memory-cli/src/commands/workstream_search.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 ai_memory_cli::commands::workstream_search::run at line 12), 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(cli): neutralize the names mid-run lines quote, not only errors\u201D; \u201Cfix(cli): route checkout commands through the marker\u0027s server profile (#2016)\u201D; \u201Cfix(cli): prevent server text from injecting terminal controls\u201D; \u201Cfix(cli): label historical tool events as completed evidence in workstream-search\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/workstream_search.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/workstream_search.rs"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"2458029ba1053d4100436ea604d837f4137ad0a518f20431d321f4be0b7343cb"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-store/src/session_consolidation.rs: crates/ai-memory-store/src/session_consolidation.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 5 (its worst body is ai_memory_store::session_consolidation::claim_next at line 199), 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): queue a resumed session\u0027s checkpoint and guard retried checkpoints\u201D; \u201Cfix(hooks): keep consolidate admission on the deferred checkpoint (#1229)\u201D; \u201Cfix(hooks): queue PreCompact LLM work on the durable worker (#1229)\u201D; \u201Cfix(backfill): store each event\u0027s original time instead of the import time\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-store/src/session_consolidation.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/session_consolidation.rs"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3dfe038e0463f89030b876886b0dd813fbe367d60484b53c9659a11b7755e65"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: companions/ai-memory-wikisync/src/state.rs: companions/ai-memory-wikisync/src/state.rs changed 6 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 ai_memory_wikisync::state::acquire_write_lock_impl at line 178), 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(wikisync): stage every atomic write under an unpredictable name\u201D; \u201Cfix(wikisync): retry a contended write lock through the fork window\u201D; \u201Cfix(wikisync): serialize mutating runs\u201D; \u201Cfix(wikisync): record the baseline\u0027s scope and refuse a foreign one\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- companions/ai-memory-wikisync/src/state.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-wikisync/src/state.rs"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b956896339435f4c6992437ad6a3deb9d96bbdb08be3861ce92d7324949f632"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: companions/ai-memory-macos/Sources/AIMemoryMenu/AppModel.swift: companions/ai-memory-macos/Sources/AIMemoryMenu/AppModel.swift 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 AppModel.headlineVersion 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(macos): reload the selected data directory on restart\u201D; \u201Cfix(security): bind the macOS app token to its server and stop browser caching of viewer-filtered API reads\u201D; \u201Cfix(auth): let a browser and the Mac app into a fresh token install\u201D; \u201Cfix(macos): show only a server error logged since the last start\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- companions/ai-memory-macos/Sources/AIMemoryMenu/AppModel.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-macos/Sources/AIMemoryMenu/AppModel.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8d5803b03d315ed103d33b1da52d555af6ddc3b8b9641e8472009dc625cb049"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-llm/src/google.rs: crates/ai-memory-llm/src/google.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 9 (its worst body is GoogleEmbedder::embed_with_task at line 64), 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(llm): honor provider retry hints\u201D; \u201Cfix(embed): leave the Voyage input to Voyage\u0027s own truncation\u201D; \u201Cfix(embed): bound the embedding input on the Gemini and Voyage embedders\u201D; \u201Cfix(embed): apply the 429/503 retry policy to every HTTP embedder\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-llm/src/google.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-llm/src/google.rs"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"532561a10541859987128154c689dde85dd341ba7d38c57476369fbd789a8289"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-web/src/routes/pending.rs: crates/ai-memory-web/src/routes/pending.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 4 (its worst body is ai_memory_web::routes::pending::handler at line 51), 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(web): send no-store on the /pending triage page\u201D; \u201Cfix: harden audited release paths\u201D; \u201Cfix(web): shell-quote the pending-writes commands shown to a read-only browser\u201D; \u201Cfix(web): show CLI commands on /web/pending to a Basic-auth browser\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-web/src/routes/pending.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-web/src/routes/pending.rs"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c765ad8e45a7207c0dd7ad7b846bd9e369e4d80c97c8ddb599483a7a63bbdb2"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-web/src/html_auth.rs: crates/ai-memory-web/src/html_auth.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 11 (its worst body is ai_memory_web::html_auth::sanitize_next 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(serve): answer /api/v1 CORS preflights outside auth\u201D; \u201Cfix(web): redirect only the must-change-password 403 to that form\u201D; \u201Cfix(web): show a project refusal instead of redirecting to change-password\u201D; \u201Cfix(auth): let a browser and the Mac app into a fresh token install\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-web/src/html_auth.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-web/src/html_auth.rs"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"4575bd0b9051cb8bae4866d1f88c31c21dd1083822e742122f796b2b2233db24"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/project.rs: crates/ai-memory-cli/src/commands/project.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 4 (its worst body is ai_memory_cli::commands::project::access at line 45), 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(cli): neutralize scope names in the project administration lines\u201D; \u201Cfix(cli): prevent server text from injecting terminal controls\u201D; \u201Cfix(cli): refuse empty flags on project access and grants\u201D; \u201Cfix(cli): suggest the resolved scope in project init and write only it\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/project.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/project.rs"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"44bcc91869432dbe85fa5bbf25933e0aeff59554373f326c67c25945d78b4cfa"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/rename_workstream.rs: crates/ai-memory-cli/src/commands/rename_workstream.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 5 (its worst body is ai_memory_cli::commands::rename_workstream::run at line 13), 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(cli): neutralize the names mid-run lines quote, not only errors\u201D; \u201Cfix(cli): route checkout commands through the marker\u0027s server profile (#2016)\u201D; \u201Cfix(cli): prevent server text from injecting terminal controls\u201D; \u201Cfix(cli): refuse empty scope flags on rename-workstream\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/rename_workstream.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/rename_workstream.rs"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"11e369c6dc9da5b74a1c36dbf4ff8c10147d6d39464953b7fbc33c10c101bb33"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/read_page.rs: crates/ai-memory-cli/src/commands/read_page.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 10 (its worst body is ai_memory_cli::commands::read_page::run at line 44), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(cli): route checkout commands through the marker\u0027s server profile (#2016)\u201D; \u201Cfix(cli): prevent server text from injecting terminal controls\u201D; \u201Cfix(cli): refuse empty scope flags and targets on read-page\u201D; \u201Cfix(cli): show when read-page returns an expired page\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/read_page.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/read_page.rs"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0ccc546248c82224192253463690f610664ee93ee9fe31c838d634b09fdffac"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/auth.rs: crates/ai-memory-cli/src/commands/auth.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 12 (its worst body is ai_memory_cli::commands::auth::run at line 33), 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(cli): prevent server text from injecting terminal controls\u201D; \u201Cfix(auth): enforce device authorization polling deadlines\u201D; \u201Cfix(cli,llm): redact auth.json values, warn on unusable proxy vars\u201D; \u201Cfix(auth): bound and scrub remote error bodies in auth login\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/auth.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/auth.rs"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"185d62f8ff2c9d0382b7666106bf0f17fd603e37786bc07a3ab378293457dd38"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-store/src/project_authz.rs: crates/ai-memory-store/src/project_authz.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 12 (its worst body is ai_memory_store::project_authz::resolve at line 419), 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(store): fail closed on project authorization errors\u201D; \u201Cfix(workstream): apply the run owner check to every run mutation route\u201D; \u201Cfix(authz): gate writes to the reserved global scope ([GHSA redacted])\u201D; \u201Cfix(workstream): authorize finish imports against owner and grants\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-store/src/project_authz.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-store/src/project_authz.rs"},"region":{"startLine":419}}}],"partialFingerprints":{"codehealthFindingId/v1":"edbb4a25b0ed74ce6284b5b7f89d01644a28eed501ac57a20d26c7d23a32985c"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-llm/src/error.rs: crates/ai-memory-llm/src/error.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 11 (its worst body is LlmError::class at line 149), 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(llm): honor provider retry hints\u201D; \u201Cfix(llm): treat a throttled or overloaded token endpoint as transient\u201D; \u201Cfix(embeddings): reserve local query capacity\u201D; \u201Cfix(bootstrap): retry a chunk on transient LLM errors before failing the run (#617)\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-llm/src/error.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-llm/src/error.rs"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0af380ebd48827bb200cbeb5c83ed2429aee6f3a72e39187b68830d3c526888"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/render_plugins.rs: crates/ai-memory-cli/src/commands/render_plugins.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 4 (its worst body is ai_memory_cli::commands::render_plugins::write_all at line 293), 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): ignore a relative ai_memory_bin option\u201D; \u201Cfix(plugins): start the Claude Code launcher with sh\u201D; \u201Cfix(plugins): omit an empty --server-url and retry pre-3.0 binaries\u201D; \u201Cfix(plugins): keep plugin trees and shell scripts LF on every checkout\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/render_plugins.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/render_plugins.rs"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"4607ee63ee8f64a054bdc4fc11e72fbf8019a2b698834caa349b27ea578c29f0"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/opencode_dialect.rs: crates/ai-memory-cli/src/commands/opencode_dialect.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 10 (its worst body is ai_memory_cli::commands::opencode_dialect::resolve_generic_with_timeout 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(cli): retry a briefly busy OpenCode probe\u201D; \u201Cfix(opencode): give the version probe room for a cold start\u201D; \u201Cfix(cli): compare the resolved launcher path case-insensitively (#1097)\u201D; \u201Cfix(cli): scope the OpenCode test import to unix (#1097)\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/opencode_dialect.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/opencode_dialect.rs"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"b54b70c2eb3f23a47e4415e1c29c98898dc62d9c7e568d0881a1e2622fa45b38"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/server_profiles.rs: crates/ai-memory-cli/src/server_profiles.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 11 (its worst body is ai_memory_cli::server_profiles::clear_tokens at line 532), 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(cli): mask printed bearer tokens and URL credentials ([GHSA redacted] items 1-4)\u201D; \u201Cfix(cli): route checkout commands through the marker\u0027s server profile (#2016)\u201D; \u201Cfix(cli): update inline server profile tables\u201D; \u201Cfix(server): match a profile\u0027s roots case-insensitively on Windows paths\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/server_profiles.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/server_profiles.rs"},"region":{"startLine":532}}}],"partialFingerprints":{"codehealthFindingId/v1":"88d0016537713012bfd43f5c8388969308bcc1385e23b2c594da05f4fbfccab4"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/delete_page.rs: crates/ai-memory-cli/src/commands/delete_page.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 3 (its worst body is ai_memory_cli::commands::delete_page::run at line 37), 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(cli): neutralize scope names in the page command lines\u201D; \u201Cfix(cli): route checkout commands through the marker\u0027s server profile (#2016)\u201D; \u201Cfix(cli): prevent server text from injecting terminal controls\u201D; \u201Cfix(cli): refuse empty scope flags on delete-page\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/delete_page.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/delete_page.rs"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"497b92fa0c6d8ed72534a9fa7f0c36befb79093f04ff542308b13701138c3eea"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-web/src/recall.rs: crates/ai-memory-web/src/recall.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 5 (its worst body is ai_memory_web::recall::search_scopes at line 54), 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(audit): harden integrated bug fixes\u201D; \u201Cfix(web): apply the search kind and tier filter inside every stream\u201D; \u201Cfix(web): filter search by kind and tier inside the ranker\u201D; \u201Cfix(retrieval): show observation text only to a session\u0027s readers\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-web/src/recall.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-web/src/recall.rs"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"07b0767f403c2fb06f1bb1f72fc45183ecc8f99b3eaba96f7381896102223e8d"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: companions/ai-memory-client/src/scrub.rs: companions/ai-memory-client/src/scrub.rs changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 8 (its worst body is ai_memory_client::scrub::redact_through_invisibles 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(sanitize): redact own-prefix and AWS keys glued onto a word by a stripped character\u201D; \u201Cfix(client): anchor the companion scrub\u0027s sk- rule like the server\u0027s (#2025)\u201D; \u201Cfix(sanitize): redact ai-memory\u0027s own credentials\u201D; \u201Cfix(sanitize): match credentials across invisible characters and redact more key blocks\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- companions/ai-memory-client/src/scrub.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-client/src/scrub.rs"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad3d425d3648b14efd9f608de7b0358f7aea103b7e5048cb218b6782a3c771b9"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-web/src/routes/health.rs: crates/ai-memory-web/src/routes/health.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 ai_memory_web::routes::health::handler at line 26), 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(web): render an unreadable storage read as unknown, not zero\u201D; \u201Cfix(status): preserve the derived status API\u201D; \u201Cfix(status): count a page with only a foreign-model vector as missing\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-web/src/routes/health.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-web/src/routes/health.rs"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"471d8c856131d3c21c5f7f6e343745fa536eb71c39ae34c3a0c1b480d2bd72a0"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/merge_project.rs: crates/ai-memory-cli/src/commands/merge_project.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 ai_memory_cli::commands::merge_project::run at line 29), 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(cli): point the checkout link and bindings at the merge-project target (#2158)\u201D; \u201Cfix(cli): send merge-project to the server the checkout routes to\u201D; \u201Cfix(cli): prevent server text from injecting terminal controls\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/merge_project.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/merge_project.rs"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e799a76a5d43ca5fdb4e5ab981f01ce084e81d6ca46e4c09118331f0027bc8d"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-core/src/excerpt.rs: crates/ai-memory-core/src/excerpt.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 ai_memory_core::excerpt::leading_prose at line 74), 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(core): skip fenced code in the SessionStart brief excerpt\u201D; \u201Cfix: omit compaction footer from CRLF excerpts\u201D; \u201Cfix(brief): bound excerpt and pricing work by the budget, not the page\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-core/src/excerpt.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-core/src/excerpt.rs"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6bc6a613b636006b913552d4e070155b9d3051334acf2f92c57e67445ac4d8b"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/api_key.rs: crates/ai-memory-cli/src/commands/api_key.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 ai_memory_cli::commands::api_key::run 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(cli): neutralize the names mid-run lines quote, not only errors\u201D; \u201Cfix(cli): prevent server text from injecting terminal controls\u201D; \u201Cfix(cli): size the api-key list columns by display width, not bytes\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/api_key.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/api_key.rs"},"region":{"startLine":58}}}],"partialFingerprints":{"codehealthFindingId/v1":"58cd5f89b1375eeff0e8a9f570d873ad16367a9909fcaaee02cadc14802abb4b"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/project_registry.rs: crates/ai-memory-cli/src/commands/project_registry.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 11 (its worst body is ai_memory_cli::commands::project_registry::load_registry at line 412), 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(cli): neutralize the names mid-run lines quote, not only errors\u201D; \u201Cfix(run): join a split project by moving its repository identity\u201D; \u201Cfix(run): keep sessions linked under a custom native store reachable\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/project_registry.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/project_registry.rs"},"region":{"startLine":412}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb0d3c942f6fa8ed1e935b629835443b230ad92dcb48fd07ae2347bda43e52c6"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/auto_improve.rs: crates/ai-memory-cli/src/commands/auto_improve.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 ai_memory_cli::commands::auto_improve::render_human at line 112), 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(cli): route checkout commands through the marker\u0027s server profile (#2016)\u201D; \u201Cfix(cli): prevent server text from injecting terminal controls\u201D; \u201Cfix(auto-improve): keep eval policy server-owned\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/auto_improve.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/auto_improve.rs"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"11c59649e771c90b0692c357143ef3c3c53e3b2e3563c24fb842e956f938fc77"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: companions/ai-memory-importer/src/mcp.rs: companions/ai-memory-importer/src/mcp.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 11 (its worst body is ImportClient::mcp_write_pages_batch at line 213), 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(importer): explain why a long document page cannot be verified\u201D; \u201Cfix(importer): read the whole stored page before comparing a rerun\u201D; \u201Cfix(importer): initialize stateful MCP sessions\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- companions/ai-memory-importer/src/mcp.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-importer/src/mcp.rs"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"d28c2e65341ad42d833428e1aac3f57c7f938ee5c92abe8711cfa589f365244e"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-llm/src/stored_token.rs: crates/ai-memory-llm/src/stored_token.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 ai_memory_llm::stored_token::credential_endpoint at line 31), 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(llm): honor provider retry hints\u201D; \u201Cfix(llm): treat a throttled or overloaded token endpoint as transient\u201D; \u201Cfix(auth): validate OIDC endpoints at request sinks\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-llm/src/stored_token.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-llm/src/stored_token.rs"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"d16ada1e87bea72049095c08872bfb4073a617589a256c8984c99cfee670c47a"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/commit.rs: crates/ai-memory-cli/src/commands/commit.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 2 (its worst body is ai_memory_cli::commands::commit::run at line 32), 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(cli): route checkpoints and commit through the checkout\u0027s server profile\u201D; \u201Cfix(cli): neutralize the names mid-run lines quote, not only errors\u201D; \u201Cfix(cli): prevent server text from injecting terminal controls\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/commit.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/commit.rs"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4db7b3243ba06f9f1dd2085330b7790d91e5fffe31382bd55b034972761d38d"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-llm/src/fallback.rs: crates/ai-memory-llm/src/fallback.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 5 (its worst body is FallbackLlmProvider::record_error at line 144), 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(llm): preserve longer fallback cooldowns across failures\u201D; \u201Cfix(llm): deduplicate concurrent fallback warnings\u201D; \u201Cfix(llm): honor provider retry hints\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-llm/src/fallback.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-llm/src/fallback.rs"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccebac07722af85324fe7b0f813fad9c6ad78c6f2c29862d31384e446b39286e"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/repair_backfill_timestamps.rs: crates/ai-memory-cli/src/commands/repair_backfill_timestamps.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 ai_memory_cli::commands::repair_backfill_timestamps::run at line 175), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201Cfix(cli): neutralize scope names in the backfill and repair lines\u201D; \u201Cfix(cli): route checkout commands through the marker\u0027s server profile (#2016)\u201D; \u201Cfix(cli): prevent server text from injecting terminal controls\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/repair_backfill_timestamps.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/repair_backfill_timestamps.rs"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"8739439792cc86ae87840d0434ee1da7c32d53608a445e786a1c75c79440f3b1"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/auto_improve_report.rs: crates/ai-memory-cli/src/commands/auto_improve_report.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 5 (its worst body is ai_memory_cli::commands::auto_improve_report::print_human_report at line 97), 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(cli): neutralize scope names in the profile, curator and report lines\u201D; \u201Cfix(cli): route checkout commands through the marker\u0027s server profile (#2016)\u201D; \u201Cfix(cli): prevent server text from injecting terminal controls\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/auto_improve_report.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/auto_improve_report.rs"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"e36b96aaaae435d2219c1df4b77dacdd2b21188663e7b750f06588f46c336379"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/curator.rs: crates/ai-memory-cli/src/commands/curator.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 ai_memory_cli::commands::curator::run at line 36), 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(cli): neutralize scope names in the profile, curator and report lines\u201D; \u201Cfix(cli): route checkout commands through the marker\u0027s server profile (#2016)\u201D; \u201Cfix(cli): prevent server text from injecting terminal controls\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/curator.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/curator.rs"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f2633422a84c99fc945717cf2c5e27e61ea619be0f3dba5e8295c749210e6da"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/project_init.rs: crates/ai-memory-cli/src/commands/project_init.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 5 (its worst body is ai_memory_cli::commands::project_init::prompt_scope_value at line 97), 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(cli): neutralize the names mid-run lines quote, not only errors\u201D; \u201Cfix(admin): carry the resolved project name; tidy the id-path follow-ups\u201D; \u201Cfix(cli): suggest the resolved scope in project init and write only it\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/project_init.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/project_init.rs"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6c629ad0234175a0e1031236ff4d0a4967ce1dc5a76c9000374589b43c5b24a"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/plugin_origin.rs: crates/ai-memory-cli/src/commands/plugin_origin.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 9 (its worst body is ai_memory_cli::commands::plugin_origin::settings_files_for at line 112), 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): capture Claude Code tool failures via PostToolUseFailure\u201D; \u201Cfix(plugins): only a catch-all settings hook suppresses the plugin copy\u201D; \u201Cfix(plugins): de-duplicate and skip folderless Droid plugin events\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/plugin_origin.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/plugin_origin.rs"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7865aaae5888ce66837e17eef272a9ff63d0cd4ab32417bc04c8053c59a3963"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-wiki/src/error.rs: crates/ai-memory-wiki/src/error.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 3 (its worst body is ai_memory_wiki::error::into_io_error at line 90), 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(deps): replace unmaintained serde_yaml with serde-saphyr\u201D; \u201Cfix(wiki): confine page I/O to the project tree\u201D; \u201Cfix(windows): document owner-account service guidance and surface wiki git owner failures (#872)\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-wiki/src/error.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-wiki/src/error.rs"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"fec4ab6b80650aafd541b3a9bfa1662e4e46aaa8290bb212acef2b8e68e5f52c"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/commands/repair_split.rs: crates/ai-memory-cli/src/commands/repair_split.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 3 (its worst body is ai_memory_cli::commands::repair_split::adopt at line 70), 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(cli): neutralize scope names in the backfill and repair lines\u201D; \u201Cfix(cli): route checkout commands through the marker\u0027s server profile (#2016)\u201D; \u201Cfix(cli): neutralize every mid-run diagnostic that quotes foreign text\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/commands/repair_split.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/repair_split.rs"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c023c8e6cac17749f0bc97848ac3c8842b380fcd3b2d668f5efd68f932e9104"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: companions/ai-memory-wikisync/src/hook.rs: companions/ai-memory-wikisync/src/hook.rs changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 9 (its worst body is ai_memory_wikisync::hook::find_git at line 120), 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(wikisync): stage every atomic write under an unpredictable name\u201D; \u201Cfix(wikisync): detect core.hooksPath set on a git config section-header line\u201D; \u201Cfix(wikisync): accept ordinary Windows destination prefixes\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- companions/ai-memory-wikisync/src/hook.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-wikisync/src/hook.rs"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a687a482b2357ee346ce8803d51131e8f37b0a9dc712a64b2663dff1b9ef0d9"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-wiki/src/atomic.rs: crates/ai-memory-wiki/src/atomic.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 5 (its worst body is ai_memory_wiki::atomic::persist_with_retry_impl 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(upgrade): retry the Windows binary swap through a sharing violation\u201D; \u201Cfix(wiki): auto-commits stage what the wiki wrote, with the repository kept open\u201D; \u201Cfix(wiki): absorb transient Windows sharing violations in atomic persists (#568)\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-wiki/src/atomic.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-wiki/src/atomic.rs"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"403fcb9fded07838f4cdba168f581689fc221d626f4f29e3e465e3630a9f1d1d"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: companions/ai-memory-ts/src/core.ts: companions/ai-memory-ts/src/core.ts 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 10 (its worst body is core.waitForShared 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(ts): isolate shared probe cancellation\u201D; \u201Cfix(ts-sdk): retain a newer handshake after probe failure\u201D; \u201Cfix(ts-sdk): initialize sessions before raw tool calls\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- companions/ai-memory-ts/src/core.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/src/core.ts"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"8397a1f54fdc8f95a56fd583d55cbae0430d173a5dc7441e9612822aff8f8365"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: crates/ai-memory-cli/src/logging.rs: crates/ai-memory-cli/src/logging.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 ai_memory_cli::logging::init 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(cli): clarify first-run readiness and improve terminal presentation\u201D; \u201Cfix(logging): do not raise rmcp above a quieter log_level\u201D; \u201Cfix(logging): quiet the 30s reconcile summary and the rmcp SDK in the default log (#894)\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-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 14:04:13 -03:00\u0027 --until=\u00272026-11-14 14:04:13 -03:00\u0027 --full-history --no-merges -- crates/ai-memory-cli/src/logging.rs\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/logging.rs"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"92221e6340dcca8b5661c4ba3214ad2f901532e2f0c994e279250a32ea9175a4"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 18 significant file(s) lose their only recent owner: crates/ai-memory-cli/src/commands/setup_web.rs, evals/src/retrieval/reachability.rs, crates/ai-memory-cli/src/commands/agentmemory_residue.rs, evals/src/retrieval/ingest.rs, companions/ai-memory-ts/src/transport.ts, crates/ai-memory-cli/src/commands/render_plugins.rs, crates/ai-memory-wiki/src/confinement.rs, crates/ai-memory-llm/src/local.rs (\u002B10 more). Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"53e8ea59bd11fb51f2018234be7f066aa82f31965f89115b7f661e97512c5236"}},{"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 (25 single-owned of 371 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; 371 of the 406 production source files in this repository met that bar). They are anonymized user #2 (2 file(s)), anonymized user #3 (1 file(s)), anonymized user #4 (1 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)), anonymized user #7 (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: companions/ai-memory-relay/src/identity.rs, companions/ai-memory-relay/src/ack.rs, crates/ai-memory-hooks/src/brief_tiers.rs, crates/ai-memory-consolidate/src/compaction.rs, crates/ai-memory-consolidate/src/prompt_template.rs, crates/ai-memory-core/src/agent_backup.rs, crates/ai-memory-cli/src/commands/data_purge.rs."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6eac528f2429e724e1a97ed868f79eefbcf1888dab4af9a9e673429369bb5b2f"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: 3 of 19 project(s) overshoot their size bounds, lowering Project Cohesion to 6.8/10. The most over is \u0060crates/ai-memory-cli\u0060 (155118 LoC, 311 module-visible types across 5 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":"d5b8f11381d61a58459ffc7c595fd52d09c03c711894a63a9578043d2338412b"},"taxa":[{"id":"CWE-829","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":"a91099160caea646ad02132f87bc626ca1812e4ce7ff4a0388c5aa45259d0e2a"},"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":"27138e8d7a25952e3cc8e3ba4126b65f2a79c262422a0c07ce8ee133028b69ef"},"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":"3e0b94f038c5ab790a017f07292879b15464edac36c6d915d2b7de718f387f3d"},"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":"2b0356fd888e96da5b92aad99c84bea9e631f3cddcf73108e7a6211bb623f195"},"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":"15c8c1646aa93267361d047f95bcb0c5ea76327d1d3b9effae989aa34b424d0f"},"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":"9530c5ceb7b1e35170faa929e151adc52a7537dd82b0c4efa7d5d8663a066b21"},"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":"ed20bf6038b725d1822cadb75c3bbb3353385d142f90c579e8eafaf2c6d5eb0e"},"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":"5d0fbf0b677a36c13f3bef24dcdf4c422fa519640b7927c1be22ef136dc44d05"},"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":"efecfd31cd828f30da162eb2730b73569d6a4dca99763ef7110a3e8f4c9ede24"},"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":"fd5de5f8c78d2646301dd319f50064b52e7eb6f981cd593ea868eddae0dc3a96"},"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":"b1fca294e2fb73d446a25cddd29522f37f262a3169034dfc8261f05ac709d180"},"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":"4e6282bb3279ac603ad119870f8e8b5f4f3325dfcfb9f5e2902868f6971735b7"},"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":"460adbd94a441062a9b13f303638d705426f73d67c44a23b8ffc86edf59fc84d"},"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":"b34f2cc68412f20a86d8bf6d7410f55ce67dfb2b7f97f9ae04aa8ffd19716ed1"},"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":"c10605f377c4e1125634ccadd43bc20faf157700206c4a214cf000bf9584dfdb"},"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":"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":"a29d02308a98e9951068c8ffa9f4775a4817ad5fec36a3e176ba638f21755392"},"taxa":[{"id":"CWE-79","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":"e533b53b9174d8e10a64f8da452347193afe7a08776388d1213b8169d5383799"},"taxa":[{"id":"CWE-79","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":"a0c9cc1231db4ccfaa54539f4adcae6acdc01a3c78b13976413d1f64b8318e19"},"taxa":[{"id":"CWE-79","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":"5f59d52175dae43f590f0e42cbb4b759a78a1cb0a3851d760a59b199d7074326"},"taxa":[{"id":"CWE-79","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":"ec1263cb272f4b718da08e30ed1862251d4ce90ee0826324b07d8c3ee3ce45b5"},"taxa":[{"id":"CWE-79","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":"8a607fefc7252cedf286059accd71116192628b19ab1c6aee1756f63920d4050"},"taxa":[{"id":"CWE-79","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":"489673c7750aa028b5deb1711d1fa4e61a1be1bcbc6577209f826b6bec97a0b1"},"taxa":[{"id":"CWE-79","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":"1dcc94d67dda20c3c186da07e7022ec7997b93a1790a10cd5fb906f0b184eff2"},"taxa":[{"id":"CWE-79","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":"1a8f9705008d200b3863ac7bb9efb2dc5deb0c6343555c0b6f232e458da389bc"},"taxa":[{"id":"CWE-79","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":"2eb8d96488c013c224c2bfb1a86be896a0183a07c0f82872631a6dfe4868dd36"},"taxa":[{"id":"CWE-79","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":"f66be39b316226aa85852152457587d97254485c5ca38765bed619d5cf5f34ec"},"taxa":[{"id":"CWE-79","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":"33240b06209b6de0dd9a56c7bd5f5aa75cb88595c63358e124a787a14d44ec61"},"taxa":[{"id":"CWE-79","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":"81a3298bc3ed64a878279c051ec5ab3bcafcc9c58d8d1f5646a00f3d7b191bcd"},"taxa":[{"id":"CWE-79","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":"a0e2dd61400eefca5c0b7da68ecec68c701968cceac6cfd934865ddc2e9f992b"},"taxa":[{"id":"CWE-79","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":"94b5f77fb5491611da746b41d709d57d0634d14cac19b94df8fe14f1c46bbba7"},"taxa":[{"id":"CWE-79","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":"5e246468840fe50ea308a10fe0c3ce298bbdfa992a81efd1d59dc02a3b1c3405"},"taxa":[{"id":"CWE-79","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":"d895e89bfafa2b6735ddbe8c3a920aae56f09d8aa997c31537e09cac14e1683c"},"taxa":[{"id":"CWE-79","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":"906c80090cee4ac5cacecf78dae88a9d1797c59c1fa3ee13aa34954138bc8a50"},"taxa":[{"id":"CWE-79","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":"47813dd0513cfd99313a8b7d3b937263d984907daa3d2e2474b07036a3fdcf1b"},"taxa":[{"id":"CWE-79","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":"fa694296f1a7c49979f9477b0ca9c9542f86aa6014afb3bdb538e11dafa3c850"},"taxa":[{"id":"CWE-79","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":"c5a834d20fc3168c26fe5c8505f1f0922ed08357cb837b727572408e0b584b05"},"taxa":[{"id":"CWE-79","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":"7f569621c1d1b6d43fd94e21d079bbc1ceaafafb9d6404140b2219928a647142"},"taxa":[{"id":"CWE-79","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":"8fb24403cfa618c799680f9c93093fdcd206d9895bba8b2f4e6b7802e6753e71"},"taxa":[{"id":"CWE-79","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":"88d460e452c6327d89bcca38c31ac3a11de2b385b25a2afe1ab6cffa73dbb3e0"},"taxa":[{"id":"CWE-79","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":"398893936d85e429f12b1a6e49675c5752352b6ac3e3d0bebf82134e418a30c6"},"taxa":[{"id":"CWE-79","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":"dc5563d2b9a4a42618a76c1543511a6adc60c23a5b622e51da02d5f80fbe964d"},"taxa":[{"id":"CWE-79","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":"323e7f106b731656951bb3181f9ca96c04d4debcc961ad201ddd8da4a05d5020"},"taxa":[{"id":"CWE-79","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":"76439018e4101e36bbddbd30f04bd65425f45e994ae12e9db1ffc26688304973"},"taxa":[{"id":"CWE-79","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":"014af5451754df25d731ed6342e29cae84be9d2c5c5ac043a256668d8c22fd5e"},"taxa":[{"id":"CWE-79","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":"10dc695a6b50ec81fec2395e449cee04099d0dd230810118a987cd789d6a177d"},"taxa":[{"id":"CWE-79","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":"d65424dd36451efaf5fd4806b07ff47d252b1dfeefd57c68acab6fb4025b60be"},"taxa":[{"id":"CWE-79","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":"4714c3a98ee6f17d27f7f20c414b3d18a5673f9eafd348e4dd2dd59e387cc91b"},"taxa":[{"id":"CWE-79","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":"77a2eb8f089bc44a6bdf90216214422e2af52849e8af6ac7a46b857b470cfbf5"},"taxa":[{"id":"CWE-79","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":"370781f7dbd9acaecb7c138c8f76107e234a42bfb80b4d0887bcf0c10c5d2b62"},"taxa":[{"id":"CWE-79","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":"ec49e344ecbe4d50fc628afc719c85c37457adc767f4add1c361937daf2deded"},"taxa":[{"id":"CWE-79","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":"420d7bd87c523ef2a203e144206389195a0f4032ba4dff946e579c14bb5e5c30"},"taxa":[{"id":"CWE-79","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":"3a34cc1304ae843b4e78bf16901e4cbbc2a0c8416bfaf0ac303029b51138cfe7"},"taxa":[{"id":"CWE-79","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":"3af4a489c0b338ec0b471c93a7d598c98144350b27378c6e457ae530a112d6fb"},"taxa":[{"id":"CWE-79","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":"d652fafee2a4c459cb0b36e7d81d6850275c304758f5722d98e05ccea7372ad0"},"taxa":[{"id":"CWE-79","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":"4f5991a73b41f70c412f43bc19595779ee2fdd65de04bf0a5aefc7a55548cd05"},"taxa":[{"id":"CWE-79","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":"8766c508b89b24d1de77943e8a3f39019d3bf3927cabebeaeaab2d2a9a20b936"},"taxa":[{"id":"CWE-79","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":"41cf16627dfb778025ff11124015fe7ab4c6b38a5f8f29abe1d9ec97a8d2b423"},"taxa":[{"id":"CWE-79","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":"8006101dc781e8f7bc2c5389542855ffb3f0940a11664b50b606ca0bed5dd501"},"taxa":[{"id":"CWE-79","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":"43bc04405ce87edff9a5342b5264d4bf7d2c0b7c26aed846fbc4cc0e6ef27282"},"taxa":[{"id":"CWE-79","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":"c5797eabdece350f1041f20cc70b53272ad7828d39cd3357f30d0c70a98b8432"},"taxa":[{"id":"CWE-79","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":"c2c05d1a732a716a7f9b9dfff1a6546a6d1be0c8c9507e8ac793292a081a95af"},"taxa":[{"id":"CWE-79","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":"cfe3c5e63d75fd49cc783f68d2523b7b8f759d62e843908fe19d0b5f996951a0"},"taxa":[{"id":"CWE-79","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":"7d07365fbdf8e12646732fde7c048ba3b69c285f25a9123854a7c0157974dcc9"},"taxa":[{"id":"CWE-79","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":"da236cda07bd8e087cf12ab9bf2999a6da055993a0fd95c7cf21861ef0ff095c"},"taxa":[{"id":"CWE-79","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":"7c311c34116d04ddf8543702532c07bc8ff0f421a53f62dae65ed955234456a4"},"taxa":[{"id":"CWE-79","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":"63c3cfde10df35231ffbabd6a86715c6a5a0afe68640dfd04a2be64f07078e95"},"taxa":[{"id":"CWE-79","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":"a1fd35749d6dad4e46534b23f20e49f0a77421615ef70d5584a635766605b7b9"},"taxa":[{"id":"CWE-79","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":"8eebf6f45d528084178512405b217197acf4e233b66979070f3403a29cd450d3"},"taxa":[{"id":"CWE-79","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":"2f30b29d6fb24f47e08f398af89e06af32daa5c31140a5443fe6c54cc56141ee"},"taxa":[{"id":"CWE-79","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":"8511029be6802c94cb4255a672ebfedb776fde76b2cf1cb73c2df3abd19e4428"},"taxa":[{"id":"CWE-79","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":"8b01186a95345353628cd13fcd8c18104a190e7abaee9eec73fb75aeb6df6a6c"},"taxa":[{"id":"CWE-79","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":"8e41d1efd5e912b200d4d3d97eef33af1fef59252dd63893f926029f73ad2f77"},"taxa":[{"id":"CWE-79","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":"628eabb91900b0240b1028c23bb7e7c48470bdb50aac55bd2a3958bd60223ed8"},"taxa":[{"id":"CWE-79","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":"635ea68539c61df911c9af9b6cbdb442bc883ee3a5f6ad97ba5f1c81f8eb0338"},"taxa":[{"id":"CWE-79","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":"bd47a2a022b6fc1f49d4e15ae82757cb40581e7b5ef6f956b09eaa5dac15d925"},"taxa":[{"id":"CWE-79","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":"021bdebcf553afb215895b1f64d842fa4e2902c4381c1b51d99dcaf81f0982c6"},"taxa":[{"id":"CWE-79","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":"462efcb84329f174605971f7d5bc20ac3828f76a72e79be11fea78f2cbc8b9ea"},"taxa":[{"id":"CWE-79","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":"5c0c8cf5a89417d55666ace3eec10d6972b56b98da3b55be9817fbff13f6608f"},"taxa":[{"id":"CWE-79","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":"0215e443093641cd9f9ca1d97cf6d93de8b5e77049fc8b6980a8bdbcb6633a02"},"taxa":[{"id":"CWE-79","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":"e1a1a8463f1b0030bf657832ddca758b8859d8788c689e5a357b83ce48600a75"},"taxa":[{"id":"CWE-79","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":"ade97b1df1976d52be8c7330568b85a162bf8fc2cc848c2d3396e311df6f38e3"},"taxa":[{"id":"CWE-79","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":"b460c66eab3c4e05b804ae02563fdb0a76056c3f592387458ded40203dfde1ee"},"taxa":[{"id":"CWE-79","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":"ff33876b1ac2b884dc2a5e517c5f1e5ef0b4a0f0b44325132951fc4decf5c541"},"taxa":[{"id":"CWE-79","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":"9a18740de4391d5618dbd2073d96fb02fb758bc368395c7050e7b52742692785"},"taxa":[{"id":"CWE-79","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":"2da00c67c5659036d34353d69f8b4cdbb9baf918a6be2e1c88a3c9c587aa2305"},"taxa":[{"id":"CWE-79","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":"d8d627e439026923e8ea158da1e5ff5e36e2d13f56f82609290295324a05bc85"},"taxa":[{"id":"CWE-79","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":"c7a6f8dfa5cacae2d473986ddc655457d19728819045d6c4c41fcd480649748c"},"taxa":[{"id":"CWE-79","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":"eaeae92e6558801399e630ac4c24fc6b1ac82ee0beef76b1abc1f2a9b8e3bb60"},"taxa":[{"id":"CWE-79","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":"ff5057459f24caf3bf9dd717d6cc84941bb81edb52829294d1470a6771ee4420"},"taxa":[{"id":"CWE-79","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":"baf198aede2140807d1effd08271125c3dfb37c247c9f07b328bb54a5055571d"},"taxa":[{"id":"CWE-79","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":"65ee9ea1165e547a3ff6b2735ecb9b743fa2c4f155960640f99bc554fb97c8bf"},"taxa":[{"id":"CWE-79","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":"cf374ca9783fa592135a65adfcf22914e7b47ae94156a508e5b4caed139f772e"},"taxa":[{"id":"CWE-79","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":"6e5fafd2b7352abced7a3fdadc24233554846e5cb78999f488f0bd5014dc7363"},"taxa":[{"id":"CWE-79","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":"e6e68dd726debc5644d03165d9a3a7c3f3f0631c7876d475062694b4de0402ea"},"taxa":[{"id":"CWE-79","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":"163b4ef1e2920c6e8d9788ef151bce56cb78825d63b82da7fd9f8037d0a54dd7"},"taxa":[{"id":"CWE-79","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":"2862e712609d10ad96b8cb0c19566847e25f95a6617360311ad2b7fc3646fb25"},"taxa":[{"id":"CWE-79","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":"a023da76283d43b6231689886014213f1cc2b17eece4493e609ea57b62b565e2"},"taxa":[{"id":"CWE-79","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":"cbdcc5899c7e985cd0bbf0ad0c591e7a2a7d9c01519e441da0c80f36c81dcceb"},"taxa":[{"id":"CWE-79","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":"a5d1fcff24761f98ee5b084c2bc95e5ed46abfa5959cce9889d41ccf1cb22a2b"},"taxa":[{"id":"CWE-79","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":"4c035bd5cfccee555e639d946544c4dc8cfad5276300160ae458d98a63a9cd7c"},"taxa":[{"id":"CWE-79","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":"249a6615eb7f4d9719382be370c88648a5674c4fb01b5f39160a1a94d6b58020"},"taxa":[{"id":"CWE-79","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":"816aee2bdcdf262f89da772fb7c31bfbe1fbb969fe10b02e6636c9bee5288aa8"},"taxa":[{"id":"CWE-79","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":"0c122b088e763d5a267c4fabbf1b074b6eec88083753cbdd9695854b61ac717e"},"taxa":[{"id":"CWE-79","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":"7baf060350de4a8106a0a9023440632e012cec929965d47bdff7077d8603f82e"},"taxa":[{"id":"CWE-79","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":"d702f6d2b23439cd1d95f0130b137e9ad5a7174a1fde5990776706d06d390240"},"taxa":[{"id":"CWE-79","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":"7533ed743e3bd8dde5f214e62e62556d1a4da34f760725727111632efa4d34c4"},"taxa":[{"id":"CWE-79","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":"2bc35754f25d10ed7cb717a1b0626dc412b4683111721fc0352f73ab0cff2ab3"},"taxa":[{"id":"CWE-79","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":"ea351a1b8f347733de174872687388c8f9bc48c74a176177e1b26ef33effa59d"},"taxa":[{"id":"CWE-79","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":"a392e672c1e2f75871ab6df0af0e3fc0ed731061cb8c8885742530175b25b9ec"},"taxa":[{"id":"CWE-79","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":"d0d9d7a34d79088e933b9022779a3f0d90963315b71c73b3b486d73b8c818a97"},"taxa":[{"id":"CWE-79","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":"6ee1380758c8d4035b292eb7168f3548e1cb961623c6b23c93ee4fddd4698e39"},"taxa":[{"id":"CWE-79","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":"2af1f795e8eec7d45535c7f6c11b80a87e5e70ad534826c84b8402bb81a25556"},"taxa":[{"id":"CWE-79","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":"b32630506c18ef297c72997f9a5d3bc46a0cf312677060e5b0959bcb32feba27"},"taxa":[{"id":"CWE-79","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":"d5a359f29ed61afdeceeaa43733a049857501e17cda96af414d7566533d9ca4a"},"taxa":[{"id":"CWE-79","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":"f4c0098bafa764a2dbf25a16a18247531307277b9b49957ca428672abbd1e044"},"taxa":[{"id":"CWE-79","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":"e40b46c8a2664d735f1ed94f7927add2712920fce6068670135d068fd7eeb5a4"},"taxa":[{"id":"CWE-79","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":"900cfe9885a98dccffb0d93864de703501ef209a5b8b48d7b3386a981203415e"},"taxa":[{"id":"CWE-79","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":"d0a46a90b8e3ff3443679291bb0e75b5a1d78edfc6cab8cc63f9fb5f7d48542c"},"taxa":[{"id":"CWE-79","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":"993a58b5f637c8065276afbf8919c57a7f8b241a8cfca4b09c32c2a7aa86abbf"},"taxa":[{"id":"CWE-79","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":"36ce281e396c0d51e2bf34db529d883ef1c38d8a9b20ebabb35e9d89dc189d14"},"taxa":[{"id":"CWE-79","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":"f0bceae52110409dde68ef0d68b34fe792658899e01b8eb196fff66a99c79826"},"taxa":[{"id":"CWE-79","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":"9733865dad6e0a4f287f0a40c97a9504f02564e251534e9e9435a9e5b5ff5e84"},"taxa":[{"id":"CWE-79","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":"a1a737b64fb62441e4cd30f8a19e7cfcbfa316de2e238e7a6faf3e8b89f83b1b"},"taxa":[{"id":"CWE-79","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":"ea577ab4c5e2d6b21e992eb4e331338f70a29fd9b56dbd8e195f370505ed2cb2"},"taxa":[{"id":"CWE-79","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":"0448b19672e9fde70f8d73e992cb921d3405ff47f9d8611bc0ffb66ba0873f8b"},"taxa":[{"id":"CWE-79","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":"d9b43ae4c973ac9149904900e5e0d8ec4ec10aab56f108bb116997b0ed68ce57"},"taxa":[{"id":"CWE-79","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":"5330dd2d0b7ed14b6048383b110229e0c597d81860e6796d61438ff3d5d57834"},"taxa":[{"id":"CWE-79","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":"cc28e2cef892aa94226b4f00a28caed0f519572861ed195eb752d8da2c21983e"},"taxa":[{"id":"CWE-79","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":"81256d85d40963680931ea00fd57c214307c25c999ffd34fff21690c9275b8a4"},"taxa":[{"id":"CWE-79","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":"1bcdb837255a9088c8f5b6c46cd2f546ffd0801d1c723f76a0fe9b43d343d3e7"},"taxa":[{"id":"CWE-79","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":"273bc7799eca40a571877d5d2947d368a4d645c277a38b2d5347b5ebcd69e92a"},"taxa":[{"id":"CWE-79","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":"ab7d1062c27c6509c20c8019bc435a3e287b185ef54971c617c2b85419af42c9"},"taxa":[{"id":"CWE-79","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":"3861efa9d561a3060a69c3b64e93c66bae8bb30c36dee0e38129ec0c90e1ec90"},"taxa":[{"id":"CWE-79","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":"c1c70409049a902cb326215e1117ffbfa79ce8bfe39b3b4e7f50ec512f8d0cec"},"taxa":[{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D30","level":"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":"8.6.0","advisory":"[GHSA redacted]","aliases":["[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","RUSTSEC-2026-0367","RUSTSEC-2026-0368","RUSTSEC-2026-0369","RUSTSEC-2026-0429"],"reachability":{"kind":"unknown"}}}},{"ruleId":"D30","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"e9cf74773a6e34d2f2cd5f4cc024a1a57cb07e5917cf84c703df779cadb57013"},"properties":{"dependency":{"package":"rustix","version":"1.1.4","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":"d34aa4b76bef9fd7bf5c27b773b644767907155ad656920c60529c4e5c3b13db"},"properties":{"dependency":{"package":"glib","version":"0.18.5","advisory":"[GHSA redacted]","aliases":["RUSTSEC-2024-0429"],"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":"3a371141fdb30048d95e594fa557420f344f439316ab83b90dac3b6cdab8622e"},"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":"953f86db9cf1a9c76ef4a214a1e662ec327435ec8bdb45129e9aa6b227bb08e8"},"properties":{"dependency":{"package":"rustix","version":"1.1.5","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":"d0d7c95daf0cadd3e29eaf98127005ac268dc58d3f630b9413bb1f372f87740f"},"properties":{"dependency":{"package":"rustix","version":"1.1.4","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":"3bc37741d57e76072067393a84394d71803dcc091461ffdc4a522a5a349ae9d3"},"properties":{"dependency":{"package":"rustix","version":"1.1.5","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":"8c3aea0e9bbbcb9b9de379bfa7b892265a69001d6980908de0809c08b6e80afe"},"properties":{"dependency":{"package":"rustix","version":"1.1.5","advisory":"RUSTSEC-2026-0486","aliases":["[GHSA redacted]"],"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":"5922a5beeab5ac077ffb485a783ad545036e79b56239f83da38f3fb84336b113"},"properties":{"dependency":{"package":"paste","version":"1.0.15","advisory":"RUSTSEC-2024-0436","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":"f3a73015ebc37f4c1a888ae7a34b4fbd5791bcfb346bff5711f6e29915044f1b"},"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":"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":"94f958c65b1a7b6ecf6751e5caf4d82ce86c5e683be404e708e596e4c20e11c3"},"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":"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":"2e2d3953205f4a87c8e3bc0638bc4c08dea77cf161167cf5616c843adef2282c"},"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":"990d74f45466f5fc3054b513dc7bb9a4282e740a1f50a4bb29828e018621436c"},"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":"D35","level":"warning","message":{"text":"Change coupling: client.ts \u2194 coverage.ts: \u0060companions/ai-memory-ts/src/client.ts\u0060 and \u0060companions/ai-memory-ts/src/coverage.ts\u0060 change together 87% of the time (13 of the 15 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 13 shared commits counted here, the most recent 3 are \u006088999109\u0060 fix(ts-sdk): preserve profile metadata on page updates; \u0060f97f0682\u0060 docs(sdk): document source_files and carry it through the TypeScript SDK; \u0060fda4cc82\u0060 feat(mcp): address messages to a harness and record the sender harness \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/src/client.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb83a1a3083da9b54ff4f4e1a49d9c938067ed4c8566835767d2c431c7ba856d"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: coverage.ts \u2194 types.ts: \u0060companions/ai-memory-ts/src/coverage.ts\u0060 and \u0060companions/ai-memory-ts/src/types.ts\u0060 change together 87% of the time (13 of the 15 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 13 shared commits counted here, the most recent 3 are \u006088999109\u0060 fix(ts-sdk): preserve profile metadata on page updates; \u0060f97f0682\u0060 docs(sdk): document source_files and carry it through the TypeScript SDK; \u0060fda4cc82\u0060 feat(mcp): address messages to a harness and record the sender harness \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/src/coverage.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa76d8cf3590e24f41b50c9f8c3f8351c245e429061ffa87c590d3643691fac9"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: curator.rs \u2194 writer.rs: \u0060crates/ai-memory-consolidate/src/curator.rs\u0060 and \u0060crates/ai-memory-store/src/writer.rs\u0060 change together 54% of the time (7 of the 13 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 7 shared commits counted here, the most recent 3 are \u00600861e4c0\u0060 fix: harden proposal ownership and breadth retention; \u0060197eaeae\u0060 feat(auto-improve,decay): scope proposal staging and reinforcement to\u2026; \u00605044af97\u0060 feat(auto-improve,decay): scope proposal staging and reinforcement to\u2026 \u2014 run \u0060git show\u0060 on any of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-consolidate/src/curator.rs"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b4a8252fed57f1851b5e16cd8db9ba0990e6eefb484a9401bdba30f65771933"}},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"eb00976a698a5d68999b7ee6d27206fd374e916853e7ff1ead5eed42386f043f"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"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":"c593d4dbd23724f337bfb8d2c1653812f143ae255bd9b59d4b3e9c37779fa6f4"},"taxa":[{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D44","level":"warning","message":{"text":"End-of-life runtime: Rust 1.95: rust-toolchain.toml declares Rust 1.95 as this project\u0027s toolchain file, and Rust 1.95, superseded by 1.96 on 2026-05-28 (the Rust project patches only the current stable). An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2026-05-28 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"rust-toolchain.toml"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"dde701f9c40b0b8cb202babf3f8d8da48dda44162595030f1b0a8f7d57710684"}},{"ruleId":"AC2","level":"error","message":{"text":"\u003Clabel\u003E that labels no control: This \u003Clabel\u003E has no for 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 for=\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":"crates/ai-memory-core/locales/en/diagnostics.ftl"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"6199205b60738720d0e780b6cc0d495c7524e472b7c486ced25832b753e35bc7"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast Tailwind colour pair (4.3:1): This element\u0027s Tailwind text/background colour utilities fall below the 4.5:1 WCAG AA minimum for normal text. Pick a darker or lighter shade."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-web/templates/history.html"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"be67933b2cfba4a925e2b29d523c01a8679884950e426d978b261dd1d37f5f27"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (4.3:1): \u0060.agent-avatar\u0060 sets color: #9b6048 on background-color: #f6ebe4 \u2014 4.3:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-web/static/input.css"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"248c4971c78c9a1e952fcc15551952e2733eb350cd29e5db1e6c7db1513b492a"}},{"ruleId":"AC6","level":"warning","message":{"text":"Low contrast colour pair in CSS (4.3:1): \u0060.agent-avatar\u0060 sets color: #9b6048 on background-color: #f6ebe4 \u2014 4.3:1, below the 4.5:1 WCAG AA minimum for normal text. This is a MINIFIED, build-generated sheet \u2014 editing the literal here is undone by the next vendor drop or rebuild, so override the rule in your own stylesheet (or fix it upstream / in the source the bundle is built from)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-web/static/tailwind.css"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6559ddf200f1be096b3af2ffb1ad1991e7084f91271b69cc16b5090efad42500"}},{"ruleId":"AC6","level":"warning","message":{"text":"Focus outline removed in CSS without a :focus replacement: \u0060.app-content\u0060 sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-web/static/input.css"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"84e95574b12c7b0dd1ba0c1d0bc5e8cec013c06294279aa10fef779a505a2c3d"}},{"ruleId":"AC6","level":"warning","message":{"text":"Focus outline removed in CSS without a :focus replacement: \u0060.app-content\u0060 sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-web/static/tailwind.css"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"edf16f5b76b82c985dcc7c7c710f813846035f0f63d03787efb1f9bb3789915d"}},{"ruleId":"AC6","level":"warning","message":{"text":"Animation without a prefers-reduced-motion guard: \u0060.metric-link\u0060 moves (\u0060transition: border-color .15s ease,box-shadow .15s ease,transform .15s 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":"crates/ai-memory-web/static/input.css"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3a6068a9851044b032c39cdb4009f55b75cc3d4f9b9386df282995dc65d851d"}},{"ruleId":"AC6","level":"warning","message":{"text":"Animation without a prefers-reduced-motion guard: \u0060.metric-link\u0060 moves (\u0060transition: border-color .15s ease,box-shadow .15s ease,transform .15s 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":"crates/ai-memory-web/static/tailwind.css"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff96e30561103bb9c9ee191bddd67e0a1bf8470cf5930ea3a762a4dd1c73a215"}},{"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":"M2","level":"note","message":{"text":"ADRs not easily discoverable: 2 ADR-shaped document(s) detected by content \u2014 \u0060docs/design-decisions.md\u0060, \u0060plugins/claude-code/skills/ai-memory-durable-pages/SKILL.md\u0060. They are not under a conventional ADR folder (docs/adr/) and are not named NNNN-title.md, and this check found them by their decision signature rather than by where they live \u2014 so a reader who does not already know these paths has no route to them. Detected by content signature only: records kept outside the repository, or written without a Status/Decision/Consequences shape, are not visible to this check and are not counted here."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"ea921cf64dae701abd877090b3279ff10d03c2e3250e26c8c299d7c5665e0d3f"}},{"ruleId":"P2","level":"note","message":{"text":"Logging is not universal: Only 10/16 runnable modules use logging (modules with no entry point or server are excluded \u2014 they are libraries a runnable module hosts). Silent: \u0060companions/ai-memory-desktop\u0060, \u0060companions/ai-memory-importer\u0060, \u0060companions/ai-memory-macos\u0060, \u0060companions/ai-memory-relay\u0060, \u0060companions/ai-memory-wikisync\u0060 and 1 more."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"91a94e21d6d4d0e6a2003f94505b0b02b157176f0b24c4820f3f82b4447a97fe"}},{"ruleId":"P3","level":"note","message":{"text":"Dependabot does not watch npm/cargo: \u0060.github/dependabot.yml\u0060 schedules updates, but no \u0060package-ecosystem\u0060 entry covers \u0060npm\u0060, \u0060cargo\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":2}}}],"partialFingerprints":{"codehealthFindingId/v1":"da0c54ac7d1909cf66cde56c6953f9b69c17981f10a9d84238b8ca04b469d8a1"}},{"ruleId":"P7","level":"warning","message":{"text":"Outbound HTTP without resilience: \u0060reqwest::Client::builder(\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/ai-memory-llm/src/oidc.rs"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"82fb88c27c1424bbbe0e24d49c738f5e451f6a94ea25ffc9227a4f494d2875c0"}},{"ruleId":"P7","level":"warning","message":{"text":"Outbound HTTP without resilience: \u0060reqwest::Client::builder(\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/ai-memory-llm/src/openai_oauth.rs"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"901d44ef43dfad6a05bb5d846c6a0da4f930bb6490520abb5f73e1b00ff820b9"}},{"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":"evals/src/retrieval/dataset.rs"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"092d09066418cff8961e1aa0da855f880ebc1f3a0a7759c4ad1c34687cda943a"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (76 matched lines \u00D7 2 locations): companions/ai-memory-ts/src/client.ts:347 \u00B7 companions/ai-memory-ts/src/client.ts:609 \u2014 the two spans are one implementation copied and then locally edited \u2014 516 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/src/client.ts"},"region":{"startLine":347}}}],"partialFingerprints":{"codehealthFindingId/v1":"a86e64fb192829d4a6a57a5015cb05074c5dbd97438467ca6b240bae0478c48e"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2 locations): companions/ai-memory-ts/src/decode.ts:55 \u00B7 companions/ai-memory-ts/src/decode.ts:77 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/src/decode.ts"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6aeafa4e7c1a5c20e654f25fa9f929d1e548bec35452d86a53823ce28a9943f"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2 locations): companions/ai-memory-ts/src/decode.ts:164 \u00B7 companions/ai-memory-ts/src/decode.ts:325 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/src/decode.ts"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"b63abf5d062e61dfe08d0672b23541f0364d54d390d2361f0d75ae9e6b7b35bf"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2 locations): companions/ai-memory-ts/src/client.ts:661 \u00B7 companions/ai-memory-ts/src/client.ts:699 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/src/client.ts"},"region":{"startLine":661}}}],"partialFingerprints":{"codehealthFindingId/v1":"09a555c05bb5df4eb9c09cd5efc71b1cc39eff28420521f57552745562c6b3f3"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2 locations): companions/ai-memory-ts/src/decode.ts:234 \u00B7 companions/ai-memory-ts/src/decode.ts:305 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/src/decode.ts"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"1300124c924344724419f44162983a8ee5903cd3628ddaa0b7238142a4a4d710"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block with local edits (9 matched lines \u00D7 2 locations): companions/ai-memory-ts/src/client.ts:1171 \u00B7 companions/ai-memory-ts/src/transport.ts:568 \u2014 the two spans are one implementation copied and then locally edited \u2014 53 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row\u0027s finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters \u2014 or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/src/client.ts"},"region":{"startLine":1171}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f67288d1fd5617a5f325730df657dfb4dd2bb6113deaa4ecfe0b7e8bb6e18a3"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2 locations): companions/ai-memory-ts/src/core.ts:120 \u00B7 companions/ai-memory-ts/src/core.ts:135 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/src/core.ts"},"region":{"startLine":120}}}],"partialFingerprints":{"codehealthFindingId/v1":"820acc27f527b07e3ade46f28b50773455abd2aafb25d7043c351371c4deb75d"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2 locations): companions/ai-memory-ts/src/decode.ts:195 \u00B7 companions/ai-memory-ts/src/decode.ts:250 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/src/decode.ts"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab9ac14c8280bbe87fcb397b4b8fe77bd3271289be36d5cbf564b4d9182e1dd1"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2 locations): companions/ai-memory-ts/src/decode.ts:358 \u00B7 companions/ai-memory-ts/src/decode.ts:372 \u2014 all 2 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/src/decode.ts"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd797c9c9ae2c7f4f9edc561f6573af6e84409cf829a13cb0186e1d65c32f45d"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2 locations): companions/ai-memory-ts/src/core.ts:30 \u00B7 companions/ai-memory-ts/src/scope.ts:20 \u2014 the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct \u2014 and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal\u0027s entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins \u2014 a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/src/core.ts"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"99f2314901a1dfcb0f35c187c53fe7aa915eada28cb468c930a7e6d5d06219b2"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 5 locations): companions/ai-memory-ts/src/client.ts:309 \u00B7 companions/ai-memory-ts/src/client.ts:364 \u00B7 companions/ai-memory-ts/src/client.ts:595 \u00B7 companions/ai-memory-ts/src/client.ts:692 \u00B7 \u002B1 more site(s) not listed \u2014 all 5 copies are in the same file, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/src/client.ts"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b78a47ceeffdacbe277c65269f4b8285421c9bda24289a9468f90793bd3cdb5"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 6 locations): companions/ai-memory-ts/src/api.ts:174 \u00B7 companions/ai-memory-ts/src/client.ts:624 \u00B7 companions/ai-memory-ts/src/client.ts:925 \u00B7 companions/ai-memory-ts/src/client.ts:1029 \u00B7 \u002B2 more site(s) not listed \u2014 the 6 copies are spread across 2 files, and the CITED SPAN is not a self-contained block \u2014 it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead \u2014 the whole function, component or branch these lines sit in \u2014 and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/src/api.ts"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"c107820aec0cada1e5dad64cf3f5efa5bbd46c7967a3f3107c33da1de97b132d"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2 locations): companions/ai-memory-ts/src/decode.ts:151 \u00B7 companions/ai-memory-ts/src/decode.ts:169 \u2014 all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct \u2014 the members of a type, or the entries of an object or array literal \u2014 with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal\u0027s entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or \u2014 where the copies are a literal\u0027s entries rather than a type\u0027s members \u2014 one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared \u2014 a decorator and its options, an annotation, a registration table\u0027s keys \u2014 the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/src/decode.ts"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ce943c8e28c42f7f80887a3e9204e1635a900076f9d803130410b4897405b40"}},{"ruleId":"R11","level":"warning","message":{"text":"Boundary violation [package:test-suite-dependency]: companions/ai-memory-ts/scripts/schema-update.ts:10 imports companions/ai-memory-ts/test/support/tools-list.ts, a module inside the test suite \u2014 test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/scripts/schema-update.ts"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"476acbffeda081b0836c97185179538d915e807aee9e7d450c102f90de302163"}},{"ruleId":"R11","level":"warning","message":{"text":"Boundary violation [package:test-suite-dependency]: companions/ai-memory-ts/scripts/schema-update.ts:11 imports companions/ai-memory-ts/test/support/schema.ts, a module inside the test suite \u2014 test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/scripts/schema-update.ts"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a3ace574729654ab17e3b7b7ff9ff78ddddbfc69f643773e886fc70346b1e5a"}},{"ruleId":"R11","level":"warning","message":{"text":"Boundary violation [package:test-suite-dependency]: companions/ai-memory-ts/scripts/schema-update.ts:12 imports companions/ai-memory-ts/test/support/server.ts, a module inside the test suite \u2014 test helpers carry no compatibility contract and are maintained for the suite, not as an API, so production code that depends on one is coupled to a module nobody keeps stable. Move the shared helper into a source directory both layers may depend on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/scripts/schema-update.ts"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"57683cfe416bfb670ff60c80bfd4ed9f294c31f2ecc138c8a0f96e1da1f346e3"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function normalizeSchema (cyclomatic 28, cognitive 43): normalizeSchema has cyclomatic complexity 28 and cognitive complexity 43; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/test/support/schema.ts"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ce49d979e562bc701a1663a27ac362ca5a66575998c56eeae0b04093f758346"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function request (cyclomatic 23, cognitive 29): request has cyclomatic complexity 23 and cognitive complexity 29; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/src/transport.ts"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8b7738c40bde5c1112c636c2592138eeda453024b7f52a4284dcc82fcc01a74"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function metadataFromFrontmatter (cyclomatic 22, cognitive 25): metadataFromFrontmatter has cyclomatic complexity 22 and cognitive complexity 25; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/src/client.ts"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"6249866dec48453e966968952e25801629b069e1f9a5c6359138bf41ecdb5f83"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function query (cyclomatic 18, cognitive 27): query has cyclomatic complexity 18 and cognitive complexity 27; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/src/client.ts"},"region":{"startLine":946}}}],"partialFingerprints":{"codehealthFindingId/v1":"84547954e0153d7a1a3cb55d70bb9a534ffee941a05b388c50fbcd66f0b5c731"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function main (cyclomatic 17, cognitive 22): main has cyclomatic complexity 17 and cognitive complexity 22; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/e2e/web_dashboard_browser.mjs"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"a59e71f1e2bcc663c98290fe2d18316a2f362925cb47ed654bd6cda051f096ef"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function read (cyclomatic 17, cognitive 17): read has cyclomatic complexity 17 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/src/client.ts"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"840c7a3a7dc01196e7f2cce6411cacb5b0b50757c17115c88f8e012382375e3e"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function update (cyclomatic 16, cognitive 19): update has cyclomatic complexity 16 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/src/client.ts"},"region":{"startLine":542}}}],"partialFingerprints":{"codehealthFindingId/v1":"74e9a5171cf0a143fd62bbe20b88822202ba9e6a5ffec622452cd4fe654cb6b7"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function constructor (cyclomatic 15, cognitive 15): constructor has cyclomatic complexity 15 and cognitive complexity 15; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/src/transport.ts"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"3913b5b73e8e2f09076d235ccae293e62e92d31fbc6c7f3f427d291e7e2864ca"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function startServer (cyclomatic 14, cognitive 24): startServer has cyclomatic complexity 14 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/test/support/server.ts"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"6943f148db87ddfeaaa9dc13f15180c8ca7daeb2a5c2ee0ebaacf9c98b98c20f"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function paused (cyclomatic 12, cognitive 11): paused has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"tests/e2e/web_dashboard_browser.mjs"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"451e57c3711e2a627e81645d77a624819172a5b90add9697b8049579ae725333"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function httpError (cyclomatic 11, cognitive 9): httpError has cyclomatic complexity 11 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/src/transport.ts"},"region":{"startLine":388}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1c4ef39863670d99632267fbb0834e6bfdeb96217c38785f35c1164c93991cb"}},{"ruleId":"R3","level":"warning","message":{"text":"companions/ai-memory-ts/src/client.ts: 1141 lines of code: companions/ai-memory-ts/src/client.ts has 1141 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/src/client.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"53541a499b254b1c200529f303a0ef13d50970aebbbd5ecb4933f3206072622f"}},{"ruleId":"R3","level":"warning","message":{"text":"companions/ai-memory-ts/src/transport.ts: 543 lines of code: companions/ai-memory-ts/src/transport.ts has 543 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/src/transport.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"114dab21bebd697354b51944d291e517860e5ef87bfb372be494eb5e0a62c7a7"}},{"ruleId":"R4","level":"warning","message":{"text":"This test file cannot be loaded: companions/ai-memory-ts/test/integration/examples.test.ts:14 imports \u0027../../examples/\u0027, which names no file in this repository \u2014 and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/test/integration/examples.test.ts"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"98751ed3fc5c502d45e1cfb948d1cca913f6e0fe8faf517fadc5f2c9c38de720"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/scripts/generate-docs.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"81008026ef8626d009af1472872c9486e76e49d103cf60246b870092655dbb22"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/scripts/schema-check.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"34ddca17542078fb13737ef950b521a907718b5bb184fc299e06ab0aa2512df0"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-web/static/management/theme.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b49dd1e78ecaa841557c64fe4b22022c92ffc49f3372bb7eb02cf9e501f6232f"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/scripts/schema-update.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d37c530011daf935136849cac5e3a7ab55c6a267fa6ac0b3c7474558151949c"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-desktop/ui/app.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe8870a28629f392249e481b4481cb23885c8199ebac11795ff8ace3ed6eacc6"}},{"ruleId":"R6","level":"warning","message":{"text":"The declared test suite includes a file that cannot be loaded: This repository declares test tooling, and the \u2713 above records that declaration \u2014 but companions/ai-memory-ts/test/integration/examples.test.ts cannot be loaded at all: it imports a module that names no file in this repository, so the runner throws while collecting it and none of its cases execute. The wiring is present and the suite it points at does not run as written, which is why the tooling tick must not be read as a statement that the tests pass. Fix the unloadable file(s) \u2014 each one is reported with its failing import under Test Coverage \u2014 then the declared script exercises what it claims to."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"companions/ai-memory-ts/test/integration/examples.test.ts"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e1681b71a5882c3a3a5b30274a7eb598778fb7238ebfc7e8ecbe53ade62473f"}},{"ruleId":"S1","level":"note","message":{"text":"No security response headers detected: None of the 11 security response headers the OWASP Secure Headers Project recommends (Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options, X-Frame-Options, \u2026) is configured \u2014 defense in depth, even when a reverse proxy could set them. This is reported because \u0060nginx.conf\u0060 is committed to this repository and declares the server that serves it, so the configuration that would carry these headers is in this repository and was read in full. (\u22122.0 on this card.)"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"docker/multiuser-test/nginx.conf"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1dbb02fa1ed072cc32e8390c51ba4605b8d6e15b3c0becd895fbc562723dc52"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060a.scope !== undefined || a.scopes !== undefined\u0060 appears character-identically in 2 files \u2014 companions/ai-memory-ts/src/api.ts, companions/ai-memory-ts/src/client.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":"companions/ai-memory-ts/src/api.ts"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"a31d25a96f04a87b1bf78f53a66eb1bdef00a25a16341923a2c5eeacfae88566"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060frontmatter !== null \u0026\u0026 typeof frontmatter === \u0022object\u0022 \u0026\u0026 !Array.isArray(frontmatter)\u0060 appears character-identically in 2 files \u2014 companions/ai-memory-ts/src/client.ts, companions/ai-memory-ts/src/decode.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":"companions/ai-memory-ts/src/client.ts"},"region":{"startLine":481}}}],"partialFingerprints":{"codehealthFindingId/v1":"7eb8aad6044dcb400954a36b64edfb8cb02bf79df6c5eee4a5b6fc467414c633"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060response.status \u003C 200 || response.status \u003E= 300\u0060 appears character-identically in 2 files \u2014 companions/ai-memory-ts/src/api.ts, companions/ai-memory-ts/src/transport.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":"companions/ai-memory-ts/src/api.ts"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"56e2b7905870ff41036b5fe3b9f06c29905d636ceed10a911009c6046ae60abb"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060typeof value !== \u0022string\u0022 || value.trim() === \u0022\u0022\u0060 appears character-identically in 2 files \u2014 companions/ai-memory-ts/src/core.ts, companions/ai-memory-ts/src/scope.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":"companions/ai-memory-ts/src/core.ts"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"173df1d3b9c1299b71ee27e2f399c7c58212baf46114e8cc54e504f314771b11"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060value !== null \u0026\u0026 typeof value === \u0022object\u0022 \u0026\u0026 !Array.isArray(value)\u0060 appears character-identically in 2 files \u2014 companions/ai-memory-ts/src/capabilities.ts, companions/ai-memory-ts/src/transport.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":"companions/ai-memory-ts/src/capabilities.ts"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"4afccbf1677c66f29ccd364c19cab4090ebc4e5fceca6291f273321d1d9877e5"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060value === null || typeof value !== \u0022object\u0022 || Array.isArray(value)\u0060 appears character-identically in 3 files \u2014 companions/ai-memory-ts/src/admin.ts, companions/ai-memory-ts/src/core.ts, companions/ai-memory-ts/src/decode.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":"companions/ai-memory-ts/src/admin.ts"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"aaf385788cbd8dc2f07cbe9d16dc2156f5744ead4bb8d8acaf8c0510d2fb8867"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!body.is_empty() \u0026\u0026 !is_acknowledgment(body)\u0060 appears character-identically in 2 files \u2014 crates/ai-memory-hooks/src/router.rs, crates/ai-memory-hooks/src/session_end_equivalence.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/ai-memory-hooks/src/router.rs"},"region":{"startLine":6308}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd56b8a84afd9417fb007a2da480c7e8bce3f400f53b28c871bc527695ca3018"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!breadth_weight.is_finite() || breadth_weight \u003C 0.0\u0060 appears character-identically in 2 files \u2014 crates/ai-memory-consolidate/src/curator.rs, crates/ai-memory-consolidate/src/sweep.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/ai-memory-consolidate/src/curator.rs"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf5013364420b2abd4cd755c973250cac09ff9aec053a6e3e4857dba7b2c8f05"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!self.groups.is_empty() \u0026\u0026 self.char_count() \u003E max_chars\u0060 appears character-identically in 2 files \u2014 crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs, crates/ai-memory-consolidate/src/projection.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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":325}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c3a52bf26f94e8bf9d7363a7e0da1f095c90be10ee6681733a7c59c41fb2082"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!std::io::stdin().is_terminal() || !std::io::stdout().is_terminal()\u0060 appears character-identically in 2 files \u2014 crates/ai-memory-cli/src/commands/resume.rs, crates/ai-memory-cli/src/commands/show.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/ai-memory-cli/src/commands/resume.rs"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab7f7aa070144f7dcd1d3e82b2b4a0beece9d6750918736aa0c03dac9b6bb362"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060!trimmed.eq_ignore_ascii_case(\u0022y\u0022) \u0026\u0026 !trimmed.eq_ignore_ascii_case(\u0022yes\u0022) \u0026\u0026 !trimmed.eq_ignore_ascii_case(\u0022s\u0022) \u0026\u0026 !trimmed.eq_ignore_ascii\u2026\u0060 appears character-identically in 2 files \u2014 crates/ai-memory-cli/src/commands/api_key.rs, crates/ai-memory-cli/src/commands/user.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/ai-memory-cli/src/commands/api_key.rs"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8925891e9b25a45a085c48743b620c84fb90ad717a44915af4a55b8eb9aeb82"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060Path::new(\u0022/.dockerenv\u0022).exists() || Path::new(\u0022/run/.containerenv\u0022).exists()\u0060 appears character-identically in 2 files \u2014 crates/ai-memory-cli/src/commands/serve.rs, crates/ai-memory-wiki/src/backup.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/ai-memory-cli/src/commands/serve.rs"},"region":{"startLine":622}}}],"partialFingerprints":{"codehealthFindingId/v1":"148591db70ff680dac330441a2f666a6d82e13c535ea1be6898336d6ed4cd613"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060args.apply \u0026\u0026 args.manifest_out.is_none()\u0060 appears character-identically in 2 files \u2014 companions/ai-memory-importer/src/agentmemory/export.rs, companions/ai-memory-importer/src/claude_mem.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":"companions/ai-memory-importer/src/agentmemory/export.rs"},"region":{"startLine":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"d31146e4abffefec9681891615ccc9335cf8c7d37445e6cb2ee9c5f8d183b22d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060body.ends_with(\u0027?\u0027) || body.ends_with(\u0027\uFF1F\u0027)\u0060 appears character-identically in 2 files \u2014 crates/ai-memory-hooks/src/router.rs, crates/ai-memory-hooks/src/session_end_equivalence.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/ai-memory-hooks/src/router.rs"},"region":{"startLine":6274}}}],"partialFingerprints":{"codehealthFindingId/v1":"a33324a5d828af532d286b3e3bfcbfa470092c38cfb5bf682622637fc3548fea"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060candidate.trim() == SUBAGENT_PROMPT_PREAMBLE || looks_like_scaffolding(candidate)\u0060 appears character-identically in 2 files \u2014 crates/ai-memory-hooks/src/session_end_equivalence.rs, crates/ai-memory-hooks/src/synth.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/ai-memory-hooks/src/session_end_equivalence.rs"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"edd6c96b02dfa434bd0576f50c2bfebdc3a18c764e687015c7064dfc85ba1ab2"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060cfg.max_selected_observations == 0 || cfg.max_total_chars == 0\u0060 appears character-identically in 2 files \u2014 crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs, crates/ai-memory-consolidate/src/projection.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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a3297bd0cc660a3acbd78ad81d16238d6b7c8129d90e6126d3f3fa27e0f1c10"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060config.server_url_configured() || config.server_url_derived_from_bind\u0060 appears character-identically in 2 files \u2014 crates/ai-memory-cli/src/commands/install_mcp.rs, crates/ai-memory-cli/src/commands/run.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/ai-memory-cli/src/commands/install_mcp.rs"},"region":{"startLine":609}}}],"partialFingerprints":{"codehealthFindingId/v1":"b98c034a33f2664507b7371b9de39f2795c9175a7421ff2c402799826d217afe"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060entry_type.is_file() || entry_type == tar::EntryType::GNUSparse\u0060 appears character-identically in 2 files \u2014 crates/ai-memory-cli/src/commands/restore.rs, crates/ai-memory-cli/src/commands/upgrade.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/ai-memory-cli/src/commands/restore.rs"},"region":{"startLine":694}}}],"partialFingerprints":{"codehealthFindingId/v1":"c81cff44e8cc09c02efd337666c5f54ff2125cb2218c29d8bd6b1c4165fb1e6a"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060entry_type.is_symlink() || entry_type.is_hard_link()\u0060 appears character-identically in 2 files \u2014 crates/ai-memory-cli/src/commands/restore.rs, crates/ai-memory-cli/src/commands/upgrade.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/ai-memory-cli/src/commands/restore.rs"},"region":{"startLine":701}}}],"partialFingerprints":{"codehealthFindingId/v1":"3470165496b0a30c61543b0ed86669f1592bdaacddb5719546dde6b61a622bc7"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060error.get(\u0022code\u0022).and_then(Value::as_i64) != Some(INVALID_REQUEST) || data.get(\u0022reason\u0022).and_then(Value::as_str) != Some(\u0022precondition_faile\u2026\u0060 appears character-identically in 2 files \u2014 companions/ai-memory-importer/src/mcp.rs, companions/ai-memory-wikisync/src/mcp.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":"companions/ai-memory-importer/src/mcp.rs"},"region":{"startLine":509}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d783f04912d91e973f9b2df129f30b55abb6528558c66131055404f68973e20"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060error.kind() == std::io::ErrorKind::ExecutableFileBusy \u0026\u0026 attempt \u003C ATTEMPTS\u0060 appears character-identically in 2 files \u2014 crates/ai-memory-cli/src/commands/codex_hook_trust.rs, crates/ai-memory-cli/src/commands/opencode_dialect.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/ai-memory-cli/src/commands/codex_hook_trust.rs"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3619625673284351dd2d6d9a52f6bcce3f4154aa644697a17e8a1072be0ea37"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060first.is_ascii_lowercase() || first.is_ascii_digit()\u0060 appears character-identically in 2 files \u2014 crates/ai-memory-cli/src/commands/show.rs, crates/ai-memory-cli/src/server_profiles.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/ai-memory-cli/src/commands/show.rs"},"region":{"startLine":571}}}],"partialFingerprints":{"codehealthFindingId/v1":"b53727c513d800eaedd4b6522f41b8f94b31c9d0b530499062178db3df3026d0"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060first_line.starts_with(\u0022tool_family:\u0022) || first_line.starts_with(\u0022tool:\u0022)\u0060 appears character-identically in 2 files \u2014 crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs, crates/ai-memory-consolidate/src/projection.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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":552}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1771456fbb4f2ea381457e785e158af278d6c97138636dc24db3ffd217bc6b8"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060hooks_json.contains(\u0022ai-memory\u0022) || hooks_json.contains(\u0022ai_memory\u0022)\u0060 appears character-identically in 2 files \u2014 crates/ai-memory-cli/src/commands/run.rs, crates/ai-memory-cli/src/commands/run_autowire.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/ai-memory-cli/src/commands/run.rs"},"region":{"startLine":10355}}}],"partialFingerprints":{"codehealthFindingId/v1":"90dfa630794f4c61ce9ba0835f2d25243eebf3badf6ff6493fe3899ca2844d43"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060is_regular_file(entry_type) || entry_type.is_dir()\u0060 appears character-identically in 2 files \u2014 crates/ai-memory-cli/src/commands/restore.rs, crates/ai-memory-cli/src/commands/upgrade.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/ai-memory-cli/src/commands/restore.rs"},"region":{"startLine":704}}}],"partialFingerprints":{"codehealthFindingId/v1":"550d2a84f7f52e352e3cc5cb751e56d4f4a3a661541323f032cd97d593d63f60"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060line.is_empty() || line.starts_with(\u0027#\u0027)\u0060 appears character-identically in 2 files \u2014 crates/ai-memory-cli/src/commands/upgrade.rs, crates/ai-memory-cli/src/marker.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/ai-memory-cli/src/commands/upgrade.rs"},"region":{"startLine":489}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0d91f1b398d8266dc13103c833f9ca06f6fe20373cea42182f8bb86c6651956"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060obs.kind == ObservationKind::SessionStart || obs.title == obs.kind.as_str()\u0060 appears character-identically in 2 files \u2014 crates/ai-memory-hooks/src/session_end_equivalence.rs, crates/ai-memory-hooks/src/synth.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/ai-memory-hooks/src/session_end_equivalence.rs"},"region":{"startLine":156}}}],"partialFingerprints":{"codehealthFindingId/v1":"ef43efde2ab10c3ce8d5fc0e1de20928e82bf53aefcf6688d65e40018c9c059d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060observation.body.chars().count() \u003C= per_body_excerpt_chars || carries_routing_text(observation)\u0060 appears character-identically in 2 files \u2014 crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs, crates/ai-memory-consolidate/src/projection.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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":378}}}],"partialFingerprints":{"codehealthFindingId/v1":"c591422cac8f9a2c60811ff3b232131cb50d972337645761c0a80bc3b60c33fc"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060p.edit_mode == \u0022patch\u0022 || (target_exists \u0026\u0026 path.as_str() == \u0022_slots/current-focus.md\u0022)\u0060 appears character-identically in 2 files \u2014 crates/ai-memory-consolidate/src/auto_improve_schedule.rs, crates/ai-memory-mcp/src/admin.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/ai-memory-consolidate/src/auto_improve_schedule.rs"},"region":{"startLine":633}}}],"partialFingerprints":{"codehealthFindingId/v1":"2845c39ab0d717c4d9e36b0e89257b931e42da56a9ba82d92dc32242a5354f02"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060report[\u0022files_failed\u0022].as_array() \u0026\u0026 !failed.is_empty()\u0060 appears character-identically in 2 files \u2014 crates/ai-memory-cli/src/commands/purge_project.rs, crates/ai-memory-cli/src/commands/purge_session.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/ai-memory-cli/src/commands/purge_project.rs"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"20673b9301382f2ec6fe83f032309f42f5c3ac1143ebc86786cdd8518ada7c84"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060segment.is_empty() || segment == \u0022.\u0022 || segment == \u0022..\u0022\u0060 appears character-identically in 2 files \u2014 companions/ai-memory-importer/src/agentmemory/mod.rs, crates/ai-memory-core/src/ids.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":"companions/ai-memory-importer/src/agentmemory/mod.rs"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"61757a3067b1cf948e2e583ffaa5697cd85e977edd79607f89c2d1c2ee60081d"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.max_eps \u003E 0.0 \u0026\u0026 self.max_eps.is_finite()\u0060 appears character-identically in 2 files \u2014 crates/ai-memory-consolidate/src/dream.rs, crates/ai-memory-consolidate/src/sweep.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/ai-memory-consolidate/src/dream.rs"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"c35b5c73a64d87a9fbcbbb12e1114e8bd89c1024f06310f2840d4ae6fdde56df"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.project.is_some() || self.identity.is_some()\u0060 appears character-identically in 2 files \u2014 crates/ai-memory-cli/src/commands/hook_capture.rs, crates/ai-memory-cli/src/marker.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/ai-memory-cli/src/commands/hook_capture.rs"},"region":{"startLine":513}}}],"partialFingerprints":{"codehealthFindingId/v1":"3863ab8666186915db1c5ee9931d889dabea6fd6df1276696994fa7b0510dff9"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060source != \u0022USER_EXPLICIT\u0022 \u0026\u0026 !source.ends_with(\u0022_USER_EXPLICIT\u0022)\u0060 appears character-identically in 2 files \u2014 crates/ai-memory-hooks/src/antigravity.rs, crates/ai-memory-workstream/src/transcript.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/ai-memory-hooks/src/antigravity.rs"},"region":{"startLine":668}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2941e79ad27c8c0740d65eacfd4b938c227fb7cbcae7fd91acda5b1f0f6cf6f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060target.contains(\u0022://\u0022) || lower.starts_with(\u0022mailto:\u0022) || lower.starts_with(\u0022data:\u0022) || lower.starts_with(\u0022javascript:\u0022) || lower.starts_wit\u2026\u0060 appears character-identically in 2 files \u2014 crates/ai-memory-web/src/markdown.rs, crates/ai-memory-wiki/src/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/ai-memory-web/src/markdown.rs"},"region":{"startLine":727}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ab25207c2e2b9e40588013d59cdb45cbddfc695c2066dc033dbdb69c4c5d1e8"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060text.contains(\u0022long-term memory (ai-memory)\u0022) || text.contains(\u0022install ai-memory routing\u0022) || text.contains(\u0022memory_query searches only one\u2026\u0060 appears character-identically in 2 files \u2014 crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs, crates/ai-memory-consolidate/src/projection.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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":789}}}],"partialFingerprints":{"codehealthFindingId/v1":"980bfedeeb69499462f22edfa16b9bc033d855d9685f897c1242cdcb181bc850"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060text.ends_with(\u0027?\u0027) || text.ends_with(\u0027\uFF1F\u0027)\u0060 appears character-identically in 2 files \u2014 crates/ai-memory-hooks/src/session_end_equivalence.rs, crates/ai-memory-hooks/src/synth.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/ai-memory-hooks/src/session_end_equivalence.rs"},"region":{"startLine":454}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5db2f1924caadb18173595653f7332fe88add0fc4eafea7aabf4e7f2feaf555"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060total_chars \u003E cfg.max_total_chars \u0026\u0026 selected.len() \u003E 1\u0060 appears character-identically in 2 files \u2014 crates/ai-memory-consolidate/src/consolidator_frozen_oracle.rs, crates/ai-memory-consolidate/src/projection.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/ai-memory-consolidate/src/consolidator_frozen_oracle.rs"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"a263c5d7e9a3af6459c1a2afc990684532d37bc713b033d9fbecfa495a89a05b"}},{"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/ai-memory-cli/src/commands/doctor/hermes.rs, crates/ai-memory-cli/src/commands/run.rs, crates/ai-memory-cli/src/marker.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/ai-memory-cli/src/commands/doctor/hermes.rs"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f46e7c7c9558ae9209b4de2538b6f3c11992b475c82ca76490884cef52d9973"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060workspace.contains(\u0027/\u0027) || project.contains(\u0027/\u0027)\u0060 appears character-identically in 2 files \u2014 crates/ai-memory-web/src/routes/pending.rs, crates/ai-memory-web/src/routes/workstreams.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/ai-memory-web/src/routes/pending.rs"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"02af51ce698ed294f3c135855d160ffc4231a7c5d2e656f79fec9a66e2230976"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060info!\u0060 at line 174 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: \u0060info!(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":"evals/src/retrieval/dataset.rs"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"c27a4d596f2c1990a5f59acbeaba0da66954558902e8151ea97d0333c3a39203"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060error!\u0060 at line 746 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: \u0060error!(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":"evals/src/retrieval/mod.rs"},"region":{"startLine":746}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7bbea2ec79e1d5d80335475af39fffa1713f008e95a6d12ffe1e10c52c70d36"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060warn!\u0060 at line 286 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/ai-memory-store/src/lib.rs"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"e27be71f1654b07119172206c18b970ca38440edc3cfa76b10bf96da3fb66262"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060warn!\u0060 at line 9153 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/ai-memory-mcp/src/admin.rs"},"region":{"startLine":9153}}}],"partialFingerprints":{"codehealthFindingId/v1":"05bcbbedd4cec24296083945554649297a45a4df906adfd6616b2a64ebdafe92"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060warn!\u0060 at line 6520 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/ai-memory-hooks/src/router.rs"},"region":{"startLine":6520}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a07e60cb87a29a87c71b965272d7ef3848a88443133bfe6045129a2cc82de2f"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060debug!\u0060 at line 6523 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: \u0060debug!(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/ai-memory-hooks/src/router.rs"},"region":{"startLine":6523}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c44a0aaa8c0e26380646e6515140a244e193677768a719f0d4f4c23932fd6a8"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060warn!\u0060 at line 35 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/ai-memory-cli/src/proxy_env.rs"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d17d90373d1cb19762e794b574e350bef43d4de686dc83a012f8f5f3d808a4e"}},{"ruleId":"X4","level":"note","message":{"text":"Interpolated log message defeats structured logging: \u0060error!\u0060 at line 373 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: \u0060error!(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/ai-memory-cli/src/commands/service_host.rs"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"376be07a0c4ccb947fdd011cbdd64b193362e9ae1ba5cf8a1ca71dea24852fc8"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060child_directories\u0060 turns every \u0060Err\u0060 into \u0060Some(Vec::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/ai-memory-cli/src/commands/hook.rs"},"region":{"startLine":3097}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e0d6428a71d681a4feda413b9b970734b4de93d09600ed3da91b2239f2661fe"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060list\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/ai-memory-cli/src/commands/jail_folders.rs"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"140ba9a3d1e6100ea6017dd7de4a4829043ccc23c93a88fa8e7470a077cccae4"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060identity\u0060 turns every \u0060Err\u0060 into \u0060\u0022\u003Cinvalid-server-url\u003E\u0022.to_owned()\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/ai-memory-cli/src/http_client.rs"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ac362a9d789004989c1e64b6c0b102a50a6d825f964fbbb99711afe02277461"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060approvals\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/ai-memory-cli/src/commands/doctor/hermes.rs"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"50694d35b54e939fc47ce7d15062a1d9fe6da9c460cce17bf7a671597cd2d8bc"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060hook_scope_from_selection\u0060 turns every \u0060Err\u0060 into \u0060Some(\u0022invalid\u0022.to_owned())\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/ai-memory-cli/src/commands/hook_capture.rs"},"region":{"startLine":645}}}],"partialFingerprints":{"codehealthFindingId/v1":"af5b2cd4d7413822ad354957aeaa24e188c5c5e2cc453ddb598cefc6ac9a7d48"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060marker_query_suffix_impl\u0060 turns every \u0060Err\u0060 into \u0060String::new()\u0060 \u2014 a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with \u0060?\u0060. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"crates/ai-memory-cli/src/commands/hook_capture.rs"},"region":{"startLine":736}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce0851f173b69ba6e085bbba412589d7b00f69d92f06aade71f0c3c617ee664b"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060build_client\u0060 turns every \u0060Err\u0060 into \u0060reqwest::Client::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/ai-memory-cli/src/commands/hook_capture.rs"},"region":{"startLine":938}}}],"partialFingerprints":{"codehealthFindingId/v1":"789f257629936db615e674f3abf23a29df2438b817805f61fabbbf274f1811b4"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060spool_health\u0060 turns every \u0060Err\u0060 into \u0060SpoolHealth::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/ai-memory-cli/src/commands/hook_spool.rs"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"2362a56a3c6d469a4bcf9e8a5ae1c70e043ff0b6b017fa567e9826298ed78cb5"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060claude_subagent_transcripts\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/ai-memory-cli/src/commands/session_usage.rs"},"region":{"startLine":517}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b712481210920b1e355b77ce339a894c51bbb927108eb7aafa594ba54fd37b8"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060humanize_age\u0060 turns every \u0060Err\u0060 into \u0060\u0022unknown activity\u0022.to_owned()\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/ai-memory-cli/src/commands/show.rs"},"region":{"startLine":696}}}],"partialFingerprints":{"codehealthFindingId/v1":"72f77c18ca8dbd1747c35634bcfc709aa6d6e6c0b1d419bf6620ea13a3571353"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060humanize_age\u0060 turns every \u0060Err\u0060 into \u0060\u0022unknown activity\u0022.to_owned()\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/ai-memory-cli/src/commands/workstreams.rs"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2fda947afc55a4b714bf6d9d7ca17a23f1a2f58d4b282d4d8784e5debf054eb"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060display_url\u0060 turns every \u0060Err\u0060 into \u0060\u0022an unparsable URL\u0022.to_owned()\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/ai-memory-cli/src/http_client.rs"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"a928fea5f137082cd0d28e130304723cbf5408612fff12c8aee5ddc9a0a29f9a"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060http_client\u0060 turns every \u0060Err\u0060 into \u0060reqwest::Client::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/ai-memory-cli/src/http_client.rs"},"region":{"startLine":412}}}],"partialFingerprints":{"codehealthFindingId/v1":"85bf9592852a94e54cd374ff437e646fa14728ee0095b6e6d78bf57bba997464"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060link_native_session\u0060 turns every \u0060Err\u0060 into \u0060Ok(false)\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/ai-memory-store/src/workstream.rs"},"region":{"startLine":997}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7aa7c01ba0d4a93715bea6f732b18877ee2958b5b058b88cd71b9fd621c4eec"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060dead_http_endpoint\u0060 turns every \u0060Err\u0060 into \u0060\u0022http://127.0.0.1:1\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/ai-memory-test-support/src/lib.rs"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba18ff1f2e18fa30b16a448f32c42e7d07eabd9ebe2ffa72a374c7e20106b599"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060antigravity_brain_prompt_events\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/ai-memory-workstream/src/transcript.rs"},"region":{"startLine":5110}}}],"partialFingerprints":{"codehealthFindingId/v1":"91da7e78ee1cf9a8ad69527f42b463d99260e23cb12f0e914ec9d123f512e020"}},{"ruleId":"X7","level":"note","message":{"text":"Silent fallback default on Err: \u0060stderr_snapshot\u0060 turns every \u0060Err\u0060 into \u0060\u0022(stderr capture poisoned)\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":"evals/src/retrieval/server.rs"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"498090ade382233f3dff248c23445c4b187cc88abb7567f6d2d02895e21d1df9"}}],"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-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-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-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-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":"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":"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/"}]},{"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-9","guid":"b3d36727-0395-5b51-94c4-5e173d62eab3","name":"Improper Artifact Integrity Validation","shortDescription":{"text":"Improper Artifact Integrity Validation"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-09-Improper-Artifact-Integrity-Validation"}]}],"properties":{"codehealthPublication":{"public":true,"notice":"This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings \u2014 which rule fired, in which file, on which line, and how to fix it \u2014 are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.","securityFindingsRedacted":150,"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."]}]}