{"$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":"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"]}],"properties":{"cwe":["CWE-798","CWE-259"]}},{"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":"D21","name":"Naming Consistency","shortDescription":{"text":"Naming Consistency"},"helpUri":"https://codehealth.canine.dev/dimensions/D21"},{"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"]}],"properties":{"cwe":["CWE-798","CWE-259"]}},{"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"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"]}},{"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"]}],"properties":{"cwe":["CWE-1032","CWE-732","CWE-16"]}},{"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"]}],"properties":{"cwe":["CWE-1357","CWE-494"]}},{"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"]}],"properties":{"cwe":["CWE-1059"]}},{"id":"D38","name":"OSV Dependency Vulnerabilities","shortDescription":{"text":"OSV Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D38","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"]}],"properties":{"cwe":["CWE-1395","CWE-937"]}}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"renderDetailDrawer (cyclomatic 104): renderDetailDrawer has cyclomatic complexity 104 (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":"internal/monitoring/static/app.js"},"region":{"startLine":2317}}}],"partialFingerprints":{"codehealthFindingId/v1":"75e9fc9baf9c9d0e3ad7b0e155a4c89f84c29ee610c151d97ecbf01d20c35802"}},{"ruleId":"D1","level":"warning","message":{"text":"Config.setDefaults (cyclomatic 55): Config.setDefaults has cyclomatic complexity 55 (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":"internal/ares_config/config_defaults.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"58dfbe90b74a08540cdec9b198dd62bfdd833afe8c721181f83618b4f24c6345"}},{"ruleId":"D1","level":"warning","message":{"text":"Compactor.buildSummary (cyclomatic 48): Compactor.buildSummary has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_events/compactor.go"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"4655c35b248db9027bd3b43c031231ad90af36112d8904855df09ac8ade327cd"}},{"ruleId":"D1","level":"warning","message":{"text":"Validator.validateValue (cyclomatic 40): Validator.validateValue 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":"internal/llm/output/validator.go"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4d59b00135a7e0f0fc3030751cf33475af30acc33151929b2abb60a889114ee"}},{"ruleId":"D1","level":"warning","message":{"text":"leaderAgent.ProcessStream (cyclomatic 39): leaderAgent.ProcessStream has cyclomatic complexity 39 (threshold 15). Most of this is not in the body itself: 5 of the 39 points are its own statements and the rest belongs to one function literal inside it that branches (line 710). 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":"internal/agents/leader/agent.go"},"region":{"startLine":662}}}],"partialFingerprints":{"codehealthFindingId/v1":"e73308ac383b62332b57ce9e7b718ce897e1c798c8cce9d7e349c2733198d677"}},{"ruleId":"D1","level":"warning","message":{"text":"MultiAssetSimulator.RunMultiAssetSimulation (cyclomatic 37): MultiAssetSimulator.RunMultiAssetSimulation has cyclomatic complexity 37 (threshold 15). Of this number, 35 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_quant/portfolio/simulator.go"},"region":{"startLine":445}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7d8c49feaf1a5931f5d3204d3cecbecc301a95f2f487deed2d5da48abf80c7b"}},{"ruleId":"D1","level":"warning","message":{"text":"MutableDAG.ReplaceNode (cyclomatic 36): MutableDAG.ReplaceNode has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/workflow/engine/mutable_dag.go"},"region":{"startLine":629}}}],"partialFingerprints":{"codehealthFindingId/v1":"7273dbe6881accc186a92d4f1325e2d265d990ca506fb8b00a1cecfd45a57500"}},{"ruleId":"D1","level":"warning","message":{"text":"showDAGTooltip (cyclomatic 34): showDAGTooltip has cyclomatic complexity 34 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/monitoring/static/app.js"},"region":{"startLine":1333}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c561dac160a0b37b1bae4de868c425aa22894eabcb10b070d3b5aef9233d2ec"}},{"ruleId":"D1","level":"warning","message":{"text":"UserProfile.Execute (cyclomatic 33): UserProfile.Execute has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/resources/builtin/memory/memory_tools.go"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"1499b06f709e56a5e37898c77fcb5f753a53278446efc39d3dac00787e32a849"}},{"ruleId":"D1","level":"warning","message":{"text":"(anonymous) (cyclomatic 33): (anonymous) has cyclomatic complexity 33 (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":"internal/monitoring/static/app.js"},"region":{"startLine":713}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b03d0599b80895d48e9da4cd22b5ebda6b0158c1ec5034c4487f6f2d4e222a6"}},{"ruleId":"D1","level":"warning","message":{"text":"Service.CreateWiredSystem (cyclomatic 32): Service.CreateWiredSystem has cyclomatic complexity 32 (threshold 15). Of this number, 24 points are the body\u0027s own statements and 8 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/service/service.go"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"edea09f8a18c0c04195da8c69ca59594ab03854541256e662b4b111fb9e39ba1"}},{"ruleId":"D1","level":"warning","message":{"text":"ares_events.DefaultSummarizer (cyclomatic 31): ares_events.DefaultSummarizer 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":"internal/ares_events/compactor.go"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"a220f27c75d4f3a5e64a60d02866fae411391ddb6c6037f74df62eefed40cd25"}},{"ruleId":"D1","level":"warning","message":{"text":"FileTools.listFiles (cyclomatic 31): FileTools.listFiles has cyclomatic complexity 31 (threshold 15). Of this number, 20 points are the body\u0027s own statements and 11 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/resources/builtin/file/file_tools.go"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6ec7f7127794ce52fefd39bec3675c0402c1b9f9574f43b6425be7e7aab5611"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runServe (cyclomatic 29): main.runServe has cyclomatic complexity 29 (threshold 15). Of this number, 21 points are the body\u0027s own statements and 8 belong to 4 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/ares/serve.go"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"58bdbcb2e1290732b21f6199c95ba0b3972d253e944b99211aa1e1b2967f87eb"}},{"ruleId":"D1","level":"warning","message":{"text":"main.main (cyclomatic 29): main.main has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 8 of the 29 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 152, 92, 212, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/embedding-mcp/main.go"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3ea3597f0d67468e4aefdaf3ada352e1026b0a2ad86d48cac70964f11101786"}},{"ruleId":"D1","level":"warning","message":{"text":"renderDAG (cyclomatic 29): renderDAG has cyclomatic complexity 29 (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":"internal/monitoring/static/app.js"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7d50dc17d9883d10259f196ba8ca270e49612b7c3d3a657f81e411ba4f8cbf8"}},{"ruleId":"D1","level":"warning","message":{"text":"evolution.RunIdleEvolution (cyclomatic 28): evolution.RunIdleEvolution 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":"internal/ares_evolution/genome_wiring_system.go"},"region":{"startLine":678}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dedef99aea3d0784bce4610ed7376354df9ef137e74bdd0f46e45e2c18a70d2"}},{"ruleId":"D1","level":"warning","message":{"text":"Manager.executePhase (cyclomatic 28): Manager.executePhase has cyclomatic complexity 28 (threshold 15). Of this number, 21 points are the body\u0027s own statements and 7 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_shutdown/manager.go"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"623f08c328ac9e97530cab4c3c459729a99b8bffa9a043004a32798f236e9e08"}},{"ruleId":"D1","level":"warning","message":{"text":"Orchestrator.runAgent (cyclomatic 28): Orchestrator.runAgent 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":"internal/dashboard/orchestrator.go"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"07f07aa56c0fb6660258bfb3a397605d6ec9a08a0c3f42693be26aa27fe0e514"}},{"ruleId":"D1","level":"warning","message":{"text":"LeaderSupervisor.doFailover (cyclomatic 27): LeaderSupervisor.doFailover 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":"internal/agents/leader/supervisor.go"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"615cf9e94d232003aa919f1afdbe223c403c3c49c879cca7120a2edbbb4092f8"}},{"ruleId":"D1","level":"warning","message":{"text":"arena.ValidateAction (cyclomatic 27): arena.ValidateAction 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":"internal/ares_arena/http.go"},"region":{"startLine":585}}}],"partialFingerprints":{"codehealthFindingId/v1":"e7e150ee4c52b1e99c1abaaa6504bd0849b03a8fd2a1130f2f5a7ad30bc97798"}},{"ruleId":"D1","level":"warning","message":{"text":"Service.Execute (cyclomatic 27): Service.Execute 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":"internal/ares_arena/service.go"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2f3eb73d17a2fb8797bad7427a4b77c7e7813650f7fe045f060343f0ce40174"}},{"ruleId":"D1","level":"warning","message":{"text":"ares_bootstrap.Bootstrap (cyclomatic 27): ares_bootstrap.Bootstrap has cyclomatic complexity 27 (threshold 15). Of this number, 24 points are the body\u0027s own statements and 3 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_bootstrap/bootstrap.go"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"16894c8dfc57188725a686316edde5f8c3e0256e75b52fffc515bf23912fa1e3"}},{"ruleId":"D1","level":"warning","message":{"text":"arena.RunScenarioReport (cyclomatic 26): arena.RunScenarioReport 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":"internal/ares_arena/scenario.go"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"97f283e514fd71c8bfa9b5d433bf470d6b38686f642587ec59400dfc2abd43ad"}},{"ruleId":"D1","level":"warning","message":{"text":"Population.doEvolve (cyclomatic 26): Population.doEvolve 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":"internal/ares_evolution/genome/population.go"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ccc8f2a13fee3e9ffab690fc77c169eef5a0ea8c3cda11460fd7d84f8199d77"}},{"ruleId":"D1","level":"warning","message":{"text":"ExperienceExtractor.parseUserProfile (cyclomatic 26): ExperienceExtractor.parseUserProfile 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":"internal/ares_memory/distillation/extractor.go"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7db8a525e3eaa4b60f2bc3b67625f72ce5cc447b86bb816924b2fc15d1904d1"}},{"ruleId":"D1","level":"warning","message":{"text":"HTTPRequest.Execute (cyclomatic 26): HTTPRequest.Execute has cyclomatic complexity 26 (threshold 15). Of this number, 25 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/resources/builtin/network/http_request.go"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"f197ac539339a3c6a0ba1647e6dda3913d1a7df4f804e98834ceb5052cd7ccff"}},{"ruleId":"D1","level":"warning","message":{"text":"Runner.ResumeExecution (cyclomatic 26): Runner.ResumeExecution 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":"internal/workflow/runner_checkpoint.go"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"c5895d9cb883a769bb5448f85b10e8e9644b7b8b7013683e3555ee3d8c961f4e"}},{"ruleId":"D1","level":"warning","message":{"text":"profileParser.parseResponse (cyclomatic 25): profileParser.parseResponse 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":"internal/agents/leader/profile.go"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"26d10029bf469b4bbc511a9d2ef60b81d3769eca2359a6e71dd8bc615e6467d0"}},{"ruleId":"D1","level":"warning","message":{"text":"ares_bootstrap.wireGAEvolution (cyclomatic 25): ares_bootstrap.wireGAEvolution has cyclomatic complexity 25 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 10 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_bootstrap/bootstrap_steps.go"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"e768199a0f3b4140231fe7f880d551a724773fb890045e699326b0e4948184f2"}},{"ruleId":"D1","level":"warning","message":{"text":"ExperienceGuidedMutator.chooseGuidedMutationType (cyclomatic 25): ExperienceGuidedMutator.chooseGuidedMutationType 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":"internal/ares_evolution/mutation/guided_mutator.go"},"region":{"startLine":403}}}],"partialFingerprints":{"codehealthFindingId/v1":"223d7a11f2f7f31a4e417742a0f3ee4315b549035bed3776610a810fc30ee327"}},{"ruleId":"D1","level":"warning","message":{"text":"ConfigFile.Validate (cyclomatic 25): ConfigFile.Validate 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":"sdk/config.go"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"cee654eef678d57acd24a06f532aeb917a4379f5ebe777ee0e07a7cb9212bd6d"}},{"ruleId":"D1","level":"warning","message":{"text":"ArenaAdapter.Execute (cyclomatic 24): ArenaAdapter.Execute has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/api_impl/adapters.go"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"83875abb857b616cf21d9fd5d75c05fd4833caf1c0dae0ba04cdf970cca35458"}},{"ruleId":"D1","level":"warning","message":{"text":"Registry.ApplySet (cyclomatic 24): Registry.ApplySet 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":"internal/evolution/patch/patch.go"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb9c6c87069ac8fcf7f1811b27deef0ef42014b53984ea2074919b9f87214bfd"}},{"ruleId":"D1","level":"warning","message":{"text":"CodeProvider.Stream (cyclomatic 24): CodeProvider.Stream has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to one function literal inside it that branches (line 84). 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":"internal/knowledge/provider/code/provider.go"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"054c8fc898a10f357c30f53e7ff02db4bfd5b222aa93e32dfda2e57bb1fcc9f7"}},{"ruleId":"D1","level":"warning","message":{"text":"output.scanFixJSON (cyclomatic 24): output.scanFixJSON 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":"internal/llm/output/parser.go"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"a065340e03427b1c372a29ab6f1d0906463d495be9b3a2c4d6d896f2aa5a0dce"}},{"ruleId":"D1","level":"warning","message":{"text":"KnowledgeRepository.CreateBatch (cyclomatic 24): KnowledgeRepository.CreateBatch has cyclomatic complexity 24 (threshold 15). Of this number, 22 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/repositories/knowledge_repository.go"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a81da3061312e5368a9c0821c17d346c649366aad49a127bf19268dcd2aa26a"}},{"ruleId":"D1","level":"warning","message":{"text":"StringUtils.Execute (cyclomatic 24): StringUtils.Execute has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/resources/builtin/stringutils/stringutils.go"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4a12b2905e8397f710012a6116462afa00a0f70de3de2a31189cffd20382cf6"}},{"ruleId":"D1","level":"warning","message":{"text":"Agent.Run (cyclomatic 24): Agent.Run has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/sdk.go"},"region":{"startLine":853}}}],"partialFingerprints":{"codehealthFindingId/v1":"67e5bb84f2e096b43a4f72bed637ffccad506b61fc3ed30a03062c0e0535aef4"}},{"ruleId":"D1","level":"warning","message":{"text":"main.main (cyclomatic 23): main.main 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":"examples/runtime_evolution/full/main.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ac02f2c59d6f16314031346107ce77f88547c55f6375ca50ea995bb3e1249da"}},{"ruleId":"D1","level":"warning","message":{"text":"resultAggregator.Aggregate (cyclomatic 23): resultAggregator.Aggregate has cyclomatic complexity 23 (threshold 15). Of this number, 19 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/agents/leader/aggregator.go"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"f403de118bc67565c3ed56b5f9118b0c6e80cb5b2f16b17e26ebe580a31a32cb"}},{"ruleId":"D1","level":"warning","message":{"text":"EventRecovery.RecoverFromEvents (cyclomatic 23): EventRecovery.RecoverFromEvents 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":"internal/agents/leader/event_recovery.go"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1abd3acded2462cde596009ace2ad1b5c9d58f86f5967fa28822258398138bf"}},{"ruleId":"D1","level":"warning","message":{"text":"MemoryPatchExecutor.Apply (cyclomatic 23): MemoryPatchExecutor.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":"internal/ares_memory/memory_patcher.go"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"99a686a4606cc7c43a16101bc5b3292ce9b7aa48fc1d9fe36613d8d0bf58749c"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultReducer.Reduce (cyclomatic 23): DefaultReducer.Reduce 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":"internal/knowledge/runtime/components.go"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"72e6605fe197e5c791f4cf01434b45a0e665535a871a6febdde25f299781dbbc"}},{"ruleId":"D1","level":"warning","message":{"text":"Client.streamAnthropic (cyclomatic 23): Client.streamAnthropic has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 9 of the 23 points are its own statements and the rest belongs to one function literal inside it that branches (line 574). 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":"internal/llm/client.go"},"region":{"startLine":522}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e6d8ece560ffc76689456bc3c9ddbc2d773758daaf184ace0ff7e4597dc62b9"}},{"ruleId":"D1","level":"warning","message":{"text":"MemoryRepository.ListKnowledge (cyclomatic 23): MemoryRepository.ListKnowledge 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":"internal/retrievalservice/memory_repository.go"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"44b134e2e1147f8fd0e02c0e3507dd21f21da608be76dac191a2ac0012edc479"}},{"ruleId":"D1","level":"warning","message":{"text":"computeDAGLayout (cyclomatic 23): computeDAGLayout 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":"internal/monitoring/static/app.js"},"region":{"startLine":1098}}}],"partialFingerprints":{"codehealthFindingId/v1":"1db43da28b61884fb5e039c0b82e6998cd3b55693ec7f47f934ed70faed46cfe"}},{"ruleId":"D1","level":"warning","message":{"text":"ConfigFile.validate (cyclomatic 22): ConfigFile.validate 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":"api/client/config.go"},"region":{"startLine":403}}}],"partialFingerprints":{"codehealthFindingId/v1":"a24e74f77f5dae3194e77bebc08b3e9822481422f88076ca482eac3a925ff5f4"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runEvolutionCycle (cyclomatic 22): main.runEvolutionCycle 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":"cmd/ares/evolution.go"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cc133d86e8c80ea7dbbe6209592a4dc550bcfd70bebd14abb161d3007b96838"}},{"ruleId":"D1","level":"warning","message":{"text":"PostgresEventStore.Append (cyclomatic 22): PostgresEventStore.Append has cyclomatic complexity 22 (threshold 15). Of this number, 19 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_events/pg_store.go"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bb95947ece8ea35968b5664c852934a5117112f5b3a7dd76b202365bd419ab5"}},{"ruleId":"D1","level":"warning","message":{"text":"evolution.NewWiredEvolutionSystem (cyclomatic 22): evolution.NewWiredEvolutionSystem 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":"internal/ares_evolution/genome_wiring_system.go"},"region":{"startLine":454}}}],"partialFingerprints":{"codehealthFindingId/v1":"2324b48ec01d0665a78286256f3d1226d1726f6d4df2fd913a2dc95ec34057f6"}},{"ruleId":"D1","level":"warning","message":{"text":"DateTime.Execute (cyclomatic 22): DateTime.Execute has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/resources/builtin/math/calculator.go"},"region":{"startLine":565}}}],"partialFingerprints":{"codehealthFindingId/v1":"83871b5eb8226d5db58e63e2264ed79c771e07fcec820525445cf148179ca072"}},{"ruleId":"D1","level":"warning","message":{"text":"WebSearch.Execute (cyclomatic 22): WebSearch.Execute has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/resources/builtin/network/web_search.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ec6e640d56934dfb974a1f2a2e9227342cea995f0fe4883ec6c6d1d2b83fcca"}},{"ruleId":"D1","level":"warning","message":{"text":"apiimpl.StartService (cyclomatic 21): apiimpl.StartService has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/api_impl/service.go"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"a247b6dc0d819afd6e784d4278ea842c5f12192e134d9c02ce2495d40de655e8"}},{"ruleId":"D1","level":"warning","message":{"text":"ares_bootstrap.ProvideNewEvolution (cyclomatic 21): ares_bootstrap.ProvideNewEvolution 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":"internal/ares_bootstrap/provide_new_evolution.go"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"7eccce97f9a8bd4c3cf4b3fabc997c3b7551d81f752334ab87105e19be7069d3"}},{"ruleId":"D1","level":"warning","message":{"text":"mutation.valuesEqual (cyclomatic 21): mutation.valuesEqual 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 taking that case\u0027s concrete type, so the dispatch reads one line per case. These arms are selected by TYPE rather than by value, so there is no key a lookup table could be built on; where you own the matched types, giving them one shared interface method and calling that is the form a table would have taken, and where you do not, keep the cases \u2014 they stay explicit and reviewable."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/mutation/mutator.go"},"region":{"startLine":512}}}],"partialFingerprints":{"codehealthFindingId/v1":"db6f3ad44e368eece399674a21e690978ab0e800ac4e06b0c68ad1b219da52f3"}},{"ruleId":"D1","level":"warning","message":{"text":"MMBacktestRunner.Run (cyclomatic 21): MMBacktestRunner.Run 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":"internal/ares_quant/marketmaking/mm_backtest.go"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"346938353e2fb35e166580bff18aebca77219266a2187e55535ad0f1ce882b15"}},{"ruleId":"D1","level":"warning","message":{"text":"KnowledgePipeline.Process (cyclomatic 21): KnowledgePipeline.Process 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":"internal/knowledge/pipeline.go"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1e1432c08c958678d1d736931c82600f040d405b8063e76afa5fd799ecdd33d"}},{"ruleId":"D1","level":"warning","message":{"text":"Client.streamOpenRouter (cyclomatic 21): Client.streamOpenRouter has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 9 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 689). 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":"internal/llm/client.go"},"region":{"startLine":636}}}],"partialFingerprints":{"codehealthFindingId/v1":"141641b58a9c6a4a2525cf1ae8d539a6d5ea27a5178b0b2a6185307d620f45db"}},{"ruleId":"D1","level":"warning","message":{"text":"(anonymous) (cyclomatic 21): (anonymous) has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/monitoring/static/app.js"},"region":{"startLine":600}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ba59441c9911cabb8e6daf9eb24d4c9e6d58b8672959589d157a524ee003499"}},{"ruleId":"D1","level":"warning","message":{"text":"(anonymous) (cyclomatic 21): (anonymous) has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/dashboard/static/app.js"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"806e9a483d6c6b5bd8f0b005926cf2d1db110b0a0b8508e241d8e0a93d1412af"}},{"ruleId":"D1","level":"warning","message":{"text":"main.main (cyclomatic 20): main.main 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":"examples/13-archive-akg-chain/main.go"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8fc7feb3a834c921fffd5071d9208abe0fbd3628892fe6bc1f528d241755e87"}},{"ruleId":"D1","level":"warning","message":{"text":"leaderAgent.ReplayEvents (cyclomatic 20): leaderAgent.ReplayEvents 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":"internal/agents/leader/agent.go"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"b14a681997d847d514cad5a3163f54b29093dc902aacaa4ac3db7fb74e6c166b"}},{"ruleId":"D1","level":"warning","message":{"text":"taskPlanner.Plan (cyclomatic 20): taskPlanner.Plan 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":"internal/agents/leader/planner.go"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"28091150e425a80b83937f579f24485e94283dada71224e15436e94c98e2ae69"}},{"ruleId":"D1","level":"warning","message":{"text":"subAgent.ProcessStream (cyclomatic 20): subAgent.ProcessStream has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 358). 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":"internal/agents/sub/agent.go"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"f98347fc1fefdd69d97b5aba2ecb5edc5dd377dea540f9d58975076a97ef8b84"}},{"ruleId":"D1","level":"warning","message":{"text":"RegressionTester.runAdaptive (cyclomatic 20): RegressionTester.runAdaptive has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body\u0027s own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_arena/regression.go"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"234aa496f1e068b3c32383758bda7fc5bf8a6d7c9f382fb9ce71f53bab636387"}},{"ruleId":"D1","level":"warning","message":{"text":"DreamCycle.findWinner (cyclomatic 20): DreamCycle.findWinner has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body\u0027s own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/dream_cycle.go"},"region":{"startLine":781}}}],"partialFingerprints":{"codehealthFindingId/v1":"25b24ffef80cff7f2f89c3198046e537dbf103cbb327386675951d113087b8f1"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultNormalizer.Normalize (cyclomatic 20): DefaultNormalizer.Normalize has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/experience/normalizer.go"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"a57e43ce2f54798966556d2c53f9c1e1f8497b97378c3512f94283286a7e66fd"}},{"ruleId":"D1","level":"warning","message":{"text":"memoryManager.StoreDistilledTask (cyclomatic 20): memoryManager.StoreDistilledTask has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_memory/manager_impl.go"},"region":{"startLine":497}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae6e9d5f790b4c25810ef99323e6656189357499e980e85f3fded95e6768c0d1"}},{"ruleId":"D1","level":"warning","message":{"text":"portfolio.LoadSignalsFromCSV (cyclomatic 20): portfolio.LoadSignalsFromCSV 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":"internal/ares_quant/portfolio/csv_loader.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bb45f0a6991cf1ad074df7f901ebb74e85324f355da7b5d90ea9d8e200adefc"}},{"ruleId":"D1","level":"warning","message":{"text":"OpenAIAdapter.GenerateStream (cyclomatic 20): OpenAIAdapter.GenerateStream has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 8 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 251). 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":"internal/llm/output/openai.go"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a0d3617fa3e767142a4661c8241ae432f3fb445d6d16fa5aa0b84888927b54a"}},{"ruleId":"D1","level":"warning","message":{"text":"SecretRepository.Import (cyclomatic 20): SecretRepository.Import has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/repositories/secret_repository.go"},"region":{"startLine":521}}}],"partialFingerprints":{"codehealthFindingId/v1":"7162da5f5f5f457198b2a46b789009764d671335ac5c5d34e9f6a3d91e027eab"}},{"ruleId":"D1","level":"warning","message":{"text":"ConfigFile.ToOptions (cyclomatic 20): ConfigFile.ToOptions 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":"sdk/config.go"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f8122b316a05ccb59d90c998ca0f80892310167c69f91dcfe119ed2ba5b7cb7"}},{"ruleId":"D1","level":"warning","message":{"text":"ConfigFile.setDefaults (cyclomatic 19): ConfigFile.setDefaults 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":"api/client/config.go"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"a73e5b3bd5a5cb33cd23c9b56fcd3f4c76f4f5e911aa4546a1d4e4cc1c83bd41"}},{"ruleId":"D1","level":"warning","message":{"text":"Service.ListAgents (cyclomatic 19): Service.ListAgents 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":"api/service/agent/service.go"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"aea660a7ecc8424a3b066f6ec583b0ff7538e3d84119ded0ef174738b29902a0"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runInspect (cyclomatic 19): main.runInspect 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":"cmd/arena/main.go"},"region":{"startLine":657}}}],"partialFingerprints":{"codehealthFindingId/v1":"efd1de429b131d6eb4789a56cb7e5f65a3a504b3c0af804fb68849fb8d620a32"}},{"ruleId":"D1","level":"warning","message":{"text":"liveDAGPatchExecutor.Apply (cyclomatic 19): liveDAGPatchExecutor.Apply 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":"cmd/ares/serve.go"},"region":{"startLine":615}}}],"partialFingerprints":{"codehealthFindingId/v1":"34b81e884dc475a2bebe7646aa6ab12aa737c810510a6314a7a8ac83f8dacf46"}},{"ruleId":"D1","level":"warning","message":{"text":"main.main (cyclomatic 19): main.main 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":"cmd/monitor-live/main.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb429a3afe378434e59b846ae97822b2e6b603585def4ac04ac2464e2b329f95"}},{"ruleId":"D1","level":"warning","message":{"text":"main.run (cyclomatic 19): main.run 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":"examples/11-knowledge-import/akg/main.go"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ffbcecba96e10165b875e6b57688ab8391d6307918c845a1d38766a323c1960"}},{"ruleId":"D1","level":"warning","message":{"text":"main.registerTools (cyclomatic 19): main.registerTools has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 2 of the 19 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 625, 688, 579, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/11-knowledge-import/main.go"},"region":{"startLine":570}}}],"partialFingerprints":{"codehealthFindingId/v1":"18858360ac6bff94fc4624c13630a0d68b9f2815af1f8307abe03e65498890a8"}},{"ruleId":"D1","level":"warning","message":{"text":"main.run (cyclomatic 19): main.run has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 156, 65, 95, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/eval/main.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"b702cb40a0144e213635e04984d87970df8623d6569829c731f151fda50268c6"}},{"ruleId":"D1","level":"warning","message":{"text":"leaderAgent.Process (cyclomatic 19): leaderAgent.Process 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":"internal/agents/leader/agent.go"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e1420dbc3e8638c9f46d9e2dff3edebbf76ba1b4a1d03bba1c55e0d82a9a422"}},{"ruleId":"D1","level":"warning","message":{"text":"RegressionTester.Run (cyclomatic 19): RegressionTester.Run has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body\u0027s own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_arena/regression.go"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4c8abfa7e46e092ddc5f8a1c932e26a5daf507924602ffb061272a942c648e2"}},{"ruleId":"D1","level":"warning","message":{"text":"evolution.ReportString (cyclomatic 19): evolution.ReportString 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":"internal/ares_evolution/report.go"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"57fa065eba78ddf7f59c88902942c6bf987116169d2345d36f7a9bffb248933b"}},{"ruleId":"D1","level":"warning","message":{"text":"DreamCycle.deployWinner (cyclomatic 19): DreamCycle.deployWinner 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":"internal/ares_evolution/dream_cycle.go"},"region":{"startLine":486}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7d178f20ffe249864c11fcbb59b2333ed7fea2bf336b4fed39c07fb2026082e"}},{"ruleId":"D1","level":"warning","message":{"text":"providers.scanConfigFile (cyclomatic 19): providers.scanConfigFile 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":"internal/discovery/providers/filesystem.go"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"a432a18fcc70eb8d6ff2ba383825a0ac729c2b7fe700d92071ea297cbea87b22"}},{"ruleId":"D1","level":"warning","message":{"text":"OpenRouterAdapter.GenerateStream (cyclomatic 19): OpenRouterAdapter.GenerateStream has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 7 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 229). 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":"internal/llm/output/openrouter.go"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f8f4ab42c87eec2193c1458e40a2ed861949a1203bad08f1508bf61e9acd8ec"}},{"ruleId":"D1","level":"warning","message":{"text":"MemoryRepository.SearchKnowledge (cyclomatic 19): MemoryRepository.SearchKnowledge 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":"internal/retrievalservice/memory_repository.go"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"10d5f9870335f56906db0594e6465820c9b4d6af35417ae73c7ea8b4dff61a23"}},{"ruleId":"D1","level":"warning","message":{"text":"workflow.migrateScheduler (cyclomatic 19): workflow.migrateScheduler 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":"internal/workflow/runner_mutation.go"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a6cc9a0478d7cd15e4d6773b770b2fecbc3ce25b76a45a17507dad30d461632"}},{"ruleId":"D1","level":"warning","message":{"text":"Runner.executeIteration (cyclomatic 19): Runner.executeIteration 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":"internal/workflow/runner_execution.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad17b69ee42d8864514d640696bee713474a37fee5f5e7ed055781ee415345fc"}},{"ruleId":"D1","level":"warning","message":{"text":"DreamCycle.runESEvolution (cyclomatic 18): DreamCycle.runESEvolution 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":"internal/ares_evolution/dream_cycle.go"},"region":{"startLine":379}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dbe64fbde9c3840b8d1275233de3efd5412acf7c468a7d11f4d1ee02395612f"}},{"ruleId":"D1","level":"warning","message":{"text":"MetaController.Tune (cyclomatic 18): MetaController.Tune 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":"internal/ares_evolution/genome/meta_evolution.go"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b7155d637953abeec80afb0ee086a0f5a63d3f508c8a42aa89f1ff16e90a936"}},{"ruleId":"D1","level":"warning","message":{"text":"ContextCleaner.CleanWithTurns (cyclomatic 18): ContextCleaner.CleanWithTurns 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":"internal/ares_memory/context/cleaner.go"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"204654f83face668378ac546464967224e840bb3bde480c37f7451baa21a00bb"}},{"ruleId":"D1","level":"warning","message":{"text":"ImportanceScorer.ScoreMemory (cyclomatic 18): ImportanceScorer.ScoreMemory 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":"internal/ares_memory/distillation/scorer.go"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"d38d9a0061c7f815f7483657b2459763947684e7f41e542ab61a70194713614f"}},{"ruleId":"D1","level":"warning","message":{"text":"QuoteEngine.GenerateQuote (cyclomatic 18): QuoteEngine.GenerateQuote 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":"internal/ares_quant/marketmaking/quote_engine.go"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"029927f11baf8e8c75a47c9fb92cf08d99d091c69164b64df8e943869cd418ea"}},{"ruleId":"D1","level":"warning","message":{"text":"portfolio.LoadCustomBarsFromCSV (cyclomatic 18): portfolio.LoadCustomBarsFromCSV 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":"internal/ares_quant/portfolio/csv_loader.go"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3a137b8441cb4f2d96d519b400f1aa6da7d2093deea0ebbe52f3d47817f72f3"}},{"ruleId":"D1","level":"warning","message":{"text":"Store.Query (cyclomatic 18): Store.Query 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":"internal/knowledge/store/memory/store.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"b971e925ed6c75d9a688679a64b4ce1bd456b89fd462a53b67f64fd5bd18964d"}},{"ruleId":"D1","level":"warning","message":{"text":"Client.GenerateStream (cyclomatic 18): Client.GenerateStream has cyclomatic complexity 18 (threshold 15). Of this number, 9 points are the body\u0027s own statements and 9 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/llm/client.go"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"86de51a5e59506a3a96b91b3d013639e8d887b9ed269c4765d80ec5ce58493b6"}},{"ruleId":"D1","level":"warning","message":{"text":"SecretRepository.RotateKey (cyclomatic 18): SecretRepository.RotateKey has cyclomatic complexity 18 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/repositories/secret_repository.go"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fe39b19e7f29da47d869b69c6584dc339e32a0592e8839de1d74c3a4f062de6"}},{"ruleId":"D1","level":"warning","message":{"text":"webSearchTool.Execute (cyclomatic 17): webSearchTool.Execute has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"api/tools/builtin.go"},"region":{"startLine":460}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc697f0f19834614587c65ebd0239d4662a474bcacabd5c5260d647c3cec7b31"}},{"ruleId":"D1","level":"warning","message":{"text":"main.main (cyclomatic 17): main.main 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":"examples/runtime_evolution/knowledge/main.go"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"352b67a7ed715f1fa125990023f2e5d6210274e86351dde62f568bd6ec379db1"}},{"ruleId":"D1","level":"warning","message":{"text":"MemoryRepository.List (cyclomatic 17): MemoryRepository.List 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":"internal/agents/memory_repository_impl.go"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5dd50bdee94a6731143dde0e90a5a40c3b30a98c16ddb35c5751b6477ecec1b"}},{"ruleId":"D1","level":"warning","message":{"text":"ares_archive.extractVerdict (cyclomatic 17): ares_archive.extractVerdict 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":"internal/ares_archive/extract.go"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b9919e33048f0b1aea05e436c37907b54e02521382d5d1f6199a487c00cbaa0"}},{"ruleId":"D1","level":"warning","message":{"text":"CompactableEventStore.archivePendingRoundsOnce (cyclomatic 17): CompactableEventStore.archivePendingRoundsOnce 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":"internal/ares_events/compactable_store.go"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"e568b20826234442fc34c863745d4f99346257eb13dc77a942adc12bf8e9f9e9"}},{"ruleId":"D1","level":"warning","message":{"text":"evolution.GenerateReport (cyclomatic 17): evolution.GenerateReport 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":"internal/ares_evolution/report.go"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b700512b90f5d5abeb8e6991d003d5856ce9db13ad4e2a111302054c5718ac5"}},{"ruleId":"D1","level":"warning","message":{"text":"evolution.NewService (cyclomatic 17): evolution.NewService 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":"internal/ares_evolution/service/service.go"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a3bb9936031c1fac66ff0c13687555df85abe25c3589dddc5fdba9e044ba42e"}},{"ruleId":"D1","level":"warning","message":{"text":"MCPManager.ApplyConfig (cyclomatic 17): MCPManager.ApplyConfig 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":"internal/ares_mcp/manager.go"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"21b1e69994d3889cede937a3fdc42671d49cc95ccc4ab3e2e4aebadc73862ba3"}},{"ruleId":"D1","level":"warning","message":{"text":"ExperienceExtractor.ExtractExperiences (cyclomatic 17): ExperienceExtractor.ExtractExperiences 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":"internal/ares_memory/distillation/extractor.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb9d838756b3716732ae94c90631b519d8c29625ad8386bfd006c8d14715c529"}},{"ruleId":"D1","level":"warning","message":{"text":"Pipeline.Run (cyclomatic 17): Pipeline.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":"internal/ares_memory/pipeline.go"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4e33b877c9d05feebfe8b7c74f3f6958bcc192ca240325fdf60b4d39456cda9"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultCompiler.formatMarkdown (cyclomatic 17): DefaultCompiler.formatMarkdown 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":"internal/knowledge/compiler/compiler.go"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"a045ccae60f1d5863021339747918919b407af8b3793dffa8bfdc48b7efb33bb"}},{"ruleId":"D1","level":"warning","message":{"text":"EvolutionProvider.Stream (cyclomatic 17): EvolutionProvider.Stream has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to one function literal inside it that branches (line 70). 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":"internal/knowledge/provider/evolution/provider.go"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"9175705f686068912eb774f1e1d5772d5db5155cfc178cade1dc3861ac8a8263"}},{"ruleId":"D1","level":"warning","message":{"text":"KnowledgeRuntime.loadAndProcess (cyclomatic 17): KnowledgeRuntime.loadAndProcess has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 6 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 190). 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":"internal/knowledge/runtime/runtime.go"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ede634fdbedb61bf24525da697682a3914f4f5449c2c6fd35687309f25854f1"}},{"ruleId":"D1","level":"warning","message":{"text":"Client.streamOllama (cyclomatic 17): Client.streamOllama has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 8 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 481). 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":"internal/llm/client.go"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"c82103dc07c8a122f4a33dd9c71046bc05f5b29436dadd1050c1667c6a31e7ea"}},{"ruleId":"D1","level":"warning","message":{"text":"RetrievalService.GenerateDebugInfo (cyclomatic 17): RetrievalService.GenerateDebugInfo 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":"internal/storage/postgres/services/retrieval_helpers.go"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cd104295b4066c5130a8fe996d2e0df337f57afab416bc7d9cd5bb4812b1d6f"}},{"ruleId":"D1","level":"warning","message":{"text":"RetrievalService.applySourceSignals (cyclomatic 17): RetrievalService.applySourceSignals 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":"internal/storage/postgres/services/retrieval_search.go"},"region":{"startLine":703}}}],"partialFingerprints":{"codehealthFindingId/v1":"35d4429bdd97133a2591b7d440e560737f9567307f55b395f4cc1f23e64c27c9"}},{"ruleId":"D1","level":"warning","message":{"text":"WriteBuffer.flushBatch (cyclomatic 17): WriteBuffer.flushBatch has cyclomatic complexity 17 (threshold 15). Of this number, 15 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/write_buffer.go"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fff9574917e4dfb88e1e875fcb52d221ab664728072c79c7ebc8b4dba461229"}},{"ruleId":"D1","level":"warning","message":{"text":"DataValidation.validateSchema (cyclomatic 17): DataValidation.validateSchema 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":"internal/tools/resources/builtin/text/data_validation.go"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"30f20a53ff7bd87b47ece74a21738922a0966c944414751a77c416bf4cdd2f5d"}},{"ruleId":"D1","level":"warning","message":{"text":"GraphPatchExecutor.CanApply (cyclomatic 17): GraphPatchExecutor.CanApply 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":"internal/workflow/graph/patcher.go"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3759dce5a7a5d156634d72f9d427c08cbdf89bba6c183a7704fdbf3e057f873"}},{"ruleId":"D1","level":"warning","message":{"text":"Agent.buildMessages (cyclomatic 17): Agent.buildMessages 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":"sdk/sdk.go"},"region":{"startLine":1027}}}],"partialFingerprints":{"codehealthFindingId/v1":"25169ff6f698d66d8640f2deacde62bd6f29133134cce49f26551dce3f5e0e87"}},{"ruleId":"D1","level":"warning","message":{"text":"StreamHandler.HandleStream (cyclomatic 16): StreamHandler.HandleStream has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 81). 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":"api/handler/stream.go"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fde53213e854a3768de50157772037c319c23e4f6d6d2f47f2c35d2d8d096c6"}},{"ruleId":"D1","level":"warning","message":{"text":"main.sdkOptions (cyclomatic 16): main.sdkOptions 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":"examples/11-knowledge-import/main.go"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"396baa449d938eaf6f3c8a247e608484aa91bbc6ba7c9985f85066b76330b8bf"}},{"ruleId":"D1","level":"warning","message":{"text":"main.runChat (cyclomatic 16): main.runChat 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":"examples/11-knowledge-import/main.go"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"b07dd0ca6e061766f0632241f123a1ec7ba0eaf167c4da9b1a699c666794d715"}},{"ruleId":"D1","level":"warning","message":{"text":"ares_config.LoadFromEnv (cyclomatic 16): ares_config.LoadFromEnv has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_config/config.go"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"665e46c22d28a7729ff9d95ea62d9efaa552d3efbfbbe987eb2aa54ca823a5b2"}},{"ruleId":"D1","level":"warning","message":{"text":"CompactableEventStore.maybeCompact (cyclomatic 16): CompactableEventStore.maybeCompact 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":"internal/ares_events/compactable_store.go"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"8eebad70b3191e87224f6232bed22d626a78c562e56447ff39fe5487fba9e33c"}},{"ruleId":"D1","level":"warning","message":{"text":"evolution.RecordPopulationLineage (cyclomatic 16): evolution.RecordPopulationLineage 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":"internal/ares_evolution/genome_wiring_genealogy.go"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"544c12e8b075300763754c2d8265c68f0336a0c1c5d0aeefb6edd0f5b28c446b"}},{"ruleId":"D1","level":"warning","message":{"text":"Population.measureNumericDiversityLocked (cyclomatic 16): Population.measureNumericDiversityLocked 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":"internal/ares_evolution/genome/adaptive.go"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"57bad5032b18cac76aab9e2c22aefc36d9ad4f8451343db298a1719562a2b7a8"}},{"ruleId":"D1","level":"warning","message":{"text":"AdaptiveDistribution.normalizeBoundedLocked (cyclomatic 16): AdaptiveDistribution.normalizeBoundedLocked 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":"internal/ares_evolution/mutation/adaptive_distribution.go"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce19c0a2c7f955135330b8396d6c58194a9b0f8179f4c34962619792363baf28"}},{"ruleId":"D1","level":"warning","message":{"text":"Service.createRawComponents (cyclomatic 16): Service.createRawComponents has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/service/service.go"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae1cefd6080518f9baae24bcddb12b63ea1b7575fba70383bc6c5fd92aa22e76"}},{"ruleId":"D1","level":"warning","message":{"text":"Service.Evolve (cyclomatic 16): Service.Evolve 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":"internal/ares_evolution/service/service.go"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"5dce5785ff107b57520f29227c9616c3b72c54b196ca1cf7a4a80d52ec2d52a5"}},{"ruleId":"D1","level":"warning","message":{"text":"Orchestrator.CreateAgent (cyclomatic 16): Orchestrator.CreateAgent has cyclomatic complexity 16 (threshold 15). Of this number, 11 points are the body\u0027s own statements and 5 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/dashboard/orchestrator.go"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"88e9f4061772a6ef62ec821ac6b4e03fd10f710f9cb6a1265cfff617c4f2f76e"}},{"ruleId":"D1","level":"warning","message":{"text":"DefaultCompiler.formatPrompt (cyclomatic 16): DefaultCompiler.formatPrompt 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":"internal/knowledge/compiler/compiler.go"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"59ae07279d42d8f38a1eba45ae94fd7ffe184dbcc2bda6cd23a95f77adae95e0"}},{"ruleId":"D1","level":"warning","message":{"text":"OllamaAdapter.GenerateStream (cyclomatic 16): OllamaAdapter.GenerateStream has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 182). 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":"internal/llm/output/ollama.go"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"87afbe13710d9f4e2700cf1f7d977fd9b01da9571b03e9ea12164941faac7cf6"}},{"ruleId":"D1","level":"warning","message":{"text":"HTTPServer.handleGetAgent (cyclomatic 16): HTTPServer.handleGetAgent 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":"internal/monitoring/http_api.go"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f6b1911339f22540ced0eaaf23cb8b84ee25a53d397ddc0ded87396337c8a02"}},{"ruleId":"D1","level":"warning","message":{"text":"ToolExecutionBridge.executeMultiStep (cyclomatic 16): ToolExecutionBridge.executeMultiStep 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":"internal/tools/planner/bridge.go"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"332d48ba2108c4be02a06949e9a15930f639f63524a65dbc1766d8c6bb0ecc93"}},{"ruleId":"D1","level":"warning","message":{"text":"Planner.Plan (cyclomatic 16): Planner.Plan 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":"internal/tools/planner/planner.go"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ee0cc2bd8b1c5287635938d924c57ae5cfbb4c9822f396d8becb02f46386591"}},{"ruleId":"D1","level":"warning","message":{"text":"KnowledgeUpdate.Execute (cyclomatic 16): KnowledgeUpdate.Execute has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/resources/builtin/knowledge/knowledge_base.go"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"16c44668d2628a3580f73dba476e9b56c02ad467a5c0233b7080daa7444d51fb"}},{"ruleId":"D1","level":"warning","message":{"text":"sdk.New (cyclomatic 16): sdk.New 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":"sdk/sdk.go"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"4256d568e6a7132b34829200e96c719b00c67ec6f0b7237f80d0e83e67a4b40c"}},{"ruleId":"D1","level":"warning","message":{"text":"(anonymous) (cyclomatic 16): (anonymous) 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":"internal/monitoring/static/app.js"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"09640a590129a07120fe8ff55eaa27efb9f396e13f2ba498f1413b4a2bdcdb92"}},{"ruleId":"D2","level":"warning","message":{"text":"renderDetailDrawer (cognitive 127): renderDetailDrawer has cognitive complexity 127 (threshold 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":"internal/monitoring/static/app.js"},"region":{"startLine":2317}}}],"partialFingerprints":{"codehealthFindingId/v1":"bef6b1c413af43b44b93bd9b1b3d2c6702b0c6a814bb551df49e2b16d1891d51"}},{"ruleId":"D2","level":"warning","message":{"text":"Compactor.buildSummary (cognitive 107): Compactor.buildSummary has cognitive complexity 107 (threshold 15). Drivers by points: if/else 92, boolean chains 13, loops 1, match/switch 1 (nesting depth added 58). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_events/compactor.go"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"70d560f3e7985167782b3afff39fec3c6730c9077798d8006e49d457d352986e"}},{"ruleId":"D2","level":"warning","message":{"text":"MultiAssetSimulator.RunMultiAssetSimulation (cognitive 90): MultiAssetSimulator.RunMultiAssetSimulation has cognitive complexity 90 (threshold 15). Drivers by points: if/else 59, loops 27, boolean chains 2, match/switch 2 (nesting depth added 53). Of this number, 87 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_quant/portfolio/simulator.go"},"region":{"startLine":445}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b7a9bdc085a06aec8481ea35259cd37ae42100a342a495600074c6e102c7283"}},{"ruleId":"D2","level":"warning","message":{"text":"Validator.validateValue (cognitive 83): Validator.validateValue has cognitive complexity 83 (threshold 15). Drivers by points: if/else 69, loops 8, boolean chains 6 (nesting depth added 43). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/llm/output/validator.go"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a18faa7dc75d4a81efce9e1b6597dfd677571f2c92ea1f04a270f3597033da1"}},{"ruleId":"D2","level":"warning","message":{"text":"UserProfile.Execute (cognitive 78): UserProfile.Execute has cognitive complexity 78 (threshold 15). Drivers by points: if/else 61, boolean chains 9, loops 8 (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/resources/builtin/memory/memory_tools.go"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"7afe4d47f6d4731c320dfc5ac4d761a27dc60573d678b3fa9c3f3e93bfd3a04e"}},{"ruleId":"D2","level":"warning","message":{"text":"Registry.ApplySet (cognitive 74): Registry.ApplySet has cognitive complexity 74 (threshold 15). Drivers by points: if/else 58, loops 15, boolean chains 1 (nesting depth added 51). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/evolution/patch/patch.go"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e7066a364aab96d29d7f242739bcb4c2661311e0ef49b007468cd2829a1b340"}},{"ruleId":"D2","level":"warning","message":{"text":"FileTools.listFiles (cognitive 69): FileTools.listFiles has cognitive complexity 69 (threshold 15). Drivers by points: if/else 65, boolean chains 2, loops 2 (nesting depth added 36). Of this number, 39 points are the body\u0027s own statements and 30 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/resources/builtin/file/file_tools.go"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"135c51b400445674b8c21c36a5aa7016c9475efdfdb1702b4026b9d383cee55d"}},{"ruleId":"D2","level":"warning","message":{"text":"MutableDAG.ReplaceNode (cognitive 67): MutableDAG.ReplaceNode has cognitive complexity 67 (threshold 15). Drivers by points: if/else 42, loops 22, boolean chains 3 (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":"internal/workflow/engine/mutable_dag.go"},"region":{"startLine":629}}}],"partialFingerprints":{"codehealthFindingId/v1":"02f035c904f6b699e0d62241fc32259e599c1e0f3638e86a2772a908215cdb7e"}},{"ruleId":"D2","level":"warning","message":{"text":"Config.setDefaults (cognitive 59): Config.setDefaults has cognitive complexity 59 (threshold 15). Drivers by points: if/else 56, boolean chains 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":"internal/ares_config/config_defaults.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"55cb8bf9cab78c4f04dc0c0ee86a992e79ab32de758b842a33cae4641cf085f0"}},{"ruleId":"D2","level":"warning","message":{"text":"evolution.RunIdleEvolution (cognitive 56): evolution.RunIdleEvolution has cognitive complexity 56 (threshold 15). Drivers by points: if/else 45, loops 5, boolean chains 4, match/switch 2 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/genome_wiring_system.go"},"region":{"startLine":678}}}],"partialFingerprints":{"codehealthFindingId/v1":"502842fc8016caec1e1b5b52b33fc7f758e7bdac184a09c15a33e3033d1d020f"}},{"ruleId":"D2","level":"warning","message":{"text":"MemoryRepository.ListKnowledge (cognitive 54): MemoryRepository.ListKnowledge has cognitive complexity 54 (threshold 15). Drivers by points: if/else 40, loops 10, boolean chains 4 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/retrievalservice/memory_repository.go"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"fde88609b9ff7da11264bcf343eeacb822eb2b823735b556e783160d35cd38db"}},{"ruleId":"D2","level":"warning","message":{"text":"Agent.Run (cognitive 54): Agent.Run has cognitive complexity 54 (threshold 15). Drivers by points: if/else 48, boolean chains 3, loops 3 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/sdk.go"},"region":{"startLine":853}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5a90ec7c38953459105c1464466a8071a464ca4a920034a8396a252ce29a571"}},{"ruleId":"D2","level":"warning","message":{"text":"ExperienceExtractor.parseUserProfile (cognitive 53): ExperienceExtractor.parseUserProfile has cognitive complexity 53 (threshold 15). Drivers by points: if/else 34, loops 15, boolean chains 4 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_memory/distillation/extractor.go"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"013ee56b0b89a0fd64a73ba18fdae5c5722ccc0c573391908396f35410b77226"}},{"ruleId":"D2","level":"warning","message":{"text":"Manager.executePhase (cognitive 52): Manager.executePhase has cognitive complexity 52 (threshold 15). Drivers by points: if/else 26, match/switch 15, loops 9, jumps 2 (nesting depth added 27). Of this number, 39 points are the body\u0027s own statements and 13 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_shutdown/manager.go"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e724b7bf24c08bedb3d38e69c88f651312167d273ca9526090900e637dd7a90"}},{"ruleId":"D2","level":"warning","message":{"text":"taskPlanner.Plan (cognitive 51): taskPlanner.Plan has cognitive complexity 51 (threshold 15). Drivers by points: if/else 32, loops 17, boolean chains 2 (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":"internal/agents/leader/planner.go"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f83b288bc3dcfc7ef0cbbaa6e105f1c197e7d7c12d01e5e2362855a24d19e11"}},{"ruleId":"D2","level":"warning","message":{"text":"ares_events.DefaultSummarizer (cognitive 50): ares_events.DefaultSummarizer has cognitive complexity 50 (threshold 15). Drivers by points: if/else 42, boolean chains 6, loops 1, match/switch 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_events/compactor.go"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f596c69ed19c28d5ab2796a99a88d8a652455df74e82372cf84dc8ced6b39e8"}},{"ruleId":"D2","level":"warning","message":{"text":"KnowledgeRepository.CreateBatch (cognitive 50): KnowledgeRepository.CreateBatch has cognitive complexity 50 (threshold 15). Drivers by points: if/else 42, loops 8 (nesting depth added 25). Of this number, 47 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/repositories/knowledge_repository.go"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e51bd5cb42fe0996b2001245265a8fd7cd3ba949dee5d27526272ff1257a42c"}},{"ruleId":"D2","level":"warning","message":{"text":"profileParser.parseResponse (cognitive 47): profileParser.parseResponse has cognitive complexity 47 (threshold 15). Drivers by points: if/else 35, loops 8, boolean chains 2, match/switch 2 (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":"internal/agents/leader/profile.go"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1aaa21f487ea53e44c6ec0ff79359f4b42236988e67ab95f428661eb68557ae"}},{"ruleId":"D2","level":"warning","message":{"text":"Service.CreateWiredSystem (cognitive 47): Service.CreateWiredSystem has cognitive complexity 47 (threshold 15). Drivers by points: if/else 40, boolean chains 5, loops 2 (nesting depth added 15). Of this number, 28 points are the body\u0027s own statements and 19 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/service/service.go"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4dcbd7f1f0a345b64e1e6fc0488db396b867e7f4d21218936d1f3b6cea0011d"}},{"ruleId":"D2","level":"warning","message":{"text":"ares_bootstrap.wireGAEvolution (cognitive 46): ares_bootstrap.wireGAEvolution has cognitive complexity 46 (threshold 15). Drivers by points: if/else 28, loops 9, match/switch 6, boolean chains 3 (nesting depth added 24). Of this number, 18 points are the body\u0027s own statements and 28 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_bootstrap/bootstrap_steps.go"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0106df5690eaca5299c0efdd58eab4f1f820ad5886fdc0fdd129a4753cff3e8"}},{"ruleId":"D2","level":"warning","message":{"text":"output.scanFixJSON (cognitive 46): output.scanFixJSON has cognitive complexity 46 (threshold 15). Drivers by points: if/else 31, loops 8, boolean chains 7 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/llm/output/parser.go"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2b18fcedac5ac393a1fabae84d799fb45260eb344be13b4a66525d9fa96fcaf"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runEvolutionCycle (cognitive 44): main.runEvolutionCycle has cognitive complexity 44 (threshold 15). Drivers by points: if/else 33, loops 11 (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":"cmd/ares/evolution.go"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"23ad10ac5c20ea715e03e8fc60a47eee64691e232b71a1b1515a3cf78fb67917"}},{"ruleId":"D2","level":"warning","message":{"text":"AdaptiveDistribution.normalizeBoundedLocked (cognitive 43): AdaptiveDistribution.normalizeBoundedLocked has cognitive complexity 43 (threshold 15). Drivers by points: if/else 27, loops 16 (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":"internal/ares_evolution/mutation/adaptive_distribution.go"},"region":{"startLine":431}}}],"partialFingerprints":{"codehealthFindingId/v1":"70f3a9beb17808724b1693a3b94f69a7718485e5f803b44952e44c2df82f202c"}},{"ruleId":"D2","level":"warning","message":{"text":"KnowledgePipeline.Process (cognitive 43): KnowledgePipeline.Process has cognitive complexity 43 (threshold 15). Drivers by points: if/else 32, loops 10, boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/knowledge/pipeline.go"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"154e9573790207f365fb4f3a34e467f42ecb13f01918c920fdb59382f683dcd0"}},{"ruleId":"D2","level":"warning","message":{"text":"Store.Query (cognitive 43): Store.Query has cognitive complexity 43 (threshold 15). Drivers by points: if/else 30, loops 11, boolean chains 2 (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":"internal/knowledge/store/memory/store.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ed2c884ca64545c29d89aca9271389a19b1a47e9062753d1903f8bf98889bba"}},{"ruleId":"D2","level":"warning","message":{"text":"Orchestrator.runAgent (cognitive 41): Orchestrator.runAgent has cognitive complexity 41 (threshold 15). Drivers by points: if/else 26, loops 7, boolean chains 4, match/switch 4 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/dashboard/orchestrator.go"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"a89afc94b2a3381e91287466da590ee880f458154ed5d85841d38ec22f95eb09"}},{"ruleId":"D2","level":"warning","message":{"text":"ares_bootstrap.ProvideNewEvolution (cognitive 40): ares_bootstrap.ProvideNewEvolution has cognitive complexity 40 (threshold 15). Drivers by points: if/else 32, loops 8 (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":"internal/ares_bootstrap/provide_new_evolution.go"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"c557a357e1a6464a45cf020bafba99843138e8c671e7b495c2db6420f0f3f96b"}},{"ruleId":"D2","level":"warning","message":{"text":"ContextCleaner.CleanWithTurns (cognitive 39): ContextCleaner.CleanWithTurns has cognitive complexity 39 (threshold 15). Drivers by points: if/else 25, loops 7, match/switch 4, 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":"internal/ares_memory/context/cleaner.go"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ddf6fe86c67dcaed76648962c8a44fc22560ee63be21dcfdccda0f165a4a316"}},{"ruleId":"D2","level":"warning","message":{"text":"KnowledgeRuntime.loadAndProcess (cognitive 39): KnowledgeRuntime.loadAndProcess has cognitive complexity 39 (threshold 15). Drivers by points: if/else 24, loops 7, match/switch 5, jumps 2, boolean chains 1 (nesting depth added 22). Most of this is not in the body itself: 7 of the 39 points are its own statements and the rest belongs to one function literal inside it that branches (line 190). 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":"internal/knowledge/runtime/runtime.go"},"region":{"startLine":171}}}],"partialFingerprints":{"codehealthFindingId/v1":"16230b1fd4bdfb20fb21de59064057c91f5d25aeb37064b772f96293e569015a"}},{"ruleId":"D2","level":"warning","message":{"text":"WriteBuffer.processLoop (cognitive 39): WriteBuffer.processLoop has cognitive complexity 39 (threshold 15). Drivers by points: if/else 36, match/switch 2, loops 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/write_buffer.go"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cd50a50f08dd41e5752a86567e35df69af53d39b04dde63589c342c65755f60"}},{"ruleId":"D2","level":"warning","message":{"text":"resultAggregator.Aggregate (cognitive 38): resultAggregator.Aggregate has cognitive complexity 38 (threshold 15). Drivers by points: if/else 27, loops 7, boolean chains 3, match/switch 1 (nesting depth added 17). Of this number, 31 points are the body\u0027s own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/agents/leader/aggregator.go"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8360ae75e86a8c466071214c99418554eb61d03c170d23abbcc4cb31226bebe"}},{"ruleId":"D2","level":"warning","message":{"text":"evolution.GenerateReport (cognitive 38): evolution.GenerateReport has cognitive complexity 38 (threshold 15). Drivers by points: if/else 24, loops 12, boolean chains 1, match/switch 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/report.go"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c2c64807b2b17b8e77f65c11efb8291820aebf9c758fdd03e6cfbaf69230bb7"}},{"ruleId":"D2","level":"warning","message":{"text":"ExperienceExtractor.ExtractExperiences (cognitive 38): ExperienceExtractor.ExtractExperiences has cognitive complexity 38 (threshold 15). Drivers by points: if/else 31, loops 5, boolean chains 2 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_memory/distillation/extractor.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"0858eb7f68da082d2b677520567e276a9a1ce5c541fcc1b01e849ecb1f2421b7"}},{"ruleId":"D2","level":"warning","message":{"text":"ToolExecutionBridge.executeMultiStep (cognitive 38): ToolExecutionBridge.executeMultiStep has cognitive complexity 38 (threshold 15). Drivers by points: if/else 23, loops 14, boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/planner/bridge.go"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"06730c23ec4ea52d10772e59f055e8a0802e880e965f18e6703e46d951236671"}},{"ruleId":"D2","level":"warning","message":{"text":"ConfigFile.Validate (cognitive 38): ConfigFile.Validate has cognitive complexity 38 (threshold 15). Drivers by points: if/else 32, boolean chains 6 (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":"sdk/config.go"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"551f1df5661cef85ea1e865b58e94c2c313cfdca0a1a74240667deee7593588a"}},{"ruleId":"D2","level":"warning","message":{"text":"main.main (cognitive 37): main.main has cognitive complexity 37 (threshold 15). Drivers by points: if/else 21, loops 16 (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":"examples/runtime_evolution/full/main.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"eef7d04ea8cf0cb271885e514dcaf3155b7f285b1bfede65905a8d39694f4310"}},{"ruleId":"D2","level":"warning","message":{"text":"Runner.executeIteration (cognitive 37): Runner.executeIteration has cognitive complexity 37 (threshold 15). Drivers by points: if/else 34, loops 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/workflow/runner_execution.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d4504326f90fa96a35adfa1da28534b936afbb098434a389eba4cc5eea94213"}},{"ruleId":"D2","level":"warning","message":{"text":"EventRecovery.RecoverFromEvents (cognitive 36): EventRecovery.RecoverFromEvents has cognitive complexity 36 (threshold 15). Drivers by points: if/else 27, boolean chains 4, loops 3, match/switch 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":"internal/agents/leader/event_recovery.go"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f121cf9e0f20fa784e51e3fb361316926343823c696cac0c8a2a165c382745e"}},{"ruleId":"D2","level":"warning","message":{"text":"LeaderSupervisor.doFailover (cognitive 36): LeaderSupervisor.doFailover has cognitive complexity 36 (threshold 15). Drivers by points: if/else 28, boolean chains 4, match/switch 3, 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":"internal/agents/leader/supervisor.go"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"c03398f35a941ce9e9b5faf5890dde9c4b6e748704f83b28d72a56d63f2b8604"}},{"ruleId":"D2","level":"warning","message":{"text":"DreamCycle.deployWinner (cognitive 36): DreamCycle.deployWinner has cognitive complexity 36 (threshold 15). Drivers by points: if/else 36 (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":"internal/ares_evolution/dream_cycle.go"},"region":{"startLine":486}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c7210edd6eecf5742a6bb4ceea6cc1dc6eb67812110bdc98886b1496bf8ab06"}},{"ruleId":"D2","level":"warning","message":{"text":"MemoryRepository.SearchKnowledge (cognitive 36): MemoryRepository.SearchKnowledge has cognitive complexity 36 (threshold 15). Drivers by points: if/else 22, loops 8, boolean chains 4, match/switch 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/retrievalservice/memory_repository.go"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8df082245fde801376e7f85e7edd99798051a4f2e23348264e13278a2dd6411"}},{"ruleId":"D2","level":"warning","message":{"text":"main.pollSurvival (cognitive 35): main.pollSurvival has cognitive complexity 35 (threshold 15). Drivers by points: if/else 32, match/switch 2, loops 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/arena/main.go"},"region":{"startLine":463}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca4cb8e36563c5b9dc2a2e5df5bbacfc91b2a78e3c99fc71a8492fa599918aac"}},{"ruleId":"D2","level":"warning","message":{"text":"main.run (cognitive 35): main.run has cognitive complexity 35 (threshold 15). Drivers by points: if/else 26, loops 7, 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":"examples/11-knowledge-import/akg/main.go"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"e64cc5346e05992fdcf6f5ca2ec640362959751c62f32603cd55408ad2782ffd"}},{"ruleId":"D2","level":"warning","message":{"text":"distillation.extractEvidenceFromMessages (cognitive 35): distillation.extractEvidenceFromMessages has cognitive complexity 35 (threshold 15). Drivers by points: if/else 28, loops 4, match/switch 2, boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_memory/distillation/distiller_admin.go"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"aeeeb3a92bc4a66bbfd222376f014e10721f2ef147b4813e74b90aa1792a6896"}},{"ruleId":"D2","level":"warning","message":{"text":"portfolio.LoadSignalsFromCSV (cognitive 35): portfolio.LoadSignalsFromCSV has cognitive complexity 35 (threshold 15). Drivers by points: if/else 30, boolean chains 2, match/switch 2, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_quant/portfolio/csv_loader.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"cba475a4caf852b4f3e8a4677a6a9ee54546d288fefb4e455f3687ffa95b7052"}},{"ruleId":"D2","level":"warning","message":{"text":"(anonymous) (cognitive 35): (anonymous) has cognitive complexity 35 (threshold 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":"internal/monitoring/static/app.js"},"region":{"startLine":713}}}],"partialFingerprints":{"codehealthFindingId/v1":"05ce6180b0f19577fd97710dd2a1291ce660006d3d013cbaf22d42debba67316"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runServe (cognitive 34): main.runServe has cognitive complexity 34 (threshold 15). Drivers by points: if/else 26, loops 6, boolean chains 1, match/switch 1 (nesting depth added 7). Of this number, 23 points are the body\u0027s own statements and 11 belong to 4 function literals 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":"cmd/ares/serve.go"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"37eee80ab8d545114fa633cf8a9165307a7ebff6f8c61e2c37203affd135b711"}},{"ruleId":"D2","level":"warning","message":{"text":"DreamCycle.findWinner (cognitive 34): DreamCycle.findWinner has cognitive complexity 34 (threshold 15). Drivers by points: if/else 26, loops 6, boolean chains 2 (nesting depth added 14). Of this number, 29 points are the body\u0027s own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/dream_cycle.go"},"region":{"startLine":781}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ec103092ef194f3834aa3bb91b58f88a1c700cfcece3fc2d496f9e35a9fe500"}},{"ruleId":"D2","level":"warning","message":{"text":"LogAnalyzer.extractMetrics (cognitive 34): LogAnalyzer.extractMetrics has cognitive complexity 34 (threshold 15). Drivers by points: if/else 24, loops 10 (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":"internal/tools/resources/builtin/text/log_analyzer.go"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4231c7f3deea2c3e2a699fbb08f43fd92ccf2ce1666a0cf8339c20241c889c0"}},{"ruleId":"D2","level":"warning","message":{"text":"arena.RunScenarioReport (cognitive 33): arena.RunScenarioReport has cognitive complexity 33 (threshold 15). Drivers by points: if/else 22, match/switch 7, loops 3, 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":"internal/ares_arena/scenario.go"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7fd09cd4357f790f654fc8ca6b30e82a38b31973fbb242681f91e4975de91ab"}},{"ruleId":"D2","level":"warning","message":{"text":"RegressionTester.runAdaptive (cognitive 33): RegressionTester.runAdaptive has cognitive complexity 33 (threshold 15). Drivers by points: if/else 29, boolean chains 3, loops 1 (nesting depth added 14). Of this number, 29 points are the body\u0027s own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_arena/regression.go"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6a3011b2800c5019a6436ad65017fcb14023a58d7d2f758437d5725bcdf395a"}},{"ruleId":"D2","level":"warning","message":{"text":"MemoryPatchExecutor.Apply (cognitive 33): MemoryPatchExecutor.Apply has cognitive complexity 33 (threshold 15). Drivers by points: if/else 27, boolean chains 5, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_memory/memory_patcher.go"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba7b8841c417c7cae60b76ecf182c5a5cd07830be1c53e934cec543a19d58504"}},{"ruleId":"D2","level":"warning","message":{"text":"Pipeline.Run (cognitive 33): Pipeline.Run has cognitive complexity 33 (threshold 15). Drivers by points: if/else 31, boolean chains 1, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_memory/pipeline.go"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"12edcfee850eb549765e618cfc36e0ca8313e808d2beed691035b86877242fa2"}},{"ruleId":"D2","level":"warning","message":{"text":"providers.scanConfigFile (cognitive 33): providers.scanConfigFile has cognitive complexity 33 (threshold 15). Drivers by points: if/else 24, loops 6, boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/discovery/providers/filesystem.go"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cc5b8ab5d65d2dd58296d60a54ef1f39026751515aff328a63b2e9e0806d4b6"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultReducer.Reduce (cognitive 33): DefaultReducer.Reduce has cognitive complexity 33 (threshold 15). Drivers by points: if/else 23, loops 8, 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":"internal/knowledge/runtime/components.go"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad876cb0381cea5f279060808ed0232095b086d5dd1f0b87bd27c35f930989e9"}},{"ruleId":"D2","level":"warning","message":{"text":"DateTime.Execute (cognitive 33): DateTime.Execute has cognitive complexity 33 (threshold 15). Drivers by points: if/else 27, loops 4, boolean chains 1, match/switch 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/resources/builtin/math/calculator.go"},"region":{"startLine":565}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e117733ed8598a6bc7bc2b9b921b774248d5f7ab6d803fa2a5fd5b2b92abcce"}},{"ruleId":"D2","level":"warning","message":{"text":"HTTPRequest.Execute (cognitive 33): HTTPRequest.Execute has cognitive complexity 33 (threshold 15). Drivers by points: if/else 25, boolean chains 4, loops 4 (nesting depth added 8). Of this number, 32 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/resources/builtin/network/http_request.go"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"63905a3139642c6cdcf1914435d6e915795ef52ddd976a0433d8e4658367c407"}},{"ruleId":"D2","level":"warning","message":{"text":"JSONTools.extract (cognitive 33): JSONTools.extract has cognitive complexity 33 (threshold 15). Drivers by points: if/else 30, boolean chains 2, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/resources/builtin/text/json_tools.go"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"876bf24932855aeb3772e2ac625938f23509923a42a6ade02527fe22ac1b3045"}},{"ruleId":"D2","level":"warning","message":{"text":"ares_bootstrap.Bootstrap (cognitive 32): ares_bootstrap.Bootstrap has cognitive complexity 32 (threshold 15). Drivers by points: if/else 28, boolean chains 2, loops 1, match/switch 1 (nesting depth added 4). Of this number, 29 points are the body\u0027s own statements and 3 belong to 3 function literals 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, 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":"internal/ares_bootstrap/bootstrap.go"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"793f51448739324162715672a6511662d13edc8dd4ead2760296ea2324a3745e"}},{"ruleId":"D2","level":"warning","message":{"text":"MCPManager.ApplyConfig (cognitive 32): MCPManager.ApplyConfig has cognitive complexity 32 (threshold 15). Drivers by points: if/else 23, loops 6, boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_mcp/manager.go"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f5cc66a81b1f0df88de256a375008d323e0784545cd5f94f573d8c21c39f039"}},{"ruleId":"D2","level":"warning","message":{"text":"MMBacktestRunner.Run (cognitive 32): MMBacktestRunner.Run has cognitive complexity 32 (threshold 15). Drivers by points: if/else 24, boolean chains 3, loops 3, match/switch 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_quant/marketmaking/mm_backtest.go"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"59b9acc15afa51e993cb1c1a201ba10c012da5f0d32a66c49340eef02632628a"}},{"ruleId":"D2","level":"warning","message":{"text":"Orchestrator.CreateAgent (cognitive 32): Orchestrator.CreateAgent has cognitive complexity 32 (threshold 15). Drivers by points: if/else 29, loops 2, boolean chains 1 (nesting depth added 18). Of this number, 26 points are the body\u0027s own statements and 6 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/dashboard/orchestrator.go"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"ecd95daaac1d8b99639595a29b73777170b73d3bb2d30ee2d9293c45473d345d"}},{"ruleId":"D2","level":"warning","message":{"text":"Registry.Apply (cognitive 31): Registry.Apply has cognitive complexity 31 (threshold 15). Drivers by points: if/else 30, boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/evolution/patch/patch.go"},"region":{"startLine":251}}}],"partialFingerprints":{"codehealthFindingId/v1":"c74bd9750c3d448fefb755498aadb26eaa02bb4d2550b3e37e8d89e997dcbdbb"}},{"ruleId":"D2","level":"warning","message":{"text":"EvolutionProvider.Stream (cognitive 31): EvolutionProvider.Stream has cognitive complexity 31 (threshold 15). Drivers by points: if/else 20, match/switch 8, loops 3 (nesting depth added 17). Most of this is not in the body itself: 0 of the 31 points are its own statements and the rest belongs to one function literal inside it that branches (line 70). 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":"internal/knowledge/provider/evolution/provider.go"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f52a931dc422ba3894dc0ca6ba78ad44a2a4564c593826013fe4355b5408b9a"}},{"ruleId":"D2","level":"warning","message":{"text":"WriteBuffer.flushBatch (cognitive 31): WriteBuffer.flushBatch has cognitive complexity 31 (threshold 15). Drivers by points: if/else 27, loops 2, match/switch 2 (nesting depth added 16). Of this number, 28 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/write_buffer.go"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"035b8d08312f33d64aea22f9153d4d277bad49821038fa9134f9fc5f4dbb0e13"}},{"ruleId":"D2","level":"warning","message":{"text":"main.main (cognitive 30): main.main has cognitive complexity 30 (threshold 15). Drivers by points: if/else 22, loops 8 (nesting depth added 16). Of this number, 24 points are the body\u0027s own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/external-tools/main.go"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4ee4c123f5258746d544e001f0f272a971147ad20fd6fe582c98df4e4b47346"}},{"ruleId":"D2","level":"warning","message":{"text":"ares_archive.extractVerdict (cognitive 30): ares_archive.extractVerdict has cognitive complexity 30 (threshold 15). Drivers by points: if/else 24, boolean chains 5, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_archive/extract.go"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfb62940e8d228e3ad62154dc5a777a1bf60053aa7213f39b43391b96d930dc6"}},{"ruleId":"D2","level":"warning","message":{"text":"PostgresEventStore.Append (cognitive 30): PostgresEventStore.Append has cognitive complexity 30 (threshold 15). Drivers by points: if/else 25, boolean chains 4, loops 1 (nesting depth added 9). Of this number, 26 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_events/pg_store.go"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"f784330c0cb2ed20df11b7c8998d0cd77aa1c5b0803a1f4f2d9242a070cb9752"}},{"ruleId":"D2","level":"warning","message":{"text":"evolution.ReportString (cognitive 30): evolution.ReportString has cognitive complexity 30 (threshold 15). Drivers by points: if/else 19, loops 9, boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/report.go"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"d57cf02b781b241c417c413d8d85b9674674a8c6bd04159cb9de5e2e58f33bf9"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultNormalizer.Normalize (cognitive 30): DefaultNormalizer.Normalize has cognitive complexity 30 (threshold 15). Drivers by points: if/else 26, loops 2, boolean chains 1, match/switch 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/experience/normalizer.go"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b117d9a0029f266eaf5fe3d55e56a75cca2e6561b544ccd6f0fe756ccfb3130"}},{"ruleId":"D2","level":"warning","message":{"text":"Population.measureNumericDiversityLocked (cognitive 30): Population.measureNumericDiversityLocked has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16, loops 13, 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":"internal/ares_evolution/genome/adaptive.go"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"fecd269a5999ccaaae76eed37bfbca8fddf690b39a59093a3ec5858f457bcabf"}},{"ruleId":"D2","level":"warning","message":{"text":"HTTPServer.handleGetAgent (cognitive 30): HTTPServer.handleGetAgent has cognitive complexity 30 (threshold 15). Drivers by points: if/else 23, loops 6, 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":"internal/monitoring/http_api.go"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"839f5de305ddf734019bcea5dd4619c532ce961f426fedaad95687cd266b9549"}},{"ruleId":"D2","level":"warning","message":{"text":"Pruner.pruneDAG (cognitive 30): Pruner.pruneDAG has cognitive complexity 30 (threshold 15). Drivers by points: if/else 25, boolean chains 2, match/switch 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":"internal/monitoring/pruner.go"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d56b4bac96f74a8de67990a900ebc17ad016c495a5a1901820a67e1e09db47c"}},{"ruleId":"D2","level":"warning","message":{"text":"computeDAGLayout (cognitive 30): computeDAGLayout has cognitive complexity 30 (threshold 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":"internal/monitoring/static/app.js"},"region":{"startLine":1098}}}],"partialFingerprints":{"codehealthFindingId/v1":"91cdf407efc5cb35359806770b92de60ba43dbee1ae48f0eeb309ecd7fe5c31d"}},{"ruleId":"D2","level":"warning","message":{"text":"main.main (cognitive 29): main.main has cognitive complexity 29 (threshold 15). Drivers by points: if/else 19, loops 8, 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":"examples/13-archive-akg-chain/main.go"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e98c9916688ed819cf058c11d5bbe80c1c516a00f7a20cf17f5de223506b7f3"}},{"ruleId":"D2","level":"warning","message":{"text":"leaderAgent.ProcessStream (cognitive 29): leaderAgent.ProcessStream has cognitive complexity 29 (threshold 15). Drivers by points: match/switch 16, if/else 9, loops 4 (nesting depth added 9). Most of this is not in the body itself: 5 of the 29 points are its own statements and the rest belongs to one function literal inside it that branches (line 710). 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":"internal/agents/leader/agent.go"},"region":{"startLine":662}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f8548aad0f122b3a53f92255eea6d85eb9f6f6905f830dcbacc35298a48876c"}},{"ruleId":"D2","level":"warning","message":{"text":"GenomePopulationAdapter.recordOutcomesLocked (cognitive 29): GenomePopulationAdapter.recordOutcomesLocked has cognitive complexity 29 (threshold 15). Drivers by points: if/else 27, loops 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/genome_wiring_run.go"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"382cbe12a780bec9c5ee6285013f8261d0fd613f390138500c5319e1b35b9c01"}},{"ruleId":"D2","level":"warning","message":{"text":"ExperienceGuidedMutator.chooseGuidedMutationType (cognitive 29): ExperienceGuidedMutator.chooseGuidedMutationType has cognitive complexity 29 (threshold 15). Drivers by points: if/else 19, boolean chains 8, match/switch 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/mutation/guided_mutator.go"},"region":{"startLine":403}}}],"partialFingerprints":{"codehealthFindingId/v1":"a18478d6f405d904e66f472691eb3b1e2e9d9d081ebe70c99adabe64d44491cf"}},{"ruleId":"D2","level":"warning","message":{"text":"Manager.Stop (cognitive 29): Manager.Stop has cognitive complexity 29 (threshold 15). Drivers by points: if/else 26, loops 2, boolean chains 1 (nesting depth added 15). Of this number, 22 points are the body\u0027s own statements and 7 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_runtime/manager_lifecycle.go"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b1cff92432e931272235655f39fd7d5aacf19ff9133595ea0f9c29fbde23682"}},{"ruleId":"D2","level":"warning","message":{"text":"discovery.mergeRecords (cognitive 29): discovery.mergeRecords has cognitive complexity 29 (threshold 15). Drivers by points: loops 17, if/else 11, boolean chains 1 (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":"internal/discovery/identity.go"},"region":{"startLine":6}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cbc7f548a29f10d545989566315fe1f4dea6e59584808df88343ba579c6e577"}},{"ruleId":"D2","level":"warning","message":{"text":"EmbeddingClient.EmbedBatch (cognitive 29): EmbeddingClient.EmbedBatch has cognitive complexity 29 (threshold 15). Drivers by points: if/else 25, loops 4 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/embedding/client.go"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae58036546ee33ab66537989c6f4f85312f675d2a054d5f0a3fbe2c8999e53f3"}},{"ruleId":"D2","level":"warning","message":{"text":"Runner.ResumeExecution (cognitive 29): Runner.ResumeExecution has cognitive complexity 29 (threshold 15). Drivers by points: if/else 27, boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/workflow/runner_checkpoint.go"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"17ca76007adcb422be424b3fb4a554d2308782ea298b3ef977adf13d1f73c1d2"}},{"ruleId":"D2","level":"warning","message":{"text":"renderDAG (cognitive 29): renderDAG has cognitive complexity 29 (threshold 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":"internal/monitoring/static/app.js"},"region":{"startLine":396}}}],"partialFingerprints":{"codehealthFindingId/v1":"358c900c5d73791a40cf0033a0fa5b4d65ddcdc35f4f69cdbf25aee99ae090ac"}},{"ruleId":"D2","level":"warning","message":{"text":"showDAGTooltip (cognitive 29): showDAGTooltip has cognitive complexity 29 (threshold 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":"internal/monitoring/static/app.js"},"region":{"startLine":1333}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f11d3407b03413bb5e444960ddf304973ec0381140756f2d9cc0157e6aa1042"}},{"ruleId":"D2","level":"warning","message":{"text":"main.main (cognitive 28): main.main has cognitive complexity 28 (threshold 15). Drivers by points: if/else 24, boolean chains 2, loops 1, match/switch 1. Most of this is not in the body itself: 8 of the 28 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 152, 92, 212, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/embedding-mcp/main.go"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"88b3c665fa81caab0c9662cd8c78bb06f92212313f62361dcf2ca0468fdda29a"}},{"ruleId":"D2","level":"warning","message":{"text":"MemoryRepository.List (cognitive 28): MemoryRepository.List has cognitive complexity 28 (threshold 15). Drivers by points: if/else 22, boolean chains 5, 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":"internal/agents/memory_repository_impl.go"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"7272e987a227a5dd88c3023cbbdc3d193386caaf324fba6ed5df417c0944bec9"}},{"ruleId":"D2","level":"warning","message":{"text":"genome.computeParamRanges (cognitive 28): genome.computeParamRanges has cognitive complexity 28 (threshold 15). Drivers by points: if/else 25, loops 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":"internal/ares_evolution/genome/adaptive.go"},"region":{"startLine":371}}}],"partialFingerprints":{"codehealthFindingId/v1":"acb4edadfb70143b78da5e9c976f3f4db48f9aa845943819914ea93fd6b5d998"}},{"ruleId":"D2","level":"warning","message":{"text":"Population.generateOffspring (cognitive 28): Population.generateOffspring has cognitive complexity 28 (threshold 15). Drivers by points: if/else 22, match/switch 5, 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":"internal/ares_evolution/genome/population.go"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"1019cd9d51535d1ee752b107ad374e5363e4856d302714aeb1f4217541f76c9b"}},{"ruleId":"D2","level":"warning","message":{"text":"Population.injectFreshMutantsLocked (cognitive 28): Population.injectFreshMutantsLocked has cognitive complexity 28 (threshold 15). Drivers by points: if/else 24, loops 3, 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":"internal/ares_evolution/genome/population_guard.go"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3904c3391408ae71db829c885ba16a6172d995a73d4bc34091b1ed2c3fa40df"}},{"ruleId":"D2","level":"warning","message":{"text":"Client.streamAnthropic (cognitive 28): Client.streamAnthropic has cognitive complexity 28 (threshold 15). Drivers by points: if/else 20, match/switch 5, boolean chains 2, loops 1 (nesting depth added 9). Most of this is not in the body itself: 10 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 574). 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":"internal/llm/client.go"},"region":{"startLine":522}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6a6d1cebc2fc716499d82886001bbd7a552a90e4981c11e6f881006c91d8be7"}},{"ruleId":"D2","level":"warning","message":{"text":"Supervisor.resurrect (cognitive 28): Supervisor.resurrect has cognitive complexity 28 (threshold 15). Drivers by points: if/else 26, 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":"internal/plugins/resurrection/resurrection.go"},"region":{"startLine":470}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f1c1adb7f28fa5402c4625b9040beb989c982c91d0c0e654ff3592164082710"}},{"ruleId":"D2","level":"warning","message":{"text":"SecretRepository.Import (cognitive 28): SecretRepository.Import has cognitive complexity 28 (threshold 15). Drivers by points: if/else 27, loops 1 (nesting depth added 9). Of this number, 25 points are the body\u0027s own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/repositories/secret_repository.go"},"region":{"startLine":521}}}],"partialFingerprints":{"codehealthFindingId/v1":"b30f982e6ebc715b058b43071d92b03b9a18722954315674736350b0caba57d5"}},{"ruleId":"D2","level":"warning","message":{"text":"RetrievalService.applySourceSignals (cognitive 28): RetrievalService.applySourceSignals has cognitive complexity 28 (threshold 15). Drivers by points: if/else 22, boolean chains 3, match/switch 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/services/retrieval_search.go"},"region":{"startLine":703}}}],"partialFingerprints":{"codehealthFindingId/v1":"a030c3c2f5e2d60f042dbb65577b44c75fc34811adcb15315b65b7f18ef19d15"}},{"ruleId":"D2","level":"warning","message":{"text":"evolution.NewWiredEvolutionSystem (cognitive 27): evolution.NewWiredEvolutionSystem has cognitive complexity 27 (threshold 15). Drivers by points: if/else 23, boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/genome_wiring_system.go"},"region":{"startLine":454}}}],"partialFingerprints":{"codehealthFindingId/v1":"22b948752f0dd067e142c72755a6577cdfc9a360bb9dacbd5f40cd4fb29e331b"}},{"ruleId":"D2","level":"warning","message":{"text":"genome.ApplyHypothesis (cognitive 27): genome.ApplyHypothesis has cognitive complexity 27 (threshold 15). Drivers by points: if/else 22, match/switch 5 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/genome/hypothesis.go"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"52030120f4ee70806f1301cf37aa9b6e0ecd12a09da6a6ad5d06eddc63b3240b"}},{"ruleId":"D2","level":"warning","message":{"text":"Population.doEvolve (cognitive 27): Population.doEvolve has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17, boolean chains 7, loops 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/genome/population.go"},"region":{"startLine":258}}}],"partialFingerprints":{"codehealthFindingId/v1":"a62bf1c7a35d4efa3c64c3cb5d4d0f99c623fd0a0be3dc78348efebc53342033"}},{"ruleId":"D2","level":"warning","message":{"text":"DistillationService.parseExtractionResponse (cognitive 27): DistillationService.parseExtractionResponse has cognitive complexity 27 (threshold 15). Drivers by points: if/else 21, match/switch 5, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_experience/distillation_service.go"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0d6f4d525be17004c49da3667a97dd764e9a57f40fdd7c52e7e35f278e9eea5"}},{"ruleId":"D2","level":"warning","message":{"text":"ahp.reconstructTaskResult (cognitive 27): ahp.reconstructTaskResult has cognitive complexity 27 (threshold 15). Drivers by points: if/else 25, 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":"internal/ares_protocol/ahp/message.go"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"494ba83b5df255d4f1a855f6f914006b540b68f1ccdc1f5b9f0215ad50541626"}},{"ruleId":"D2","level":"warning","message":{"text":"agents.formatSnapshotForAnalyst (cognitive 27): agents.formatSnapshotForAnalyst has cognitive complexity 27 (threshold 15). Drivers by points: if/else 18, loops 9 (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":"internal/ares_quant/research/agents/prompt_builder.go"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc15f833282708973cf5d20e21ad08c677983ceec83ea04b9f2293a8b73ad51a"}},{"ruleId":"D2","level":"warning","message":{"text":"Client.streamOpenRouter (cognitive 27): Client.streamOpenRouter has cognitive complexity 27 (threshold 15). Drivers by points: if/else 22, match/switch 4, loops 1 (nesting depth added 9). Most of this is not in the body itself: 10 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 689). 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":"internal/llm/client.go"},"region":{"startLine":636}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3db1342dfc67a01a689e82ff70483f712c1c1749394373e87468d7dab71628d"}},{"ruleId":"D2","level":"warning","message":{"text":"apiimpl.StartService (cognitive 26): apiimpl.StartService has cognitive complexity 26 (threshold 15). Drivers by points: if/else 21, loops 4, boolean chains 1 (nesting depth added 5). Of this number, 24 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. 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":"internal/api_impl/service.go"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec71e0acf288d28dc0fa067118de0e567e7a1d656f7b84d60573373f4d5efe4a"}},{"ruleId":"D2","level":"warning","message":{"text":"CompactableEventStore.archivePendingRoundsOnce (cognitive 26): CompactableEventStore.archivePendingRoundsOnce has cognitive complexity 26 (threshold 15). Drivers by points: if/else 20, 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":"internal/ares_events/compactable_store.go"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"6107426a4b10b0fa0ace262bbe249e0adc212c959d7b72559436d56ba700a8d7"}},{"ruleId":"D2","level":"warning","message":{"text":"evolution.RecordPopulationLineage (cognitive 26): evolution.RecordPopulationLineage has cognitive complexity 26 (threshold 15). Drivers by points: if/else 21, loops 4, 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":"internal/ares_evolution/genome_wiring_genealogy.go"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1417ee30b7a54e45547fdf3f0c3a9c0d65cc847886a21e0ac804219a3a1b39c"}},{"ruleId":"D2","level":"warning","message":{"text":"DreamCycle.runESEvolution (cognitive 26): DreamCycle.runESEvolution has cognitive complexity 26 (threshold 15). Drivers by points: if/else 23, loops 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":"internal/ares_evolution/dream_cycle.go"},"region":{"startLine":379}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffdf2a9beaa93b8b2e3ed9f124562ec71544a9e9076b516476dd06c74c8090fa"}},{"ruleId":"D2","level":"warning","message":{"text":"MemoryExperienceStore.GetTaskTypeStatistics (cognitive 26): MemoryExperienceStore.GetTaskTypeStatistics has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19, loops 6, 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":"internal/ares_evolution/experience/memory_store.go"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"684952687664e90bfc2dc2200da957bc02ae285d7fc29e39ce3a63c8d2167946"}},{"ruleId":"D2","level":"warning","message":{"text":"PhaseExecutor.Execute (cognitive 26): PhaseExecutor.Execute has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19, match/switch 6, 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":"internal/ares_shutdown/phase.go"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"79f3428f5e06d2cb08866fe158a2978c3d8d845ca5578fe7e49f52d45d68fb9e"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultCompiler.formatMarkdown (cognitive 26): DefaultCompiler.formatMarkdown has cognitive complexity 26 (threshold 15). Drivers by points: if/else 19, boolean chains 4, 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":"internal/knowledge/compiler/compiler.go"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f871e86e9961e235aec45936ae039629a363b88ff3b2e3a61df6e2756308b69"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenAIAdapter.GenerateStream (cognitive 26): OpenAIAdapter.GenerateStream has cognitive complexity 26 (threshold 15). Drivers by points: if/else 21, match/switch 4, loops 1 (nesting depth added 9). Most of this is not in the body itself: 9 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 251). 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":"internal/llm/output/openai.go"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"df7b19f656b3de08b037961079f3395f1e8458cfb0f79a168c7df9aef1408800"}},{"ruleId":"D2","level":"warning","message":{"text":"workflow.migrateScheduler (cognitive 26): workflow.migrateScheduler has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16, loops 6, boolean chains 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/workflow/runner_mutation.go"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4695ac7f31cf4a0313e4dbc8bf54e91ddcfacb8e335beddd08e17a898998b74"}},{"ruleId":"D2","level":"warning","message":{"text":"ConfigFile.validate (cognitive 25): ConfigFile.validate has cognitive complexity 25 (threshold 15). Drivers by points: if/else 19, boolean chains 6 (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":"api/client/config.go"},"region":{"startLine":403}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fcaa0c8bc04b4ba63386dd12b574a81679518e06e8a3747f27fb41787722448"}},{"ruleId":"D2","level":"warning","message":{"text":"Service.ListAgents (cognitive 25): Service.ListAgents has cognitive complexity 25 (threshold 15). Drivers by points: if/else 20, boolean chains 4, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"api/service/agent/service.go"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"dea7fa30603b6d5a6526064048e82cdb096982068999d21cf4b778b91a10d1f2"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runInspect (cognitive 25): main.runInspect has cognitive complexity 25 (threshold 15). Drivers by points: if/else 20, boolean chains 5 (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":"cmd/arena/main.go"},"region":{"startLine":657}}}],"partialFingerprints":{"codehealthFindingId/v1":"82d443aca9880768e0eb8d50e16fc3d09f878872f53bef069266056af262bd3f"}},{"ruleId":"D2","level":"warning","message":{"text":"leaderAgent.ReplayEvents (cognitive 25): leaderAgent.ReplayEvents has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18, boolean chains 4, match/switch 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":"internal/agents/leader/agent.go"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"cca9b0fa5f73d7eefce5b630b4a406a909e5aed870fded406bba53c51904ae72"}},{"ruleId":"D2","level":"warning","message":{"text":"leaderAgent.initMemoryContext (cognitive 25): leaderAgent.initMemoryContext has cognitive complexity 25 (threshold 15). Drivers by points: if/else 24, 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":"internal/agents/leader/agent_memory.go"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9c8146bc3da3927b12dcbfde634fd82e88eb930dc541061a70a89a945c25348"}},{"ruleId":"D2","level":"warning","message":{"text":"ArenaAdapter.Execute (cognitive 25): ArenaAdapter.Execute has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18, loops 4, 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":"internal/api_impl/adapters.go"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"61fda66225f8246099ccea044e2b7997317315653fdc0829ae83310c1d919683"}},{"ruleId":"D2","level":"warning","message":{"text":"arena.ValidateAction (cognitive 25): arena.ValidateAction has cognitive complexity 25 (threshold 15). Drivers by points: if/else 23, boolean chains 1, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_arena/http.go"},"region":{"startLine":585}}}],"partialFingerprints":{"codehealthFindingId/v1":"05a3ce287b670ee2e7121d69d38bef2a3ddedb88c4140e0557e687b30c2f894d"}},{"ruleId":"D2","level":"warning","message":{"text":"MetaController.Tune (cognitive 25): MetaController.Tune has cognitive complexity 25 (threshold 15). Drivers by points: if/else 23, 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":"internal/ares_evolution/genome/meta_evolution.go"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"b78ea1f91f6bc4a4f07ff47659bebb382c12f3048b385d92b11eb9a4ef7db4ac"}},{"ruleId":"D2","level":"warning","message":{"text":"memoryManager.StoreDistilledTask (cognitive 25): memoryManager.StoreDistilledTask has cognitive complexity 25 (threshold 15). Drivers by points: if/else 22, boolean chains 2, loops 1 (nesting depth added 6). Of this number, 13 points are the body\u0027s own statements and 12 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_memory/manager_impl.go"},"region":{"startLine":497}}}],"partialFingerprints":{"codehealthFindingId/v1":"33e52cf246e132793462cc96c556c6c8d27c33fc9d56d45dbc91da748a81471d"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultCompiler.formatPrompt (cognitive 25): DefaultCompiler.formatPrompt has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18, boolean chains 4, 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":"internal/knowledge/compiler/compiler.go"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"d959d3bf00506dd548dbfc19b38242d7e73d66eb68880d9c51856660dbe30a5c"}},{"ruleId":"D2","level":"warning","message":{"text":"TimelineLinker.Link (cognitive 25): TimelineLinker.Link has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17, boolean chains 4, 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":"internal/knowledge/linker/timeline.go"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"a664b14d6e06c047ef6a62ead53f75c11f64c123aa5e5fa9e0c751250dac942b"}},{"ruleId":"D2","level":"warning","message":{"text":"CodeProvider.Stream (cognitive 25): CodeProvider.Stream has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16, boolean chains 3, loops 3, match/switch 3 (nesting depth added 7). Most of this is not in the body itself: 0 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 84). 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":"internal/knowledge/provider/code/provider.go"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"7cd621ea5cb32b8375aceac5ec7b726420b0479a7d8fac3e873352ba9abb9225"}},{"ruleId":"D2","level":"warning","message":{"text":"Planner.Plan (cognitive 25): Planner.Plan has cognitive complexity 25 (threshold 15). Drivers by points: if/else 20, loops 5 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/planner/planner.go"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"827ea2d20295cf3de3e6186a9317b11c0a8a8e00b58a465b8dbb9f2aff40f543"}},{"ruleId":"D2","level":"warning","message":{"text":"DataValidation.validateSchema (cognitive 25): DataValidation.validateSchema has cognitive complexity 25 (threshold 15). Drivers by points: if/else 22, loops 2, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/resources/builtin/text/data_validation.go"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"53c55d6e1f846942e35e22343fbfa8edaa917771494c1b7e04896b40bfd2ff53"}},{"ruleId":"D2","level":"warning","message":{"text":"ConfigFile.ToOptions (cognitive 25): ConfigFile.ToOptions has cognitive complexity 25 (threshold 15). Drivers by points: if/else 24, 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":"sdk/config.go"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"04ebeb184df73a461b6be258afd14e85b942e82300542d438ab977795311ede5"}},{"ruleId":"D2","level":"warning","message":{"text":"MemoryExperienceStore.Query (cognitive 24): MemoryExperienceStore.Query has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17, loops 5, 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":"internal/ares_evolution/experience/memory_store.go"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"09076418f9da3932538af7e10f891ada100bcfe2255851c07e08402da0ebcd59"}},{"ruleId":"D2","level":"warning","message":{"text":"Population.preservePromptDiversityLocked (cognitive 24): Population.preservePromptDiversityLocked has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15, loops 6, boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/genome/population_guard.go"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3907b6c416c50c13f13f9fd4f7123ac4f6245ad1ee4c6a7f647dc96e7ab8600"}},{"ruleId":"D2","level":"warning","message":{"text":"Service.Evolve (cognitive 24): Service.Evolve has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17, match/switch 4, loops 2, 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":"internal/ares_evolution/service/service.go"},"region":{"startLine":434}}}],"partialFingerprints":{"codehealthFindingId/v1":"c43aac62659072fcac3a7928008dff7818694bc393339a36fcab32145c3dd668"}},{"ruleId":"D2","level":"warning","message":{"text":"SSETransport.receiveLoop (cognitive 24): SSETransport.receiveLoop has cognitive complexity 24 (threshold 15). Drivers by points: if/else 22, loops 2 (nesting depth added 10). Of this number, 23 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_mcp/transport_sse.go"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"d68af12d0789c51c1e71ecf7d846feb04c768b14d256dc457fde82f636e4476b"}},{"ruleId":"D2","level":"warning","message":{"text":"ProductionMemoryManager.BuildPromptMessages (cognitive 24): ProductionMemoryManager.BuildPromptMessages has cognitive complexity 24 (threshold 15). Drivers by points: if/else 22, 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":"internal/ares_memory/production_manager.go"},"region":{"startLine":575}}}],"partialFingerprints":{"codehealthFindingId/v1":"de04969a4a4edc0c14a7459e65e1401b81f008cafafc26d1d01440b11296ec27"}},{"ruleId":"D2","level":"warning","message":{"text":"Client.streamOllama (cognitive 24): Client.streamOllama has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17, match/switch 6, loops 1 (nesting depth added 10). Most of this is not in the body itself: 9 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 481). 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":"internal/llm/client.go"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"95af5f31d62e954b6a09060b83f5560350a2fd96f7c2829ea013e45e411e88f6"}},{"ruleId":"D2","level":"warning","message":{"text":"OpenRouterAdapter.GenerateStream (cognitive 24): OpenRouterAdapter.GenerateStream has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, match/switch 4, loops 1 (nesting depth added 8). Most of this is not in the body itself: 7 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 229). 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":"internal/llm/output/openrouter.go"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"afef369fe9cde7e4c89284993b0e337fa7756567d6e893b9351246fa164339e5"}},{"ruleId":"D2","level":"warning","message":{"text":"SecretRepository.RotateKey (cognitive 24): SecretRepository.RotateKey has cognitive complexity 24 (threshold 15). Drivers by points: if/else 22, loops 2 (nesting depth added 6). Of this number, 20 points are the body\u0027s own statements and 4 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/repositories/secret_repository.go"},"region":{"startLine":355}}}],"partialFingerprints":{"codehealthFindingId/v1":"61802a7d73d2cc512f88998a423c7708874053ec5557cfe6e81b66036915fa7f"}},{"ruleId":"D2","level":"warning","message":{"text":"TaskResultRepository.SearchByVector (cognitive 24): TaskResultRepository.SearchByVector has cognitive complexity 24 (threshold 15). Drivers by points: if/else 23, loops 1 (nesting depth added 10). Of this number, 23 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/repositories/task_result_repository.go"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"77af2f6ff83518f45c2cbcf893b19e09ae1b2e17a1d99642cfd1814c893a8950"}},{"ruleId":"D2","level":"warning","message":{"text":"bootstrap.runEvolutionCycle (cognitive 23): bootstrap.runEvolutionCycle has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16, loops 6, 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":"api/bootstrap/bootstrap.go"},"region":{"startLine":259}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8a99ceb031f3271f5a666eaf3b147b031fbc0d385f65b57a3599773bb09d255"}},{"ruleId":"D2","level":"warning","message":{"text":"taskExecutor.executeWithLLM (cognitive 23): taskExecutor.executeWithLLM has cognitive complexity 23 (threshold 15). Drivers by points: if/else 21, boolean chains 1, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/agents/sub/executor.go"},"region":{"startLine":291}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f8f0234bc68139d044b41cf6063068c32270cbfa07e46c0504ef2902dc5acb9"}},{"ruleId":"D2","level":"warning","message":{"text":"ReportGenerator.GenerateMarkdown (cognitive 23): ReportGenerator.GenerateMarkdown has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13, loops 10 (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":"internal/ares_eval/report.go"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3539d85849d981b86e567eecfa7dd70b797b46e44377480a250648498756f54"}},{"ruleId":"D2","level":"warning","message":{"text":"evolution.generateDiffPatches (cognitive 23): evolution.generateDiffPatches has cognitive complexity 23 (threshold 15). Drivers by points: if/else 20, loops 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/genome_wiring_system.go"},"region":{"startLine":805}}}],"partialFingerprints":{"codehealthFindingId/v1":"da4825a223dd7935a4605c3b952799ee1ec1f921424c014fd2d7d70d708f813e"}},{"ruleId":"D2","level":"warning","message":{"text":"Population.applyFitnessSharingSampled (cognitive 23): Population.applyFitnessSharingSampled has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16, loops 7 (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":"internal/ares_evolution/genome/population_guard.go"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ead26a4a490c827ee7bb1bac5bd0bfe8cfd06e204c14df89c9bf7f703db620e"}},{"ruleId":"D2","level":"warning","message":{"text":"ares_mcp.matchURITemplate (cognitive 23): ares_mcp.matchURITemplate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17, loops 4, 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":"internal/ares_mcp/server.go"},"region":{"startLine":519}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd017b3f336a534ab08f459238e1250012f6f2385a924ae64d710ab517ae5680"}},{"ruleId":"D2","level":"warning","message":{"text":"portfolio.LoadCustomBarsFromCSV (cognitive 23): portfolio.LoadCustomBarsFromCSV has cognitive complexity 23 (threshold 15). Drivers by points: if/else 21, boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_quant/portfolio/csv_loader.go"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fdcb56959857f6d9e73e8e1961d9c7bb2c747eafd56448767965d75715c5e3f"}},{"ruleId":"D2","level":"warning","message":{"text":"WSClient.WritePump (cognitive 23): WSClient.WritePump has cognitive complexity 23 (threshold 15). Drivers by points: if/else 20, match/switch 2, loops 1 (nesting depth added 14). Of this number, 22 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/dashboard/ws_hub.go"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c9c44f69281112416c53e98b0cece4888e69ffaae2dd2e61e7584ba10174eac"}},{"ruleId":"D2","level":"warning","message":{"text":"KnowledgeAgent.Process (cognitive 23): KnowledgeAgent.Process has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17, loops 3, match/switch 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/knowledge/workflow/workflow.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"53e9b8058ce1713533d94b6192924094ca8d8572e7e0c864ba962c340786b482"}},{"ruleId":"D2","level":"warning","message":{"text":"main.printReport (cognitive 22): main.printReport has cognitive complexity 22 (threshold 15). Drivers by points: if/else 20, loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/arena/main.go"},"region":{"startLine":850}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b58620578700af550c4433af33c869885e3e7f34417512a1f0cc16a0b0d5ac4"}},{"ruleId":"D2","level":"warning","message":{"text":"main.printReport (cognitive 22): main.printReport has cognitive complexity 22 (threshold 15). Drivers by points: if/else 20, loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/ares/arena.go"},"region":{"startLine":561}}}],"partialFingerprints":{"codehealthFindingId/v1":"42a643c5e0f21a7653e3ead89a0366f90ca46aba5cc05acaf0dec17a15e98622"}},{"ruleId":"D2","level":"warning","message":{"text":"main.main (cognitive 22): main.main has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18, loops 4 (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":"cmd/monitor-live/main.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dd235cdbeaf8ace03ecf2c3ee1ef83b216aeb7545c41710e645ab27f1d39b59"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runChat (cognitive 22): main.runChat has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18, boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/11-knowledge-import/main.go"},"region":{"startLine":330}}}],"partialFingerprints":{"codehealthFindingId/v1":"04d476ba8ad3798d5e2342f2def6202e1661629c57c57239157e2b99bed8cb81"}},{"ruleId":"D2","level":"warning","message":{"text":"experience.AggregateEvidence (cognitive 22): experience.AggregateEvidence has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19, boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/experience/types.go"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"cec674e58d9055bdd0aa2914932471d13a0c2fa81ba14821f27ea494b32f6946"}},{"ruleId":"D2","level":"warning","message":{"text":"genome.ParetoDominance (cognitive 22): genome.ParetoDominance has cognitive complexity 22 (threshold 15). Drivers by points: if/else 20, boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/genome/multi_objective.go"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"80994247188f4a879b256542ef333f4a2260cffcd8f1a6ed874c09894f2fc1fa"}},{"ruleId":"D2","level":"warning","message":{"text":"mutation.extractOutermostBracket (cognitive 22): mutation.extractOutermostBracket has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14, loops 4, boolean chains 2, match/switch 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":"internal/ares_evolution/mutation/llm_hint_provider.go"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a307c001744459963a312eadae6fa61ea77b9b2e217a6f75479cd1d301a490c"}},{"ruleId":"D2","level":"warning","message":{"text":"Manager.healthCheck (cognitive 22): Manager.healthCheck has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18, boolean chains 2, loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_runtime/manager_lifecycle.go"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"164f43e60272936c95f5301cf6d945ce77a3be1980d73f25c5c247f10a0599bc"}},{"ruleId":"D2","level":"warning","message":{"text":"Client.GenerateStream (cognitive 22): Client.GenerateStream has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16, match/switch 4, boolean chains 1, loops 1 (nesting depth added 7). Most of this is not in the body itself: 7 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 386). 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":"internal/llm/client.go"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e17e9186a103e90a2cb187f7ebd09b500b3dff626daca6c0cb367ea96593bec"}},{"ruleId":"D2","level":"warning","message":{"text":"OllamaAdapter.GenerateStream (cognitive 22): OllamaAdapter.GenerateStream has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15, match/switch 6, loops 1 (nesting depth added 9). Most of this is not in the body itself: 7 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 182). 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":"internal/llm/output/ollama.go"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"9dfb6faca88b822d596f71d7cb9fba45339b75c09d263882e548f2d50571b55d"}},{"ruleId":"D2","level":"warning","message":{"text":"WebSearch.Execute (cognitive 22): WebSearch.Execute has cognitive complexity 22 (threshold 15). Drivers by points: if/else 20, boolean chains 1, loops 1 (nesting depth added 1). Of this number, 21 points are the body\u0027s own statements and 1 belongs to one function literal 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":"internal/tools/resources/builtin/network/web_search.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c1c2a546e010cf9754d14d1e26597e7b589bb9f2302b2d98935786cbecd0953"}},{"ruleId":"D2","level":"warning","message":{"text":"Agent.buildMessages (cognitive 22): Agent.buildMessages has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15, boolean chains 7 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/sdk.go"},"region":{"startLine":1027}}}],"partialFingerprints":{"codehealthFindingId/v1":"e753629e98b9bbf412c57b554e882033e56201fd187f7878da39f198cf962c44"}},{"ruleId":"D2","level":"warning","message":{"text":"liveDAGPatchExecutor.Apply (cognitive 21): liveDAGPatchExecutor.Apply has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, boolean chains 2, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/ares/serve.go"},"region":{"startLine":615}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd9f98ca424d96570f4cf57184c0d92f1d87d9f5d3067c87a5921de36506f376"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runEvolutionCycle (cognitive 21): main.runEvolutionCycle has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15, loops 5, jumps 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":"examples/runtime_evolution/basic/main.go"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"924edcf4dc60b6993f2b94a670e3855e4ba0135a1d7efe00c637262aa881c2cf"}},{"ruleId":"D2","level":"warning","message":{"text":"Service.Execute (cognitive 21): Service.Execute has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18, 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":"internal/ares_arena/service.go"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"0007142b436b82c03e6d525c5e8690552236dc261c974deaf6952a4917c6426e"}},{"ruleId":"D2","level":"warning","message":{"text":"MemoryExperienceStore.GetStatistics (cognitive 21): MemoryExperienceStore.GetStatistics has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15, loops 6 (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":"internal/ares_evolution/experience/memory_store.go"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab594784428c64952b54fdc826c4309101eb2a0dfb9454b884ece1e9152a22a5"}},{"ruleId":"D2","level":"warning","message":{"text":"EvolutionGuardrails.PostEvolveCheck (cognitive 21): EvolutionGuardrails.PostEvolveCheck has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, loops 5, 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":"internal/ares_evolution/guardrails.go"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"47db7abe8d3a28ea12479cee51707545949b9e05cb0b5bc054245423f486bc8d"}},{"ruleId":"D2","level":"warning","message":{"text":"evolution.extractScoreFromText (cognitive 21): evolution.extractScoreFromText has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12, boolean chains 5, loops 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/service/llm_scorer.go"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"1961fc0e224bdfa6569caa0c54fe207fde78441ef0387baf34a1ea5bde919bf7"}},{"ruleId":"D2","level":"warning","message":{"text":"WSHub.Run (cognitive 21): WSHub.Run has cognitive complexity 21 (threshold 15). Drivers by points: loops 10, if/else 9, match/switch 2 (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/dashboard/ws_hub.go"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"9062548af0ae2a3538b7133a95240c53e7775e9151908bd48d06c15fe2c27cc1"}},{"ruleId":"D2","level":"warning","message":{"text":"MemoryRepository.SearchSimilarTasks (cognitive 21): MemoryRepository.SearchSimilarTasks has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, loops 6, 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":"internal/memoryservice/memory_repository.go"},"region":{"startLine":241}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d5e1d57ab02fb55810b6a0e00c9d29c90624e03f8aaa14959ad1468ea109235"}},{"ruleId":"D2","level":"warning","message":{"text":"MemorySearch.Execute (cognitive 21): MemorySearch.Execute has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19, boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/resources/builtin/memory/memory_tools.go"},"region":{"startLine":48}}}],"partialFingerprints":{"codehealthFindingId/v1":"25a4b75cc806f26058cca9e57998870c9c5f739784b325fed2e531b323dd61a3"}},{"ruleId":"D2","level":"warning","message":{"text":"StringUtils.Execute (cognitive 21): StringUtils.Execute has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12, loops 6, boolean chains 2, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/resources/builtin/stringutils/stringutils.go"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbe51c779fdd16862720a6c3137975e048df58dac62b53ccfd06deea529ae7b5"}},{"ruleId":"D2","level":"warning","message":{"text":"DataTransform.jsonToCSV (cognitive 21): DataTransform.jsonToCSV has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13, loops 7, 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":"internal/tools/resources/builtin/text/data_transform.go"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"005ad50184f4416c0b85b31873fc5e57ed935f3cd420c8a0370bb118b151d26f"}},{"ruleId":"D2","level":"warning","message":{"text":"main.registerTools (cognitive 20): main.registerTools has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15, loops 4, boolean chains 1 (nesting depth added 2). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 625, 688, 579, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/11-knowledge-import/main.go"},"region":{"startLine":570}}}],"partialFingerprints":{"codehealthFindingId/v1":"15a8760882cfd40941678fdcf417ec707ffa7b5dd47c58c91982603219a3598d"}},{"ruleId":"D2","level":"warning","message":{"text":"ares_archive.extractDecisions (cognitive 20): ares_archive.extractDecisions has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15, loops 3, boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_archive/extract.go"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"024b9f96e3f1df4d91390ca0ad8c2d3c4cb84ab5f373c04f5e25fbd57a783d9e"}},{"ruleId":"D2","level":"warning","message":{"text":"RegressionTester.Run (cognitive 20): RegressionTester.Run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 18, boolean chains 2 (nesting depth added 2). Of this number, 18 points are the body\u0027s own statements and 2 belong to 2 function literals 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":"internal/ares_arena/regression.go"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b158ea9d46f54983756976ea43bc35bd812f19279f63c9167123fe73b6efe56"}},{"ruleId":"D2","level":"warning","message":{"text":"NewEvolutionComponents.UpdateLiveDAG (cognitive 20): NewEvolutionComponents.UpdateLiveDAG has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, loops 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_bootstrap/provide_new_evolution.go"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"53f9076d5ec9661684283157686942da4f74e0a5b1bcaafb1f1d193fe9d22a6b"}},{"ruleId":"D2","level":"warning","message":{"text":"Distiller.embedPhase (cognitive 20): Distiller.embedPhase has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, match/switch 3, loops 1 (nesting depth added 10). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 437). 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":"internal/ares_memory/distillation/distiller.go"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ddc9d3a295d84d767b2af53f3cdf0bbd004e51ca3e723cf91c49a7d45e7b8d2"}},{"ruleId":"D2","level":"warning","message":{"text":"Distiller.resolveConflictsPhase (cognitive 20): Distiller.resolveConflictsPhase has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, match/switch 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_memory/distillation/distiller.go"},"region":{"startLine":538}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b4c020f5775e77ce74780e24f6e223ccf0e838a056d145af481e12119fe8e4f"}},{"ruleId":"D2","level":"warning","message":{"text":"ImportanceScorer.ScoreMemory (cognitive 20): ImportanceScorer.ScoreMemory has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15, boolean chains 2, match/switch 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":"internal/ares_memory/distillation/scorer.go"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"088abc305f24fc778994f1104c2905bbad6f7c8b868827c96a1cf9f59841336e"}},{"ruleId":"D2","level":"warning","message":{"text":"LoopPlugin.OnRoundEnd (cognitive 20): LoopPlugin.OnRoundEnd has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, loops 3, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_runtime/loop.go"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"90bfbb1408458551eef8b8b68f7aa95c7a724ed0c05eef5c70f02806ed041354"}},{"ruleId":"D2","level":"warning","message":{"text":"WorkflowDiffer.Diff (cognitive 20): WorkflowDiffer.Diff has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12, loops 8 (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":"internal/evolution/diff/workflow_differ.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"967b008c6376465f4609e83dee2c5e63dad26dafa023578e6ff57440bd34e32c"}},{"ruleId":"D2","level":"warning","message":{"text":"llmservice.NewService (cognitive 20): llmservice.NewService has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, loops 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/llmservice/service.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d57ada99d8d35cc4d3c349228899e3b05edbc4ef02ef0e0c6d8e718150062a1"}},{"ruleId":"D2","level":"warning","message":{"text":"EmbeddingCache.Clear (cognitive 20): EmbeddingCache.Clear has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, 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":"internal/storage/postgres/embedding/cache.go"},"region":{"startLine":162}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c79a7699a2bf8c8a2788c644051b4972969ccded12981c7a25cb6324be80bfa"}},{"ruleId":"D2","level":"warning","message":{"text":"TaskResultRepository.ListByType (cognitive 20): TaskResultRepository.ListByType has cognitive complexity 20 (threshold 15). Drivers by points: if/else 19, loops 1 (nesting depth added 8). Of this number, 19 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/repositories/task_result_repository.go"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"18dcd22bd7331b8e5bf9a3504e8fbc324062f9bc29c71a03100e1f09d4cab9db"}},{"ruleId":"D2","level":"warning","message":{"text":"RetrievalService.GenerateDebugInfo (cognitive 20): RetrievalService.GenerateDebugInfo has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, match/switch 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/services/retrieval_helpers.go"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"285b7f5ae6f3de296f1b2466342ad4f19e801bc9c31b4a8abee8668708219872"}},{"ruleId":"D2","level":"warning","message":{"text":"core.ParameterSchemaToMap (cognitive 20): core.ParameterSchemaToMap has cognitive complexity 20 (threshold 15). Drivers by points: if/else 18, loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/resources/core/convert.go"},"region":{"startLine":23}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7d85e5941013f596eb77b582ad4c334e3b4e0a8b246c6b400e972f58d397d7c"}},{"ruleId":"D2","level":"warning","message":{"text":"FileWatcher.fsnotifyLoop (cognitive 20): FileWatcher.fsnotifyLoop has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15, boolean chains 2, match/switch 2, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/workflow/engine/reloader.go"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"e95129d8cbcd89f8dec8fe2a7f1d759c96123056fd4362285354b0f35c8ca0c3"}},{"ruleId":"D2","level":"warning","message":{"text":"sdk.New (cognitive 20): sdk.New has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, boolean chains 3, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/sdk.go"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"10b2845a18f6ed1082efea02a94ce7756acc7a21a6498929094c251309f6e82f"}},{"ruleId":"D2","level":"warning","message":{"text":"WorkflowAgentExecutor.Process (cognitive 19): WorkflowAgentExecutor.Process has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"api/client/workflow.go"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fbdc0f4d75dd769981f3d2fc6efead888a191d9798cb698c906cad53f6b2c14"}},{"ruleId":"D2","level":"warning","message":{"text":"actionHandler.handleChaos (cognitive 19): actionHandler.handleChaos has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, loops 4, match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/ares/actions.go"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"52fa877c848db78f3a0ad1d4502ddc0469ecff0bcd37118da491e176419cc05f"}},{"ruleId":"D2","level":"warning","message":{"text":"actionHandler.handleChaos (cognitive 19): actionHandler.handleChaos has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, loops 4, match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/monitor-live/actions.go"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bbdb9ceb384e999f75fed15de88726363c8446e08d8e237c6e72bd838e41b29"}},{"ruleId":"D2","level":"warning","message":{"text":"openaiapi.extractContent (cognitive 19): openaiapi.extractContent has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"compat/protocol/openai_api/openai_api.go"},"region":{"startLine":539}}}],"partialFingerprints":{"codehealthFindingId/v1":"b07bba577f93f07dc459b4a3473704e425b2a69cb3584f89228da1820a440d70"}},{"ruleId":"D2","level":"warning","message":{"text":"main.main (cognitive 19): main.main has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, loops 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/runtime_evolution/knowledge/main.go"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5b6fffc41433d3ec4b31a3e4367bf1f6621928f73c98f3e21a64f7913e30edc"}},{"ruleId":"D2","level":"warning","message":{"text":"leaderAgent.Process (cognitive 19): leaderAgent.Process has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18, 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":"internal/agents/leader/agent.go"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0d1c7892cd2d8d56b7cb11cb69469d90211f9c44cf882663943626ef045917b"}},{"ruleId":"D2","level":"warning","message":{"text":"ares_archive.extractTODOs (cognitive 19): ares_archive.extractTODOs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, loops 3, 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":"internal/ares_archive/extract.go"},"region":{"startLine":418}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b22468e519868638b501c1310719d6a7fd76b74b26127ed4b23e437b818f0f3"}},{"ruleId":"D2","level":"warning","message":{"text":"ares_eval.findJSONEnd (cognitive 19): ares_eval.findJSONEnd has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, 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":"internal/ares_eval/llm_judge.go"},"region":{"startLine":331}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd3160c6d1bfdb209108dfa2f6452071d60d00bf6a3fa4555e9c174a45e175fa"}},{"ruleId":"D2","level":"warning","message":{"text":"MemoryExperienceStore.QueryByTaskType (cognitive 19): MemoryExperienceStore.QueryByTaskType has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, loops 5, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/experience/memory_store.go"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8c462a14dfabc2552ce19265c332e3e93124afb9403b829d6164c94cd2be435"}},{"ruleId":"D2","level":"warning","message":{"text":"FeedbackRecorder.Register (cognitive 19): FeedbackRecorder.Register has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16, loops 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/feedback_recorder.go"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"20c0a6234773e49fe01a32b03d00d79e51ea4daeaeba99d4c3efca4e6110e599"}},{"ruleId":"D2","level":"warning","message":{"text":"Population.applyFitnessSharingExact (cognitive 19): Population.applyFitnessSharingExact has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, loops 6 (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":"internal/ares_evolution/genome/population_guard.go"},"region":{"startLine":392}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb7029ba7fddba4335335b43efdddcef39c7fa70ad6b9e95ee5de0306ba34c47"}},{"ruleId":"D2","level":"warning","message":{"text":"SUSSelection.Select (cognitive 19): SUSSelection.Select has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9, loops 7, 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":"internal/ares_evolution/genome/selection.go"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"3976a2a1fbb3a66ff045534f454a01d6cd35eeb45592560959198242c056c49b"}},{"ruleId":"D2","level":"warning","message":{"text":"evolution.NewService (cognitive 19): evolution.NewService has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, boolean chains 5 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/service/service.go"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee9e3f69afa901384b057f9ec2258670cb9952d7fd58031ff3f15eb30f09e1d5"}},{"ruleId":"D2","level":"warning","message":{"text":"ConflictResolver.DetectConflictGroups (cognitive 19): ConflictResolver.DetectConflictGroups has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, loops 6 (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":"internal/ares_experience/conflict_resolver.go"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a1b46ba0d7b63d9454312529c813095bbad54016f18d30c547e5444abd7672a"}},{"ruleId":"D2","level":"warning","message":{"text":"MCPConfigWatcher.Start (cognitive 19): MCPConfigWatcher.Start has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, match/switch 5, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_mcp/config_watcher.go"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"9e81baa4b6189d2d1e3f5266a5cc9181c0397127215a44b4562cc83c71fbdc54"}},{"ruleId":"D2","level":"warning","message":{"text":"QuoteEngine.GenerateQuote (cognitive 19): QuoteEngine.GenerateQuote has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_quant/marketmaking/quote_engine.go"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3604129f75855f7f28052844dc990ee0a846cb5ad05be84ffd37686f7e9bf1e"}},{"ruleId":"D2","level":"warning","message":{"text":"Manager.scheduleResurrection (cognitive 19): Manager.scheduleResurrection has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, match/switch 3, loops 1 (nesting depth added 11). Most of this is not in the body itself: 0 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 564). 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":"internal/ares_runtime/manager.go"},"region":{"startLine":563}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0f21beedd7073e926867d7019b5002377da6bdde3cee42970d7d32cd20ca886"}},{"ruleId":"D2","level":"warning","message":{"text":"WSClient.ReadPump (cognitive 19): WSClient.ReadPump has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, match/switch 5, loops 1 (nesting depth added 9). Of this number, 17 points are the body\u0027s own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/dashboard/ws_hub.go"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc0ff0a8ef8a1e6f1f873e79d772fa07db8caed61a11cddd2b602f883f4c097a"}},{"ruleId":"D2","level":"warning","message":{"text":"ArchitectureLinker.Link (cognitive 19): ArchitectureLinker.Link has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, loops 4, 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":"internal/knowledge/linker/architecture.go"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f7691e3728b6b3f136afd89894b1b3d134a284e06219169a4670f29d627c556"}},{"ruleId":"D2","level":"warning","message":{"text":"KnowledgePipeline.ProcessStream (cognitive 19): KnowledgePipeline.ProcessStream has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, match/switch 6, loops 1 (nesting depth added 12). Most of this is not in the body itself: 0 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 218). 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":"internal/knowledge/pipeline.go"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"218a6ba9f7819768c18e3f6a322a4fd0e666d2fbefe37b766ab65972074271fd"}},{"ruleId":"D2","level":"warning","message":{"text":"TaskResultRepository.ListBySession (cognitive 19): TaskResultRepository.ListBySession has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18, loops 1 (nesting depth added 8). Of this number, 18 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/repositories/task_result_repository.go"},"region":{"startLine":470}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1eb9970b5a9f88f4b9036270f23823a37714ebb4c4198ea9eff2b6072e66081"}},{"ruleId":"D2","level":"warning","message":{"text":"ToolExecutionBridge.Execute (cognitive 19): ToolExecutionBridge.Execute has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, boolean chains 3, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/planner/bridge.go"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"21c685e29a3abfd844d896aa07e04b49882a7bd3190e0c077de6e67f6a21da0e"}},{"ruleId":"D2","level":"warning","message":{"text":"toolResolver.Resolve (cognitive 19): toolResolver.Resolve has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, loops 6 (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":"internal/tools/planner/resolver.go"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"11a5b0c962eb8a1fe62a1c8d7ad400f3ea212c23ff09f80a54532e03dcdab332"}},{"ruleId":"D2","level":"warning","message":{"text":"CodeRunner.validateCode (cognitive 19): CodeRunner.validateCode has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, loops 5, 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":"internal/tools/resources/builtin/execution/code_runner.go"},"region":{"startLine":253}}}],"partialFingerprints":{"codehealthFindingId/v1":"03f1cf2afcbdf298a6c845d87e2892adeb5068a7f49834abcb60595fdab887bc"}},{"ruleId":"D2","level":"warning","message":{"text":"KnowledgeUpdate.Execute (cognitive 19): KnowledgeUpdate.Execute has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, boolean chains 3, loops 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/resources/builtin/knowledge/knowledge_base.go"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"fde5af5aa1f82fb888a13a643fc460d83d7da6f6acebc5f67346ec3876369d54"}},{"ruleId":"D2","level":"warning","message":{"text":"workflow.replaceMutationNode (cognitive 19): workflow.replaceMutationNode has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, loops 4, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/workflow/mutation.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"6542707963e691e25376fd0ee17616dad804e7460d016888b0a2ba52e61126b8"}},{"ruleId":"D2","level":"warning","message":{"text":"workflow.validateMutationSafety (cognitive 19): workflow.validateMutationSafety has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, boolean chains 2, match/switch 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/workflow/runner_mutation.go"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b15b396fe74b5ab5466c5d405fb9e17ba8c0af5c8c7beef691d7fe0bebc2420"}},{"ruleId":"D2","level":"warning","message":{"text":"workflow.TopologicalSort (cognitive 19): workflow.TopologicalSort has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, loops 6, 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":"internal/workflow/scheduler.go"},"region":{"startLine":498}}}],"partialFingerprints":{"codehealthFindingId/v1":"876242c0492ac73f77ec987b20574d585c257448ec39db88e548c8b04ffb08ef"}},{"ruleId":"D2","level":"warning","message":{"text":"MutableDAG.GetExecutionOrder (cognitive 19): MutableDAG.GetExecutionOrder has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, loops 5, 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":"internal/workflow/engine/mutable_dag.go"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"58213b32da688722578e0f67c79a58c54a900f2b4242a6e42ae6de7665a83c89"}},{"ruleId":"D2","level":"warning","message":{"text":"FileWatcher.scanAndLoad (cognitive 19): FileWatcher.scanAndLoad has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, loops 4, 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":"internal/workflow/engine/reloader.go"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"b868a8dd09d1da9891374650a9184474836f37a6d0846c84e6d6eb78fba2b516"}},{"ruleId":"D2","level":"warning","message":{"text":"(anonymous) (cognitive 19): (anonymous) has cognitive complexity 19 (threshold 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":"internal/monitoring/static/app.js"},"region":{"startLine":600}}}],"partialFingerprints":{"codehealthFindingId/v1":"acdbe685a737c996c7a150b9d57aa69d28ad8dbd9efa2142904ad139486c9668"}},{"ruleId":"D2","level":"warning","message":{"text":"StreamHandler.HandleStream (cognitive 18): StreamHandler.HandleStream has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, boolean chains 2, match/switch 2, loops 1 (nesting depth added 3). Most of this is not in the body itself: 0 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 81). 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":"api/handler/stream.go"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1888ace71133ad786f44312ebc8e8eff6fc002dcab9f6bce56a9d4c2b7658a0"}},{"ruleId":"D2","level":"warning","message":{"text":"main.run (cognitive 18): main.run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, loops 2. Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 156, 65, 95, \u2026). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals\u0027 work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/eval/main.go"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"b40d87970ffa49825e4e0c742072bd04ec5c1e4907b4d2bd256800152f748255"}},{"ruleId":"D2","level":"warning","message":{"text":"apiimpl.wireWiredServices (cognitive 18): apiimpl.wireWiredServices has cognitive complexity 18 (threshold 15). Drivers by points: if/else 18 (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":"internal/api_impl/service.go"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4759411f961596b0a74ecdaf59cb8d7704f0c4d5a8c4b824b296726d234ef5c"}},{"ruleId":"D2","level":"warning","message":{"text":"MetricsCollector.Snapshot (cognitive 18): MetricsCollector.Snapshot has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, loops 6 (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":"internal/ares_arena/metrics.go"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"df4e0ea61033760c4d1d8803b5bbc444a098342aeeb3253d9c1c76ab6b4e8890"}},{"ruleId":"D2","level":"warning","message":{"text":"Service.randomChaosAction (cognitive 18): Service.randomChaosAction has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, 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":"internal/ares_arena/survival.go"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"a629bd2fe1c562c53609d2ad53641f7357d24bb593e6b63a6b2f647b7bd0c4dc"}},{"ruleId":"D2","level":"warning","message":{"text":"ares_eval.extractJudgeJSON (cognitive 18): ares_eval.extractJudgeJSON has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, loops 2, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_eval/llm_judge.go"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"4af1b20f662cf5cba5630c01a7687c266179c59a926e08d7bfae2d9d0b8f7b86"}},{"ruleId":"D2","level":"warning","message":{"text":"MemoryEventStore.matchesFilter (cognitive 18): MemoryEventStore.matchesFilter has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, loops 4, 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":"internal/ares_events/memory_store.go"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"612f6e657d58f411ecdd8c2ddd342b2162760da771a7fc7cfc3a047bf82cfea1"}},{"ruleId":"D2","level":"warning","message":{"text":"evolution.ValidateStrategySize (cognitive 18): evolution.ValidateStrategySize has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, 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":"internal/ares_evolution/validation.go"},"region":{"startLine":27}}}],"partialFingerprints":{"codehealthFindingId/v1":"5cc5e188bda59ee18a34c418e9c46c4bf5db4ceefff2380f0c525b1ef354d73b"}},{"ruleId":"D2","level":"warning","message":{"text":"Population.applyFitnessSharingSpatial (cognitive 18): Population.applyFitnessSharingSpatial has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, loops 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":"internal/ares_evolution/genome/population_guard.go"},"region":{"startLine":514}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a64702580e52f4118ac927ed4fde19b97f197a9160dcff6ff5fabbee20594f0"}},{"ruleId":"D2","level":"warning","message":{"text":"ExperienceGuidedMutator.guidedMutateTool (cognitive 18): ExperienceGuidedMutator.guidedMutateTool has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/mutation/guided_mutator.go"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a8ead2a0672d0e00fb4b36baf8813902bdd4cbb330325335c065e1a580ad5f4"}},{"ruleId":"D2","level":"warning","message":{"text":"EvolutionScheduler.shouldEvolve (cognitive 18): EvolutionScheduler.shouldEvolve has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, boolean chains 3, 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":"internal/ares_evolution/scheduler.go"},"region":{"startLine":336}}}],"partialFingerprints":{"codehealthFindingId/v1":"181cc33106b792dcf89f89aeae06ce98de332d748c5221382e7f10e0367f3973"}},{"ruleId":"D2","level":"warning","message":{"text":"SlidingWindowLimiter.Wait (cognitive 18): SlidingWindowLimiter.Wait has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, match/switch 7, 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":"internal/ares_ratelimit/sliding_window.go"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"59bc9290ffcb2b6103c0910ae3e98933d60496fb155ee23f36f3818bc5a92cbb"}},{"ruleId":"D2","level":"warning","message":{"text":"ares_security.maskAPIKey (cognitive 18): ares_security.maskAPIKey has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, 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":"internal/ares_security/sanitizer.go"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c4c48983c391633051332bb9ea89a147106e06b832fd85272059e9452b3e670"}},{"ruleId":"D2","level":"warning","message":{"text":"ares_security.maskToken (cognitive 18): ares_security.maskToken has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, 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":"internal/ares_security/sanitizer.go"},"region":{"startLine":255}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ca2f2a616f8c5748108fdcefda96251e90633034f3c029a9eb3caf896c863ed"}},{"ruleId":"D2","level":"warning","message":{"text":"Engine.DiscoverNow (cognitive 18): Engine.DiscoverNow has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, loops 8 (nesting depth added 5). Of this number, 14 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/discovery/engine.go"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"4d8829cfa5ccb5d152c9e9b579038f32a1e8999a9e6f5c29bdd67f0cfa452534"}},{"ruleId":"D2","level":"warning","message":{"text":"DistillBridge.DistillConversation (cognitive 18): DistillBridge.DistillConversation has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, loops 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/knowledge/adapter/distill.go"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4e804a8517cfb9a9ab6efe7d0e6b46501b47c50248bf6eaf837cc17801b415c"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultCompiler.formatXML (cognitive 18): DefaultCompiler.formatXML has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, boolean chains 4, loops 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/knowledge/compiler/compiler.go"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"60b44f1474c2098f39d618fb42899bc487f3fc207d98e1fb9f469b1c831df2d0"}},{"ruleId":"D2","level":"warning","message":{"text":"VectorProvider.resultToObject (cognitive 18): VectorProvider.resultToObject has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, loops 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":"internal/knowledge/provider/vector/provider.go"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"de6e9b48041092d08a7ec29ceb0902d7cdc662212ca60c389ad1d010f81437f3"}},{"ruleId":"D2","level":"warning","message":{"text":"Service.DistillTask (cognitive 18): Service.DistillTask has cognitive complexity 18 (threshold 15). Drivers by points: if/else 18 (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":"internal/memoryservice/service.go"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"f931b4c1673bf95ad13b0b9314417a035f204fb519dec077fa370040b994b930"}},{"ruleId":"D2","level":"warning","message":{"text":"QueryCache.Clear (cognitive 18): QueryCache.Clear has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, 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":"internal/storage/postgres/query/cache.go"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"7557ec9b4512ad25373173a3354e9f741e7b7ef071e9f1f9706238fe1004b060"}},{"ruleId":"D2","level":"warning","message":{"text":"DAGValidator.detectCycles (cognitive 18): DAGValidator.detectCycles has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, loops 3 (nesting depth added 8). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 100). 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":"internal/tools/planner/dag.go"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"a594b3039132199e1eab3bb3fd3d055d4546622858eeda026cdd55e6d8cc31da"}},{"ruleId":"D2","level":"warning","message":{"text":"FileTools.writeFile (cognitive 18): FileTools.writeFile has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, boolean chains 1 (nesting depth added 4). Of this number, 16 points are the body\u0027s own statements and 2 belong to one function literal inside it that branches. 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":"internal/tools/resources/builtin/file/file_tools.go"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cfca8b94612e9a1abdc3cdb3f26dd3bb70d392a3439249c3b6eebb413d6d9df"}},{"ruleId":"D2","level":"warning","message":{"text":"DataTransform.csvToJSON (cognitive 18): DataTransform.csvToJSON has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, loops 7 (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":"internal/tools/resources/builtin/text/data_transform.go"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"20759caa67d6d0f5a8afd71b87dce78dc87d3af1d5a049f4ff002fdcddd6b146"}},{"ruleId":"D2","level":"warning","message":{"text":"MutableDAG.AddNode (cognitive 18): MutableDAG.AddNode has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, loops 7, 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":"internal/workflow/engine/mutable_dag.go"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"73425b9118ed62dac44024094c55c19272a51a55632db8942764ce7b123a8c89"}},{"ruleId":"D2","level":"warning","message":{"text":"MutableDAG.RemoveNode (cognitive 18): MutableDAG.RemoveNode has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, loops 7 (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":"internal/workflow/engine/mutable_dag.go"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfbf3830628edc71e0c1e5113ad9b367a0250999ee7e45dc6fd905422b60606c"}},{"ruleId":"D2","level":"warning","message":{"text":"GraphPatchExecutor.CanApply (cognitive 18): GraphPatchExecutor.CanApply has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, 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":"internal/workflow/graph/patcher.go"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"9cb97ca640cd3b7d0452c0b238572c302988dc2314480bf00d2a7707a6f25097"}},{"ruleId":"D2","level":"warning","message":{"text":"Team.buildAssignments (cognitive 18): Team.buildAssignments has cognitive complexity 18 (threshold 15). Drivers by points: loops 9, if/else 8, boolean chains 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":"sdk/team.go"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"1718e47882948d60b232e1621206244b2679f1cf179310cc959fcc6397be45e2"}},{"ruleId":"D2","level":"warning","message":{"text":"Team.executeConcurrent (cognitive 18): Team.executeConcurrent has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, loops 4 (nesting depth added 10). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 270). 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":"sdk/team.go"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"38b3e82abb6941b00096b24bfef99cf8e6c3d6bb75b90f5f76c1c83d238d1427"}},{"ruleId":"D2","level":"warning","message":{"text":"(anonymous) (cognitive 18): (anonymous) has cognitive complexity 18 (threshold 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":"internal/monitoring/static/app.js"},"region":{"startLine":303}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e7a7a3b8c85c4005f20599d374e655861641544d152f6bbd76128556276571e"}},{"ruleId":"D2","level":"warning","message":{"text":"(anonymous) (cognitive 18): (anonymous) has cognitive complexity 18 (threshold 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":"internal/dashboard/static/app.js"},"region":{"startLine":183}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4895193266937f9c10e30b92ecc6612f81eeb4f02886f51213fcfd3f7b166ee"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runList (cognitive 17): main.runList has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, loops 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/arena/main.go"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"f68b142924a6ccd2fdf4cdc1739c55ece7647c8fd44ad4cc482f5c62ae170e13"}},{"ruleId":"D2","level":"warning","message":{"text":"main.wireEvolutionLiveDAGs (cognitive 17): main.wireEvolutionLiveDAGs has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, 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":"cmd/ares/serve.go"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"76b50937bd902b3c340fc264b340e84e90049c378b74b928342ecd136549c64e"}},{"ruleId":"D2","level":"warning","message":{"text":"main.runReplay (cognitive 17): main.runReplay has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, loops 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":"cmd/flight/main.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"634104fbc5000d77b09bc29222069b5174d31f75563e0210b2b662f12d118343"}},{"ruleId":"D2","level":"warning","message":{"text":"main.main (cognitive 17): main.main has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, 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":"examples/10-ga-full-evolution/main.go"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"2370795fd02736ddd1ae901285a6190ec7c7c5fed9d8f843fafa66969883c07d"}},{"ruleId":"D2","level":"warning","message":{"text":"ares_bootstrap.wireRetrievers (cognitive 17): ares_bootstrap.wireRetrievers has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_bootstrap/retriever_wiring.go"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8469f1c979c9d9461cf962e8dede50accc6ebe433ae8039eea61a25defabc01"}},{"ruleId":"D2","level":"warning","message":{"text":"ares_config.LoadFromEnv (cognitive 17): ares_config.LoadFromEnv has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_config/config.go"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcb477350639c54f9833c2657600b41c892db871952018de5eab19df71a89d55"}},{"ruleId":"D2","level":"warning","message":{"text":"CompactableEventStore.maybeCompact (cognitive 17): CompactableEventStore.maybeCompact has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, 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":"internal/ares_events/compactable_store.go"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdadc9d6b77b2e3eb26df9081593ddb6e55525e3e77e178e4784d7196f1de229"}},{"ruleId":"D2","level":"warning","message":{"text":"Crossover.segmentCrossParams (cognitive 17): Crossover.segmentCrossParams has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 1, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/genome/crossover.go"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"e3ccb30643191f58c5eabf2c4414b3ae60203f68c093e3a42d40f8d76132be16"}},{"ruleId":"D2","level":"warning","message":{"text":"ExperienceGuidedMutator.guidedMutateParameter (cognitive 17): ExperienceGuidedMutator.guidedMutateParameter has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, loops 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/mutation/guided_mutator.go"},"region":{"startLine":579}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a16602aae4bbf3936cee09024d14d7dcda2bba86f1b4bdae53642b351faa367"}},{"ruleId":"D2","level":"warning","message":{"text":"Distiller.SubscribeAndDistill (cognitive 17): Distiller.SubscribeAndDistill has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, match/switch 2, loops 1 (nesting depth added 9). 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 70). 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":"internal/ares_memory/distillation/distiller_admin.go"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"82f304472ad7d2ba5a261605726a7accda5122a13ddd32b934ebf950d06edfd0"}},{"ruleId":"D2","level":"warning","message":{"text":"Manager.recoverAgentState (cognitive 17): Manager.recoverAgentState has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, loops 3 (nesting depth added 9). Of this number, 12 points are the body\u0027s own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_runtime/manager.go"},"region":{"startLine":446}}}],"partialFingerprints":{"codehealthFindingId/v1":"c111a47ab46a610930de03c5fcfa06edb7f61be0b02d67415de3ed46d19715cc"}},{"ruleId":"D2","level":"warning","message":{"text":"llm.buildAnthropicChatMessages (cognitive 17): llm.buildAnthropicChatMessages has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, loops 6, match/switch 2, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/llm/chat.go"},"region":{"startLine":520}}}],"partialFingerprints":{"codehealthFindingId/v1":"42c3784e9eb61ae6a328eaf21c54faefc1b703bff90e78f05e037ad654f3d6ed"}},{"ruleId":"D2","level":"warning","message":{"text":"output.findMatchingBracket (cognitive 17): output.findMatchingBracket has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, match/switch 2, boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/llm/output/parser.go"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa1b8cf8af09db5877d5dc4f7eb05dba7920dd1cd363785ed92588ce742f0979"}},{"ruleId":"D2","level":"warning","message":{"text":"KnowledgeRepository.SearchByVector (cognitive 17): KnowledgeRepository.SearchByVector has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, 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":"internal/storage/postgres/repositories/knowledge_repository.go"},"region":{"startLine":429}}}],"partialFingerprints":{"codehealthFindingId/v1":"8324cc21bea1dec0854c8e728fc555384d6d61b8c0c49cb985356b76b2545b80"}},{"ruleId":"D2","level":"warning","message":{"text":"builtin.extractJSON (cognitive 17): builtin.extractJSON has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, match/switch 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/resources/builtin/planning/task_planner.go"},"region":{"startLine":394}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6fd8f9f45ee7184ee17a3de44cff7df64029e4f46f752641f3df2664570175f"}},{"ruleId":"D2","level":"warning","message":{"text":"DataTransform.flatten (cognitive 17): DataTransform.flatten has cognitive complexity 17 (threshold 15). Drivers by points: loops 10, if/else 6, 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":"internal/tools/resources/builtin/text/data_transform.go"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"7019f6fa8e25ec5f99a8f6b57552b83dee9eb8df3284fc85750925d04aa20825"}},{"ruleId":"D2","level":"warning","message":{"text":"graph.compileGraphRouters (cognitive 17): graph.compileGraphRouters has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, boolean chains 2, loops 1 (nesting depth added 8). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 140). 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":"internal/workflow/graph/runner.go"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"e45b62c555c93b1e1105f083d2093b6ea89cee7121a8dea0c9fee99d5a2a9af8"}},{"ruleId":"D2","level":"warning","message":{"text":"Graph.Edge (cognitive 17): Graph.Edge has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, 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":"internal/workflow/graph/graph.go"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"72bc307cceb3bbed1867f0b4174fecf6973c971da303eca47adeb1c63150d495"}},{"ruleId":"D2","level":"warning","message":{"text":"Runner.Execute (cognitive 17): Runner.Execute has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, 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":"internal/workflow/runner.go"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d43c8c6c41b1a6c2e45b331ff91a31b9984459df53eb7f1463c2f0b17335ad5"}},{"ruleId":"D2","level":"warning","message":{"text":"updateTabCounts (cognitive 17): updateTabCounts has cognitive complexity 17 (threshold 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":"internal/monitoring/static/app.js"},"region":{"startLine":1673}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8ce0c12e81067829e66ea88eea05c36093f4c56aa134f758512801d0f802b09"}},{"ruleId":"D2","level":"warning","message":{"text":"ConfigFile.setDefaults (cognitive 16): ConfigFile.setDefaults has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, match/switch 4 (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":"api/client/config.go"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9e5305f8fb202c414e240d0689ab69bdf697c774f2cd81627033fae7cd7dc76"}},{"ruleId":"D2","level":"warning","message":{"text":"webSearchTool.Execute (cognitive 16): webSearchTool.Execute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 3, loops 1. Of this number, 15 points are the body\u0027s own statements and 1 belongs to one function literal 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":"api/tools/builtin.go"},"region":{"startLine":460}}}],"partialFingerprints":{"codehealthFindingId/v1":"1abce8507b3dbe3db1f5cfcd1e9b5aedbf4300f54f55220c565f8f4b66e9ff05"}},{"ruleId":"D2","level":"warning","message":{"text":"main.main (cognitive 16): main.main has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/mcp-registry/main.go"},"region":{"startLine":16}}}],"partialFingerprints":{"codehealthFindingId/v1":"aaf9cd91857ecdfd3176a1dd29016fcb519828db0512831118bab1f21dc9eb3a"}},{"ruleId":"D2","level":"warning","message":{"text":"Service.runSingleConfig (cognitive 16): Service.runSingleConfig has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_eval/service/service.go"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"881b3135e6e67e3d23ce5735374e0f5be3155ff355ae9329947f49ab0b361cae"}},{"ruleId":"D2","level":"warning","message":{"text":"MemoryEventStore.Read (cognitive 16): MemoryEventStore.Read has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 3, 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":"internal/ares_events/memory_store.go"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"04f5058686c1992d07b9b0b4f5a84c54be9cd780fc2786bb16720a67cda9f767"}},{"ruleId":"D2","level":"warning","message":{"text":"DefaultNormalizer.normalizeScore (cognitive 16): DefaultNormalizer.normalizeScore has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, 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":"internal/ares_evolution/experience/normalizer.go"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1700334eac1acbcd809d509b111e3a2b632a95c225a1d417ca3609d07c60fc0"}},{"ruleId":"D2","level":"warning","message":{"text":"genome.ParetoFront (cognitive 16): genome.ParetoFront has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, loops 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":"internal/ares_evolution/genome/multi_objective.go"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"861f653bbf47f524be205157ab3f61abf531f6a12d9d81bca08783c411a5d2aa"}},{"ruleId":"D2","level":"warning","message":{"text":"Population.measureCategoricalDiversityLocked (cognitive 16): Population.measureCategoricalDiversityLocked has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, 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":"internal/ares_evolution/genome/adaptive.go"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f1a1a8e300e11c0316488361a8a4e7c79d045250f9415bd4734a53179e68eb0"}},{"ruleId":"D2","level":"warning","message":{"text":"NondominatedSortingSelection.Select (cognitive 16): NondominatedSortingSelection.Select has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 4, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/genome/selection.go"},"region":{"startLine":803}}}],"partialFingerprints":{"codehealthFindingId/v1":"f461fc12829ff8eace6128f78c2dccc0a2205c404a6149b9bca32b45e56e3f8e"}},{"ruleId":"D2","level":"warning","message":{"text":"GenomePopulationAdapter.buildRunScorer (cognitive 16): GenomePopulationAdapter.buildRunScorer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, loops 3, boolean chains 1 (nesting depth added 7). Of this number, 12 points are the body\u0027s own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/genome_wiring_run.go"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"313e0b3a49b998ea88c3b2882699aeb8dc695de2b063a1054c738c7557cff69c"}},{"ruleId":"D2","level":"warning","message":{"text":"Genealogy.RecordResurrection (cognitive 16): Genealogy.RecordResurrection has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_flight/genealogy.go"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3ce35065d6f316f4427759b7b9e3e5d3cf29dfe38f1919b3bdaafe595aa549f"}},{"ruleId":"D2","level":"warning","message":{"text":"Timeline.Summary (cognitive 16): Timeline.Summary has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 3, loops 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_flight/timeline.go"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"346143e383d47bcc2ada32b96a9addc07eb680c973a00c7665cc246f25fd6441"}},{"ruleId":"D2","level":"warning","message":{"text":"MCPClient.call (cognitive 16): MCPClient.call has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, 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":"internal/ares_mcp/client.go"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6197d27081447e18de2c8175892aeaf41c8b7edb530ae77d8dfd628da328b30"}},{"ruleId":"D2","level":"warning","message":{"text":"SSEServerTransport.handleSSEConnect (cognitive 16): SSEServerTransport.handleSSEConnect has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, loops 2, match/switch 2 (nesting depth added 7). Of this number, 15 points are the body\u0027s own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_mcp/transport_server.go"},"region":{"startLine":292}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f36fdfc81e1c86743f4691e694e4423f58c9d06818eb91fec1ab77f8f3105f8"}},{"ruleId":"D2","level":"warning","message":{"text":"context.summarizeHTTPRequestResult (cognitive 16): context.summarizeHTTPRequestResult has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 3, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_memory/context/cleaner.go"},"region":{"startLine":374}}}],"partialFingerprints":{"codehealthFindingId/v1":"09280bb4845ebb2ce1d9ce6bddced3d13ccd30269ac7a98258d72af02db61dcd"}},{"ruleId":"D2","level":"warning","message":{"text":"distillation.RunTestSet (cognitive 16): distillation.RunTestSet has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, loops 3, boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_memory/distillation/test_set.go"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"8741e0f8c7fea33242e1555882f996a53b334b9758e1907426d80f63b44a25fe"}},{"ruleId":"D2","level":"warning","message":{"text":"ExperienceExtractor.extractCoreSolution (cognitive 16): ExperienceExtractor.extractCoreSolution has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, loops 4, 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":"internal/ares_memory/distillation/extractor.go"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"048bd0299b7200807e7edc2fdb28262eca018f0a049e7a35b3467be1a38d7c39"}},{"ruleId":"D2","level":"warning","message":{"text":"ExperienceExtractor.extractUserProfile (cognitive 16): ExperienceExtractor.extractUserProfile has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_memory/distillation/extractor.go"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"12fa0474ef7dac7af2ff523d5075b8a341e3f197cb9f8636b02d9087e3c6c39b"}},{"ruleId":"D2","level":"warning","message":{"text":"ares_runtime.matchFilter (cognitive 16): ares_runtime.matchFilter has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, loops 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_runtime/bus.go"},"region":{"startLine":334}}}],"partialFingerprints":{"codehealthFindingId/v1":"75099e17657be7d7c22095bbb72eed5209f79deaea3d6d3bac53d2bdfbfd605a"}},{"ruleId":"D2","level":"warning","message":{"text":"dashboard.computeSummary (cognitive 16): dashboard.computeSummary has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, loops 3, 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":"internal/dashboard/api_handlers.go"},"region":{"startLine":620}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a64d964b85fe8b0447686f1bf92e8a958064399a25a7bd250dd9fd32923adb8"}},{"ruleId":"D2","level":"warning","message":{"text":"MemoryStore.Query (cognitive 16): MemoryStore.Query has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/evidence/evidence.go"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"221eeb42af67355da0058d7dffbfeb5e7f552e1ad3f360c64c26e73a53df43e8"}},{"ruleId":"D2","level":"warning","message":{"text":"WorkflowGenome.Crossover (cognitive 16): WorkflowGenome.Crossover has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, 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":"internal/evolution/genome/workflow_genome.go"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"978d56cb6e78520c5f39e662948d85002fa78a2501bc8053a684c6cc747c133f"}},{"ruleId":"D2","level":"warning","message":{"text":"Service.GenerateEmbedding (cognitive 16): Service.GenerateEmbedding has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, loops 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/llmservice/service.go"},"region":{"startLine":247}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fd0a9e536d40c7e74731038c0e9b3124dc3387b9501b7ae3331e67cd8fdd0a3"}},{"ruleId":"D2","level":"warning","message":{"text":"KnowledgeRepository.Create (cognitive 16): KnowledgeRepository.Create has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/repositories/knowledge_repository.go"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e83c6fc9eb221125461f445e0378b6eb4f890ce2c2540aaf43cc1394770ab36"}},{"ruleId":"D2","level":"warning","message":{"text":"RetrievalService.markQueryCached (cognitive 16): RetrievalService.markQueryCached has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 4, 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":"internal/storage/postgres/services/retrieval_rewrite.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a71da187bec6acf808f7e132e10cbda0947d9c296e277973bc54e06a29c0ee9"}},{"ruleId":"D2","level":"warning","message":{"text":"DAGValidator.checkIOCompatibility (cognitive 16): DAGValidator.checkIOCompatibility has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, loops 5, 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":"internal/tools/planner/dag.go"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e5b20d7ec1ca47815a8c2cbde4a2584d0e184613fb36de201d635be4fb3e761"}},{"ruleId":"D2","level":"warning","message":{"text":"memoryEvidenceStore.Aggregate (cognitive 16): memoryEvidenceStore.Aggregate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, loops 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/planner/executor.go"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"b666e4fbed20293250937468c397490968ed8ca81f65be505d43cfe7ccbdcf20"}},{"ruleId":"D2","level":"warning","message":{"text":"ParameterExtractor.tryExtractMathExpr (cognitive 16): ParameterExtractor.tryExtractMathExpr has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/planner/extractor.go"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f18a31d47ba7f51af8bee9420a389eb0796c122cde6731bcd9acb2e75d78b87"}},{"ruleId":"D2","level":"warning","message":{"text":"core.ValidateParams (cognitive 16): core.ValidateParams has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/resources/core/registry.go"},"region":{"startLine":403}}}],"partialFingerprints":{"codehealthFindingId/v1":"a27948efea9749ae5168237e64d771aead59611c55dff8fe6694fdf5564ada75"}},{"ruleId":"D2","level":"warning","message":{"text":"engine.NewDAG (cognitive 16): engine.NewDAG has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, loops 4, 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":"internal/workflow/engine/types.go"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"160a5dbd306445760e687170b5834536caf3c39b08efbb108423e4e4ea49cbd8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: static/app.js: FileTooLong \u2014 1932 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/monitoring/static/app.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"97bbfc43ce82a360d5e5a609d5f941cd9a3ccfb29db3a7f930dacc7a5b97ce75"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: APIv2: TooManyMethods \u2014 50 methods, declared across 2 files: dashboard/api_handlers.go (36), dashboard/api.go (14). 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":"internal/dashboard/api.go"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c9066cb2556d7b7569fea4b37510ec8e843c82f245ed2c5def20c8d66119b1b"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Population: TooManyMethods \u2014 49 methods, declared across 4 files: genome/population.go (19), genome/adaptive.go (11), genome/population_guard.go (10), genome/population_history.go (9). 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":"internal/ares_evolution/genome/population.go"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"270b00bf900ffb7001aad9c85af9cf2215077942dfa81c862badb76be5b56c67"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: RetrievalService: TooManyMethods \u2014 46 methods, declared across 5 files: services/retrieval_search.go (21), services/retrieval_rewrite.go (12), services/retrieval_service.go (9), services/retrieval_embedding.go (2), \u002B1 more file(s). 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":"internal/storage/postgres/services/retrieval_service.go"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc4d8ac256525676f35998c81e7c35078e6cc0718151ee438c9a377e99d81efd"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: openai_api/openai_api.go: FileTooLong \u2014 724 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"compat/protocol/openai_api/openai_api.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0ea25adce6d50d9c4f3b4761b74b2d5d8b71902d554a894d945600c03925ed3"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ExecutionScope: TooManyMethods \u2014 40 methods, declared across 2 files: workflow/scope.go (31), workflow/scope_recovery.go (9). 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":"internal/workflow/scope.go"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"32a2bba94f7b1fe84f97b2ce5403d94ee270a9574319658732fe03db52976843"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: sdk/sdk.go: FileTooLong \u2014 647 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/sdk.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c198c27c8b8a5d60cd6adbe3e7dfbf19cd6e1fbd7b918986b37fa7d4454b6862"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Runner: TooManyMethods \u2014 37 methods, declared across 7 files: workflow/runner_execution.go (14), workflow/runner_checkpoint.go (11), workflow/runner_plugins.go (6), workflow/runner.go (2), \u002B3 more file(s). 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":"internal/workflow/runner.go"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b77624b8021081ab34d9a9be12b1bee85cf1ec0bb27f22d02fb4ae00f94363b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: arena/main.go: FileTooLong \u2014 580 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/arena/main.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2ef3686ad7e95780dfeb9a93474e2cfb001b7466ab0d1a584d8dea2f8dc9de9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: dashboard/orchestrator.go: FileTooLong \u2014 552 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/dashboard/orchestrator.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dc10e389ee3faf6f32776026a7531b46aa3a3da385dcc7b01a6ce80a69f58e3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: math/calculator.go: FileTooLong \u2014 548 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/resources/builtin/math/calculator.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"86ecee1c335561f5d6ad4acacbf301f0b8be3dffb04aa14a3cc65803f8e383d1"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ares_evolution/genome_wiring_system.go: FileTooLong \u2014 547 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/genome_wiring_system.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ac6d4246304ea21d904dcf3e13982efad356703693c0c447d3911ade1b3d107"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: dashboard/api_handlers.go: FileTooLong \u2014 542 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/dashboard/api_handlers.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdca0084b719c2a7ba3c793f28aa55163cd02e8939c57111b2ec02bb8b7da072"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: service/service.go: FileTooLong \u2014 525 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/service/service.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"904429c91be51eb006a6cdf13b852d48bc404867a31c271cc2607c00f2477057"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Manager: TooManyMethods \u2014 31 methods, declared across 3 files: ares_runtime/manager.go (15), ares_runtime/manager_chaos.go (10), ares_runtime/manager_lifecycle.go (6). 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":"internal/ares_runtime/manager.go"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"daa9a5dc130196c9b516121ba5f1c213a1176c625a9bdead6b3c3ae4d75816e4"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: Calculator: TooManyMethods \u2014 31 methods. 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":"internal/tools/resources/builtin/math/calculator.go"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8e4593760be4db32e3e391d7c87a86c4b4058da982a14e6ece0f902fefa04dd"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: portfolio/simulator.go: FileTooLong \u2014 515 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_quant/portfolio/simulator.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"23f8bc8986ade47de69a2f00f4da2a003f7ec922e45414eee3fd0dedd3a0a5a8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ares_evolution/dream_cycle.go: FileTooLong \u2014 509 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/dream_cycle.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d668538179b4bf66a51f603fc29627af3736403a60f11a76d704fd62ee269307"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): internal/tools/resources/builtin/execution/code_runner.go:55-82 | internal/tools/resources/builtin/execution/code_runner.go:102-129 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/tools/resources/builtin/execution/code_runner.go:55\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"internal/tools/resources/builtin/execution/code_runner.go"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"5fc33b0ab0134e442db597840e543b130f033b85e8d51ef49ff2db7ae4191429"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (25 lines \u00D7 2): api/core/evolution.go:244-268 | internal/evolution/patch/patch.go:44-68 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"api/core/evolution.go"},"region":{"startLine":244}}}],"partialFingerprints":{"codehealthFindingId/v1":"7407b082588a2ff50dc143d9c059c49d894ec23d4eb2693b18a0b14ed9f21b5d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): internal/llm/output/openai.go:261-281 | internal/llm/output/openrouter.go:239-259 \u2014 before extracting anything, compare \u0060internal/llm/output/openai.go\u0060 and \u0060internal/llm/output/openrouter.go\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/llm/output/openai.go:261\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/llm/output/openai.go"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9258ca10d87a598559563447dc0f9e4a5c9407f9332a977232b412058d48b36"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): internal/llm/client.go:499-518 | internal/llm/output/ollama.go:197-216 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060internal/llm/client.go:499\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"internal/llm/client.go"},"region":{"startLine":499}}}],"partialFingerprints":{"codehealthFindingId/v1":"192aa8dbcfe66f4e477a7f9a5989b70f2bed4b21b89e6f3832ab231483099812"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): cmd/ares/actions.go:49-66 | cmd/monitor-live/actions.go:48-65 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060cmd/ares/actions.go:49\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/ares/actions.go"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"de4a7f5cd9d031d21a3a13e662b7bf9724e13092f5844a705f901624a4f37e65"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): cmd/monitor-live/agents.go:150-167 | cmd/ares/agents.go:148-165 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060cmd/monitor-live/agents.go:150\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/monitor-live/agents.go"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"122c806748a33525781777b54e284d4666e773ae76be739f4bea1ca4a2f3d288"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): cmd/monitor-live/agents.go:234-251 | cmd/ares/agents.go:231-248 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060cmd/monitor-live/agents.go:234\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/monitor-live/agents.go"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b2f787f0c396b20e3dcc88ff85ddbf6d552221eb63696f53a5694ea0c17ddbe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): cmd/flight/main.go:400-416 | cmd/ares/flight.go:330-346 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060cmd/flight/main.go:400\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"cmd/flight/main.go"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"52194ac4e6bd242ea07f95c34495ffa049dc54737886218429f0554509e4b7fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): internal/ares_evolution/genome/crossover.go:343-359 | internal/ares_evolution/genome/crossover.go:408-424 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_evolution/genome/crossover.go:343\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/genome/crossover.go"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0bc81a4b7e4b854b49b223d3d1ecc2bf3b28ab82c802e864e07e555559c0998"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): cmd/ares/db_check_rls.go:83-99 | cmd/check_rls/main.go:71-88 \u2014 before extracting anything, compare \u0060cmd/ares/db_check_rls.go\u0060 and \u0060cmd/check_rls/main.go\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/ares/db_check_rls.go:83\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/ares/db_check_rls.go"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5a0662e6909c5e08b8c7bfbdc1aaae02d960806fb3d8f4305c169329730cd91"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): cmd/ares/serve.go:415-430 | cmd/monitor-live/main.go:43-59 | cmd/ares/recall.go:76-91 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/ares/serve.go"},"region":{"startLine":415}}}],"partialFingerprints":{"codehealthFindingId/v1":"53da2e4133154c92f32bd4185a7dc0ce054f7b60803ad0ae2086b1219f0e79e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): cmd/flight/main.go:266-282 | cmd/ares/flight.go:209-224 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/flight/main.go:266\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/flight/main.go"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"9fc48b2f6b3dcdf7e057415d032b7b4b1371556df8aacf40ae764e7433d3fdc6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): cmd/monitor-live/agents.go:110-125 | cmd/ares/agents.go:108-123 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060cmd/monitor-live/agents.go:110\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"cmd/monitor-live/agents.go"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc8047e7d07166b53b0ad2437823d2ef78b95a27baf13e28444b2b936a098e41"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): internal/ares_evolution/scoring/memory_aware_scorer.go:380-395 | internal/ares_evolution/scoring/memory_aware_scorer.go:457-472 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/scoring/memory_aware_scorer.go"},"region":{"startLine":380}}}],"partialFingerprints":{"codehealthFindingId/v1":"081039fbd3d02130ad77c2c13db8df0a418d724a8397c5182ac2cca7a5e51af6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): internal/ares_memory/manager_impl.go:66-81 | internal/ares_memory/manager_impl.go:106-121 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_memory/manager_impl.go"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"9aab263e557c40b65eedf9d320cc1aaaa3a400b6a84e221559cce28517117323"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): internal/ares_memory/manager_impl.go:383-398 | internal/ares_memory/production_manager.go:690-705 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, 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":"internal/ares_memory/manager_impl.go"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"612e65110573f9af2ecd90bb526866fd76ed19813a96e2c1d633b9e561f778c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): internal/ares_security/sanitizer.go:223-238 | internal/ares_security/sanitizer.go:279-294 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_security/sanitizer.go:223\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"internal/ares_security/sanitizer.go"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb67ebea8d24ab38554e446f250d80c13b65ba75543448b760408f5e7d137816"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): internal/knowledge/provider/code/provider.go:78-93 | internal/knowledge/provider/memory/provider.go:64-79 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060internal/knowledge/provider/code/provider.go: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. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/knowledge/provider/code/provider.go"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"083a89e06c891c5d7a61fc59c7402e9b8e0b293929bc294b492698f57cc2dd7a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): internal/monitoring/data/agent_tracker.go:158-173 | internal/monitoring/data/agent_tracker.go:217-232 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/monitoring/data/agent_tracker.go"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"203ed7e01e15c6a877d969b4d7bbd3eade15eb1bb32cc7c4d21204f3e9dc37ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): internal/storage/postgres/repositories/task_result_repository.go:333-348 | internal/storage/postgres/repositories/task_result_repository.go:426-441 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/storage/postgres/repositories/task_result_repository.go:333\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/repositories/task_result_repository.go"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d5795a373985b541da1d182e94ebe4c9d17b2e3cc9fbc14c7e7d65a22e34c53"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): internal/ares_archive/extract.go:350-365 | internal/ares_archive/extract.go:435-450 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_archive/extract.go:350\u0060 it begins part-way through the construct above it, so those exact 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":"internal/ares_archive/extract.go"},"region":{"startLine":350}}}],"partialFingerprints":{"codehealthFindingId/v1":"93bbdf3fb76d3b53b52b64555a4af3ceb200abc29077f3ac8720fb877ba975e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): internal/ares_evolution/genome/selection.go:335-349 | internal/ares_evolution/genome/selection.go:569-583 | internal/ares_evolution/genome/selection.go:707-721 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_evolution/genome/selection.go:335\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"internal/ares_evolution/genome/selection.go"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7e414564bfdc562e2f540ff45ac0138a95a2e6700948b2cb48d51313aa6b914"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 3): internal/storage/postgres/repositories/experience_repository.go:522-536 | internal/storage/postgres/repositories/knowledge_repository.go:748-762 | internal/storage/postgres/repositories/task_result_repository.go:557-571 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/storage/postgres/repositories/experience_repository.go:522\u0060 it begins part-way through the construct above it, so those exact 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":"internal/storage/postgres/repositories/experience_repository.go"},"region":{"startLine":522}}}],"partialFingerprints":{"codehealthFindingId/v1":"200165f465e68007bdf3f77ce3759d6ae9a6af92bcb25c993e4688ce8024d036"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): cmd/flight/main.go:354-368 | cmd/ares/flight.go:289-303 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060cmd/flight/main.go:354\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/flight/main.go"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"67aecd71dbd4b30f5ea820e29244029a1788fb544129e30f8fe93c8ba0acb5f1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/agents/memory_repository_impl.go:138-152 | internal/retrievalservice/memory_repository.go:270-284 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/agents/memory_repository_impl.go:138\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/agents/memory_repository_impl.go"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"28d09ae5bde6ed29838aa1450426ecdacf093beb2fd89dcc0a45829e3c4d1d65"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/agents/service_impl.go:40-54 | internal/memoryservice/service.go:39-53 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/agents/service_impl.go:40\u0060 it does not close everything it opens, so those exact 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":"internal/agents/service_impl.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"18776e6b8a341bd2ac2e082e0e866f690260cd8b20afc40c30d817c03488fa10"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/agents/service_impl.go:282-304 | internal/retrievalservice/service.go:277-291 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060internal/agents/service_impl.go:282\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/agents/service_impl.go"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"f976a50370f32c763112216eed61b1a1bf4c9f967ef210244830de817d4f81a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/ares_evolution/genome/adaptive.go:235-249 | internal/ares_evolution/genome/adaptive.go:421-437 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_evolution/genome/adaptive.go:235\u0060 it begins part-way through the construct above it, so those exact lines 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":"internal/ares_evolution/genome/adaptive.go"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ba7f4fcb9b024cce7fb063f01730597689eff1161951c564e9db9f000c37a3d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/ares_evolution/genome/selection.go:371-387 | internal/ares_evolution/genome/selection.go:680-694 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_evolution/genome/selection.go:371\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/genome/selection.go"},"region":{"startLine":371}}}],"partialFingerprints":{"codehealthFindingId/v1":"210f34cb2ea1a2f938bd9933f5baa622bdf2a24d3d06aafc646a3e7076e531d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/evolution/genome/scheduler_genome.go:129-143 | internal/evolution/genome/workflow_genome.go:186-201 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/evolution/genome/scheduler_genome.go:129\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/evolution/genome/scheduler_genome.go"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3c1fee7067c0920c4c674692d090645c0f4c879417f23d9ed91ee859921b411"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/llm/output/parser.go:38-52 | internal/llm/output/parser.go:364-378 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/llm/output/parser.go:38\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/llm/output/parser.go"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc41b62ff009ee2753915ccbb42b82a84de6813dce73b4cb5e5f7f26bcc90d1d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): internal/llm/client.go:731-744 | internal/llm/output/openai.go:296-309 | internal/llm/output/openrouter.go:274-287 \u2014 before extracting anything, compare \u0060internal/llm/output/openai.go\u0060 and \u0060internal/llm/output/openrouter.go\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/llm/client.go:731\u0060 it begins part-way through the construct above it, so those exact 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":"internal/llm/client.go"},"region":{"startLine":731}}}],"partialFingerprints":{"codehealthFindingId/v1":"883070b9546a233a174b27c95e562caf8768b099802423f2bf5d0c621476ef3a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): internal/storage/postgres/repositories/experience_repository.go:338-351 | internal/storage/postgres/repositories/experience_repository.go:395-408 | internal/storage/postgres/repositories/experience_repository.go:482-495 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/storage/postgres/repositories/experience_repository.go:338\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/repositories/experience_repository.go"},"region":{"startLine":338}}}],"partialFingerprints":{"codehealthFindingId/v1":"a05b83d078456e0108f609e86ee73f70d7b94a39143e614ecad93c0c7d3ab0a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): cmd/arena/main.go:534-547 | cmd/arena/main.go:562-575 | cmd/arena/main.go:590-603 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/arena/main.go:534\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/arena/main.go"},"region":{"startLine":534}}}],"partialFingerprints":{"codehealthFindingId/v1":"c847c66e1b679614637b57d73c0e768a5ecf07e6f46c6c6b16ff7834d0f1b6be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): cmd/monitor-demo/main.go:102-116 | cmd/ares/demo.go:117-130 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060cmd/monitor-demo/main.go:102\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/monitor-demo/main.go"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd67c5aab32599850fd4f7b2fd3390432475a5b313fadcf6568177259d6536f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): cmd/monitor-live/agents.go:209-222 | cmd/ares/agents.go:206-219 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/monitor-live/agents.go:209\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/monitor-live/agents.go"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"e61a95f4d1f1a3e4e3fb18845efa371450307c316c1a66f63b9cbefd60129ae0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): cmd/monitor-live/bridge.go:77-92 | cmd/ares/bridge.go:65-78 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060cmd/monitor-live/bridge.go:77\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"cmd/monitor-live/bridge.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa8f9f055075cb76fa16ecf361d563aaa4c3138899ff1adb6cc239bf158090b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/ares_flight/collector.go:53-66 | internal/ares_flight/genealogy_collector.go:29-42 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_flight/collector.go:53\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"internal/ares_flight/collector.go"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bd3c7256a16a058f05c94044f90a0419e9d2211155ad7433481f56ee948f38e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/ares_memory/distillation/resolver.go:152-165 | internal/ares_memory/manager_impl.go:675-688 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060internal/ares_memory/distillation/resolver.go:152\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_memory/distillation/resolver.go"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1a0bfcd30dd5fbc1440075d9db5c2e78db28f64cb907ba36f1e37e47fc5b06e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/ares_quant/marketmaking_api/paper.go:136-149 | internal/ares_quant/marketmaking_api/paper.go:182-195 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_quant/marketmaking_api/paper.go:136\u0060 it does not close everything it opens, so those exact 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":"internal/ares_quant/marketmaking_api/paper.go"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"1a1ce5ff0cd65de71c24e77d300791d69e98a5c7f2ccffcb3acf33f6f99390db"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/knowledge/mcp/mcp.go:106-119 | internal/knowledge/mcp/mcp.go:143-156 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/knowledge/mcp/mcp.go"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"38bd2b05548b2f5825e2adcf7d378ac509611b6729751f6952403ebd2d932fe8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/knowledge/pipeline/llm_summarizer.go:40-53 | internal/knowledge/pipeline/normalizer.go:90-103 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/knowledge/pipeline/llm_summarizer.go"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"e45873bbdf3a6d6b5975e932aab084df817b2d6e5c4df6f588f82ce4a82c78c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/llm/client.go:415-428 | internal/llm/generate.go:137-150 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/llm/client.go:415\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/llm/client.go"},"region":{"startLine":415}}}],"partialFingerprints":{"codehealthFindingId/v1":"83270a92eb994174f35c584af91745dcffd86362cc982399fd37d88bef13d5bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/llm/output/openai.go:141-154 | internal/llm/output/openrouter.go:121-134 \u2014 before extracting anything, compare \u0060internal/llm/output/openai.go\u0060 and \u0060internal/llm/output/openrouter.go\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/llm/output/openai.go:141\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/llm/output/openai.go"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"b942dff6851c1edb067eca95ad3c0a2185672594d55875f1c371498a60f913b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/storage/postgres/embedding/cache.go:370-383 | internal/storage/postgres/query/memory_cache.go:103-116 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060internal/storage/postgres/embedding/cache.go:370\u0060 it does not close everything it opens, so those exact 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. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/embedding/cache.go"},"region":{"startLine":370}}}],"partialFingerprints":{"codehealthFindingId/v1":"86c74a0f1d698905bf2b56d2ec9668ea7cffd4910f828293a8fc7649284fb578"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/storage/postgres/repositories/experience_repository.go:274-287 | internal/storage/postgres/repositories/task_result_repository.go:349-365 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/storage/postgres/repositories/experience_repository.go:274\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/repositories/experience_repository.go"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"644bb9aa5fa5ea930f628b00ce6513a71a0004054ea631ff7b756352a59abf23"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/storage/postgres/repositories/secret_repository.go:362-376 | internal/storage/postgres/repositories/secret_repository.go:551-564 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/repositories/secret_repository.go"},"region":{"startLine":362}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae2eacd90bfe34282a7f5800b2c1a6be463448f123180ad5bf4d9661853e0cfb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/tools/planner/evidence.go:138-151 | internal/tools/planner/scorer.go:56-70 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/tools/planner/evidence.go:138\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/planner/evidence.go"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"4201ee8e211436048e0433b21c73527f0884d213a6d5912c1ea1b4a0b45329c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): internal/ares_events/summary_repository.go:128-140 | internal/ares_events/summary_repository.go:167-179 | internal/ares_events/summary_repository.go:206-218 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_events/summary_repository.go:128\u0060 it begins part-way through the construct above it, so those exact 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":"internal/ares_events/summary_repository.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ad075305294dbf54c61e84960859be32c66076bc8509a49f6664280a9c5a6e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): internal/storage/postgres/repositories/knowledge_repository.go:564-576 | internal/storage/postgres/repositories/knowledge_repository.go:627-639 | internal/storage/postgres/repositories/knowledge_repository.go:702-714 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/storage/postgres/repositories/knowledge_repository.go:564\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/repositories/knowledge_repository.go"},"region":{"startLine":564}}}],"partialFingerprints":{"codehealthFindingId/v1":"330006fccdc1d1c091c93495126e0c95b5e7e87527bcdefd585d3477c8f933f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): cmd/flight/main.go:208-221 | cmd/ares/flight.go:156-168 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/flight/main.go:208\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/flight/main.go"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"007602e3349373d5fd60204abd74f834683c6ca3d4140daf7a8ad56c5f30f6a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/agents/leader/agent.go:751-763 | internal/agents/leader/agent.go:843-855 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/agents/leader/agent.go:751\u0060 it begins part-way through the construct above it, so those exact lines 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":"internal/agents/leader/agent.go"},"region":{"startLine":751}}}],"partialFingerprints":{"codehealthFindingId/v1":"078c12a33d0755f95cf1481f65a74f15155fdfe9b34594596fa1f982817590a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/agents/sub/agent.go:227-239 | internal/agents/sub/agent.go:328-340 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/agents/sub/agent.go:227\u0060 it begins part-way through the construct above it, so those exact 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 register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/agents/sub/agent.go"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"8558c9fd89b4006d86e89f44ecf6c02456025f46986fc304d7fbfa03cdbba7b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/ares_evolution/experience/memory_store.go:155-167 | internal/ares_evolution/experience/memory_store.go:262-274 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_evolution/experience/memory_store.go:155\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/experience/memory_store.go"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"03cf2ca78e5cb35a2630a78c907101e01f14d044d2e7a3d108e7ddaf2aa32630"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/ares_evolution/experience/normalizer.go:286-299 | internal/ares_evolution/experience/normalizer.go:374-386 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_evolution/experience/normalizer.go:286\u0060 it does not close everything it opens, so those exact 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":"internal/ares_evolution/experience/normalizer.go"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"4df07a62019ef285890ee0eb710599d0f69b024c37cca916a0ff24c3a3f4910d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/ares_evolution/experience/types.go:245-258 | internal/ares_evolution/experience/types.go:332-344 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_evolution/experience/types.go:245\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/experience/types.go"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"3390fd380aeeb6245e5d5615f7acd68e434feb8108ed79c715c2b4770c167101"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/ares_evolution/genome/adaptive.go:458-470 | internal/llm/output/validator.go:446-458 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060internal/ares_evolution/genome/adaptive.go:458\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"internal/ares_evolution/genome/adaptive.go"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4f09bb84456872a2e385a80d5248a6af144e200498b23e05be9f65cf995dc1c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/ares_evolution/report.go:274-287 | internal/ares_evolution/report.go:315-327 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_evolution/report.go:274\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/report.go"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"5400e044e92894c77c4b6c3c20e71999f0d8e98962a586a3884a43f70d5778fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/discovery/providers/filesystem.go:135-147 | internal/discovery/providers/filesystem.go:196-208 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/discovery/providers/filesystem.go:135\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/discovery/providers/filesystem.go"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dcbfcb41d3dfff8c64ade8b7aaa6a861471e7dbf9a15416858d956aff08fc84"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/knowledge/provider/postgres/provider.go:84-96 | internal/knowledge/provider/vector/provider.go:110-123 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060internal/knowledge/provider/postgres/provider.go:84\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"internal/knowledge/provider/postgres/provider.go"},"region":{"startLine":84}}}],"partialFingerprints":{"codehealthFindingId/v1":"3488a2bd1fea9d38513624996a59bb7d1036dc92b52723e35fb0aa4dda77ed0d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/llm/output/parser.go:369-383 | internal/llm/output/parser.go:408-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/llm/output/parser.go:369\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/llm/output/parser.go"},"region":{"startLine":369}}}],"partialFingerprints":{"codehealthFindingId/v1":"f037402007f854112fa4786430ad3417fa5cbe8d22260c621c2e7218da8917bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/monitoring/dag/engine.go:271-283 | internal/monitoring/data/agent_tracker.go:32-45 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/monitoring/dag/engine.go:271\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/monitoring/dag/engine.go"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dcc34f92a79f012b73c03813b7927b6d7fe7f9780ca7e3924994ea5f04ca46f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/monitoring/data/agent_tracker.go:189-201 | internal/monitoring/data/cost_aggregator.go:39-51 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/monitoring/data/agent_tracker.go"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"66a98787bd22e55acc5ca0a8451216457a9386940ebe59638b6d37035c6aaba2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/storage/postgres/repositories/task_result_repository.go:37-49 | internal/storage/postgres/repositories/task_result_repository.go:204-217 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/repositories/task_result_repository.go"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"f131f086b850c34aed474d620312f73d288d5ce2000465c4324bc870e8868a55"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/tools/planner/bridge.go:134-149 | internal/tools/planner/bridge.go:189-201 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/tools/planner/bridge.go:134\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"internal/tools/planner/bridge.go"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd753a519e065051e6a891d9c883766f2b249b9ea588c9e61f710418cd6b2900"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/tools/resources/builtin/execution/code_runner.go:350-362 | internal/tools/resources/builtin/execution/code_runner.go:404-416 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/tools/resources/builtin/execution/code_runner.go:350\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/resources/builtin/execution/code_runner.go"},"region":{"startLine":350}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1e460d88bf96fe73c70e4bba216fbaf378c70854418e5f574f1e66df088a681"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/tools/resources/builtin/file/file_tools.go:249-261 | internal/tools/resources/builtin/file/file_tools.go:336-348 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/tools/resources/builtin/file/file_tools.go:249\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/resources/builtin/file/file_tools.go"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"3baca9e4ce08061a93b1b0ba5010b10e37e9faff99c4c22da9a288ccc84f78a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/workflow/engine/reloader.go:335-347 | internal/workflow/engine/reloader.go:355-367 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/workflow/engine/reloader.go"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"8e137dc539b3b41d256ab398208b7cdadf984eaef78a486ec206d6a4a46d6278"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): cmd/ares/db_check_rls.go:34-46 | cmd/check_rls/main.go:15-28 \u2014 before extracting anything, compare \u0060cmd/ares/db_check_rls.go\u0060 and \u0060cmd/check_rls/main.go\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/ares/db_check_rls.go:34\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/ares/db_check_rls.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"636e66e1753af0767c7363cd616f6484f0694933751e945cf821de48f692cb40"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/ares_evolution/genome/population_guard.go:487-499 | internal/ares_evolution/genome/population_guard.go:543-555 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_evolution/genome/population_guard.go:487\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/genome/population_guard.go"},"region":{"startLine":487}}}],"partialFingerprints":{"codehealthFindingId/v1":"55c884834de9bc97310f1600a88ed1084af44d66ce2521157da1c5a4873c092f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/ares_memory/manager_rag.go:43-57 | internal/ares_memory/production_manager_rag.go:44-56 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_memory/manager_rag.go:43\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_memory/manager_rag.go"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b64ca719967a75f31b30d13be949868d0b5d90b5070cd05a127f30a2daeed19"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): internal/llm/output/ollama.go:50-61 | internal/llm/output/openai.go:55-66 | internal/llm/output/openrouter.go:40-51 \u2014 before extracting anything, compare \u0060internal/llm/output/openai.go\u0060 and \u0060internal/llm/output/openrouter.go\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/llm/output/ollama.go:50\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/llm/output/ollama.go"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"31144439ca5f5404835661d02c765b837072f71d436d46d0e6aee7f8d631777f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): api/evolution/genome/genome.go:127-138 | api/evolution/genome/genome.go:169-180 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060api/evolution/genome/genome.go:127\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"api/evolution/genome/genome.go"},"region":{"startLine":127}}}],"partialFingerprints":{"codehealthFindingId/v1":"b47bbaf0153c6622e8db970c186ba644501dbe868fee64269783860cfab03e95"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/ares/serve.go:466-477 | cmd/monitor-live/main.go:259-270 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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":"cmd/ares/serve.go"},"region":{"startLine":466}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b08c69820b4fbb32d38c6769ebdaabe834897e35b9f02dc41bac1f0f8682b7c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/flight/main.go:83-94 | cmd/flight/main.go:133-144 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/flight/main.go:83\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/flight/main.go"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e158337b64bc359b7276596c065dc002c4ad70dccf104705ff0ccab64c444a6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): examples/01-quickstart/main.go:32-43 | examples/12-yaml-driven-flags/main.go:39-50 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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":"examples/01-quickstart/main.go"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"bdb1fccc427904009a97d05c9d966fbe7925d4a896547d2e26f0e6c33d13378e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): examples/04-multi-agent/main.go:26-38 | examples/05-evolution-demo/main.go:34-45 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/04-multi-agent/main.go:26\u0060 it begins part-way through the construct above it, so those exact 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 register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/04-multi-agent/main.go"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"43dfee0d070324eed369b785ae3566ef06f1cab1bb8fdb2eeb3ab4d90873aa6a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): examples/07-human-in-loop/main.go:75-86 | examples/08-mcp-integration/main.go:70-81 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/07-human-in-loop/main.go:75\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/07-human-in-loop/main.go"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"f70479d266271abf2be53aba694458ae141ae5c0600f5c37848b6f1b50b89f95"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/ares_evolution/experience/memory_store.go:209-221 | internal/ares_evolution/experience/memory_store.go:326-337 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_evolution/experience/memory_store.go:209\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/experience/memory_store.go"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c1a2529388e308b8da227f7b8e4c08912160717bcf33269c9893354f40d7994"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/ares_memory/manager_impl.go:356-367 | internal/ares_memory/production_manager.go:636-648 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_memory/manager_impl.go:356\u0060 it begins part-way through the construct above it, so those exact 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":"internal/ares_memory/manager_impl.go"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6e6e1dd3bd7e258d2cf7f260cd8f95b1fcea0394a0162149b17884cc68da80b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/ares_memory/production_manager.go:455-466 | internal/ares_memory/production_manager.go:576-587 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_memory/production_manager.go"},"region":{"startLine":455}}}],"partialFingerprints":{"codehealthFindingId/v1":"fabf8b1e320fe37327d8af87809786b5b5d64cd3cf5921373004816b9e89ea96"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/discovery/providers/filesystem.go:166-177 | internal/discovery/providers/filesystem.go:196-207 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/discovery/providers/filesystem.go:166\u0060 it does not close everything it opens, so those exact lines 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":"internal/discovery/providers/filesystem.go"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf716a5dfbc49b1d6dad4c1362c7dedfd915f8eb51e585cf6ac59230e9ec0129"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/knowledge/store/postgres/store.go:126-137 | internal/knowledge/store/sqlite/store.go:139-150 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/knowledge/store/postgres/store.go:126\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/knowledge/store/postgres/store.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a3a222b278e4f9a0b3d2ad44d967148f5fb70e5492aed6dd7bff8ab80c7901a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/knowledge/store/postgres/store.go:205-216 | internal/knowledge/store/postgres/store.go:255-266 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/knowledge/store/postgres/store.go:205\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/knowledge/store/postgres/store.go"},"region":{"startLine":205}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0bfce34cb167786043bb184d9f5a2b13e9d72b4e19f588b3f7f0086c4e92e21"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/knowledge/store/sqlite/store.go:144-155 | internal/knowledge/store/sqlite/store.go:309-320 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/knowledge/store/sqlite/store.go:144\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/knowledge/store/sqlite/store.go"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ff3d20b1bb5bd7b9f49e91a41e3ac6604496eb64369f080e9c8cceb2577fdcc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/knowledge/store/sqlite/store.go:203-214 | internal/knowledge/store/sqlite/store.go:235-246 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/knowledge/store/sqlite/store.go:203\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/knowledge/store/sqlite/store.go"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"352322984d2b77a964cc7c9f9f7745cf16d9955dcaed5427aa89f833ed72f86e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/llm/output/openai.go:79-90 | internal/llm/output/openrouter.go:60-71 \u2014 before extracting anything, compare \u0060internal/llm/output/openai.go\u0060 and \u0060internal/llm/output/openrouter.go\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/llm/output/openai.go:79\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/llm/output/openai.go"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7c0ef4341a057b05bb71bfd99fd788fbfe90ed4bb1b8b2766fc7dc00ca2a010"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/monitoring/data/trace_linker.go:142-153 | internal/monitoring/data/trace_linker.go:208-219 \u2014 both copies are in the same file, so extract the block 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 register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/monitoring/data/trace_linker.go"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba007fa4ee535e8ae7680eb964877a4f494cded9f4669446bcdb08943b5a228c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/storage/postgres/profile.go:31-42 | internal/storage/postgres/profile.go:138-149 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/storage/postgres/profile.go:31\u0060 it does not close everything it opens, so those exact 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":"internal/storage/postgres/profile.go"},"region":{"startLine":31}}}],"partialFingerprints":{"codehealthFindingId/v1":"2081187c3b6773cda23143699410ee09fac4d213b45f8d20007656d34fc39245"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/tools/resources/builtin/hash/hash.go:51-62 | internal/tools/resources/builtin/stringutils/stringutils.go:68-79 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060internal/tools/resources/builtin/hash/hash.go:51\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/resources/builtin/hash/hash.go"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc4679bad0cd1aa4ea5e10fecb0e588f85b2f56ece5f60908ad7d50374af4402"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/workflow/engine/mutable_dag.go:225-236 | internal/workflow/engine/mutable_dag.go:285-296 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/workflow/engine/mutable_dag.go:225\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/workflow/engine/mutable_dag.go"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"75ecbecfd9104e836f61d5d2502c12b0546ec22d814c603715679f3d042506d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/workflow/graph/graph.go:155-166 | internal/workflow/graph/graph.go:223-234 \u2014 both copies are in the same file, so extract the block 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. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/workflow/graph/graph.go"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c4eccdf416aaff848950d3cdb0202df77dd3217f2e7fe2deb7383743feb0bb1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/arena/main.go:242-253 | cmd/ares/arena.go:407-418 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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":"cmd/arena/main.go"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"79be505a47f5da760016dc033ec16db22105bb746e4434cd3708a9fa4b1630b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/arena/main.go:887-898 | cmd/ares/arena.go:598-609 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060cmd/arena/main.go: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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/arena/main.go"},"region":{"startLine":887}}}],"partialFingerprints":{"codehealthFindingId/v1":"41c0efccb2ee03e3a82a1d01e199a1cea51bfa88065cda5ac87651640ec89cb0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/ares/db_migrate.go:54-65 | cmd/migrate_db/main.go:45-56 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060cmd/ares/db_migrate.go:54\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/ares/db_migrate.go"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"30a58a7f063031a6c3910f23e4a3be8c3c920226556608f5152e73a5dea518e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): cmd/migrate_db/main.go:47-58 | cmd/setup_test_db/main.go:52-63 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/migrate_db/main.go:47\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/migrate_db/main.go"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c166fa63086ba57957fa2e6f599b278f49167cab688f2228070ad634442af0c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/dashboard/api_handlers.go:573-584 | internal/dashboard/api_handlers.go:678-689 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/dashboard/api_handlers.go"},"region":{"startLine":573}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc846d93e6bb3b771b2542419704a9e7bdb444980c5367cac1c48275b9ed6193"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): examples/02-tool-calling/main.go:24-34 | examples/04-multi-agent/main.go:21-31 | examples/05-evolution-demo/main.go:29-39 \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 \u0060examples/02-tool-calling/main.go:24\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/02-tool-calling/main.go"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"e4c9f4bfca5855b78448eec56e767cd9a581c1ffb236be1054fac3533bd85e60"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): internal/llm/output/ollama.go:180-190 | internal/llm/output/openai.go:249-259 | internal/llm/output/openrouter.go:227-237 \u2014 before extracting anything, compare \u0060internal/llm/output/openai.go\u0060 and \u0060internal/llm/output/openrouter.go\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/llm/output/ollama.go:180\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/llm/output/ollama.go"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"790189d336e0d65860f4f230c9086cfac623a161b10601d22b33e73f83ded0a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): internal/tools/resources/builtin/text/data_transform.go:61-71 | internal/tools/resources/builtin/text/data_validation.go:52-62 | internal/tools/resources/builtin/text/json_tools.go:58-68 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/tools/resources/builtin/text/data_transform.go: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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/resources/builtin/text/data_transform.go"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a4bd8851886b6185f8916a66a5ccd354e536f7636b263944fefba17aaebe505"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): api/client/simple.go:82-92 | api/client/simple.go:121-131 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. 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":"api/client/simple.go"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"5628dbfcd87a041d0896452fe42a6c6661096acf483a81675d8ad1c7d467e2de"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): api/handler/evolution.go:34-44 | api/handler/evolution.go:59-69 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060api/handler/evolution.go:34\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"api/handler/evolution.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"d143e8cd8b3e2edb32d33f85b1106f4f1481e4cdc052dd6d52b896cd1e902e99"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/ares/actions.go:168-178 | cmd/monitor-live/actions.go:168-178 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060cmd/ares/actions.go: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":"cmd/ares/actions.go"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"995c46bde9ea4ac864531e6dd02c17968ffa0194f3dfff7a0a6d18c7ccba65dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/ares/serve.go:236-246 | cmd/monitor-live/main.go:163-176 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060cmd/ares/serve.go:236\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/ares/serve.go"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"03e9475f3cb8f173cfed9d631aa4ae0e997fb107d80b2663522677fa551f8f25"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/ares/serve.go:487-497 | cmd/monitor-live/main.go:280-290 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. 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":"cmd/ares/serve.go"},"region":{"startLine":487}}}],"partialFingerprints":{"codehealthFindingId/v1":"f985e384477457db0e408baeb42fdb1a5af6fc6e4ee701ed635ff16f02bc6966"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/monitor-demo/main.go:35-45 | cmd/ares/demo.go:49-59 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/monitor-demo/main.go:35\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/monitor-demo/main.go"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"408bd69dca4129ed5ac6f15801e834b623161ff1e2b04a04677141c23f7e8ad4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): examples/11-knowledge-import/main.go:574-584 | examples/11-knowledge-import/main.go:598-608 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/11-knowledge-import/main.go:574\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/11-knowledge-import/main.go"},"region":{"startLine":574}}}],"partialFingerprints":{"codehealthFindingId/v1":"db28adc509a6d8752a874b15333a29a832010589c0f3c134135b6f4a03f094c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/agents/sub/executor.go:200-210 | internal/agents/sub/executor.go:233-243 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/agents/sub/executor.go"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1d2aab9d053b7925a4fa932691d7439030a916ef8b45ca577377dd9a25e9881"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/ares_eval/dimension_judge.go:138-148 | internal/ares_eval/llm_judge.go:259-270 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_eval/dimension_judge.go"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"f4196e91859fe51ce62b19927cd50c43d09ed5d1276c26131df88389b74558e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/ares_events/memory_store.go:126-137 | internal/ares_events/memory_store.go:165-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 \u0060internal/ares_events/memory_store.go:126\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_events/memory_store.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"0d2fada2b2f51a31804894f71044468b5f8849816bcb15bfd11834e844fc3aa2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/ares_evolution/genome_wiring_system.go:363-373 | internal/ares_evolution/rollback_policy.go:500-512 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_evolution/genome_wiring_system.go:363\u0060 it does not close everything it opens, so those exact 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":"internal/ares_evolution/genome_wiring_system.go"},"region":{"startLine":363}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bdbbd1c7b8b40defd773fd699ed5d1f76837b0c81ab97c10767502bb6c00db8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/ares_evolution/service/service.go:265-278 | internal/ares_evolution/service/report_hook.go:32-42 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/service/service.go"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"32f2bfb2409afdc49a46b6f51b9aee38073d445ec7ef94e1b2a518124810d9f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/ares_experience/conflict_resolver.go:203-214 | internal/ares_memory/context/rag.go:242-252 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060internal/ares_experience/conflict_resolver.go:203\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_experience/conflict_resolver.go"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"489324c9f3abf0b654b1b2d96d0d9ba26411a277676586ee5238410ecb389c53"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/ares_memory/manager.go:262-272 | internal/ares_memory/production_manager.go:791-801 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_memory/manager.go:262\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_memory/manager.go"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"94ba52ea45a73fb89f7bb2cdd9ade0c58fc3cb018d8192412cb1ef494d2f33e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/ares_memory/memory_patcher.go:75-85 | internal/ares_memory/memory_patcher.go:101-113 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_memory/memory_patcher.go:75\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_memory/memory_patcher.go"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"42778a1c75e5dbbc55a5518eddec9a5c397e8a3d0f8710f36200205ed44096e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/ares_ratelimit/sliding_window.go:109-119 | internal/ares_ratelimit/sliding_window.go:149-159 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_ratelimit/sliding_window.go:109\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_ratelimit/sliding_window.go"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c14a09841b345ca6f4e70fe4ac7010c948dc7445eab2de892a337479452af0f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/ares_security/sanitizer.go:204-214 | internal/ares_security/sanitizer.go:262-272 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_security/sanitizer.go:204\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_security/sanitizer.go"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"4642da69a785b6dce73f8a23caa8cde711e658df29ba6f008dcbecc8f0775a17"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/ares_security/sanitizer.go:321-331 | internal/ares_security/sanitizer.go:341-351 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_security/sanitizer.go:321\u0060 it does not close everything it opens, so those exact 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":"internal/ares_security/sanitizer.go"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"c75a65a2ebbde3032d536018a2627bd57f7c5c845b90ced47a803a622341df13"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/knowledge/provider/mysql/provider.go:178-188 | internal/knowledge/provider/postgres/provider.go:222-232 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/knowledge/provider/mysql/provider.go:178\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/knowledge/provider/mysql/provider.go"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"c572042d09a9857e79ef32c56a3955094bde222f2c45bd9d0ec8881d74b14215"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/llm/client.go:479-489 | internal/llm/client.go:687-697 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/llm/client.go:479\u0060 it does not close everything it opens, so those exact 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 register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/llm/client.go"},"region":{"startLine":479}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ea8c1c1c40ccd4c0362b2c0d68cf53f9478cd2c931b675888ea1f2a4dc99acd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/llm/output/openai.go:186-196 | internal/llm/output/openrouter.go:165-175 \u2014 before extracting anything, compare \u0060internal/llm/output/openai.go\u0060 and \u0060internal/llm/output/openrouter.go\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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":"internal/llm/output/openai.go"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"425da8042cbf19b6b268c9d6f644fa142f488aca825f836280498aa8d1b4a3e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/llm/output/openai.go:213-223 | internal/llm/output/openrouter.go:192-202 \u2014 before extracting anything, compare \u0060internal/llm/output/openai.go\u0060 and \u0060internal/llm/output/openrouter.go\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/llm/output/openai.go: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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/llm/output/openai.go"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"13d3efe57a1d2260f656ef7db13c68d9505ab025a76108b9c9f754f029ca1836"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/plugins/resurrection/resurrection.go:417-427 | internal/ares_runtime/manager_lifecycle.go:233-244 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060internal/plugins/resurrection/resurrection.go:417\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/plugins/resurrection/resurrection.go"},"region":{"startLine":417}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad154fd3fb1081520daf424cfb53b4d8259e68e006a8b8c7135a57a7c1d2003b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/storage/postgres/embedding/cache.go:126-136 | internal/storage/postgres/query/cache.go: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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/storage/postgres/embedding/cache.go:126\u0060 it begins part-way through the construct above it, so those exact 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":"internal/storage/postgres/embedding/cache.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"fcb84948611cca386aeccb25f2bd03b9db9db97d51d49eb1512e26bc61c85342"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/storage/postgres/embedding/client.go:271-281 | internal/storage/postgres/embedding/client.go:321-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 \u0060internal/storage/postgres/embedding/client.go:271\u0060 it does not close everything it opens, so those exact 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 register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/embedding/client.go"},"region":{"startLine":271}}}],"partialFingerprints":{"codehealthFindingId/v1":"56af4f77ce0baee07ea938eeb9bc72e9cbc14f28efe9c2a75a4955a1f4b62429"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/storage/postgres/repositories/distilled_memory_repository.go:72-82 | internal/storage/postgres/repositories/knowledge_repository.go:188-198 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/repositories/distilled_memory_repository.go"},"region":{"startLine":72}}}],"partialFingerprints":{"codehealthFindingId/v1":"052dd46cb478edbc333eabe038e7c634613d7e2fadb1f84ed3b1049eaffd5b61"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/storage/postgres/repositories/task_result_repository.go:435-445 | internal/storage/postgres/repositories/task_result_repository.go:514-524 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/storage/postgres/repositories/task_result_repository.go:435\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/repositories/task_result_repository.go"},"region":{"startLine":435}}}],"partialFingerprints":{"codehealthFindingId/v1":"37fee3819eaeffd2d9ff38f575a16f815421280384533fdbaf2d38697605001f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/arena/main.go:151-161 | cmd/arena/main.go:257-267 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/arena/main.go:151\u0060 it does not close everything it opens, so those exact 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 register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/arena/main.go"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"5c045e0133799dee23dcedeb3856e8f761241017dea612fd00ac9fe48c454cbc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/ares/db_migrate.go:85-95 | cmd/migrate_db/main.go:81-91 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/ares/db_migrate.go"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"b4f0d103bf721c449e8cc7ef3050fa624c607acfc7ff5423d5d7dcd5bcdffecd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/ares/recall.go:105-115 | cmd/ares/recall.go:145-155 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/ares/recall.go:105\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"cmd/ares/recall.go"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"eed420463ede2676b5ddb0ff8558e64ecddf1ff23ecd55087bf934526ad7ddab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): cmd/migrate_db/main.go:59-69 | cmd/setup_test_db/main.go:64-74 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060cmd/migrate_db/main.go:59\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/migrate_db/main.go"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"e94fcbe2b4374c755243091b9c53b60eb7533e50c18c30ab998bde4bb18bbe33"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/storage/postgres/services/retrieval_search.go:375-385 | internal/storage/postgres/services/retrieval_search.go:511-521 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/storage/postgres/services/retrieval_search.go:375\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/services/retrieval_search.go"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c758483c363c9405a2a814d251273e1077543f454219198100152badd73e7c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): internal/storage/postgres/repositories/distilled_memory_repository.go:356-365 | internal/storage/postgres/repositories/experience_repository.go:342-351 | internal/storage/postgres/repositories/experience_repository.go:399-408 | internal/storage/postgres/repositories/experience_repository.go:486-495 \u2014 there are 4 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/storage/postgres/repositories/distilled_memory_repository.go:356\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/repositories/distilled_memory_repository.go"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2548927d481487925751fb92fa16e452eddcba3130e1df8dbd7826bea54382e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): internal/llm/client.go:689-698 | internal/llm/output/openai.go:251-260 | internal/llm/output/openrouter.go:229-238 \u2014 before extracting anything, compare \u0060internal/llm/output/openai.go\u0060 and \u0060internal/llm/output/openrouter.go\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/llm/client.go:689\u0060 it does not close everything it opens, so those exact 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 register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/llm/client.go"},"region":{"startLine":689}}}],"partialFingerprints":{"codehealthFindingId/v1":"b74d1da76388cb6bcd287bf628ae27de51a0cbf9b210b4fb3f35da9f2bf2e648"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): internal/tools/resources/builtin/embedding/embedding.go:117-126 | internal/tools/resources/builtin/embedding/embedding.go:159-168 | internal/tools/resources/builtin/embedding/embedding.go:211-220 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/tools/resources/builtin/embedding/embedding.go:117\u0060 it begins part-way through the construct above it, so those exact lines 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":"internal/tools/resources/builtin/embedding/embedding.go"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"f86249701d194beb466da55b4a7f6abed98c2a94b7398d33fa58c4fcb87f9bef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): cmd/create_distilled_table/main.go:102-111 | cmd/migrate_db/main.go:97-106 | cmd/setup_test_db/main.go:91-100 \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 \u0060cmd/create_distilled_table/main.go:102\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"cmd/create_distilled_table/main.go"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a904ad45d764dc48dbd29fa854190b4f520255cae334884372a30909ce95c2b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/ares/actions.go:125-134 | cmd/monitor-live/actions.go:124-133 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060cmd/ares/actions.go:125\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/ares/actions.go"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"11084a1e5a7561548d33b27228e3e092efc043987e51d0f1367f461e78000f4e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/ares/serve.go:445-454 | cmd/monitor-live/main.go:238-247 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060cmd/ares/serve.go:445\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/ares/serve.go"},"region":{"startLine":445}}}],"partialFingerprints":{"codehealthFindingId/v1":"f42f4bddac15b909cee9b78dd008f546c22f621803f8460fffe696e186409fb8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/embedding-mcp/main.go:157-166 | internal/tools/resources/builtin/embedding/embedding.go:186-195 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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":"cmd/embedding-mcp/main.go"},"region":{"startLine":157}}}],"partialFingerprints":{"codehealthFindingId/v1":"0befc1ff0924e35c17970283e055b1c1fe273f2fdb1ef1ced4d5d5a33ab014be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/embedding-mcp/main.go:229-238 | cmd/mcp-null/main.go:54-64 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060cmd/embedding-mcp/main.go:229\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/embedding-mcp/main.go"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"900250bd210a6270027d36c97e4f244c5c01faead77ddb75c660d52e4e176bdc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/flight/main.go:452-461 | cmd/ares/flight.go:368-377 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/flight/main.go"},"region":{"startLine":452}}}],"partialFingerprints":{"codehealthFindingId/v1":"72179a7bc07c261c953e69ae0954b05c1cf71081bb9dda250e0ffe94468d57dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/ares_bootstrap/retriever_wiring.go:145-154 | sdk/memory_wiring.go:366-375 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060internal/ares_bootstrap/retriever_wiring.go:145\u0060 it begins part-way through the construct above it, so those exact 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":"internal/ares_bootstrap/retriever_wiring.go"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"110788c54f5bbd3689145dff73a944c6919013ed66c61f0b13f8f8cc40e715ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/ares_eval/service/service.go:306-315 | internal/ares_eval/service/service.go:400-409 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_eval/service/service.go:306\u0060 it does not close everything it opens, so those exact 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":"internal/ares_eval/service/service.go"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"708767f26c743120f9c9492e5c1ae66935f72903d056fbe8b60b0fdee583d131"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/ares_events/memory_summary_repo.go:46-55 | internal/ares_events/memory_summary_repo.go:67-76 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_events/memory_summary_repo.go:46\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_events/memory_summary_repo.go"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"2aa9026271bfddb2d6fa49be0562b7141848a71eb19518f55827c227026e556f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/ares_flight/timeline.go:135-144 | internal/dashboard/api_handlers.go:645-654 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060internal/ares_flight/timeline.go:135\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_flight/timeline.go"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba7844279060e76e07bda2c13dbb9d766ae6d43e675bef66e15a2d8435c349a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/ares_mcp/config_watcher.go:220-229 | internal/ares_bootstrap/provide_mcp.go:45-54 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_mcp/config_watcher.go:220\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"internal/ares_mcp/config_watcher.go"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"95fca830ee320c7e9111729f4c43483c8349b922894650b0233c2f2e4269bbce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/ares_mcp/server.go:471-480 | internal/ares_mcp/server.go:715-724 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_mcp/server.go:471\u0060 it does not close everything it opens, so those exact 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 register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_mcp/server.go"},"region":{"startLine":471}}}],"partialFingerprints":{"codehealthFindingId/v1":"130652ef553f5abc42709ba0725b1c33999d83a9e97e7826ee116d5936adce6e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/ares_memory/manager_impl.go:432-441 | internal/ares_memory/production_manager.go:732-741 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_memory/manager_impl.go"},"region":{"startLine":432}}}],"partialFingerprints":{"codehealthFindingId/v1":"76c574c1eccd7024648c5cd0e798d4fbd07c6f9831336a161066bcc0cd95c323"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/ares_runtime/checkpoint.go:248-257 | internal/ares_runtime/checkpoint.go:308-317 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. 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":"internal/ares_runtime/checkpoint.go"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"d21e768eb8f7b4fcb0f9a736bccd061682b21beff5785920d3a6d787f214e8b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/knowledge/provider/mysql/provider.go:233-242 | internal/knowledge/provider/postgres/provider.go:37-46 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/knowledge/provider/mysql/provider.go:233\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"internal/knowledge/provider/mysql/provider.go"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"062c68ae8a9d58d2029498b8eb6d1b6cc385a2f64f825a959dc13b335d60b2bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/llm/output/openai.go:117-126 | internal/llm/output/openrouter.go:97-106 \u2014 before extracting anything, compare \u0060internal/llm/output/openai.go\u0060 and \u0060internal/llm/output/openrouter.go\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. 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":"internal/llm/output/openai.go"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"971f10fd1c2039383b801c769fe310827bcfdcc303ab4ca15a6f0d158a353ed8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/llm/output/parser.go:343-352 | internal/llm/output/parser.go:422-431 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/llm/output/parser.go:343\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/llm/output/parser.go"},"region":{"startLine":343}}}],"partialFingerprints":{"codehealthFindingId/v1":"530ca672a283a0bf071a3b124e5855bfa061a529cdf9a7406b56986173212c71"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/storage/postgres/pool.go:236-245 | internal/storage/postgres/pool.go:308-317 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/storage/postgres/pool.go:236\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/pool.go"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c48c0acf31b6dcd803d89438fe37c18fcb4226a863df3e828e1f04dd759942a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/storage/postgres/repositories/secret_repository.go:321-330 | internal/storage/postgres/repositories/secret_repository.go:719-728 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/storage/postgres/repositories/secret_repository.go:321\u0060 it begins part-way through the construct above it, so those exact 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":"internal/storage/postgres/repositories/secret_repository.go"},"region":{"startLine":321}}}],"partialFingerprints":{"codehealthFindingId/v1":"40723cfaaae3d40da018ebabbf585b141a70170b6b5c0b7c9e2a0864549cec89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/storage/postgres/repositories/task_result_repository.go:296-305 | internal/storage/postgres/repositories/task_result_repository.go:398-407 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/storage/postgres/repositories/task_result_repository.go:296\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/repositories/task_result_repository.go"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6c044eb4d6773815dbd4c13f00309d8454bdb1a6cd173e1532eba78f67317d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/storage/postgres/repositories/task_result_repository.go:362-371 | internal/storage/postgres/repositories/task_result_repository.go:448-457 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/storage/postgres/repositories/task_result_repository.go:362\u0060 it begins part-way through the construct above it, so those exact 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":"internal/storage/postgres/repositories/task_result_repository.go"},"region":{"startLine":362}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab07ee6c65304df0e554aa1e846d7e620f7e3bfd20853b200432774d8da7d6c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/tools/resources/builtin/file/file_tools.go:489-498 | internal/tools/resources/builtin/file/file_tools.go:538-547 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/tools/resources/builtin/file/file_tools.go:489\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/resources/builtin/file/file_tools.go"},"region":{"startLine":489}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f11f3580625b641765043d4725c6d74c6de109b6cbb021f13280673f9c3772c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/tools/resources/builtin/knowledge/knowledge_base.go:208-217 | internal/tools/resources/builtin/knowledge/knowledge_base.go:396-405 \u2014 both copies are in the same file, so extract the block 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":"internal/tools/resources/builtin/knowledge/knowledge_base.go"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"3ab130a1f611092e2281b6d5a4a214a94426a751b17f71115c46185d4b8cd19d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/tools/resources/builtin/knowledge/knowledge_base.go:237-247 | internal/tools/resources/builtin/knowledge/knowledge_base.go:336-345 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/tools/resources/builtin/knowledge/knowledge_base.go:237\u0060 it begins part-way through the construct above it, so those exact lines 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":"internal/tools/resources/builtin/knowledge/knowledge_base.go"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"c813ac64fe19d15cf23c6e856d631b8d4a924feef884436d449171758e1c3dd1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/tools/resources/builtin/planning/task_planner.go:463-472 | internal/tools/resources/builtin/text/json_tools.go:272-281 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060internal/tools/resources/builtin/planning/task_planner.go:463\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"internal/tools/resources/builtin/planning/task_planner.go"},"region":{"startLine":463}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b0809c2b317d6bf0ac37ae8226a884235b97230fbc68023431789c01ad7c9f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/arena/main.go:748-757 | cmd/arena/main.go:800-809 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/arena/main.go:748\u0060 it begins part-way through the construct above it, so those exact 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 register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/arena/main.go"},"region":{"startLine":748}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c82351c06f615be1f2a942b72888278440b752ac78b121c65238e30a022f474"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): cmd/migrate_db/main.go:36-45 | cmd/setup_test_db/main.go:41-50 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060cmd/migrate_db/main.go:36\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/migrate_db/main.go"},"region":{"startLine":36}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe087f881fc6ea4cb662816fd60648d5833ab015739efe3a06cb6a9f083d624c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/llm/generate.go:194-203 | internal/llm/generate.go:267-276 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/llm/generate.go: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. The matched lines also register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/llm/generate.go"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"db495b7a2d316dd318aa533073519ed231b028924c7c2f25fedaa12f0f94a36d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): cmd/ares/db_create_table.go:33-41 | cmd/ares/db_migrate.go:35-43 | cmd/create_distilled_table/main.go:22-30 | cmd/migrate_db/main.go:24-32 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 4 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/ares/db_create_table.go"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"416491560e0f6e9ea111dcc7e46f775f156540012311f6fa82fa669d529ce2c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): internal/ares_quant/research/memory_store.go:145-153 | internal/ares_quant/research/memory_store.go:185-193 | internal/ares_quant/research/memory_store.go:279-287 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_quant/research/memory_store.go:145\u0060 it does not close everything it opens, so those exact 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 register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_quant/research/memory_store.go"},"region":{"startLine":145}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f2dd7d0b6dbd887b6bc6dad06b32c08ebcf1e856c56683dfc9c3c78b1120f8d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): internal/evolution/patch/patch.go:326-334 | internal/evolution/patch/patch.go:359-367 | internal/evolution/patch/patch.go:374-382 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/evolution/patch/patch.go:326\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/evolution/patch/patch.go"},"region":{"startLine":326}}}],"partialFingerprints":{"codehealthFindingId/v1":"37db83da5ae3d7becfbe1075c5faa78fed6282642eb3c79b9c25609587ddfe40"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): internal/ares_evolution/genome/population_guard.go:427-435 | internal/ares_evolution/genome/population_guard.go:492-501 | internal/ares_evolution/genome/population_guard.go:548-557 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_evolution/genome/population_guard.go:427\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/genome/population_guard.go"},"region":{"startLine":427}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa420c2c716364ff4a4618a5dc95ac9256aeedc60479aca04418e511d33ab7c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): internal/dashboard/api_handlers.go:757-765 | internal/dashboard/api_handlers.go:769-777 | internal/dashboard/api_handlers.go:796-804 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it 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":"internal/dashboard/api_handlers.go"},"region":{"startLine":757}}}],"partialFingerprints":{"codehealthFindingId/v1":"cae6ef109362483d04cfa65a4c779056ee508acd3fbc70dab83b25c005f0444a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): api/evolution/genome/genome.go:195-203 | internal/ares_evolution/genome/crossover.go:507-516 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060api/evolution/genome/genome.go:195\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"api/evolution/genome/genome.go"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"471d6e4f19013cb4ac136353c7ae203bfbf7e940ff5c677a5f53076c221823dd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/ares/mcp_adapter.go:19-27 | cmd/monitor-live/mcp_adapter.go:19-27 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/ares/mcp_adapter.go:19\u0060 it begins part-way through the construct above it, so those exact 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":"cmd/ares/mcp_adapter.go"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"88a96975d2a0e5c17143ad2617b2cdd356783cacfc6fb81397a9a19938dce7d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/ares/serve.go:192-200 | cmd/monitor-live/main.go:125-133 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060cmd/ares/serve.go: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":"cmd/ares/serve.go"},"region":{"startLine":192}}}],"partialFingerprints":{"codehealthFindingId/v1":"501f208867e35ffef3de3c1c2877e337b94dfaa4db8d7564e447efeae39edd03"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/flight/main.go:64-72 | cmd/arena/main.go:95-103 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060cmd/flight/main.go:64\u0060 it begins part-way through the construct above it, so those exact 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":"cmd/flight/main.go"},"region":{"startLine":64}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a43d286e9e5754c7763efde13944269ff3b082ef69c7051443c1d11bc8b26ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/flight/main.go:429-437 | cmd/ares/flight.go:356-364 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060cmd/flight/main.go:429\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"cmd/flight/main.go"},"region":{"startLine":429}}}],"partialFingerprints":{"codehealthFindingId/v1":"138f511cba5747ebb5931202ef5ab3dd5627ef2c148779f59501cc8e1f2ed163"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/monitor-demo/main.go:126-134 | cmd/ares/demo.go:140-148 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060cmd/monitor-demo/main.go:126\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/monitor-demo/main.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3b4ac082b3182f28c22d749e0e22ad6738c4a3847e771a8c0b0241dc1ca82c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): cmd/monitor-live/main.go:324-332 | cmd/ares/mcp.go:43-51 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060cmd/monitor-live/main.go:324\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/monitor-live/main.go"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"a065bcb2c3af85a0125c7ab61a75b13211c5617ccabb2b3c0d5fc09e7871f42e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): examples/11-knowledge-import/store.go:312-320 | internal/storage/postgres/write_buffer.go:207-216 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060examples/11-knowledge-import/store.go:312\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"examples/11-knowledge-import/store.go"},"region":{"startLine":312}}}],"partialFingerprints":{"codehealthFindingId/v1":"d84ca4bb4183522278449198188cb965efd03d7d56581971d5e51a58c2045b31"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): examples/runtime_evolution/full/main.go:109-117 | examples/runtime_evolution/knowledge/main.go:33-41 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/runtime_evolution/full/main.go:109\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/runtime_evolution/full/main.go"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"57bc8a932e7d2266270581a55b9b8e37b4e9581f85ff5c60b5dc9fa6bba3c4c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/agents/sub/agent.go:290-298 | internal/agents/sub/agent.go:375-384 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/agents/sub/agent.go:290\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/agents/sub/agent.go"},"region":{"startLine":290}}}],"partialFingerprints":{"codehealthFindingId/v1":"2270fd11430f58d1c8f9f64feb94295b0282a9438a6ba8eddff500a639536ec3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/ares_eval/agent_runner.go:125-133 | internal/ares_eval/report.go:190-198 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_eval/agent_runner.go:125\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"internal/ares_eval/agent_runner.go"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"c25f3d71acf99d6c49ce1fb8b1dc790f5bed45f1bf092c6373180e33c82671b6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/ares_evolution/dream_cycle.go:801-809 | internal/ares_evolution/dream_cycle.go:861-869 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_evolution/dream_cycle.go:801\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/dream_cycle.go"},"region":{"startLine":801}}}],"partialFingerprints":{"codehealthFindingId/v1":"41f55736f90379e50fc151ace3a0e54e9cc1255d2e61757d5aa3ed52a69b6b39"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/ares_memory/production_manager.go:432-441 | internal/ares_memory/production_manager.go:556-564 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_memory/production_manager.go:432\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_memory/production_manager.go"},"region":{"startLine":432}}}],"partialFingerprints":{"codehealthFindingId/v1":"73765c757533e0d72ae2546f8fdf21fcc92db3e089ce08a58bc88c08a6b65ab9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/knowledge/store/postgres/store.go:28-36 | internal/knowledge/store/sqlite/store.go:46-54 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/knowledge/store/postgres/store.go:28\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"internal/knowledge/store/postgres/store.go"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"5de5822d123466818ff5666803682829d860183857134bdfcf788660d215089c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/llm/client.go:339-347 | internal/llm/generate.go:105-113 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/llm/client.go:339\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/llm/client.go"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"a896bc42f9e26911e247977e9f9a23ad309eab4840b70dd860eac2dc6232af98"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/llm/client.go:465-473 | internal/llm/client.go:673-681 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/llm/client.go:465\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/llm/client.go"},"region":{"startLine":465}}}],"partialFingerprints":{"codehealthFindingId/v1":"2463c53ec70da2aaf420da71b02908ddda22a67c6b361c6f929ffa7b0b1d1d21"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/monitoring/tabs/workflow_tab.go:116-124 | internal/monitoring/tabs/workflow_tab.go:130-138 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/monitoring/tabs/workflow_tab.go:116\u0060 it does not close everything it opens, so those exact 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 register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/monitoring/tabs/workflow_tab.go"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"66016e99263330efb25a0bb1337606fcdbf69ef9a7844fbcf57a6f877fafa79a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/storage/postgres/repositories/distilled_memory_repository.go:254-262 | internal/storage/postgres/repositories/distilled_memory_repository.go:340-348 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/storage/postgres/repositories/distilled_memory_repository.go:254\u0060 it does not close everything it opens, so those exact 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 register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/repositories/distilled_memory_repository.go"},"region":{"startLine":254}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5841edfb762da88c03b87061d22f6b6d1fbeaf4c79e88d8491c83672add012f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/storage/postgres/services/retrieval_service.go:501-509 | internal/storage/postgres/services/retrieval_service.go:543-551 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/storage/postgres/services/retrieval_service.go:501\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/services/retrieval_service.go"},"region":{"startLine":501}}}],"partialFingerprints":{"codehealthFindingId/v1":"3150225a1f585c0a38b519939949af65cb0f55ed4fb6aefc443a73345bbece85"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/storage/postgres/services/simple_retrieval_service.go:267-275 | internal/storage/postgres/services/simple_retrieval_service.go:307-315 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/storage/postgres/services/simple_retrieval_service.go:267\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/services/simple_retrieval_service.go"},"region":{"startLine":267}}}],"partialFingerprints":{"codehealthFindingId/v1":"7268bbf5316fe9f7339b9b5cb20efb40b6d5c631438bed23a4db84f5c64ad578"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/storage/postgres/session.go:198-206 | internal/storage/postgres/vector.go:96-104 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/storage/postgres/session.go:198\u0060 it begins part-way through the construct above it, so those exact 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":"internal/storage/postgres/session.go"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b36b64a6f0aa62436da292f69e109e5fb965a512db695940946a2c9414d9e42"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/tools/resources/builtin/text/json_tools.go:128-136 | internal/tools/resources/builtin/text/json_tools.go:157-166 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/tools/resources/builtin/text/json_tools.go:128\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/resources/builtin/text/json_tools.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"6974faebcd4fe8f8752e3b01a92ab71726fcc7d221d988a8977d9b8ce952828d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/tools/resources/builtin/text/log_analyzer.go:206-214 | internal/tools/resources/builtin/text/log_analyzer.go:232-240 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/tools/resources/builtin/text/log_analyzer.go:206\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"internal/tools/resources/builtin/text/log_analyzer.go"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"2615d30846a01ceff2e9b0995b88fe0774b187c2a1d6b46671d0028ad0de13f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/workflow/graph/graph.go:65-73 | internal/workflow/graph/graph.go:108-116 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/workflow/graph/graph.go:65\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"internal/workflow/graph/graph.go"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"161c292f793210d0e36768338f77931777e7d5a0c6f934814d1d61b7ebcbbce7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): api/service/knowledge/service.go:122-129 | api/service/knowledge/service.go:155-162 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"api/service/knowledge/service.go"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"7db4b44c32db1842ed668dc58f6fbc6076d14a925914fe44281069f628f5f2b9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/ares/actions.go:77-84 | cmd/monitor-live/actions.go:76-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 \u0060cmd/ares/actions.go:77\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/ares/actions.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3901de7cd6a6a0dd3a234394bc3165d5b03e822689ecfb29c9c49fce0feea48"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/ares/serve.go:270-277 | cmd/monitor-live/main.go:191-198 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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":"cmd/ares/serve.go"},"region":{"startLine":270}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7d5562ba0f5d3a612fae71c7c66250759ecaff401982900b83b0565da5b044f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/ares/serve.go:301-308 | cmd/monitor-live/main.go:212-219 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/ares/serve.go"},"region":{"startLine":301}}}],"partialFingerprints":{"codehealthFindingId/v1":"fda9f3df15bb6c3531431857ecb21f4e58e0931193cd441dca3ab90f97572cc6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/flight/main.go:468-475 | cmd/ares/flight.go:383-390 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060cmd/flight/main.go:468\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/flight/main.go"},"region":{"startLine":468}}}],"partialFingerprints":{"codehealthFindingId/v1":"48799538f3eacdd02922c4d2199b061e131585a4b3800f3d0555c4b0768f56ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): cmd/monitor-demo/main.go:143-150 | cmd/ares/demo.go:157-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 \u0060cmd/monitor-demo/main.go:143\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/monitor-demo/main.go"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"99d1cd65840538269e92ef2496363cb1eec68fb90bf67bd3a6fe305581cf4101"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): examples/11-knowledge-import/main.go:640-647 | examples/11-knowledge-import/store.go:250-257 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060examples/11-knowledge-import/main.go:640\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/11-knowledge-import/main.go"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"4945972ea23b7eb91400ab7920680cd47d0eb23f9878ee85da813cafd9753cc5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/agents/leader/agent.go:400-407 | internal/agents/leader/agent.go:415-422 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/agents/leader/agent.go"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"d639a6bd2f9b7be93483f24c6158404ad815ae5214247eff802cdb1c23fb5728"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/agents/leader/agent.go:769-776 | internal/agents/leader/agent.go:840-847 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/agents/leader/agent.go:769\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/agents/leader/agent.go"},"region":{"startLine":769}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fbde2b906a02008573dc84227a735f2fa58bfafa835a61c0ccff39b00b96447"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/api_impl/adapters.go:22-29 | internal/api_impl/adapters.go:75-82 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/api_impl/adapters.go"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"97f35e14df708c8d531333758a3ac7c6a3fe7995fea9d3b00f37d48a692b8dfa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/ares_events/memory_summary_repo.go:163-171 | internal/ares_events/memory_summary_repo.go:187-194 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_events/memory_summary_repo.go"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"64118f400b6abf9d6ebe37b00b93061b61a227ee26baf2824b1f17fb3ffbfd6b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/ares_evolution/genome/adaptive.go:599-606 | internal/ares_evolution/genome/population_guard.go:90-97 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_evolution/genome/adaptive.go:599\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/genome/adaptive.go"},"region":{"startLine":599}}}],"partialFingerprints":{"codehealthFindingId/v1":"103053b510eead2a5a3eecf62ca0624493517cd35a390a2f940173a3f9f439ff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/ares_memory/manager.go:213-220 | internal/ares_memory/production_manager.go:602-609 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_memory/manager.go:213\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_memory/manager.go"},"region":{"startLine":213}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fca1fa131a52f6fd604c986ee62e8ba2ccd045e83e02425e5b5101883c27476"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/ares_runtime/bus.go:159-166 | internal/ares_runtime/bus.go:183-190 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_runtime/bus.go:159\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_runtime/bus.go"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"83741bc5b31a822a51374b6b0ef1891993167089675fdaf99398c4ab8f5cf673"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/discovery/providers/filesystem.go:158-165 | internal/discovery/providers/filesystem.go:188-195 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/discovery/providers/filesystem.go:158\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/discovery/providers/filesystem.go"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"77a5a3fcc29a72e528ac7770a517f8b02b389083ca2e14ee8e3200e7bbefb08c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/knowledge/mcp/mcp.go:124-131 | internal/knowledge/mcp/mcp.go:261-268 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/knowledge/mcp/mcp.go"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"d08f4bc4434c515cce839b1c85daf0e0aa6fad684bb0474ebb88acc7f7387d34"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/knowledge/provider/mysql/provider.go:153-160 | internal/knowledge/provider/postgres/provider.go:175-182 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060internal/knowledge/provider/mysql/provider.go:153\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/knowledge/provider/mysql/provider.go"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dae44a0b6da39dfb5143107330f97e656c51c1d2bd25f50c50a8df1f7cc8114"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/llm/output/openai.go:103-110 | internal/llm/output/openai.go:172-179 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/llm/output/openai.go:103\u0060 it does not close everything it opens, so those exact 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 register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/llm/output/openai.go"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"acd3baa67675680543bc8da112ecd355949ffc2dfb7610efc8bb2e75d26a8400"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/llm/output/openai.go:174-181 | internal/llm/output/openai.go:411-418 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/llm/output/openai.go:174\u0060 it begins part-way through the construct above it, so those exact 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":"internal/llm/output/openai.go"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bf03ad0db3539e46640f5e1c318bef9a5feaab9b2acc30c395cee2818588c9c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/llm/output/openrouter.go:86-93 | internal/llm/output/openrouter.go:154-161 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/llm/output/openrouter.go:86\u0060 it does not close everything it opens, so those exact 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 register a scope-exit action (a \u0060defer\u0060-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead \u2014 before the caller uses what it releases \u2014 so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/llm/output/openrouter.go"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"72965de902dc8c3f112d5762c0fa365d5b28874d548b6f3d6b29f93257d522ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/memoryservice/service.go:252-259 | internal/tools/resources/builtin/memory/memory_tools.go:80-87 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/memoryservice/service.go:252\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/memoryservice/service.go"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7bbdc69801fa1f4e7fd239c46a1aab26528c3f25a7c579430450d1ec931d815"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/storage/postgres/repositories/task_result_repository.go:406-413 | internal/storage/postgres/repositories/task_result_repository.go:491-498 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/storage/postgres/repositories/task_result_repository.go:406\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/repositories/task_result_repository.go"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"159f7884d3802d2c30e799c622aa43b4639fde5f9216f1842fb6ab345d946735"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/workflow/engine/mutable_dag.go:100-108 | internal/workflow/engine/types.go:255-262 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/workflow/engine/mutable_dag.go:100\u0060 it does not close everything it opens, so those exact lines 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":"internal/workflow/engine/mutable_dag.go"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e7cea05b60c4146535fd3be178b6d7aa04f907712d4075a71b4a6808f9a0a45"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): examples/05-evolution-demo/main.go:55-61 | examples/07-human-in-loop/main.go:72-78 | examples/08-mcp-integration/main.go:67-73 \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 \u0060examples/05-evolution-demo/main.go:55\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/05-evolution-demo/main.go"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a78f18a9c7f206130ca68b26dccdab93168c6bc3bdbc8df918b9427b6f71338"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): cmd/create_distilled_table/main.go:114-120 | cmd/migrate_db/main.go:109-115 | cmd/setup_test_db/main.go:103-109 \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 \u0060cmd/create_distilled_table/main.go:114\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/create_distilled_table/main.go"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"6051523640ddb387e087ed1088864ef189bc1f293b2107f4fda64d12966b504b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): cmd/embedding-mcp/main.go:108-114 | cmd/embedding-mcp/main.go:172-178 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/embedding-mcp/main.go:108\u0060 it does not close everything it opens, so those exact 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":"cmd/embedding-mcp/main.go"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a7eea0c37ab528bb04db3382d12fc8992ac740568f1f79f62cbebc2f0606865"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): cmd/monitor-demo/main.go:176-182 | cmd/ares/demo.go:190-196 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/monitor-demo/main.go:176\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/monitor-demo/main.go"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"afb12a43b0747d65f068428423bf0f4f95fc0c80d050eaf095b6de6c1633ce35"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/agents/sub/agent.go:308-314 | internal/agents/sub/agent.go:400-406 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/agents/sub/agent.go:308\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/agents/sub/agent.go"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d961bbf62da6cf920ab0006ebdb93cb5d8debaad09c766609e26dda70ec0dfe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/ares_runtime/bus.go:101-107 | internal/ares_runtime/bus.go:132-138 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_runtime/bus.go:101\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_runtime/bus.go"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"97ddee8480289cbc6b774b3e2e09e44ac2529d2d49f7053d78c07d2a6fb5a51a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/dashboard/orchestrator.go:442-448 | internal/dashboard/orchestrator.go:487-493 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/dashboard/orchestrator.go"},"region":{"startLine":442}}}],"partialFingerprints":{"codehealthFindingId/v1":"c32a81023a49914209a29d31bee97213b7aeb5ac9875b10fc7e09805fa1c5444"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/llm/output/openrouter.go:77-83 | internal/llm/output/openrouter.go:145-151 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/llm/output/openrouter.go:77\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/llm/output/openrouter.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"1852c3c0f0763c6afec4c74723d6491fa8f365cb55e5291650c4731a84850157"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/tools/resources/builtin/embedding/embedding.go:149-155 | internal/tools/resources/builtin/embedding/embedding.go:201-207 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/tools/resources/builtin/embedding/embedding.go:149\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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":"internal/tools/resources/builtin/embedding/embedding.go"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"4eea37747049141dd24f149561e1243f20cf46c701b76455061a7d1260c2ca9b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): internal/storage/postgres/repositories/knowledge_repository.go:333-339 | internal/storage/postgres/repositories/knowledge_repository.go:623-628 | internal/storage/postgres/repositories/knowledge_repository.go:698-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 \u0060internal/storage/postgres/repositories/knowledge_repository.go:333\u0060 it begins part-way through the construct above it, so those exact lines 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":"internal/storage/postgres/repositories/knowledge_repository.go"},"region":{"startLine":333}}}],"partialFingerprints":{"codehealthFindingId/v1":"43a0160b5673203fc6a0f5b3248fe45743200957a547c11a17d47210041db73e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): internal/storage/postgres/repositories/knowledge_repository.go:556-561 | internal/storage/postgres/repositories/knowledge_repository.go:619-624 | internal/storage/postgres/repositories/knowledge_repository.go:694-699 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/storage/postgres/repositories/knowledge_repository.go:556\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/repositories/knowledge_repository.go"},"region":{"startLine":556}}}],"partialFingerprints":{"codehealthFindingId/v1":"d149ae4bca90b22baf32b0714d031f344a5b7c00f35fef92f801ff7d16746c15"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): cmd/ares/mcp_adapter.go:30-35 | cmd/monitor-live/mcp_adapter.go:30-35 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/ares/mcp_adapter.go:30\u0060 it does not close everything it opens, so those exact 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":"cmd/ares/mcp_adapter.go"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"28c30dc5f0e674aacc82d6e952808ce6978cb65cb7be657957665c62e2bc1e93"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): cmd/monitor-demo/main.go:155-160 | cmd/ares/demo.go:169-174 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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 \u0060cmd/monitor-demo/main.go:155\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/monitor-demo/main.go"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"73517ba0a7e7e6d4c45b0648b000db2dd5bc7ea999409cfda76cec3f5a9061a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): cmd/monitor-live/agents.go:34-39 | cmd/ares/agents.go:35-40 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/monitor-live/agents.go"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"71b049e972ff8f87ec987e2a72e3db9d73562c4a552c61c220b2afa2cd2a751d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/ares_events/compactor.go:412-417 | internal/ares_events/compactor.go:422-427 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ares_events/compactor.go:412\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_events/compactor.go"},"region":{"startLine":412}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c30695609818b922a7109b9d338c2831ee2e8f027e672e5ab54aabc2aaa473a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/storage/postgres/recommend.go:100-105 | internal/storage/postgres/recommend.go:177-182 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/storage/postgres/recommend.go:100\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/recommend.go"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6632646e8fa6aa361b01dab232e8212d6790d22185e636a8298b14499c812d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): cmd/ares/db_check_rls.go:69-74 | cmd/check_rls/main.go:55-62 \u2014 before extracting anything, compare \u0060cmd/ares/db_check_rls.go\u0060 and \u0060cmd/check_rls/main.go\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060cmd/ares/db_check_rls.go:69\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"cmd/ares/db_check_rls.go"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"79843bc75526f6e5c7d48e7030d2b739b9b796f2d61792e8d7cd5c3e18a5830a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 4): internal/storage/postgres/repositories/experience_repository.go:147-152 | internal/storage/postgres/repositories/experience_repository.go:333-337 | internal/storage/postgres/repositories/experience_repository.go:390-394 | internal/storage/postgres/repositories/experience_repository.go:477-481 \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 \u0060internal/storage/postgres/repositories/experience_repository.go:147\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/repositories/experience_repository.go"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bf2903738b2d3194b45a65028bcbe4d6fc8d0a6752d5311eb1d8869c4d62d2d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): examples/13-archive-akg-chain/main.go:60-64 | examples/runtime_evolution/full/main.go:105-109 | examples/runtime_evolution/knowledge/main.go:29-33 \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 \u0060examples/13-archive-akg-chain/main.go:60\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"examples/13-archive-akg-chain/main.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"354b66ae5c70286cc49d65c637e27b84bc53ff8c3c853b684ad59175563e138f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): internal/storage/postgres/repositories/task_result_repository.go:163-168 | internal/storage/postgres/repositories/task_result_repository.go:413-417 | internal/storage/postgres/repositories/task_result_repository.go:498-502 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/storage/postgres/repositories/task_result_repository.go:163\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/repositories/task_result_repository.go"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"28ecc3e457cf7dd3feb64bc93282f1ce52bdb86b537b579246f3b682435111e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): internal/storage/postgres/repositories/knowledge_repository.go:476-480 | internal/storage/postgres/repositories/knowledge_repository.go:561-565 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/storage/postgres/repositories/knowledge_repository.go:476\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/storage/postgres/repositories/knowledge_repository.go"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"13a13c2de36f1c591bb7c34349c76890ae8fcda06999243f010e2d311680a546"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): internal/storage/postgres/session.go:91-95 | internal/storage/postgres/session.go:195-199 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/storage/postgres/session.go:91\u0060 it does not close everything it opens, so those exact 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":"internal/storage/postgres/session.go"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"8edb0d0c4fed196caf2b5c72b0494e4ed927cd40bf1d0d53140c3628f042366f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): internal/tools/resources/builtin/math/calculator.go:286-290 | internal/tools/resources/builtin/math/calculator.go:301-305 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/tools/resources/builtin/math/calculator.go:286\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/resources/builtin/math/calculator.go"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"10880fe14acc10405c5970569e18205bcd1360a13cca6e8d5f11bcf501eb9ea6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): internal/tools/resources/builtin/memory/memory_tools.go:287-291 | internal/tools/resources/builtin/memory/memory_tools.go:305-309 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/tools/resources/builtin/memory/memory_tools.go:287\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/tools/resources/builtin/memory/memory_tools.go"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"41ec4725754a689fed4df770857eea27c515f167e045f3ece43b3e37ea1627b0"}},{"ruleId":"D13","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d1e5bfc6033dc32271cbc9d0920addaa8a712f092b37ce1d28739ca0675d0653"},"taxa":[{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/agents/leader/agent.go: internal/agents/leader/agent.go changed 29 times in last 90 days, max complexity 39. 6 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/agents/leader/agent.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6a8b18f8ae1d9f4879e73dfadbdc3655e77bf9f639f10494c88c8b189e3289d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/ares_evolution/genome/population.go: internal/ares_evolution/genome/population.go changed 30 times in last 90 days, max complexity 26. 6 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/genome/population.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c85e60246039ca42ac0489d02ba4fc41211a02d441e7f012b8e2ec838f9ee2da"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/ares_evolution/service/service.go: internal/ares_evolution/service/service.go changed 21 times in last 90 days, max complexity 32. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/service/service.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"28278cc962369c9bf1768e5d30cef6a25f70b4cd960d4c269944b472259c8b5f"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/llm/client.go: internal/llm/client.go changed 27 times in last 90 days, max complexity 23. 7 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/llm/client.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a66bb6fc320deafa4585035f3380f4c633785eba3bdd4a70424cdbba004552f3"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/ares_evolution/genome_wiring_system.go: internal/ares_evolution/genome_wiring_system.go changed 22 times in last 90 days, max complexity 28. 3 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_evolution/genome_wiring_system.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"82fe899bb13e878d8425640e167a98cd8fb24260597a37a2a72b4a5f5d82da0e"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/ares_bootstrap/bootstrap.go: internal/ares_bootstrap/bootstrap.go changed 21 times in last 90 days, max complexity 27. 1 of those changes was a fix/bug commit, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ares_bootstrap/bootstrap.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f44dea07b4b767cfa5f4f061d5c5be216cd6f827f520f77692161a6431e984f4"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/monitoring/static/app.js: internal/monitoring/static/app.js changed 5 times in last 90 days, max complexity 104. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/monitoring/static/app.js"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"cdb35785bf9b71a96baf874c7ebd6ae4dc9678cc533640c288795feebfed531d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: sdk/sdk.go: sdk/sdk.go changed 20 times in last 90 days, max complexity 24. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/sdk.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"937db2f8234b250568934421676890a35b4c2e9e57c23d3ce35aee444a4fa9c5"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/dashboard/orchestrator.go: internal/dashboard/orchestrator.go changed 17 times in last 90 days, max complexity 28. 3 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/dashboard/orchestrator.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"767af3168728bba3cd1ea354304fec1918f0b5c77492e0c1e0fd095d33735759"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/agents/leader/supervisor.go: internal/agents/leader/supervisor.go changed 16 times in last 90 days, max complexity 27. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/agents/leader/supervisor.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c13fb6f706731fe7a253c6414e19c1bba24703313ae5aea1521ace92f6814a54"}},{"ruleId":"D16","level":"warning","message":{"text":"single-maintainer \u2014 knowledge-concentration (bus factor) risk: single-maintainer \u2014 knowledge-concentration (bus factor) risk (1 author(s) across 420 commit(s) sampled)."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"b4b49d961df742f0e507f4cc5c8094fb077ba0391a27fd015d18320865187719"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"a6d47c2611945bb774490bb9a327931c1d00b47d56161fbcff8c00a834e2ea70"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"7f3a9865dc934841e1ff616530d2a70714873fe3243ce18e670fbdfe8a99ab19"}},{"ruleId":"D28","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b2b81e23e67ddaea165d59d2ffc595f327c0d4d6edbe5dd7ef0a3fa902980793"}},{"ruleId":"D28","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3cdfd7beb31b791ae18dcb425e21eb157c842e7bbcd522cc330573c1a6538db1"}},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d5b8f11381d61a58459ffc7c595fd52d09c03c711894a63a9578043d2338412b"},"taxa":[{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"8039c1a805e8b8d8d13b07fbf8286268e0b8f90b7d509719f98cae6a2ca7dcad"},"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"}}]},{"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":"b2b27c9b4cf161eb9ed6e4772732b1ec68903f473af2135f7925a40d9b549df2"},"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"}}]},{"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":"4ffa22d26fd435a37f7543b8d2506e864bbe491a5de56a48628e6febd5b15381"},"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"}}]},{"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":"ba345b6cf0b76e45a940432903c977c4974b723517d8f882a2ebcc21c06c8beb"},"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"}}]},{"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":"cd7248aace24385cc6f3a7b40db0929efbd120e2ff3d6794321601db907db9f4"},"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"}}]},{"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":"fa06dbab46c293ed185329760b3fb27a45ae918913542ff379214740aaf04713"},"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"}}]},{"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":"6845b2e66242c43dd9f8642c22a8de3f2e1257965d2e7cdadb6bd0860dfc4541"},"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"}}]},{"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":"7ceee73d76663034321cbd3b5bbecae8b673163039b70b12462f979a331e73d3"},"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"}}]},{"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":"e7a9139ada736d07ff392922c41056ab290cbfa563beec669fc516345f13b2e4"},"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"}}]},{"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":"042c2efdef873d93e5a6a2c59afa15c7d6794753fc84d569eb422a3a9a68ccd0"},"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"}}]},{"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":"8eb50784ab958284eb3ecd7050384e4061ddeae0c76cf46d9d242ff3f816fc6b"},"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"}}]},{"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":"77765882d55462152a369fef948de5215108ca7f45d82e78ff505271ac66abac"},"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"}}]},{"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":"4e5ba20d569d258ae6d0a24953bb1bf2096a834bc4a53403da7c12ca10d2411b"},"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"}}]},{"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":"2f9837116a08b8e6d1c399be63869d7e00828011b478e4dec43ad56ec6d8fca0"},"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"}}]},{"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":"229f33f5083a1fefa5ebd7f3b2a50f455445c022072eadf8ca675541407f621d"},"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"}}]},{"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":"63f6fe19604e9bbc201805ab413127670d457ca05c4ff3d9f121266d5a97d87d"},"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"}}]},{"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":"eb56f2e44d0085df25826e32c71a62971b1cb2c7a5b691fdebd076fa9e819c18"},"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"}}]},{"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":"c15e03ac1fa47e87e1db1facbff939b0109157aa1a15ea9510ba7aa38b6e07cb"},"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"}}]},{"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":"160f8e4f73e01d60a8b0f3a55ca62cade4ad4cf4c5bac6b888bcc7b6a7289d91"},"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"}}]},{"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":"53a112a53c05e4079c0523e4e1b032fbe60ae54aa09c0c3451d36f4dc5e269fb"},"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"}}]},{"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":"f9bdd82ad4ee87fec764b9a4c3dbbd1a768eabe75ec516b636b4b7a0fb23cf0a"},"taxa":[{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"a958b520e8fcd9cf129d805b723a4ff06d9a44ff7683672a8b4972244c3a044a"},"taxa":[{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"e4b3e093a1a82f04f787b80c287f7b7f76f83b6cf28825ec3c0b9d5e92253447"},"taxa":[{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"dca9aa61c3d8e237493c5ea784017e43423deb9ac6b5a376e73e99d54979a72f"},"taxa":[{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"0d101999229a3720e378e981c893f8688d987bcef8f3ce051cd8520f86e29813"},"taxa":[{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"76e7af78fa9b950efaa5067db22260fe172f775946fe3cf0783977126e1dc05a"},"taxa":[{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"5f74368131ede946baeffd01c3f1e0a62b946084600257d6a519b4cc47fdcfda"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"312bad8f57c360f595eb922ee1de53168b8e5be0a4cbc692536ce980c06c83e5"},"taxa":[{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"e60a302f674919446a32b5f37d3452179efbffa9b0228af3e0db980b112e8d5a"},"taxa":[{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"a4261a6d77763f9a997be837e6ab6b503c0c3b3b0732a815a9fe571fd2f249a2"},"taxa":[{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"0812686a5443a3cbcd9d24cad87bfa608c01c840012a1099caa478051ec01538"},"taxa":[{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"52716a5d3e38e477c0be372433a42ecca638f803366ba1db2e2b354a1e2e3183"},"taxa":[{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"1ab59a8d04e0d7e3f2ec3a8ade85f0fc72a08e85d0398796213c8812396efe9e"},"taxa":[{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"7a67b52f245e04a578a5514774828a8fb496a3ae9c4d87f7118f38a826027c48"},"taxa":[{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"65f9ece2653187ad1c7a4997290cd6295699cd0eec936d29e0f06fb5f2fe0439"},"taxa":[{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"46f92bd8646c714c9eb8cd74d2fb8074a149c9592aeedc9a94dafc033926c9e3"},"taxa":[{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"916797b8154ce5965ac154f40352f025a548a8c6919a1b8098ed2abab0e19680"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"12fe7975265bdd25031de5c8974f450929642aa2e408ea55779f4090096f756c"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"028361ee59c16ba0aa5f1da5fcf6e20013a9c226ea45df7f191c410ca2812b8c"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"454f86a8cdbcdc33f9c50efc50239e2c5572185a01085800ad43b9269dc34bdf"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"91df400da13cfade2819d92d1e30098f0ac3d7396e40a9c91523526e31a51bf0"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"85c033dabcac336215c932ab752cd55aef90c926fa1cd353f64838303672622d"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"92c914d4bfb5272f9d95d58ab2a1066141641580d883488fbbe1ae54a49d2e20"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"52a6f4dadca319a197534868250e949019e8ac320cd451525635de22dc24a5e9"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"61ce5a70dfc5a4e1569d577c89494fe3780dc1b28f7cbed517336002528aebb1"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"7de61aa334f96c4cfea0b0872192f80de79c5a6ac8f9b391db602e101cb68666"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"63ed852ff9cb21f775e058c9f605367a1fd98f2de163fb5a6726f215f09f13fa"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"c4cba0e57cbd6d22aed199263e82bbf8a4e6dae4b133d31ee515ac122882a26e"},"taxa":[{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"cea110fd98b5e0b111570f76d5f96cb025fc60ec27452abfe4cc83e22bfc1b9d"},"taxa":[{"id":"CWE-338","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"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":"4504a396e6794064d9930aa8f39fe63dc1a2c1fca1fdc862935c2d46706c37db"}},{"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":"bb755a888c2a4bee0cd5bb501f727769defc649356c71eadd00aa70db5e59e43"}},{"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":"87f01b28fcd4bb3c63dcdcd7664dbfd3bf4c33802b7985ef6f9d5e0d43d26113"}},{"ruleId":"D31","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"07cafd354ea132891e844aebfe1e8fa1470a1357a09cc36aa5c86d684b33b919"}},{"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":"1b213f6eedd4b140d0bc37bdf1496f72811a643f34064f12518b32e9e83bcfc7"}},{"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":"0e17f71490e4d120a48b2b2881ab866c93b272bef2febb673a3e8e42b2c288ab"}},{"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"}},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"90f83b4fa27db32740afe9540c905f3c0499caed87f61049a8a903ecc95b41c3"}},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0752d0df7434000fcabf1048e2de30a7a1a8b982b3db9a19898c4dec199856b4"}},{"ruleId":"D38","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":"5024c6afc6d3ad433fe6e9d6331e96e5f5c40a20c3a6565c4288cd0d4af79e78"}},{"ruleId":"D38","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":"5e3545524e8875b4c7eba7c1011fc73f5980286a976278c5029e01d01e301600"}},{"ruleId":"D38","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":"33414bfe9fc539a28e499c15ef8a3c6efeb612e97ed802ea17970eb5e12dd4d0"}},{"ruleId":"D38","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":"2492c3c0cb2c02557f01735f6b230f7415d7f8719c979b96bd81861d6f923ef1"}},{"ruleId":"D38","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":"6c3e92d0b622a9a333ef435b2cf8fddce47f03d900711f4f2160ca0642fcdffc"}},{"ruleId":"D38","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":"2028879729bf47505b421f9e3384b17a5afd55b3588cdab3d715ccec5822b84c"}},{"ruleId":"D38","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":"ba63a83e22369b1add0f8d9d549548dd86f6af210170b5315bb95c4e04fa5341"}},{"ruleId":"D38","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":"76b5795f7eb98349dfd5a20418ff630c92892bf0dedc30d9d33804f419218e13"}},{"ruleId":"D38","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":"fa474de848ec4374794a97a8bf82f042c5197f66f6f89de96bba50be1ad51a8c"}},{"ruleId":"D38","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":"989c1cbf8641f752d9377a76428181b46bf7859fe600942e6486e32d400e2963"}},{"ruleId":"D38","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":"ba0695644397eab358c67149e6d936cb8b6b648c1f9c8b9bfa34a8138855768a"}},{"ruleId":"D38","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":"be217444638ac33aa1bd5044cfc99a2e92b284c1cc1654e8220d2ef2ef47944d"}},{"ruleId":"D38","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":"231ad4dc838e4a2768e6f7a1e67ca410b16632a9e046ea516d551978147d4308"}},{"ruleId":"D38","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":"a61a1e740e1c8cc9f0be90445536cfafae62e65e42af8c6c35a0fc5ce83b55b4"}},{"ruleId":"D38","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":"d400e808f7a102a6d02b9adbd17da9d2b9dc867026cb6a435679b1454bcf5df7"}},{"ruleId":"D38","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":"1cee4e01c5c6b264cba05200a2f85d6b13dd827ed269c7caa12bd4d697493fea"}},{"ruleId":"D38","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":"b7e725d402478d3e962c4954bb56f96992b8183bd9cc5422e0995284a7936709"}},{"ruleId":"D38","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":"9a189fff5af7c096655a7ea311d629e2cf7398e326833e3373e49c2ff869b21b"}},{"ruleId":"D38","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":"11d329f54ab2d88651b34fb1b1a7c067143ecde40009cd256562c3aa7c54ff96"}},{"ruleId":"D38","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":"324621cf03ac3d6b8ab8ed2d27abfbb4b46ab0acc7a41fea725cdd2eb7aacf72"}}],"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-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-338","guid":"e89b7604-c3f7-8b53-bc8c-4d4718c28617","name":"CWE-338","shortDescription":{"text":"CWE-338"},"helpUri":"https://cwe.mitre.org/data/definitions/338.html"},{"id":"CWE-353","guid":"09d7e902-d4ee-f05d-ae6c-0a1554d0c18f","name":"CWE-353","shortDescription":{"text":"CWE-353"},"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-502","guid":"f7d3b296-aac0-5c5a-b706-e07faba26c36","name":"CWE-502","shortDescription":{"text":"CWE-502"},"helpUri":"https://cwe.mitre.org/data/definitions/502.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":"Command Injection","shortDescription":{"text":"Command Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"OS Command Injection","shortDescription":{"text":"OS Command Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Cross-site Scripting (XSS)","shortDescription":{"text":"Cross-site Scripting (XSS)"},"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":"CWE-829","shortDescription":{"text":"CWE-829"},"helpUri":"https://cwe.mitre.org/data/definitions/829.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"SQL Injection","shortDescription":{"text":"SQL Injection"},"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":"Code Injection","shortDescription":{"text":"Code Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]}],"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":84,"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."]}]}