{"$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":"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":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"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":"D33","name":"JS/npm Dependency Vulnerabilities","shortDescription":{"text":"JS/npm Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D33","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"]}},{"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"]}},{"id":"D40","name":"Network Egress Confinement","shortDescription":{"text":"Network Egress Confinement"},"helpUri":"https://codehealth.canine.dev/dimensions/D40"},{"id":"D41","name":"Kernel \u0026 Syscall Confinement","shortDescription":{"text":"Kernel \u0026 Syscall Confinement"},"helpUri":"https://codehealth.canine.dev/dimensions/D41"}]}},"results":[{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): internal/cli/filesystem/dataset.go:309-327 | internal/cli/filesystem/dataset.go:593-611 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/cli/filesystem/dataset.go:309\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/cli/filesystem/dataset.go"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"66fe024a34e987eea8956d36ec708a54b2453be4f777ae302ea8d3b778cea910"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 2): internal/engine/elasticsearch/meta_filter.go:639-657 | internal/engine/infinity/meta_filter.go:539-557 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/engine/elasticsearch/meta_filter.go:639\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/engine/elasticsearch/meta_filter.go"},"region":{"startLine":639}}}],"partialFingerprints":{"codehealthFindingId/v1":"d20ef8973e79e269c3eddcd311700588a753d3a583737e1641fceca718e42174"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): internal/dao/pipeline_operation_log.go:91-108 | internal/dao/pipeline_operation_log.go:133-150 \u2014 both copies are in the same file, so extract the block into one function there 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/dao/pipeline_operation_log.go"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"7490caba475d3843c2679b35b3d5e999791e1e9db835da8808cce0c04547389e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): internal/engine/infinity/chunk.go:433-451 | internal/engine/infinity/chunk.go:675-692 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/engine/infinity/chunk.go:433\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/engine/infinity/chunk.go"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"345a09b897e6cfa0fe3fa4a895b44436f04cf90e70b00c5720a96db85e9ec3d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): internal/entity/models/baidu.go:85-102 | internal/entity/models/baidu.go:155-172 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/entity/models/baidu.go:85\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/entity/models/baidu.go"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"90392a7577c14ec31e12c37a1bc7c4a3a6cc69a2122b381680886e6f988a0c2b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): internal/entity/models/deepseek.go:105-122 | internal/entity/models/deepseek.go:162-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/entity/models/deepseek.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/deepseek.go"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"458092e1c7d0f9c0c1c4532a1fbea2bd10bcf6115e89a80e20dcc00ce50766a1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 6): internal/handler/providers.go:987-1003 | internal/handler/providers.go:1053-1069 | internal/handler/providers.go:1120-1136 | internal/handler/providers.go:1228-1244 | internal/handler/providers.go:1335-1351 | internal/handler/providers.go:1398-1414 \u2014 all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/handler/providers.go:987\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/handler/providers.go"},"region":{"startLine":987}}}],"partialFingerprints":{"codehealthFindingId/v1":"9548576960a04597be97d49bc60c54e04afe9f5c6c33ef5b224c5feab6d026f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): internal/agent/workflowx/parallel.go:695-711 | internal/harness/graph/graph/parallel.go:269-285 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/agent/workflowx/parallel.go:695\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/agent/workflowx/parallel.go"},"region":{"startLine":695}}}],"partialFingerprints":{"codehealthFindingId/v1":"466bc05f0068f8350627dc592561a2aacf67f0ce4e95929438499f23ab873bef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): internal/cli/filesystem/skill.go:1213-1229 | internal/cli/filesystem/skill.go:1892-1908 \u2014 both copies are in the same file, so extract the block into one function there 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/cli/filesystem/skill.go"},"region":{"startLine":1213}}}],"partialFingerprints":{"codehealthFindingId/v1":"67d94019b51732895cddc5faf250967123ab63a4025e71f6b22f7f6746c555c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): internal/cli/filesystem/skill.go:1361-1377 | internal/cli/filesystem/skill.go:2067-2083 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/cli/filesystem/skill.go:1361\u0060 it does not close everything it opens, so those exact 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/cli/filesystem/skill.go"},"region":{"startLine":1361}}}],"partialFingerprints":{"codehealthFindingId/v1":"084ce306f3d96dce530a74d5550e9b25375d9644740e5908c1edaab08ea6542e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): internal/cli/filesystem/skill.go:1421-1437 | internal/cli/filesystem/skill.go:2136-2152 \u2014 both copies are in the same file, so extract the block 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/cli/filesystem/skill.go"},"region":{"startLine":1421}}}],"partialFingerprints":{"codehealthFindingId/v1":"ffca997f838407a7814e20a062a282ff25eac303b4a28b69f99658aa1ccf9430"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): internal/entity/models/openai.go:366-382 | internal/entity/models/ragcon.go:472-488 \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/entity/models/openai.go:366\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/entity/models/openai.go"},"region":{"startLine":366}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e9e0d3c39bcf8f0e6f40238332659911bca9a8abe2f40fecaa2169cb4e6f5ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): internal/handler/tenant.go:350-366 | internal/handler/tenant.go:426-442 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/handler/tenant.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/handler/tenant.go"},"region":{"startLine":350}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b1e94dcdcba086ab7e37102407f12c3bed6c37a94a31b829c3369109e7b12c1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 9): internal/entity/models/302ai.go:105-120 | internal/entity/models/gitee.go:77-92 | internal/entity/models/huggingface.go:72-87 | internal/entity/models/lmstudio.go:84-99 | internal/entity/models/moonshot.go:106-122 | internal/entity/models/vllm.go:84-99 | internal/entity/models/xiaomi.go:89-104 | internal/entity/models/xunfei.go:114-129 | internal/entity/models/zhipu-ai.go:80-95 \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/entity/models/302ai.go:105\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/entity/models/302ai.go"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"9473911f18d2dcf382b93052d403eeec0da13d65acea1a6511ece0e463ac57f4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 4): internal/entity/models/funasr.go:97-112 | internal/entity/models/groq.go:259-274 | internal/entity/models/mistral.go:392-407 | internal/entity/models/siliconflow.go:521-536 \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/entity/models/funasr.go:97\u0060 it does not close everything it opens, so those exact 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/entity/models/funasr.go"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3bde83bdb61643618eb5b5a12bccb3167ff5445f6942b1675ecdc2865f75735"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): internal/entity/models/gitee.go:98-113 | internal/entity/models/greenpt.go:112-127 | internal/entity/models/openrouter.go:90-109 \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/entity/models/gitee.go:98\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/gitee.go"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"54aab477795150d65444da3345937d9b3bb6147ac1ff49ec19dc74f9dbd0012e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): internal/entity/models/longcat.go:111-126 | internal/entity/models/stepfun.go:84-99 | internal/entity/models/upstage.go:89-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/entity/models/longcat.go:111\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/longcat.go"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0a5ec2b6e6adca4b19f193f5411514e5825627a7af5e0a9eec8533424a563de"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 3): internal/handler/providers.go:875-890 | internal/handler/providers.go:1160-1175 | internal/handler/providers.go:1268-1283 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the 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/handler/providers.go:875\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/handler/providers.go"},"region":{"startLine":875}}}],"partialFingerprints":{"codehealthFindingId/v1":"47b76a6215b1eb7741afe059d674fad4531cface3e01f82b2f8e81eafba1cab2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): internal/channels/qqbot.go:151-166 | internal/channels/telegram.go:182-197 \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/channels/qqbot.go:151\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/channels/qqbot.go"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f62796ca10b105a85e4942175560c45ce30d4b832a22a1c73b13bfccbebf483"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): internal/cli/admin_command.go:2627-2642 | internal/cli/admin_command.go:2657-2672 \u2014 both copies are in the same file, so extract the block into one function there 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/cli/admin_command.go"},"region":{"startLine":2627}}}],"partialFingerprints":{"codehealthFindingId/v1":"03ddd63d4402a5de40392f55648495328cc34968d444280ed27029ced6e4ea00"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): internal/cli/filesystem/file.go:95-110 | internal/cli/filesystem/file.go:227-242 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/cli/filesystem/file.go:95\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/cli/filesystem/file.go"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"76d070e207fe6ac831d8662921356f0dcbfe7d5ec0bf4454b8d911e87320ea0d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): internal/cli/filesystem/file.go:136-152 | internal/cli/filesystem/file.go:255-270 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/cli/filesystem/file.go:136\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/cli/filesystem/file.go"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"76e51c3b73b3bc5f1a0a6c816d162f08f76c0a9094d3ec2db38498eda7e6d547"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): internal/cli/filesystem/skill.go:695-710 | internal/cli/filesystem/skill.go:731-746 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/cli/filesystem/skill.go:695\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/cli/filesystem/skill.go"},"region":{"startLine":695}}}],"partialFingerprints":{"codehealthFindingId/v1":"2997366ed8623cbb36fcc06f583a640fff48b6d8eb376514eea76246ad2d0f27"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): internal/cli/filesystem/skill.go:881-896 | internal/cli/filesystem/skill.go:938-953 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/cli/filesystem/skill.go:881\u0060 it does not close everything it opens, so those exact 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/cli/filesystem/skill.go"},"region":{"startLine":881}}}],"partialFingerprints":{"codehealthFindingId/v1":"d37975b5169a9514546ca66a925a7144fefdcf073bdf1b6bbf5fb3adbdc741e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): internal/entity/models/vllm.go:163-178 | internal/entity/models/vllm.go:352-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/entity/models/vllm.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/vllm.go"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"947721e377f650c5816001efd3601166ba5c9a5a8f0f06d0f245c22d495edb10"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): internal/handler/chunk.go:79-95 | internal/handler/dataset.go:1230-1245 \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/handler/chunk.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/handler/chunk.go"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"c86311196ce273f15d4b7fbc95c167556b18bb4dc537a5a322217a709325ef91"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 5): internal/entity/models/astraflow.go:102-116 | internal/entity/models/mistral.go:162-177 | internal/entity/models/modelscope.go:99-113 | internal/entity/models/novita.go:94-108 | internal/entity/models/tokenpony.go:81-95 \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/entity/models/astraflow.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":"internal/entity/models/astraflow.go"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b750288c5daac9a9090fed499364e37e4e99c861aab83282ef6b2c769d21b99"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 4): internal/agent/tool/github.go:242-256 | internal/agent/tool/google.go:283-297 | internal/agent/tool/keenable.go:373-387 | internal/agent/tool/querit.go:469-483 \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/agent/tool/github.go:242\u0060 it begins part-way through the construct above it, so those exact 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/agent/tool/github.go"},"region":{"startLine":242}}}],"partialFingerprints":{"codehealthFindingId/v1":"00a487c29e494b0154b98b862db08c63772d4bbb5001fb74420014dc1140d507"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/admin/handler.go:667-681 | internal/handler/system.go:212-226 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/admin/handler.go:667\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/admin/handler.go"},"region":{"startLine":667}}}],"partialFingerprints":{"codehealthFindingId/v1":"0116827f00f736b08cb6ec0b9d4b444806374049d730e01509aec1ba9dde0c6f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/admin/handler.go:1198-1212 | internal/handler/models.go:70-84 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/admin/handler.go:1198\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/admin/handler.go"},"region":{"startLine":1198}}}],"partialFingerprints":{"codehealthFindingId/v1":"3560b84fd5f131524e61fa2c15a28005177c7b79b32488fdd4e30bc133cccef9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/admin/handler_ee.go:1292-1306 | internal/admin/handler_ee.go:1456-1470 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/admin/handler_ee.go:1292\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/admin/handler_ee.go"},"region":{"startLine":1292}}}],"partialFingerprints":{"codehealthFindingId/v1":"4cad82ecc4792969655da812bd6c607f777bd1517b26fd2e3cbb7e4d634019e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/cli/filesystem/dataset.go:149-163 | internal/cli/filesystem/dataset.go:198-212 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/cli/filesystem/dataset.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/cli/filesystem/dataset.go"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e31520a8ad69a17865bdf0b959bae8bcb9ddb3c03a25b58a239c4ba4e4376d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/cli/filesystem/file.go:283-297 | internal/cli/filesystem/file.go:433-447 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/cli/filesystem/file.go:283\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/cli/filesystem/file.go"},"region":{"startLine":283}}}],"partialFingerprints":{"codehealthFindingId/v1":"87c2c914ab6407d7eb2ca316058d8e45b24b639ad7bec2c19480091512ac2590"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/cli/filesystem/skill.go:356-370 | internal/cli/filesystem/skill.go:904-918 \u2014 both copies are in the same file, so extract the block 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/cli/filesystem/skill.go"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"68f6c15c2c2aec81459918702bd0605d1eddf18b66ba0f96eb009f50b54c2153"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/cli/filesystem/skill.go:628-642 | internal/cli/filesystem/skill.go:820-834 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/cli/filesystem/skill.go:628\u0060 it does not close everything it opens, so those exact 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/cli/filesystem/skill.go"},"region":{"startLine":628}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc36ddf47dd9d708ee8ac4b200b1d2609be573cc75b1734d21ab2e5219af7a94"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/cli/response.go:1041-1055 | internal/cli/response.go:1100-1114 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/cli/response.go:1041\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/cli/response.go"},"region":{"startLine":1041}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad573b875dc7718d0e78a409ab864932ea3a0b9af610ad389a41edf9d3b6725c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/engine/elasticsearch/meta_filter.go:487-502 | internal/engine/infinity/meta_filter.go:390-404 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/engine/elasticsearch/meta_filter.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/engine/elasticsearch/meta_filter.go"},"region":{"startLine":487}}}],"partialFingerprints":{"codehealthFindingId/v1":"a37e459720f95c39852920dd81df24f11a041def01f1ee7e9b9049390f6e46f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/entity/models/302ai.go:777-791 | internal/entity/models/mineru.go:293-307 \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/entity/models/302ai.go:777\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/entity/models/302ai.go"},"region":{"startLine":777}}}],"partialFingerprints":{"codehealthFindingId/v1":"919d50ace7e79f4dbfa3b2100e08520025d949aaa9ff71231d77cc7de024a185"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/entity/models/bedrock.go:615-629 | internal/entity/models/bedrock.go:902-916 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/entity/models/bedrock.go:615\u0060 it begins part-way through the construct above it, so those exact 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/entity/models/bedrock.go"},"region":{"startLine":615}}}],"partialFingerprints":{"codehealthFindingId/v1":"a25c028c3a927b66e0113ef478c4e0f7a9dee5f84892a91a066ff68794238ece"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/entity/models/greenpt.go:92-106 | internal/entity/models/openai_api_compatible.go:104-118 \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/entity/models/greenpt.go:92\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/entity/models/greenpt.go"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f9966098d1cd522097c08679fccf4cf5855c4ce3e20c659324a9cefa6daefff"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/entity/models/minimax.go:131-145 | internal/entity/models/minimax.go:191-205 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/entity/models/minimax.go:131\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/entity/models/minimax.go"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"af47f05bc02981228110ccd060c460dc94938347490b127519f9c186c14ce0c8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/entity/models/minimax.go:170-184 | internal/entity/models/moonshot.go:131-145 \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/entity/models/minimax.go"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e75fbb9250d0245ff2ecaca29221276516199d06577e6301d0e2c00169d3dd8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/entity/models/model.go:424-438 | internal/entity/models/model.go:497-511 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/entity/models/model.go:424\u0060 it begins part-way through the construct above it, so those exact 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/entity/models/model.go"},"region":{"startLine":424}}}],"partialFingerprints":{"codehealthFindingId/v1":"42d8e918629adaab0f75b73daa5a4ef74aae79c551cb9cb3baec86b00d5fcdfd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/entity/models/xiaomi.go:313-327 | internal/entity/models/xiaomi.go:507-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/entity/models/xiaomi.go:313\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/entity/models/xiaomi.go"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4be97132a2d4ad55a8123fcd5766aecb829f8e1a3babbf87b47f638cdee3dbd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/handler/chat.go:77-91 | internal/handler/search.go:89-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. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/handler/chat.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":"internal/handler/chat.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b15d724c79b6c09eccbb00760186d0aa64521a6b8c52244209b9b873df00862"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/handler/file.go:160-174 | internal/handler/file.go:195-209 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/handler/file.go:160\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/handler/file.go"},"region":{"startLine":160}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ced1b899eac79ae699de23e96446aad52aad91f67737d7437d52a6390ee5db1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/handler/memory.go:263-277 | internal/handler/memory.go:392-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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/handler/memory.go"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"acb348b798e694c51e4d796fec0b7e6d91df727196730361f1c015d02404402d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/handler/memory.go:278-292 | internal/handler/memory.go:407-421 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/handler/memory.go"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"2db1f2cbea145c76278648d502ad9ce1e52aa7e9b5f6d37506f59759d5e0dcb2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/handler/search.go:201-215 | internal/handler/search.go:260-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/handler/search.go"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0585215d34ce4bc2b53f98e4a68d6a18be8207d5cece5ab215281aefeba9905"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): internal/ingestion/component/chunker/group.go:175-189 | internal/ingestion/component/chunker/hierarchy.go:259-273 \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/ingestion/component/chunker/group.go:175\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/ingestion/component/chunker/group.go"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"272a97a4e7bc9b6cf3b1714f53ce20c4152de1edad3e7115ec20c2ec792d7b37"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 5): internal/entity/models/302ai.go:395-408 | internal/entity/models/cometapi.go:393-406 | internal/entity/models/funasr.go:118-131 | internal/entity/models/groq.go:280-293 | internal/entity/models/siliconflow.go:542-555 \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/entity/models/302ai.go:395\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/entity/models/302ai.go"},"region":{"startLine":395}}}],"partialFingerprints":{"codehealthFindingId/v1":"3bbb9d8196cfe758ccc0db2a339039f9e62f20ce9d7aff998003b308b467bc8d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 5): internal/entity/models/localai.go:100-115 | internal/entity/models/longcat.go:111-126 | internal/entity/models/nvidia.go:102-115 | internal/entity/models/stepfun.go:84-99 | internal/entity/models/upstage.go:89-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/entity/models/localai.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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/entity/models/localai.go"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"dcf75b99eb344d69553ac004c8a9d4dee37a8dd53e1e5beb95eeae483ab1c42f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 4): internal/admin/handler_ee.go:1334-1347 | internal/admin/handler_ee.go:1374-1387 | internal/admin/handler_ee.go:1414-1427 | internal/admin/handler_ee.go:1466-1479 \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/admin/handler_ee.go:1334\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/admin/handler_ee.go"},"region":{"startLine":1334}}}],"partialFingerprints":{"codehealthFindingId/v1":"29bf7c0b6106c800bd07aa72af531f6cf144d9ff4c4fc8afcbebdbacf76f59f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 4): internal/entity/models/fishaudio.go:313-326 | internal/entity/models/minimax.go:510-524 | internal/entity/models/stepfun.go:324-337 | internal/entity/models/togetherai.go:619-632 \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/entity/models/fishaudio.go:313\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/entity/models/fishaudio.go"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f19d56388647fd2a70e89b1f4ddf12b7ea0f0b9c900e21c8281072991a8e25a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): internal/entity/models/aliyun.go:332-345 | internal/entity/models/gitee.go:292-305 | internal/entity/models/zhipu-ai.go:389-402 \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/entity/models/aliyun.go:332\u0060 it begins part-way through the construct above it, so those exact 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/entity/models/aliyun.go"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c3e8ba831efb08abded2e51bd7d490b549d3d6b57ee3759085e7ad3aafa914b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): internal/entity/models/azure_openai.go:246-259 | internal/entity/models/xai.go:141-154 | internal/entity/models/xunfei.go:216-229 \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/entity/models/azure_openai.go"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"629c6da53fe31938431fa7d8ccb508abb8cdbb28979c6bc67a9104ab1d2f61ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): internal/entity/models/lmstudio.go:149-162 | internal/entity/models/ollama.go:136-149 | internal/entity/models/vllm.go:159-172 \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/entity/models/lmstudio.go:149\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/lmstudio.go"},"region":{"startLine":149}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cec09505e89a8f4a70112ff8dfe94d5c9943d250212c9c305df2ba0d08eda19"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): internal/handler/document.go:118-131 | internal/handler/document.go:293-306 | internal/handler/document.go:346-359 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it 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/handler/document.go"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"952d2251f693b7648cffed1ac59f1c9d375c498604e05f3f2c832183a2d7a1b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/admin/handler_ee.go:1169-1182 | internal/admin/handler_ee.go:1197-1210 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/admin/handler_ee.go:1169\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/admin/handler_ee.go"},"region":{"startLine":1169}}}],"partialFingerprints":{"codehealthFindingId/v1":"49337a70cab71a7e8172eff2e94e6cb111341988d19b6ed75729358272679bd2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/agent/component/agent.go:377-390 | internal/agent/component/agent.go:589-602 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/agent/component/agent.go:377\u0060 it begins part-way through the construct above it, so those exact 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/agent/component/agent.go"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"fec7537e1b4dad0a082482cba01e8ae58940726662e8b9482e879fb60f6648c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/agent/component/llm.go:1249-1262 | internal/agent/tool/retrieval_nlp.go:619-632 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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":"internal/agent/component/llm.go"},"region":{"startLine":1249}}}],"partialFingerprints":{"codehealthFindingId/v1":"755f3c032995e2670fff9da587e7120921c34dd54c4bc353cce12fe315a3938e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/cli/admin_command.go:323-336 | internal/cli/admin_command.go:359-372 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/cli/admin_command.go:323\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/cli/admin_command.go"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"c74b85805bb8dcbdeee80c563150a7121ab0d2e29dc3576d957b83c0685afddd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/cli/admin_command.go:2750-2763 | internal/cli/admin_command.go:2843-2856 \u2014 both copies are in the same file, so extract the block into one function there 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/cli/admin_command.go"},"region":{"startLine":2750}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9e067a7ceca90bdf4ad80a49277508405c70b7f494dde2c84976fd1bc2b12e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/dao/chat.go:83-96 | internal/dao/search.go:76-89 \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/dao/chat.go:83\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/dao/chat.go"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b654547ec110029c6703e32d0f7668ab3eda69d68a251354be92d4988f2bf7f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/dao/chat.go:132-145 | internal/dao/search.go:125-138 \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/dao/chat.go"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"964842c777158751432d681ed5e331156049d1c61b410ada2ff2931c8aa30334"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/entity/models/aliyun.go:211-224 | internal/entity/models/gitee.go:161-174 \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/entity/models/aliyun.go:211\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/entity/models/aliyun.go"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"78dade81c07cb1df6ab48ef4ce9c66d0201ad881a448f8af4022f2a701751112"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/entity/models/astraflow.go:276-289 | internal/entity/models/togetherai.go:314-327 \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/entity/models/astraflow.go:276\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/astraflow.go"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"b983d69f4fe12c0adbfecd79b299b79051c396e6b0a43bfc5ff06673d2d0a417"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/entity/models/baidu.go:320-333 | internal/entity/models/cohere.go:469-482 \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/entity/models/baidu.go:320\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/entity/models/baidu.go"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"3470976f75a110546fb8a148c2ba728d0a8af39e335504b53be70e1db1a3ec18"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/entity/models/base_model.go:340-353 | internal/entity/models/base_model.go:370-383 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/entity/models/base_model.go:340\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/entity/models/base_model.go"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"8013373c160f873e8e8091ef4cc82ed58734267af5c467910ae6cb164b66e091"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/entity/models/cohere.go:158-171 | internal/entity/models/cohere.go:254-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 \u0060internal/entity/models/cohere.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/entity/models/cohere.go"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"23339c65f0930810520e6ef21be27098a51cf768e565475bc37bf27da404435f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/entity/models/cometapi.go:447-460 | internal/entity/models/siliconflow.go:599-612 \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/entity/models/cometapi.go:447\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/entity/models/cometapi.go"},"region":{"startLine":447}}}],"partialFingerprints":{"codehealthFindingId/v1":"df7b013ec3bd6ca792f5c52f25ad3b072b4eea10a0320046a2164d49afc2974f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/entity/models/fishaudio.go:158-171 | internal/entity/models/xinference.go:428-441 \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/entity/models/fishaudio.go:158\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/fishaudio.go"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"b96c2007f2c30ad17a9dfe7677cd8d50b6083cc77f0c18486b51f4ec8c12e384"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/entity/models/gitee.go:379-392 | internal/entity/models/gitee.go:476-489 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/entity/models/gitee.go:379\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/entity/models/gitee.go"},"region":{"startLine":379}}}],"partialFingerprints":{"codehealthFindingId/v1":"479e3c4bd64dac790d697a1648926c967861afb027e11779966ab0cb580a16cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/entity/models/gpustack.go:92-105 | internal/entity/models/jina.go:132-145 \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/entity/models/gpustack.go:92\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/gpustack.go"},"region":{"startLine":92}}}],"partialFingerprints":{"codehealthFindingId/v1":"170a2774d141f1f0e5268a2d16d86929bdafba50e4e23100f6103503d66d7246"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/entity/models/localai.go:269-282 | internal/entity/models/vllm.go:376-389 \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/entity/models/localai.go:269\u0060 it begins part-way through the construct above it, so those exact 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/entity/models/localai.go"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"b84b7723d1bc101a28ebc964bc2cc37de4071da2c8ad65e578ecab8cfbe96d14"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/entity/models/orcarouter.go:142-155 | internal/entity/models/siliconflow.go:641-654 \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/entity/models/orcarouter.go:142\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/entity/models/orcarouter.go"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"c416da4714f384c0817338d475d939b4f18fc19373dfe7e962d9f4ea13a50d99"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/entity/models/siliconflow.go:690-703 | internal/entity/models/stepfun.go:260-273 \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/entity/models/siliconflow.go:690\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/entity/models/siliconflow.go"},"region":{"startLine":690}}}],"partialFingerprints":{"codehealthFindingId/v1":"39df4ea8a635cbd8210e5550af9afaab143918f116075a8c1970f3f53975e843"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/handler/agent.go:197-210 | internal/handler/search.go:99-112 \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/handler/agent.go:197\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/handler/agent.go"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a5dd53d99953779debd0457b8115dc5602e65de878924e6a3c72a4868a0348a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/harness/core/middlewares/telemetry/telemetry.go:143-156 | internal/harness/core/middlewares/telemetry/telemetry.go:198-211 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/harness/core/middlewares/telemetry/telemetry.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":"internal/harness/core/middlewares/telemetry/telemetry.go"},"region":{"startLine":143}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d53e233316474cbd2868b2b782f9249d6d14613afa4cd01e4cb026878221337"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/harness/core/model_chain.go:44-57 | internal/harness/core/model_chain.go:161-174 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/harness/core/model_chain.go:44\u0060 it does not close everything it opens, so those exact 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/harness/core/model_chain.go"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f59011c19de177f4f37b90f9843ea60e10763d13cd09d8d2fb036ecf981cf7c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/harness/graph/store/memory.go:106-119 | internal/harness/graph/store/memory.go:140-153 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. 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/harness/graph/store/memory.go"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bff490159a8bd75107bef97c9b8ead4343617302a99d20f5c66b352fc0ff59c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/harness/graph/types/scratchpad.go:735-748 | internal/harness/graph/types/scratchpad.go:764-777 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/harness/graph/types/scratchpad.go:735\u0060 it begins part-way through the construct above it, so those exact 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/harness/graph/types/scratchpad.go"},"region":{"startLine":735}}}],"partialFingerprints":{"codehealthFindingId/v1":"246ff28eb3a60e8157245af3056b390bfcefdb08fded1912d3c8d66d48cf3ace"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): internal/ingestion/component/chunker/one.go:85-98 | internal/ingestion/component/chunker/table.go:84-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/ingestion/component/chunker/one.go:85\u0060 it begins part-way through the construct above it, so those exact 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/ingestion/component/chunker/one.go"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"e04e0522e8fa7b18b6605715d8f33faeb1bb5567f39a933c5d3e569c112efb81"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 15): internal/entity/models/aliyun.go:103-115 | internal/entity/models/baichuan.go:76-88 | internal/entity/models/baidu.go:123-135 | internal/entity/models/cohere.go:233-245 | internal/entity/models/deepinfra.go:100-112 | internal/entity/models/deepseek.go:146-158 | internal/entity/models/futurmix.go:99-111 | internal/entity/models/huggingface.go:91-103 | internal/entity/models/lmstudio.go:104-116 | internal/entity/models/orcarouter.go:81-93 | internal/entity/models/siliconflow.go:95-107 | internal/entity/models/vllm.go:104-116 | internal/entity/models/volcengine.go:161-173 | internal/entity/models/xunfei.go:133-145 | internal/entity/models/zhipu-ai.go:100-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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/entity/models/aliyun.go"},"region":{"startLine":103}}}],"partialFingerprints":{"codehealthFindingId/v1":"44d480b7db8042624e2ca64e6f942237a13a74108308fc65a95fb04c1a00ab54"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 15): internal/entity/models/astraflow.go:200-212 | internal/entity/models/baidu.go:226-238 | internal/entity/models/gitee.go:177-189 | internal/entity/models/gpustack.go:216-228 | internal/entity/models/lmstudio.go:171-183 | internal/entity/models/localai.go:162-174 | internal/entity/models/novita.go:399-411 | internal/entity/models/ollama.go:158-170 | internal/entity/models/openai.go:178-190 | internal/entity/models/openrouter.go:166-179 | internal/entity/models/perplexity.go:221-233 | internal/entity/models/ragcon.go:157-169 | internal/entity/models/togetherai.go:232-244 | internal/entity/models/vllm.go:181-193 | internal/entity/models/xinference.go:165-177 \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/entity/models/astraflow.go:200\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/entity/models/astraflow.go"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"8972d5a0aad3d574354906ced0c1b3a0b128df0f34f126021b87b7882ec11b15"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 8): internal/entity/models/302ai.go:286-298 | internal/entity/models/baidu.go:328-340 | internal/entity/models/cohere.go:477-489 | internal/entity/models/jina.go:291-303 | internal/entity/models/novita.go:522-534 | internal/entity/models/ppio.go:312-324 | internal/entity/models/ragcon.go:232-244 | internal/entity/models/xinference.go:280-292 \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/entity/models/302ai.go:286\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/entity/models/302ai.go"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad35ff3dcd72153910499f104353232be1637a8ccc8390db9a97862308d56486"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 6): internal/entity/models/huggingface.go:181-193 | internal/entity/models/lmstudio.go:213-225 | internal/entity/models/nvidia.go:206-218 | internal/entity/models/openai.go:218-230 | internal/entity/models/vllm.go:223-235 | internal/entity/models/zhipu-ai.go:220-232 \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/entity/models/huggingface.go:181\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/entity/models/huggingface.go"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b25aa66889b1b5d31ce3e59b5eed75382ef0c03092383ca611db2ff62245e0b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 5): internal/agent/tool/arxiv.go:328-340 | internal/agent/tool/duckduckgo.go:284-296 | internal/agent/tool/google_scholar.go:261-273 | internal/agent/tool/pubmed.go:289-301 | internal/agent/tool/wikipedia.go:317-329 \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/agent/tool/arxiv.go"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc2fdd0e1155f41ff64a7c0989582704fae007c55e3d50a4a9c8e4c4cb968c95"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 4): internal/entity/models/302ai.go:322-334 | internal/entity/models/astraflow.go:317-329 | internal/entity/models/baidu.go:364-376 | internal/entity/models/togetherai.go:355-367 \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/entity/models/302ai.go:322\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/302ai.go"},"region":{"startLine":322}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8d66cb6e306239a8ace48b1e523f312d113686d3ad80b3ff196ee16c0014f89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 4): internal/entity/models/avian.go:67-79 | internal/entity/models/perplexity.go:72-84 | internal/entity/models/ragcon.go:73-85 | internal/entity/models/togetherai.go:89-101 \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/entity/models/avian.go"},"region":{"startLine":67}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9204f1c8e1af02dbb41760efff65e8a686abb6d86d56466054a0a48d4707f30"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 4): internal/entity/models/avian.go:100-112 | internal/entity/models/perplexity.go:106-118 | internal/entity/models/ragcon.go:108-120 | internal/entity/models/togetherai.go:123-135 \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/entity/models/avian.go"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"593eace62eddf085f859fbc5fb72aac22df37c427ca48b2c15588179785cdf89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 4): internal/entity/models/cometapi.go:489-501 | internal/entity/models/groq.go:374-386 | internal/entity/models/stepfun.go:214-226 | internal/entity/models/togetherai.go:505-517 \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/entity/models/cometapi.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/entity/models/cometapi.go"},"region":{"startLine":489}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a295a569b58da24d60ef9885e45e46ae599dca27b02b8e86980ab52f0d81938"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 4): internal/entity/models/deepseek.go:211-223 | internal/entity/models/huggingface.go:229-241 | internal/entity/models/openrouter.go:521-533 | internal/entity/models/siliconflow.go:234-246 \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/entity/models/deepseek.go:211\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/entity/models/deepseek.go"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"26598d4ff425645e6ee3033a00e2142ce9b119d6097417f881c78a39045d3366"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): internal/engine/elasticsearch/meta_filter.go:374-388 | internal/engine/infinity/chunk.go:1937-1949 | internal/engine/serenedb/search.go:436-448 \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 \u0060internal/engine/elasticsearch/meta_filter.go:374\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/engine/elasticsearch/meta_filter.go"},"region":{"startLine":374}}}],"partialFingerprints":{"codehealthFindingId/v1":"1932f400e126e6540014376dc07a2c3fe4643a762265fc060c9b4a19985a51cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): internal/entity/models/302ai.go:229-241 | internal/entity/models/astraflow.go:235-247 | internal/entity/models/tokenhub.go:167-179 \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/entity/models/302ai.go:229\u0060 it does not close everything it opens, so those exact 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/entity/models/302ai.go"},"region":{"startLine":229}}}],"partialFingerprints":{"codehealthFindingId/v1":"83c1960b77dd9fa7531f36bd83929d4bbc866d38fd4a587ddbe100af9da182a8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): internal/entity/models/deepinfra.go:351-363 | internal/entity/models/fishaudio.go:107-120 | internal/entity/models/togetherai.go:414-427 \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/entity/models/deepinfra.go:351\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/deepinfra.go"},"region":{"startLine":351}}}],"partialFingerprints":{"codehealthFindingId/v1":"952aa384809f8660b3d851d1a279e8c054c6ce8dbd3937ea8ade29c8a40fe5ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): internal/entity/models/fishaudio.go:112-124 | internal/entity/models/togetherai.go:419-431 | internal/entity/models/xinference.go:383-395 \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/entity/models/fishaudio.go:112\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/entity/models/fishaudio.go"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"321da706b6a8fe5ff940a03162e9a747eae235408a1bfd581f7fe6d853b584c9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): internal/entity/models/openrouter.go:464-476 | internal/entity/models/orcarouter.go:148-160 | internal/entity/models/siliconflow.go:647-659 \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/entity/models/openrouter.go:464\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/entity/models/openrouter.go"},"region":{"startLine":464}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a9f2122d068ab6362a1ebe7251783624db2c756f30432757fc8f5ffca9f42dc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): internal/handler/file_commit.go:307-319 | internal/handler/file_commit.go:365-377 | internal/handler/file_commit.go:492-504 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it 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/handler/file_commit.go"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"95ace5b50dd51e1af96f41437c75ea8427e05bcfb1d744ff3c8f495cd93a5152"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): internal/handler/memory.go:201-213 | internal/handler/memory.go:262-274 | internal/handler/memory.go:391-403 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/handler/memory.go"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"80daa5aec7687204ba50bf1c9d06ae132ff7bb45b160b51c6d2efa5df4b48f8e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/admin/handler.go:1173-1185 | internal/handler/models.go:44-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 \u0060internal/admin/handler.go:1173\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/admin/handler.go"},"region":{"startLine":1173}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac841b6eba20d5289101ca1b614504d134d95fe3b6434ead085a627586f64a2a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/agent/sandbox/e2b.go:222-235 | internal/agent/sandbox/tenki.go:202-214 \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/agent/sandbox/e2b.go"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"05011f4c72c47b3d005aac5db96a72286bf62ed72fb885b7ec5bd3e5d160ce5a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/agent/sandbox/e2b.go:237-249 | internal/agent/sandbox/tenki.go:215-228 \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/agent/sandbox/e2b.go"},"region":{"startLine":237}}}],"partialFingerprints":{"codehealthFindingId/v1":"63a2a8e81db831b81c12717f74ea8faccd0a249a2d347e669477779691a264b1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/agent/workflowx/loop.go:629-641 | internal/agent/workflowx/loop.go:656-668 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/agent/workflowx/loop.go:629\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/agent/workflowx/loop.go"},"region":{"startLine":629}}}],"partialFingerprints":{"codehealthFindingId/v1":"a914f28d9b245ee405ff6b799771a740928be881747ba737670417be8df418d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/channels/dingtalk.go:517-529 | internal/channels/feishu.go:439-451 \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/channels/dingtalk.go:517\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/channels/dingtalk.go"},"region":{"startLine":517}}}],"partialFingerprints":{"codehealthFindingId/v1":"7df00dd3b072c0d3111d1fcc2db80efdcc44781e09f70e50c35d84611fd7eeb1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/channels/discord.go:518-531 | internal/channels/whatsapp.go:440-452 \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/channels/discord.go:518\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/channels/discord.go"},"region":{"startLine":518}}}],"partialFingerprints":{"codehealthFindingId/v1":"6784b50451318c12a8fbaeb3c04237d8a82b853c5e6d0a9242af46763ccb8b7a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/cli/admin_command.go:415-427 | internal/cli/admin_command.go:533-545 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/cli/admin_command.go:415\u0060 it does not close everything it opens, so those exact 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/cli/admin_command.go"},"region":{"startLine":415}}}],"partialFingerprints":{"codehealthFindingId/v1":"5eb3bcd16526e5982a0a64431760d254230d6bc10e85ebacb3031ca0c406ebbc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/cli/filesystem/skill.go:387-399 | internal/cli/filesystem/skill.go:948-960 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/cli/filesystem/skill.go:387\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/cli/filesystem/skill.go"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5d40bd941996f298c472722887370a493a6b5606914f141c173be881415ca71"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/cli/filesystem/skill.go:1389-1401 | internal/cli/filesystem/skill.go:2095-2107 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/cli/filesystem/skill.go:1389\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/cli/filesystem/skill.go"},"region":{"startLine":1389}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a6927c9d55267b80bf5bf94d38591118ad8d0c10b62b50fc40f162a160637e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/cli/http_client.go:140-152 | internal/cli/http_client.go:210-222 \u2014 both copies are in the same file, so extract the block 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/cli/http_client.go"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd4cb1351dffe2bd3f39c819341a17207c94c55a3f25691072fa1ae4b979a12e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/cli/response.go:901-913 | internal/cli/response.go:1276-1288 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/cli/response.go:901\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/cli/response.go"},"region":{"startLine":901}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3f44d07d7618a9014757e515a3042d2dac380e20adffd938409e4b82853c9e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/engine/elasticsearch/chunk.go:1643-1655 | internal/engine/infinity/chunk.go:1465-1477 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/engine/elasticsearch/chunk.go:1643\u0060 it does not close everything it opens, so those exact 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/engine/elasticsearch/chunk.go"},"region":{"startLine":1643}}}],"partialFingerprints":{"codehealthFindingId/v1":"d716b9f79b53252d35e74bdc9d0b28f03c87db19b1844fae3927acc15962921a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/engine/elasticsearch/chunk.go:3030-3042 | internal/engine/infinity/chunk.go:2334-2346 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/engine/elasticsearch/chunk.go:3030\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/engine/elasticsearch/chunk.go"},"region":{"startLine":3030}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae5c951983d076c825ab5cf67c3a2ae1374528d6448f0abf6214efcc5031f546"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/entity/models/302ai.go:194-206 | internal/entity/models/jiekouai.go:195-207 \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/entity/models/302ai.go:194\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also 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/entity/models/302ai.go"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff4afd04f15ea29a5bedfaf7d6ae44b18ee797e89cc235e4831f062950a1f1a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/entity/models/302ai.go:556-568 | internal/entity/models/mistral.go:647-659 \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/entity/models/302ai.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/entity/models/302ai.go"},"region":{"startLine":556}}}],"partialFingerprints":{"codehealthFindingId/v1":"36fcc0b63c7260883c89b0cbad77494f6a09746fc3ade3f533f79f0968ae14df"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/entity/models/aliyun.go:307-319 | internal/entity/models/gitee.go:269-282 \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/entity/models/aliyun.go:307\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/aliyun.go"},"region":{"startLine":307}}}],"partialFingerprints":{"codehealthFindingId/v1":"0a4af859c35c73acfc836867069a10ab16bc3bbcd33ddbab48afbc5adb301316"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/entity/models/astraflow.go:368-380 | internal/entity/models/xinference.go:471-483 \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/entity/models/astraflow.go:368\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/astraflow.go"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"8a2eaf784f1a3d75e9aef5f926cc9ca35de71d2fadc10afb63ee4f67ead8f3f8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/entity/models/baidu.go:284-296 | internal/entity/models/huaweicloud.go:343-355 \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/entity/models/baidu.go:284\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/entity/models/baidu.go"},"region":{"startLine":284}}}],"partialFingerprints":{"codehealthFindingId/v1":"f07a7ef432ab696250372ce003f3f39d739ffbb87239907d0cd1519b9d4811fd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/entity/models/bedrock.go:878-890 | internal/entity/models/bedrock.go:982-994 \u2014 both copies are in the same file, so extract the block 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/entity/models/bedrock.go"},"region":{"startLine":878}}}],"partialFingerprints":{"codehealthFindingId/v1":"35fc6f582f842b1940e57519070f4d1cd95a2af0062c1882ccb626377f1ac991"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/entity/models/cohere.go:577-589 | internal/entity/models/xinference.go:378-391 \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/entity/models/cohere.go:577\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/entity/models/cohere.go"},"region":{"startLine":577}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ab86a60d3cbda831143cb614c3c7d21dd2e186f35531e44c42e3f273a1869c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/entity/models/deepinfra.go:243-255 | internal/entity/models/huaweicloud.go:396-408 \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/entity/models/deepinfra.go:243\u0060 it begins part-way through the construct above it, so those exact 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/entity/models/deepinfra.go"},"region":{"startLine":243}}}],"partialFingerprints":{"codehealthFindingId/v1":"5be9eda06aefe80e7f7f42d8ae9515e4fe27e5b7ad5f51574a752465f45dc353"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/entity/models/deepinfra.go:447-459 | internal/entity/models/deepinfra.go:525-537 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/entity/models/deepinfra.go:447\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/entity/models/deepinfra.go"},"region":{"startLine":447}}}],"partialFingerprints":{"codehealthFindingId/v1":"df220d3ed00433b5db4053139fa84a647193bfd6ef8b174035c4eba19fbf7d01"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/entity/models/fishaudio.go:201-213 | internal/entity/models/fishaudio.go:264-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/entity/models/fishaudio.go:201\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/fishaudio.go"},"region":{"startLine":201}}}],"partialFingerprints":{"codehealthFindingId/v1":"063c76743287636e0389dacb20c8179ece1113a40ca9e130b7d0d9bc010139b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/entity/models/fishaudio.go:249-261 | internal/entity/models/togetherai.go:549-561 \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/entity/models/fishaudio.go"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"e82c1bc2b8226765f88d901f28dbf08edfa8104b5e0a78735b62337c2c88a5fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/entity/models/gitee.go:222-234 | internal/entity/models/openrouter.go:212-224 \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/entity/models/gitee.go:222\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/gitee.go"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9e9cf1b1e9d163717bdc6be6dc03df4b4cc640bdfef41b23551146893d7c0bb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/entity/models/gitee.go:668-680 | internal/entity/models/novita.go:589-601 \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/entity/models/gitee.go:668\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/gitee.go"},"region":{"startLine":668}}}],"partialFingerprints":{"codehealthFindingId/v1":"69c8af9a3b0ee5ca1ffbfc5be968a79c20285853195c7e7cec1426793c20564d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/entity/models/huggingface.go:106-118 | internal/entity/models/lmstudio.go:124-136 \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/entity/models/huggingface.go"},"region":{"startLine":106}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f92763093ddd93855253baa11b38659202c8a20b70e2d5001fcd71659ff0aaf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/entity/models/jiekouai.go:327-339 | internal/entity/models/openrouter.go:320-332 \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/entity/models/jiekouai.go:327\u0060 it begins part-way through the construct above it, so those exact 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/entity/models/jiekouai.go"},"region":{"startLine":327}}}],"partialFingerprints":{"codehealthFindingId/v1":"beb00997f3c6a073707b4564d094ccd6edc042e8b6cafbea4399a1566220760f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/entity/models/jina.go:95-107 | internal/entity/models/xiaomi.go:63-75 \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/entity/models/jina.go:95\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/entity/models/jina.go"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cdcddbe7612cc573aac87f0d049bdbc8ee1db490f2ccac631923abf909aa415"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/entity/models/lmstudio.go:261-273 | internal/entity/models/vllm.go:238-250 \u2014 before extracting anything, compare \u0060internal/entity/models/lmstudio.go\u0060 and \u0060internal/entity/models/vllm.go\u0060 as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 147 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other 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/entity/models/lmstudio.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/entity/models/lmstudio.go"},"region":{"startLine":261}}}],"partialFingerprints":{"codehealthFindingId/v1":"b09b7b1e494fbc4210b1279bf26e7e1da175021e28b2a5903035c388da808933"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/entity/models/mistral.go:235-247 | internal/entity/models/voyage.go:87-99 \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/entity/models/mistral.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/mistral.go"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"22437a12f921867814fb4b5db049aa04f60c315ab27ff1d6c8a1de5bc97526c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/entity/models/openai.go:98-110 | internal/entity/models/xai.go:93-105 \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/entity/models/openai.go"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"e269a99f12dba1c230a7df7d3b98d535bc52e510364a3c2360a68f0813adb89d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/entity/models/openai.go:459-471 | internal/entity/models/ragcon.go:608-620 \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/entity/models/openai.go:459\u0060 it begins part-way through the construct above it, so those exact 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/entity/models/openai.go"},"region":{"startLine":459}}}],"partialFingerprints":{"codehealthFindingId/v1":"c29d394bd820757024353024bf6a4e218df2afac25b9d9e5a827bf2995c61d70"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/entity/models/openai.go:527-539 | internal/entity/models/ragcon.go:382-394 \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/entity/models/openai.go:527\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/entity/models/openai.go"},"region":{"startLine":527}}}],"partialFingerprints":{"codehealthFindingId/v1":"2004839277fdf2ee7e123720c1697b79d73661ded758f90c524c965dc5592a32"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/entity/models/openai.go:586-598 | internal/entity/models/ragcon.go:538-550 \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/entity/models/openai.go:586\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/entity/models/openai.go"},"region":{"startLine":586}}}],"partialFingerprints":{"codehealthFindingId/v1":"69684bc9e744cad7369660720a77260b268efdda06bb7bef586938e74f5b488d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/entity/models/openai_api_compatible.go:272-284 | internal/entity/models/togetherai.go:572-584 \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/entity/models/openai_api_compatible.go:272\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/entity/models/openai_api_compatible.go"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"127aa0663ecc2d6ad2877a2fecb7a9f85b9f26e4ee59a584599f9e90000b9d2e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/entity/models/siliconflow.go:711-723 | internal/entity/models/stepfun.go:281-293 \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/entity/models/siliconflow.go:711\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/entity/models/siliconflow.go"},"region":{"startLine":711}}}],"partialFingerprints":{"codehealthFindingId/v1":"b19578fd4dab0b4db9c18f177e87e97d61ae1a597d1882bd7a184f54af427dbf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/entity/models/volcengine.go:559-571 | internal/entity/models/zhipu-ai.go:287-300 \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/entity/models/volcengine.go:559\u0060 it begins part-way through the construct above it, so those exact 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/entity/models/volcengine.go"},"region":{"startLine":559}}}],"partialFingerprints":{"codehealthFindingId/v1":"59a6f679c226321bb40fba7b4d4166e35396d99d7658aaa0c3b7f0a84291b9b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/handler/chat.go:232-244 | internal/handler/chat.go:327-341 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/handler/chat.go"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4aabfee74ec6993f4ce429a174d51d505831b0ee3c394dc904cb11e9d0312bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/handler/chat_session.go:348-360 | internal/handler/chat_session.go:396-408 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/handler/chat_session.go:348\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/handler/chat_session.go"},"region":{"startLine":348}}}],"partialFingerprints":{"codehealthFindingId/v1":"44b549e4d57e77e7d12c60f7c80741a481fda38af08850dd8e2c43bac13f9fd5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/handler/chunk.go:287-299 | internal/handler/dataset.go:1298-1310 \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/handler/chunk.go"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"99021fd6420eda847ac15287ef5a9f39e5feadaf943a31930940b0026e0a8d77"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/handler/dataset.go:102-114 | internal/handler/dataset.go:116-128 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/handler/dataset.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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/handler/dataset.go"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3cc54646814e42f3b32d7b27d7cd47e40dd948783589195b0cdf86b12c46fba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/handler/file_commit.go:185-197 | internal/handler/file_commit.go:458-470 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/handler/file_commit.go"},"region":{"startLine":185}}}],"partialFingerprints":{"codehealthFindingId/v1":"2779bebe33e3fbece62f07196424808e3350876de838de08e9299d47ceb77b29"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/handler/file_commit.go:248-260 | internal/handler/file_commit.go:279-292 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/handler/file_commit.go:248\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/handler/file_commit.go"},"region":{"startLine":248}}}],"partialFingerprints":{"codehealthFindingId/v1":"885cc4cf01bbec96685a36d622d29b05d5db566230bb54e97aa444dd3a454d6c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/handler/memory.go:784-796 | internal/handler/memory.go:857-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/handler/memory.go"},"region":{"startLine":784}}}],"partialFingerprints":{"codehealthFindingId/v1":"33eedf328894dcb3780fa309ae8a15a340011fa3ad9c590384875e2dbb5070c5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/handler/providers.go:335-347 | internal/handler/providers.go:360-373 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/handler/providers.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/handler/providers.go"},"region":{"startLine":335}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc382ba8143551ea6662d5dec4eb33abf690caa4e7a4cd6a3e46a71936b13406"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/handler/skill_search.go:421-433 | internal/handler/skill_search.go:509-521 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/handler/skill_search.go"},"region":{"startLine":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"c62a149da80aadb9c333ce9327493571d2fe3d614ebb8e499a4c3d80874b8759"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/harness/core/callback.go:102-114 | internal/harness/core/callback.go:145-157 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/harness/core/callback.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":"internal/harness/core/callback.go"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"a52f7063a8448b6d71de2252fb8cb1e0f24d185db5e1df384442653d2e473b23"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/harness/graph/channels/barrier.go:71-83 | internal/harness/graph/channels/barrier.go:259-271 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/harness/graph/channels/barrier.go:71\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/harness/graph/channels/barrier.go"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b81a00889e9bbdd3f86e5942d1c21c1d4b65bc061f68c4f24b9ca25ccbce6c7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/harness/graph/checkpoint/checkpoint.go:644-657 | internal/harness/graph/checkpoint/checkpoint.go:739-751 \u2014 both copies are in the same file, so extract the block 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/harness/graph/checkpoint/checkpoint.go"},"region":{"startLine":644}}}],"partialFingerprints":{"codehealthFindingId/v1":"c26e968fb984ff8890bd3d9495ec642d03e7a2530858a5d7d492f06a82756afa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/harness/graph/pregel/async.go:94-106 | internal/harness/graph/pregel/async.go:149-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/harness/graph/pregel/async.go:94\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/harness/graph/pregel/async.go"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"91fe412f5a4b5c02debf40acbfe54d525dcdcbfcf91dbcda532e5395ae8b79b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/ingestion/component/chunker/group.go:124-136 | internal/ingestion/component/chunker/hierarchy.go:154-166 \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/ingestion/component/chunker/group.go:124\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ingestion/component/chunker/group.go"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b2a20ec8d613a9ae3183aa5abb62770d96371b42a51b112c17aac623527d710"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/ingestion/component/extractor.go:747-759 | internal/ingestion/component/extractor.go:783-795 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ingestion/component/extractor.go:747\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/ingestion/component/extractor.go"},"region":{"startLine":747}}}],"partialFingerprints":{"codehealthFindingId/v1":"70ee38a48f95d207101c0a05e0e7757ad8b390b10b0d087ff70d929a155f3952"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): internal/ingestion/component/extractor.go:1235-1247 | internal/ingestion/component/extractor.go:1272-1284 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/ingestion/component/extractor.go:1235\u0060 it does not close everything it opens, so those exact 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/ingestion/component/extractor.go"},"region":{"startLine":1235}}}],"partialFingerprints":{"codehealthFindingId/v1":"fa02ec5f86fa2ffc730b7d8d5fbe2e9c28189bb7c2433ac4c5c6ab4eaef437a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 9): internal/entity/models/astraflow.go:73-84 | internal/entity/models/hunyuan.go:73-84 | internal/entity/models/longcat.go:83-95 | internal/entity/models/novita.go:58-69 | internal/entity/models/openai.go:63-75 | internal/entity/models/stepfun.go:58-70 | internal/entity/models/tokenpony.go:56-67 | internal/entity/models/upstage.go:57-69 | internal/entity/models/xai.go:68-80 \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/entity/models/astraflow.go:73\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/astraflow.go"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd40c4a61cb0a5d46fb3cae54de592fcaf6a74e070e7738a0a936ac9c09a5148"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 8): internal/entity/models/cohere.go:547-558 | internal/entity/models/cometapi.go:354-365 | internal/entity/models/fishaudio.go:76-87 | internal/entity/models/groq.go:238-249 | internal/entity/models/siliconflow.go:500-511 | internal/entity/models/togetherai.go:383-394 | internal/entity/models/xai.go:179-190 | internal/entity/models/xinference.go:343-354 \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/entity/models/cohere.go:547\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/entity/models/cohere.go"},"region":{"startLine":547}}}],"partialFingerprints":{"codehealthFindingId/v1":"38b7a196b0504a9d3a16c5ccb42715a72271288cd8cc8be767eea7497f6dbe1e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 7): internal/handler/dataset.go:641-652 | internal/handler/dataset.go:816-827 | internal/handler/dataset.go:869-880 | internal/handler/dataset.go:931-942 | internal/handler/dataset.go:1014-1025 | internal/handler/dataset.go:1045-1056 | internal/handler/dataset.go:1081-1092 \u2014 all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/handler/dataset.go"},"region":{"startLine":641}}}],"partialFingerprints":{"codehealthFindingId/v1":"84e60dc3acfbfebe09f076aa6a5081dc9ae6e114339cb6ce5acf57acb255d4f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): internal/cli/filesystem/skill.go:1290-1301 | internal/cli/filesystem/skill.go:1322-1333 | internal/cli/filesystem/skill.go:1991-2002 | internal/cli/filesystem/skill.go:2023-2034 \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/cli/filesystem/skill.go:1290\u0060 it begins part-way through the construct above it, so those exact 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/cli/filesystem/skill.go"},"region":{"startLine":1290}}}],"partialFingerprints":{"codehealthFindingId/v1":"76acae224c70d7373e7612944cca72836628de512944e485719bdda8b9be52be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): internal/entity/models/deepinfra.go:414-425 | internal/entity/models/fishaudio.go:167-178 | internal/entity/models/togetherai.go:471-482 | internal/entity/models/xinference.go:437-448 \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/entity/models/deepinfra.go:414\u0060 it begins part-way through the construct above it, so those exact 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/entity/models/deepinfra.go"},"region":{"startLine":414}}}],"partialFingerprints":{"codehealthFindingId/v1":"e0ce92301b33bf1cbb2d21c9963acdf2d1f5890c15f3e967f320163c0ff84048"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): internal/entity/models/openai.go:339-350 | internal/entity/models/ragcon.go:445-456 | internal/entity/models/xiaomi.go:207-218 | internal/entity/models/xiaomi.go:441-452 \u2014 there are 4 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/entity/models/openai.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. 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/entity/models/openai.go"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfbd9c17d0b6ca99f04a0c88e02f8f8dbdcaad6eb6060e3eb1fca2267d3c002c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 4): internal/handler/chat_channel.go:112-123 | internal/handler/chat_channel.go:142-153 | internal/handler/chat_channel.go:178-189 | internal/handler/chat_channel.go:207-218 \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/handler/chat_channel.go:112\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/handler/chat_channel.go"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"90af2085a50ddacb702506c76c62385997437eab6325cf902f20c5baa59be14d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): internal/admin/handler_ee.go:530-541 | internal/admin/handler_ee.go:649-660 | internal/admin/handler_ee.go:726-737 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it 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/admin/handler_ee.go"},"region":{"startLine":530}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c7df7d6a7cb8aae1c4a40fae3177916a41eaee046afc763c4095f769e62ca1e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): internal/agent/component/message.go:463-474 | internal/ingestion/component/knowledge_compiler/structure/merge.go:538-549 | internal/ingestion/knowledge_compile/writer.go:273-284 \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 \u0060internal/agent/component/message.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/agent/component/message.go"},"region":{"startLine":463}}}],"partialFingerprints":{"codehealthFindingId/v1":"d93474ea97c70850284681a3427ca06c4ea9aabaa42687880a830b20858371ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): internal/cli/filesystem/skill_hub/source/github.go:136-147 | internal/cli/filesystem/skill_hub/source/skillssh.go:313-324 | internal/cli/filesystem/skill_hub/source/skillssh.go:364-375 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/cli/filesystem/skill_hub/source/github.go:136\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/cli/filesystem/skill_hub/source/github.go"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3739f66a44cfc99e3f23d47108d373bd8bd9b5f82e91cde03e407f5ddc28cbc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): internal/entity/models/baichuan.go:108-119 | internal/entity/models/jina.go:177-188 | internal/entity/models/tokenhub.go:126-137 \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/entity/models/baichuan.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/baichuan.go"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cec2f9c8beed101a1fe42a981050d6361140a6b2e66a6377e1fd36eb5e10bf6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): internal/entity/models/cohere.go:385-396 | internal/entity/models/mistral.go:239-250 | internal/entity/models/voyage.go:91-102 \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/entity/models/cohere.go:385\u0060 it begins part-way through the construct above it, so those exact 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/entity/models/cohere.go"},"region":{"startLine":385}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a247e0ad8c978339f6a241b17978f2ca81bdf6314b3520a1d020ead091dbb7e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): internal/entity/models/gitee.go:758-769 | internal/entity/models/volcengine.go:580-591 | internal/entity/models/zhipu-ai.go:309-320 \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/entity/models/gitee.go:758\u0060 it does not close everything it opens, so those exact 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/entity/models/gitee.go"},"region":{"startLine":758}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c86982fa7a0d615a5f0a1b729a5798bd22f2ab3318d81cced3755073055d1ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): internal/entity/models/gpustack.go:195-206 | internal/entity/models/jina.go:166-177 | internal/entity/models/togetherai.go:213-225 \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/entity/models/gpustack.go:195\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/gpustack.go"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"167e1a7195a2858cd57eb9f77235d9ea34724b9589aa234e31fcb6958e8d100c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): internal/entity/models/groq.go:176-187 | internal/entity/models/ppio.go:130-141 | internal/entity/models/replicate.go:504-515 \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/entity/models/groq.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. 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/entity/models/groq.go"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"651614a6badd8dea234544a5012f372e3686ddb4c96fd967d1c7a908ee581273"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): internal/entity/models/novita.go:497-508 | internal/entity/models/voyage.go:175-186 | internal/entity/models/xinference.go:255-266 \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/entity/models/novita.go"},"region":{"startLine":497}}}],"partialFingerprints":{"codehealthFindingId/v1":"683d08acb4298e95e31619ad9856dacc1b05961329f5b54af0a08f47161fbdf9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): internal/handler/memory.go:445-456 | internal/handler/memory.go:679-690 | internal/handler/memory.go:735-746 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/handler/memory.go"},"region":{"startLine":445}}}],"partialFingerprints":{"codehealthFindingId/v1":"de1dc9760ff64051709a70b10028e91da5bcae76f4487ab8aff926b9a3e5f922"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): internal/ingestion/component/chunker/group.go:490-501 | internal/ingestion/component/chunker/hierarchy.go:307-318 | internal/ingestion/component/chunker/title.go:757-768 \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/ingestion/component/chunker/group.go:490\u0060 it does not close everything it opens, so those exact 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/ingestion/component/chunker/group.go"},"region":{"startLine":490}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd5412e9e21940db04f0a4a870d1f3840b44e6f06d300b2f35a66dd42bcb8bbe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/agent/component/agent.go:1025-1036 | internal/agent/component/llm.go:198-209 \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/agent/component/agent.go:1025\u0060 it does not close everything it opens, so those exact 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/agent/component/agent.go"},"region":{"startLine":1025}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a441d7af5393af121e594272e60551a2225dfba27989c4968ea16d831f905ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/agent/component/universe_a_wrappers.go:50-61 | internal/agent/tool/tool2component.go:60-71 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/agent/component/universe_a_wrappers.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/agent/component/universe_a_wrappers.go"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"a118746f2b8dad32cb965f5f3c1e6d4a120fcd6ded0969f0835c7d2bdf1577a5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/channels/dingtalk.go:148-159 | internal/channels/feishu.go:146-158 \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/channels/dingtalk.go"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"28de4e58d0f1c921293690ad5a225e105db1426f677f567ae0d39d0c0dce891d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/channels/feishu.go:329-340 | internal/channels/line.go:334-345 \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/channels/feishu.go:329\u0060 it does not close everything it opens, so those exact 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/channels/feishu.go"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2b6fe091b3c1bcc7a256773d8ee4d437128e738021ae87ce35d300b91688cdd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/cli/admin_command.go:137-148 | internal/cli/admin_command.go:1887-1898 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/cli/admin_command.go:137\u0060 it begins part-way through the construct above it, so those exact 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/cli/admin_command.go"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca7985c572c4f4e008f11e0f17b0ef4529d69bf014634d24c88d89312ee4fd66"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/cli/admin_command.go:269-280 | internal/cli/admin_command.go:291-302 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/cli/admin_command.go:269\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/cli/admin_command.go"},"region":{"startLine":269}}}],"partialFingerprints":{"codehealthFindingId/v1":"7957dc4a8547daae6206bfe9356329d3feabde61e35a367e1f62ad8667cc12e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/cli/admin_command.go:447-459 | internal/cli/admin_command.go:2446-2457 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/cli/admin_command.go:447\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/cli/admin_command.go"},"region":{"startLine":447}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd16435a2387f65c1f6500401c09c024c256b27d4fa6a21aa646aeaeb11fd083"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/cli/admin_command.go:906-917 | internal/cli/admin_command.go:972-983 \u2014 both copies are in the same file, so extract the block into one function there 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/cli/admin_command.go"},"region":{"startLine":906}}}],"partialFingerprints":{"codehealthFindingId/v1":"35873cfe6266042df9a9b25c92927dd55eec68d6f947664aa4fe83662ca4caed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/cli/admin_command.go:998-1009 | internal/cli/admin_command.go:1407-1418 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/cli/admin_command.go:998\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/cli/admin_command.go"},"region":{"startLine":998}}}],"partialFingerprints":{"codehealthFindingId/v1":"f330353f2847ba310f0e5041c378bd489adb8df64989b8e3f01d65c34c5a5258"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/cli/admin_command.go:1105-1116 | internal/cli/admin_command.go:1671-1682 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/cli/admin_command.go:1105\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/cli/admin_command.go"},"region":{"startLine":1105}}}],"partialFingerprints":{"codehealthFindingId/v1":"634e8e50991177a967d7149fb8ae15d3829ca3f75ad47409d5667df1c7bb8de2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/cli/admin_command.go:1183-1194 | internal/cli/admin_command.go:1204-1215 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/cli/admin_command.go:1183\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/cli/admin_command.go"},"region":{"startLine":1183}}}],"partialFingerprints":{"codehealthFindingId/v1":"a348706b815ca677ee6e6fa235da688548f3f0b653714c12148029dc48f379b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/cli/filesystem/skill.go:375-386 | internal/cli/filesystem/skill.go:934-945 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/cli/filesystem/skill.go:375\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/cli/filesystem/skill.go"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"1dada95436362f3aaeab85e0a746dde977b5acb7f36e36c328e05b23381613d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/cli/filesystem/skill.go:828-839 | internal/cli/filesystem/skill.go:890-901 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/cli/filesystem/skill.go:828\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/cli/filesystem/skill.go"},"region":{"startLine":828}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c2651c150e8e7fd8d427742ded5f2a04c6b3afc93e35a377d1bcbb5dddd67c0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/cli/filesystem/skill.go:1306-1317 | internal/cli/filesystem/skill.go:2007-2018 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/cli/filesystem/skill.go:1306\u0060 it begins part-way through the construct above it, so those exact 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/cli/filesystem/skill.go"},"region":{"startLine":1306}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cb7b30a1a85033a1add34c91fa3cfe8dffd5a12c47ed3bb2fbdabf6ec428930"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/cli/filesystem_command.go:368-380 | internal/cli/filesystem_command.go:493-504 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/cli/filesystem_command.go:368\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/cli/filesystem_command.go"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"286fc984f98f9ef4fa3eafc4b71a058052136fb6275f3cc07d47cc297c874772"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/cli/http_client.go:236-247 | internal/cli/http_client.go:354-365 \u2014 both copies are in the same file, so extract the block 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/cli/http_client.go"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"74eaf63057688da52da336881673ce538a897e32bf1d10995711214ce3dad1e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/cli/response.go:1026-1037 | internal/cli/response.go:1085-1096 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/cli/response.go:1026\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/cli/response.go"},"region":{"startLine":1026}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f83bbe71230ad5e3ae3910e8cd81be9ec02f68dba0aa48c004e4f82180d24ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/engine/elasticsearch/meta_filter.go:589-600 | internal/engine/infinity/meta_filter.go:490-501 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/engine/elasticsearch/meta_filter.go:589\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/engine/elasticsearch/meta_filter.go"},"region":{"startLine":589}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b0c937661debe06ea49021833c4a4e0b7677c199533e59aeff5ef7fbd4b99fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/engine/infinity/meta_filter.go:318-329 | internal/engine/infinity/meta_filter.go:339-350 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/engine/infinity/meta_filter.go:318\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/engine/infinity/meta_filter.go"},"region":{"startLine":318}}}],"partialFingerprints":{"codehealthFindingId/v1":"9890190aa98b0e21c69046adc3da6875d6ec489df7e087471ddf221cbb6bc8c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/entity/models/302ai.go:130-141 | internal/entity/models/localai.go:103-115 \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/entity/models/302ai.go"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"8edc8f3607b89ff71da9860180ab479c63df14f5ee6ab87a3c7f7ceac933c21b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/entity/models/302ai.go:519-530 | internal/entity/models/mistral.go:610-621 \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/entity/models/302ai.go:519\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/entity/models/302ai.go"},"region":{"startLine":519}}}],"partialFingerprints":{"codehealthFindingId/v1":"7004845959a7401aa1b689e497e36b06279253362939f72613039cb956cc9930"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/entity/models/baidu.go:508-519 | internal/entity/models/orcarouter.go:203-214 \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/entity/models/baidu.go:508\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/entity/models/baidu.go"},"region":{"startLine":508}}}],"partialFingerprints":{"codehealthFindingId/v1":"f044853894bae6e79f274a74137ad17ea5ef8eb69cd09e51e076d7f8e2c731cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/entity/models/builtin.go:95-106 | internal/entity/models/huggingface.go:165-176 \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/entity/models/builtin.go:95\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/entity/models/builtin.go"},"region":{"startLine":95}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce513dda5cacc8bdb013dfc7a02ca60ac7e41398f90d6d34d33995c22fc43343"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/entity/models/cohere.go:528-539 | internal/entity/models/ppio.go:361-372 \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/entity/models/cohere.go:528\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/entity/models/cohere.go"},"region":{"startLine":528}}}],"partialFingerprints":{"codehealthFindingId/v1":"613a73d8fe74da4a460466446996d0b123a24b277d75e1e4b02a98eaf3147dc5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/entity/models/deepinfra.go:80-91 | internal/entity/models/deepinfra.go:120-131 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/entity/models/deepinfra.go:80\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/entity/models/deepinfra.go"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce7770c4d557e08b4eaf9899b2044f9c3d00cd87cfa59bdbd410dfda324fee2e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/entity/models/deepinfra.go:223-234 | internal/entity/models/jina.go:267-278 \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/entity/models/deepinfra.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/deepinfra.go"},"region":{"startLine":223}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6d4e00ae530506164e31f609ce6bb3da4028af2b98256b110586d66bacae558"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/entity/models/groq.go:113-124 | internal/entity/models/ppio.go:69-80 \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/entity/models/groq.go:113\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/entity/models/groq.go"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"a60edec92c402c4ca774877d3fb5df736d29546fbab0fbe3c2c1f71c88704f5b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/entity/models/groq.go:146-157 | internal/entity/models/ppio.go:100-111 \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/entity/models/groq.go:146\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/groq.go"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"070d7f5355659d3154af2522fb136bed04c3b856f7783cbe3a6407fe6c3a640c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/entity/models/hunyuan.go:194-205 | internal/entity/models/upstage.go:153-164 \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/entity/models/hunyuan.go"},"region":{"startLine":194}}}],"partialFingerprints":{"codehealthFindingId/v1":"82156879bf6e594e8f3e49ca03b203f4aab09ca3a758a1a76b24ec5a11043841"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/entity/models/jiekouai.go:113-125 | internal/entity/models/siliconflow.go:70-81 \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/entity/models/jiekouai.go:113\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/jiekouai.go"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"4fc25c522724bc60676e038660607220b13e18d5d166da96799162d008019bb4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/entity/models/jiekouai.go:196-207 | internal/entity/models/jina.go:184-195 \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/entity/models/jiekouai.go:196\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/entity/models/jiekouai.go"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"0fb1b97f7e8e206a2e378ce32cf99b813b1b98d44a008ab6e1d54c1d9ecadc62"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/entity/models/localai.go:148-159 | internal/entity/models/nvidia.go:148-160 \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/entity/models/localai.go:148\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/localai.go"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2f87bd68db7a6bac22cc0b4640eb4318017f9779fe399e02592d9f852779c9b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/entity/models/minimax.go:113-124 | internal/entity/models/moonshot.go:88-99 \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/entity/models/minimax.go"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"509fbb496f4f16330f3ffedb63af1fa3f38f074efcbf40e1454f1b6c796ab679"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/entity/models/novita.go:256-267 | internal/entity/models/novita.go:286-297 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/entity/models/novita.go:256\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/novita.go"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"54ec81173d66b64d9d7712c20248b5d9ed108e58ad0c248b6f339febee61cebc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/entity/models/openai.go:309-321 | internal/entity/models/ragcon.go:417-428 \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/entity/models/openai.go"},"region":{"startLine":309}}}],"partialFingerprints":{"codehealthFindingId/v1":"b65602f6365799e37071283d1316d08c3c338427835656dae68d4b20e02c4d3d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/entity/models/togetherai.go:437-448 | internal/entity/models/xinference.go:401-412 \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/entity/models/togetherai.go:437\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/togetherai.go"},"region":{"startLine":437}}}],"partialFingerprints":{"codehealthFindingId/v1":"53769dfe4c42611d4991b64ae36a8ec16fbe38fd0855c7a8845bee5470253756"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/entity/models/xiaomi.go:81-92 | internal/entity/models/xiaomi.go:131-142 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/entity/models/xiaomi.go:81\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/xiaomi.go"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"a720eee8455568af4bf16b6661d6c00f96b6991f9c89b78eadb8af3d411e5dc4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/handler/dataset.go:597-608 | internal/handler/document.go:401-412 \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/handler/dataset.go:597\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/handler/dataset.go"},"region":{"startLine":597}}}],"partialFingerprints":{"codehealthFindingId/v1":"eede00fffb7e8564b2653630c8e6072ade52df83b048c752165ca438f1f37480"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/handler/document.go:1501-1512 | internal/handler/document.go:1626-1637 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/handler/document.go:1501\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/handler/document.go"},"region":{"startLine":1501}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2b363090cca7d8c375c1a31e9348b893575c1503a4b247b705628151df5c397"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/handler/file.go:204-215 | internal/handler/file.go:238-249 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/handler/file.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/handler/file.go"},"region":{"startLine":204}}}],"partialFingerprints":{"codehealthFindingId/v1":"30044e1e3e0e535070315d70b9194dff51d730bbc9c43c1a07c9073698a05f29"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/handler/providers.go:410-421 | internal/handler/providers.go:445-458 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/handler/providers.go:410\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/handler/providers.go"},"region":{"startLine":410}}}],"partialFingerprints":{"codehealthFindingId/v1":"f01083da25857bde9259197f986698fa80ffb113502ba439308bc970f230180e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/handler/tenant.go:485-496 | internal/handler/tenant.go:585-596 \u2014 both copies are in the same file, so extract the block into one function there 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/handler/tenant.go"},"region":{"startLine":485}}}],"partialFingerprints":{"codehealthFindingId/v1":"340a2170d63003b6b8fe87c2bd5bfdfc3adf3ea0985b1e8712e9d2b293423429"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/handler/tenant.go:515-526 | internal/handler/tenant.go:549-560 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/handler/tenant.go:549\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/handler/tenant.go"},"region":{"startLine":515}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fc6ab02b9b7ab03e33469e7ea6bbf1762891e0be63e24d4f71060bd09b7e7f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/harness/core/middlewares/telemetry/telemetry.go:114-125 | internal/harness/core/middlewares/telemetry/telemetry.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 \u0060internal/harness/core/middlewares/telemetry/telemetry.go:114\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/harness/core/middlewares/telemetry/telemetry.go"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"e04d45031f1a7031f2c68360270d59c5446835cb91b83d8ec8ee672d7ba51356"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/harness/core/retry.go:112-123 | internal/harness/core/retry.go:222-233 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/harness/core/retry.go:112\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/harness/core/retry.go"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"90ae2fbfa20cde6cf07432059e9ef3b1b3a2a2b81ff4a304dce29861af1cd8a3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/harness/core/workflow.go:165-176 | internal/harness/core/workflow.go:240-251 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/harness/core/workflow.go:165\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/harness/core/workflow.go"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"76dcbd1ff19701c608f3759d40da58ae876f840f819c1faa5c82bc20340c64c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/harness/graph/managed/managed.go:352-363 | internal/harness/graph/managed/managed.go:380-391 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/harness/graph/managed/managed.go:352\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/harness/graph/managed/managed.go"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"34b6332740a10e34d631e6b071d1ded85210dd2e6f2c5a6d6b237d248660d162"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/harness/graph/pregel/engine.go:807-819 | internal/harness/graph/pregel/engine.go:873-884 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/harness/graph/pregel/engine.go:807\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/harness/graph/pregel/engine.go"},"region":{"startLine":807}}}],"partialFingerprints":{"codehealthFindingId/v1":"c51bc5fd6e61e755ffb92ab2bed914991970d6515bd234afc7c02b4e16c1de72"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/ingestion/component/chunker/presentation.go:79-94 | internal/ingestion/component/chunker/qa.go:91-102 \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/ingestion/component/chunker/presentation.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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/ingestion/component/chunker/presentation.go"},"region":{"startLine":79}}}],"partialFingerprints":{"codehealthFindingId/v1":"15bff8a2b39eb575fad7476976957d326b4f1dd01cf1f49b6eb0ff6fdeaf697b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/ingestion/component/chunker/qa.go:345-356 | internal/ingestion/component/chunker/tag.go:190-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ingestion/component/chunker/qa.go"},"region":{"startLine":345}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bbedd9c4094c237db3c0ad1120a0bc484f6e795b771f4b86e86c37726de6b40"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/ingestion/component/chunker/token.go:1074-1085 | internal/ingestion/component/tokenizer.go:614-625 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ingestion/component/chunker/token.go:1074\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/ingestion/component/chunker/token.go"},"region":{"startLine":1074}}}],"partialFingerprints":{"codehealthFindingId/v1":"3820a5bc3a300c7ef1c3a8f41ab54892fd9b4f971c44c0aecb9d11d56be6de02"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/ingestion/component/extractor_tag.go:329-340 | internal/ingestion/component/extractor_tag.go:363-374 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/ingestion/component/extractor_tag.go:329\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/ingestion/component/extractor_tag.go"},"region":{"startLine":329}}}],"partialFingerprints":{"codehealthFindingId/v1":"1df40e9a6390fb6de7406a8e1f4cf62985dc4e6e887c3b4d9b54c9a3d4b4df2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): internal/ingestion/component/knowledge_compiler/mindmap/mindmap.go:114-128 | internal/ingestion/component/knowledge_compiler/wiki/wiki.go:150-161 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/ingestion/component/knowledge_compiler/mindmap/mindmap.go:114\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/ingestion/component/knowledge_compiler/mindmap/mindmap.go"},"region":{"startLine":114}}}],"partialFingerprints":{"codehealthFindingId/v1":"60a1196d60d61f41cc2caa99ecc9fe30b62cdfa6e7cc349b3c815222f8abe788"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 33): internal/entity/models/aliyun.go:57-68 | internal/entity/models/astraflow.go:73-83 | internal/entity/models/baichuan.go:54-64 | internal/entity/models/baidu.go:55-65 | internal/entity/models/cohere.go:138-148 | internal/entity/models/deepinfra.go:60-71 | internal/entity/models/deepseek.go:90-101 | internal/entity/models/futurmix.go:63-74 | internal/entity/models/gitee.go:59-70 | internal/entity/models/greenpt.go:73-84 | internal/entity/models/huggingface.go:54-65 | internal/entity/models/hunyuan.go:73-83 | internal/entity/models/lmstudio.go:58-69 | internal/entity/models/localai.go:70-80 | internal/entity/models/longcat.go:83-94 | internal/entity/models/mistral.go:133-144 | internal/entity/models/modelscope.go:72-83 | internal/entity/models/novita.go:58-68 | internal/entity/models/nvidia.go:69-80 | internal/entity/models/openai.go:63-74 | internal/entity/models/openai_api_compatible.go:85-96 | internal/entity/models/openrouter.go:59-69 | internal/entity/models/orcarouter.go:53-63 | internal/entity/models/siliconflow.go:61-72 | internal/entity/models/stepfun.go:58-69 | internal/entity/models/tokenpony.go:56-66 | internal/entity/models/upstage.go:57-68 | internal/entity/models/vllm.go:58-69 | internal/entity/models/volcengine.go:91-102 | internal/entity/models/xai.go:68-79 | internal/entity/models/xinference.go:76-87 | internal/entity/models/xunfei.go:96-107 | internal/entity/models/zhipu-ai.go:61-73 \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/entity/models/aliyun.go:57\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/entity/models/aliyun.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"6934dc8177ccd46ce9f091b01b4549031dc76ce370f01fa7bb5044f2ea3b924d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 14): internal/entity/models/astraflow.go:134-144 | internal/entity/models/avian.go:139-149 | internal/entity/models/gpustack.go:125-135 | internal/entity/models/hunyuan.go:131-141 | internal/entity/models/longcat.go:158-168 | internal/entity/models/mistral.go:305-315 | internal/entity/models/novita.go:306-316 | internal/entity/models/openai.go:235-245 | internal/entity/models/perplexity.go:137-147 | internal/entity/models/ragcon.go:288-298 | internal/entity/models/stepfun.go:119-129 | internal/entity/models/togetherai.go:152-162 | internal/entity/models/tokenpony.go:110-120 | internal/entity/models/upstage.go:227-237 \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/entity/models/astraflow.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/astraflow.go"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5ec3ad9f56da420b186c9dfaa69b5aa2957f7849c9b1154e026be312db21335"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 10): internal/entity/models/302ai.go:75-85 | internal/entity/models/avian.go:64-74 | internal/entity/models/gpustack.go:56-66 | internal/entity/models/groq.go:109-119 | internal/entity/models/n1n.go:94-104 | internal/entity/models/perplexity.go:69-79 | internal/entity/models/ppio.go:65-75 | internal/entity/models/ragcon.go:70-80 | internal/entity/models/replicate.go:329-339 | internal/entity/models/togetherai.go:86-96 \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/entity/models/302ai.go"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bf02ad0c200757a12334f19bb9f3a7175b9dc6028c124d6abf9a862ea82153b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 9): internal/admin/handler.go:294-304 | internal/admin/handler_ee.go:881-891 | internal/admin/handler_ee.go:912-922 | internal/admin/handler_ee.go:934-944 | internal/admin/handler_ee.go:954-964 | internal/admin/handler_ee.go:976-986 | internal/admin/handler_ee.go:996-1006 | internal/admin/handler_ee.go:1633-1643 | internal/admin/handler_ee.go:1662-1672 \u2014 there are 9 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 9 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/admin/handler.go:294\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/admin/handler.go"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"fc0cf0738a7c230b46d1ab548168ac4315f7f51b4613bc6a70734bf4c9988079"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 9): internal/entity/models/aliyun.go:533-543 | internal/entity/models/deepinfra.go:622-632 | internal/entity/models/deepseek.go:221-231 | internal/entity/models/gitee.go:625-635 | internal/entity/models/huggingface.go:239-249 | internal/entity/models/lmstudio.go:279-289 | internal/entity/models/openrouter.go:531-541 | internal/entity/models/siliconflow.go:244-254 | internal/entity/models/vllm.go:256-266 \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/entity/models/aliyun.go"},"region":{"startLine":533}}}],"partialFingerprints":{"codehealthFindingId/v1":"08fd3924c7f6aab2adb13339d92bc04c7575bee21ff86ef71de14a5efa221275"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 7): internal/handler/providers.go:797-807 | internal/handler/providers.go:970-980 | internal/handler/providers.go:1036-1046 | internal/handler/providers.go:1103-1113 | internal/handler/providers.go:1211-1221 | internal/handler/providers.go:1318-1328 | internal/handler/providers.go:1381-1391 \u2014 all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/handler/providers.go:797\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/handler/providers.go"},"region":{"startLine":797}}}],"partialFingerprints":{"codehealthFindingId/v1":"bad6da1f3fe5b117f011bd0e96ce38cd27d0bbbc479328a2c0d7db1b149c332c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 5): internal/admin/handler_ee.go:430-440 | internal/admin/handler_ee.go:452-462 | internal/admin/handler_ee.go:474-484 | internal/admin/handler_ee.go:621-633 | internal/admin/handler_ee.go:699-711 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/admin/handler_ee.go:430\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/admin/handler_ee.go"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc46587b8e3ee9562860021fea83ac4b011939cb277c286a3cdfe5b3fcaf25d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 5): internal/entity/models/cohere.go:238-249 | internal/entity/models/deepinfra.go:105-115 | internal/entity/models/deepseek.go:151-161 | internal/entity/models/huggingface.go:96-106 | internal/entity/models/nvidia.go:108-118 \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/entity/models/cohere.go:238\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/entity/models/cohere.go"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"17b4ec55a6d41d3e92be331f9c58c43fbde86fd543e368c71eafdecb526300d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 5): internal/entity/models/cometapi.go:198-209 | internal/entity/models/gpustack.go:195-205 | internal/entity/models/jina.go:166-176 | internal/entity/models/replicate.go:679-689 | internal/entity/models/togetherai.go:213-224 \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/entity/models/cometapi.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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/entity/models/cometapi.go"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6f54caa8dc6f9d2dc43d82f900a84cc16b72354517d3701a630a86d133bf303"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): internal/agent/tool/bgpt.go:304-314 | internal/agent/tool/google.go:312-322 | internal/agent/tool/google_scholar.go:287-297 | internal/agent/tool/wikipedia.go:343-353 \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/agent/tool/bgpt.go:304\u0060 it begins part-way through the construct above it, so those exact 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/agent/tool/bgpt.go"},"region":{"startLine":304}}}],"partialFingerprints":{"codehealthFindingId/v1":"505dccaaa92ba69c563e23261c7434412af55abd8fb54ebce471474876469ce8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): internal/cli/admin_command.go:586-596 | internal/cli/admin_command.go:607-617 | internal/cli/admin_command.go:628-638 | internal/cli/admin_command.go:649-659 \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/cli/admin_command.go:586\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/cli/admin_command.go"},"region":{"startLine":586}}}],"partialFingerprints":{"codehealthFindingId/v1":"06728d49538d831538209a4d98acedd66deccd9350a624e3c239f3004a882821"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): internal/entity/models/302ai.go:181-191 | internal/entity/models/302ai.go:266-276 | internal/entity/models/302ai.go:352-362 | internal/entity/models/302ai.go:493-503 \u2014 all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/302ai.go"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"c69f71b81bb3a792aa271ae2de45afb96490498ecf6acbc738724b2b35fbf87c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): internal/entity/models/302ai.go:654-664 | internal/entity/models/jiekouai.go:368-378 | internal/entity/models/minimax.go:267-277 | internal/entity/models/moonshot.go:174-184 \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/entity/models/302ai.go:654\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/302ai.go"},"region":{"startLine":654}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d8319bf96f38ccfff5388c1a5ec24fe708e330855bdcf8c95f251ecf217078c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): internal/entity/models/deepinfra.go:633-643 | internal/entity/models/gitee.go:636-646 | internal/entity/models/jina.go:357-367 | internal/entity/models/ollama.go:275-285 \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/entity/models/deepinfra.go"},"region":{"startLine":633}}}],"partialFingerprints":{"codehealthFindingId/v1":"0116522609e540bc0ba6d530d88402706f7a943ecf48539408ca88abdaece46b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): internal/entity/models/localai.go:250-260 | internal/entity/models/nvidia.go:261-272 | internal/entity/models/ppio.go:292-302 | internal/entity/models/zhipu-ai.go:367-379 \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/entity/models/localai.go:250\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/entity/models/localai.go"},"region":{"startLine":250}}}],"partialFingerprints":{"codehealthFindingId/v1":"e21c04e3d0aad26850f0f3793d3938fa3b2158198051d724d0f43bc3bf91bff3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): internal/entity/models/openai.go:430-440 | internal/entity/models/ragcon.go:580-590 | internal/entity/models/xiaomi.go:168-178 | internal/entity/models/xiaomi.go:411-421 \u2014 there are 4 copies across 3 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. 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/entity/models/openai.go"},"region":{"startLine":430}}}],"partialFingerprints":{"codehealthFindingId/v1":"f78507098413a48bd6c2bd9fd944a0f18093367fecfee688383a754e0a61092b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): internal/entity/models/openrouter.go:153-163 | internal/entity/models/tokenhub.go:119-129 | internal/entity/models/volcengine.go:270-280 | internal/entity/models/zhipu-ai.go:164-176 \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/entity/models/openrouter.go:153\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/entity/models/openrouter.go"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"276f6bd2afea05eaf0bdd59432cbc7098819a641b14c67584c0f975791587fc3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): internal/channels/discord.go:494-505 | internal/channels/feishu.go:281-292 | internal/channels/whatsapp.go:419-429 \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/channels/discord.go:494\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/channels/discord.go"},"region":{"startLine":494}}}],"partialFingerprints":{"codehealthFindingId/v1":"39e240ea3b3217bcf97154fa551bcacb2000168f9977b883355a6ad7ee9de89f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): internal/cli/admin_command.go:2710-2720 | internal/cli/admin_command.go:2741-2751 | internal/cli/admin_command.go:2834-2844 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the 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/cli/admin_command.go:2710\u0060 it begins part-way through the construct above it, so those exact 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/cli/admin_command.go"},"region":{"startLine":2710}}}],"partialFingerprints":{"codehealthFindingId/v1":"27174264310e43e9bff626cd64d6d10344ec447bd4b7c99ba10494cebe7ab80d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): internal/entity/models/aliyun.go:452-462 | internal/entity/models/n1n.go:214-224 | internal/entity/models/n1n.go:309-319 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. 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/entity/models/aliyun.go"},"region":{"startLine":452}}}],"partialFingerprints":{"codehealthFindingId/v1":"43e8f6e412380f887bdbd0a7fd10160e1708950731a9ed9966d115a826397e98"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): internal/entity/models/gitee.go:583-593 | internal/entity/models/siliconflow.go:197-208 | internal/entity/models/zhipu-ai.go:202-213 \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/entity/models/gitee.go:583\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/gitee.go"},"region":{"startLine":583}}}],"partialFingerprints":{"codehealthFindingId/v1":"851862a68659621ec939efb1ac2caf6094b5486e86c35de5f56e580bf7683798"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): internal/handler/dataset.go:1176-1186 | internal/handler/document.go:1687-1697 | internal/handler/document.go:1821-1831 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/handler/dataset.go"},"region":{"startLine":1176}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d702a77b91cce5ae2bc3743d2a387b2dcd710073a5eee0d9d3c97f05dae237a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): internal/handler/document.go:526-537 | internal/handler/document.go:1504-1514 | internal/handler/document.go:1629-1639 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/handler/document.go"},"region":{"startLine":526}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b9aa341c99755a92593396ac77e03f1eb7e14e46466f6a8b34b898d1a7d1173"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): internal/handler/providers.go:511-522 | internal/handler/providers.go:627-638 | internal/handler/providers.go:748-758 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it 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/handler/providers.go"},"region":{"startLine":511}}}],"partialFingerprints":{"codehealthFindingId/v1":"18472d694d8f8b111ecc6b9696d561ea5bd2ffda924ce5e5d5bed63a8eebd6ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 3): internal/harness/graph/pregel/otel_telemetry.go:128-138 | internal/harness/graph/pregel/otel_telemetry.go:157-167 | internal/harness/graph/pregel/otel_telemetry.go:228-238 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the 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/harness/graph/pregel/otel_telemetry.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/harness/graph/pregel/otel_telemetry.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"9c83fa2e4344724453de9767811519ec0bb2080a8d15bec4d5ff69bcb1b7fea8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/admin/handler.go:636-646 | internal/handler/system.go:239-249 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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":"internal/admin/handler.go"},"region":{"startLine":636}}}],"partialFingerprints":{"codehealthFindingId/v1":"8dce1a5302c17e003cbcf83be4a416abd847631c2c0dad41de33210f0d9a8403"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/admin/handler_ee.go:569-579 | internal/admin/handler_ee.go:693-703 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/admin/handler_ee.go:569\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/admin/handler_ee.go"},"region":{"startLine":569}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab90c1f86e84eb9a7210755765e65af12580f360162ab3bf463a69d290e00a07"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/admin/handler_ee.go:900-911 | internal/admin/handler_ee.go:1622-1632 \u2014 both copies are in the same file, so extract the block into one function there 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/admin/handler_ee.go"},"region":{"startLine":900}}}],"partialFingerprints":{"codehealthFindingId/v1":"313ff3d62581dafd39ac94ff88b4dad68c0d74e504c2ae8f6bd45cd535be9c41"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/admin/handler_ee.go:1753-1763 | internal/admin/handler_ee.go:1860-1870 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/admin/handler_ee.go:1753\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/admin/handler_ee.go"},"region":{"startLine":1753}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ff688f812fbe19e77ad13b18f94c49c3ca52906ba32f9a72a372f9d9d8fe8b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/admin/handler_ee.go:1836-1846 | internal/admin/handler_ee.go:1887-1897 \u2014 both copies are in the same file, so extract the block 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/admin/handler_ee.go"},"region":{"startLine":1836}}}],"partialFingerprints":{"codehealthFindingId/v1":"2ea1ea60bc9aa94fb36e951d9154328b58892b1264e85762e9eea5d317101b07"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/admin/service.go:714-724 | internal/admin/service.go:756-766 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/admin/service.go"},"region":{"startLine":714}}}],"partialFingerprints":{"codehealthFindingId/v1":"d53f9ddf3693c53464a99308c71a995fcaf5a78bdb5b7c2883655e0501a66d6c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/admin/service.go:792-802 | internal/admin/service.go:824-834 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/admin/service.go:792\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/admin/service.go"},"region":{"startLine":792}}}],"partialFingerprints":{"codehealthFindingId/v1":"520b4933f0ea9308a19e1710072a6703a6b596614e4bda4f36f6e5b19005be82"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/admin/service.go:866-876 | internal/admin/service.go:907-917 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/admin/service.go"},"region":{"startLine":866}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d1e6d4e4fe114725f042bf84bda6266c58360ab6e3409dd2334939408cf3459"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/agent/canvas/scheduler.go:299-309 | internal/agent/canvas/scheduler.go:371-381 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/agent/canvas/scheduler.go:299\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/agent/canvas/scheduler.go"},"region":{"startLine":299}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c099a526ba41c73bfdfc9ecd91c1139a2d789bdfc60befcb1ce92c99b4001df"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/agent/component/agent.go:964-974 | internal/agent/component/categorize.go:128-138 \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/agent/component/agent.go:964\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/agent/component/agent.go"},"region":{"startLine":964}}}],"partialFingerprints":{"codehealthFindingId/v1":"fb518807edbd21e4b47af5dfc638e18ed8d856328f68bc658bc50933c563ce2f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/agent/component/llm.go:265-275 | internal/agent/component/llm.go:1033-1043 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/agent/component/llm.go:265\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/agent/component/llm.go"},"region":{"startLine":265}}}],"partialFingerprints":{"codehealthFindingId/v1":"c1c2cf8f0b20075e523f6c0fabb125933e91adeed42515fc35bfe478e2cde961"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/channels/qqbot.go:126-136 | internal/channels/wecom.go:257-267 \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/channels/qqbot.go:126\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/channels/qqbot.go"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"05feedeee76dcd4dbbcb4bfde0584c2654574eb9f16689648bc6c936c2dd151d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/channels/qqbot.go:478-488 | internal/channels/wecom.go:615-625 \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/channels/qqbot.go:478\u0060 it does not close everything it opens, so those exact 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/channels/qqbot.go"},"region":{"startLine":478}}}],"partialFingerprints":{"codehealthFindingId/v1":"04048dc4eccb6313d29417a76a62f1d2c8625f69205a29d76ad34b5989772341"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/cli/filesystem/skill.go:1338-1348 | internal/cli/filesystem/skill.go:2039-2049 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/cli/filesystem/skill.go:1338\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/cli/filesystem/skill.go"},"region":{"startLine":1338}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7b4528ad2e2ee3d5059bf1afebc2dc5a48eace0a11ca53431ba686abeac8d5e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/cli/filesystem_command.go:384-394 | internal/cli/filesystem_command.go:411-421 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/cli/filesystem_command.go:384\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/cli/filesystem_command.go"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"28aa855fe21df4e799e13dcb05ae851b10efcc00a3f347028735966fb03a219d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/dao/connector.go:347-357 | internal/dao/connector.go:392-402 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/dao/connector.go:347\u0060 it does not close everything it opens, so those exact 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/dao/connector.go"},"region":{"startLine":347}}}],"partialFingerprints":{"codehealthFindingId/v1":"804b41f3a74b3ed544347f4c37ea001a35fa85bc2e188feb39d2c8f7dc866951"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/deepdoc/parser/pdf/util/crop.go:135-145 | internal/deepdoc/parser/pdf/util/crop.go:292-302 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/deepdoc/parser/pdf/util/crop.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/deepdoc/parser/pdf/util/crop.go"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"813bd6c9575ba1d841fdf060c2c12c70f182d0bfb8c19024ee3e28da35c79ebf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/deepdoc/parser/pdf/util/crop.go:202-212 | internal/deepdoc/parser/pdf/util/crop.go:404-414 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/deepdoc/parser/pdf/util/crop.go:202\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/deepdoc/parser/pdf/util/crop.go"},"region":{"startLine":202}}}],"partialFingerprints":{"codehealthFindingId/v1":"90f1eed21509ec0facd7529dbb9c290379fe51eaeca763401cb1490886befced"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/engine/elasticsearch/chunk.go:540-550 | internal/engine/elasticsearch/chunk.go:561-571 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/engine/elasticsearch/chunk.go:540\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/engine/elasticsearch/chunk.go"},"region":{"startLine":540}}}],"partialFingerprints":{"codehealthFindingId/v1":"208906dc16d7c07388961a8b94c66653bd6052231f77a66354a55ba8b6a69bdf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/engine/elasticsearch/chunk.go:1366-1376 | internal/engine/elasticsearch/chunk.go:1400-1410 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/engine/elasticsearch/chunk.go:1366\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/engine/elasticsearch/chunk.go"},"region":{"startLine":1366}}}],"partialFingerprints":{"codehealthFindingId/v1":"2576d92c53c6d254d19fefadd8153d6ad564a5a742349d31c30ddaaccde3e18c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/engine/elasticsearch/chunk.go:2121-2131 | internal/engine/infinity/chunk.go:1800-1812 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/engine/elasticsearch/chunk.go:2121\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/engine/elasticsearch/chunk.go"},"region":{"startLine":2121}}}],"partialFingerprints":{"codehealthFindingId/v1":"7fb375eb3d80bfcb3477a384ec27ecac3aa98171ffbf40dd41a76ccff73699da"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/engine/elasticsearch/chunk.go:3051-3061 | internal/engine/infinity/chunk.go:2355-2365 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/engine/elasticsearch/chunk.go:3051\u0060 it begins part-way through the construct above it, so those exact 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/engine/elasticsearch/chunk.go"},"region":{"startLine":3051}}}],"partialFingerprints":{"codehealthFindingId/v1":"bcc0ed18f7b930b5b2945a7d26b177f0bf9926eb8b181be8b9b51a40ddae834e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/engine/elasticsearch/document.go:124-134 | internal/engine/elasticsearch/document.go:201-211 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/engine/elasticsearch/document.go"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae36672dc74b37e2b64b4f6dcf0cda308c8185457c3b074cb650684534664d7d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/engine/infinity/chunk.go:1324-1334 | internal/engine/infinity/chunk.go:1372-1382 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/engine/infinity/chunk.go:1324\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/engine/infinity/chunk.go"},"region":{"startLine":1324}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b51ba29040c51138f13f7eb1c3ca9546e844356f7ef90c9c6cebebe41315625"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/entity/models/302ai.go:159-169 | internal/entity/models/minimax.go:196-207 \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/entity/models/302ai.go:159\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/302ai.go"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f9017f303d213206d22c4680f7de06e7ed4d33e26fcc95f39fc462a89da9974"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/entity/models/302ai.go:256-266 | internal/entity/models/jiekouai.go:257-267 \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/entity/models/302ai.go"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"52d348fbc38756a79098b4380ed33e60d6599adcdbfdd432f8b1086922dab382"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/entity/models/302ai.go:358-373 | internal/entity/models/funasr.go:86-96 \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/entity/models/302ai.go"},"region":{"startLine":358}}}],"partialFingerprints":{"codehealthFindingId/v1":"eeae010ee269c54ae88fb8f38c9aad25aa4ae5bb729319588bcbfe343242b67a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/entity/models/302ai.go:640-650 | internal/entity/models/mineru.go:206-216 \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/entity/models/302ai.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. 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/entity/models/302ai.go"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc697e038e751a6142b45a272e730c2fef7b848348c4a386da79159db664ff66"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/entity/models/aliyun.go:264-274 | internal/entity/models/siliconflow.go:214-224 \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/entity/models/aliyun.go:264\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/aliyun.go"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"95ddb6305e195fe03fba6b85d7ab6ef1b2f9e09becd5c854231385d63ea0be10"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/entity/models/baidu.go:209-219 | internal/entity/models/huaweicloud.go:267-277 \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/entity/models/baidu.go"},"region":{"startLine":209}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f8ae2343fc4f80d6657539621e47402adf9ac2c6521865eb42c83427ac1ca74"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/entity/models/deepinfra.go:677-687 | internal/entity/models/openrouter.go:579-589 \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/entity/models/deepinfra.go:677\u0060 it begins part-way through the construct above it, so those exact 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/entity/models/deepinfra.go"},"region":{"startLine":677}}}],"partialFingerprints":{"codehealthFindingId/v1":"94f38122dc87b1f743bfbc5d103be238d5ea92ffcc19f9b8efc0d10fb8b05282"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/entity/models/deepseek.go:282-292 | internal/entity/models/siliconflow.go:298-308 \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/entity/models/deepseek.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/entity/models/deepseek.go"},"region":{"startLine":282}}}],"partialFingerprints":{"codehealthFindingId/v1":"48f97725de5f9a187c6757f4a3545afa1131652e6cf33979c03bbaff4aa36a92"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/entity/models/gitee.go:417-427 | internal/entity/models/gitee.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. 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/entity/models/gitee.go"},"region":{"startLine":417}}}],"partialFingerprints":{"codehealthFindingId/v1":"0f0b7916a15c692ce6d9717b065d3ec740bfaa27213d41417cffca31f93102e1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/entity/models/gitee.go:702-712 | internal/entity/models/novita.go:620-630 \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/entity/models/gitee.go"},"region":{"startLine":702}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5b4bd4d234bc296057255d07b031024b531cdda63cb910055d7b70bf26e3954"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/entity/models/gpustack.go:60-70 | internal/entity/models/jina.go:98-108 \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/entity/models/gpustack.go:60\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/gpustack.go"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"e801fe674e595a8a2bf37554695e3d89477eb6efa22ebaa1c9503e8b3c4417c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/entity/models/jiekouai.go:182-192 | internal/entity/models/jiekouai.go:267-277 \u2014 both copies are in the same file, so extract the block into one function there 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/entity/models/jiekouai.go"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"63b2d89e4ad74c08ada4ceda6062748190b6630ca8b54a7772a212eaea6205c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/entity/models/jiekouai.go:373-383 | internal/entity/models/jina.go:351-361 \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/entity/models/jiekouai.go"},"region":{"startLine":373}}}],"partialFingerprints":{"codehealthFindingId/v1":"f439830964dcc24d4e48ad1b386ee1b7c2f8a3d3733b1334e6ec4ce34b2e418d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/entity/models/minimax.go:344-354 | internal/entity/models/openrouter.go:444-454 \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/entity/models/minimax.go:344\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/minimax.go"},"region":{"startLine":344}}}],"partialFingerprints":{"codehealthFindingId/v1":"e806d15780dcbfbc8103b9b4fc88c28ffb0db3263becf8a6b7684a2a28f7f109"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/entity/models/minimax.go:370-380 | internal/entity/models/mistral.go:527-537 \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/entity/models/minimax.go"},"region":{"startLine":370}}}],"partialFingerprints":{"codehealthFindingId/v1":"08b7fc5ab0c1f2cdae95e8ba1ce3353968f7e718fb79e022f07266d1981c18c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/entity/models/moonshot.go:148-158 | internal/entity/models/xunfei.go:149-159 \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/entity/models/moonshot.go:148\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/moonshot.go"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"52ee8d12dcc1ed2f06f99dcded7bf8817f4fe6e9c1d76fbf0ca905321d7e0e0b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/entity/models/replicate.go:349-359 | internal/entity/models/replicate.go:795-805 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/entity/models/replicate.go:349\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/entity/models/replicate.go"},"region":{"startLine":349}}}],"partialFingerprints":{"codehealthFindingId/v1":"6e8ecd61e774851e52b9046fb3a643ac9435012e3e7040d72c6203aae4cc2b70"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/entity/models/replicate.go:696-706 | internal/entity/models/replicate.go:787-797 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/entity/models/replicate.go:696\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/entity/models/replicate.go"},"region":{"startLine":696}}}],"partialFingerprints":{"codehealthFindingId/v1":"5362722771ed925ac4cd6bbb4c0947ea932ef5619f7a7764f88bb5706088135b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/entity/models/siliconflow.go:187-197 | internal/entity/models/siliconflow.go:455-465 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/entity/models/siliconflow.go:187\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/siliconflow.go"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f4d8304495028b583262cf39fce73693aaa261620a1d0d6bdb24e17dbe00c94"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/entity/models/siliconflow.go:748-759 | internal/entity/models/zhipu-ai.go:658-668 \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/entity/models/siliconflow.go:748\u0060 it does not close everything it opens, so those exact 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/entity/models/siliconflow.go"},"region":{"startLine":748}}}],"partialFingerprints":{"codehealthFindingId/v1":"db2bc017d49bcb365268377e67925b681ccf820a7af02729d0a926e3d237d1b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/entity/models/stepfun.go:288-298 | internal/entity/models/togetherai.go:583-594 \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/entity/models/stepfun.go"},"region":{"startLine":288}}}],"partialFingerprints":{"codehealthFindingId/v1":"a33000ca57aa135ec354437a6aa96cb77ade115fcc3c78bcd5ddd31ebf4c9a9d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/entity/models/xiaomi.go:121-132 | internal/entity/models/zhipu-ai.go:110-120 \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/entity/models/xiaomi.go:121\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/xiaomi.go"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"5554239b982e46a2c4db6ba010a6550ed384640dba77e417e105143c3bc76d7c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/handler/agent_attachment.go:113-133 | internal/handler/agent_attachment.go:152-162 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/handler/agent_attachment.go:113\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/handler/agent_attachment.go"},"region":{"startLine":113}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ce90677a87bf542556cdd7f2e14a2abc3fc26196c6be74e36cbedcbd40e44ed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/handler/chat_channel.go:155-165 | internal/handler/dataset.go:1194-1204 \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/handler/chat_channel.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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/handler/chat_channel.go"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"e750f0d2e6055baab405e8f89ac38fc343e60200affeb534bd15cdfd8ffe85eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/handler/search.go:169-179 | internal/handler/search.go:321-332 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/handler/search.go:169\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/handler/search.go"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"756c9165f8019f668e910c9778efbdb3fc5788e45e94d35fc886421394090db0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/handler/user.go:110-120 | internal/handler/user.go:187-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/handler/user.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/handler/user.go"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"79d2115161c086372274d277fad5d3b337a2fabe77da32d67d4bb6931466644f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/harness/core/agent_handoff.go:131-141 | internal/harness/core/agent_handoff.go:239-250 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/harness/core/agent_handoff.go:131\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/harness/core/agent_handoff.go"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b0bc1de386cd1aa21862c2f4b9425b259fe881e4b03793502c9c04e11d5ace6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/harness/core/flow.go:232-242 | internal/harness/core/flow.go:406-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/harness/core/flow.go:232\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/harness/core/flow.go"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c19bde9c93b9ac78853a5bf86993c5d771a3ee0f931b8057eec210a7b7c2ad4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/harness/core/middlewares/patchtoolcalls/patchtoolcalls.go:59-70 | internal/harness/core/tools_node.go:291-301 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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":"internal/harness/core/middlewares/patchtoolcalls/patchtoolcalls.go"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"fea0e66d492d34ca6461f19eab345627e70ee1425583b39441d03accb8bf5a0b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/harness/core/model_chain.go:88-98 | internal/harness/core/model_chain.go:131-141 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/harness/core/model_chain.go:88\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/harness/core/model_chain.go"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c223aa509ee082db1b4988571e968ebe875732d5c4d368d72b62b67843f6c0b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/harness/core/prebuilt/coding/shell.go:125-136 | internal/harness/core/prebuilt/coding/shell.go:162-172 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/harness/core/prebuilt/coding/shell.go:162\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/harness/core/prebuilt/coding/shell.go"},"region":{"startLine":125}}}],"partialFingerprints":{"codehealthFindingId/v1":"0069b177a22ff240acdf9ab3ce7a10230400bbba45cc6db173ee4ca16aabbb8d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/harness/core/retry.go:236-246 | internal/harness/core/retry.go:278-288 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/harness/core/retry.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":"internal/harness/core/retry.go"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"f756f1df4d61f2b7bcaed3151fe7c8d572914c6a4ca682208a33cafa45d16bce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/harness/core/retry.go:317-327 | internal/harness/core/retry.go:351-361 \u2014 both copies are in the same file, so extract the block into one function there 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/harness/core/retry.go"},"region":{"startLine":317}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbfa598f5393717057a7db010c8e2c2ed010898c430076d781839eda0134ed39"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/harness/core/retry.go:332-342 | internal/harness/core/retry.go:370-380 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/harness/core/retry.go:332\u0060 it begins part-way through the construct above it, so those exact 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/harness/core/retry.go"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c66b72f12ca47892119ee8119a6ae0f13f4c25cbe9811feaf007afacc1e45e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/harness/core/workflow.go:180-190 | internal/harness/core/workflow.go:261-271 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/harness/core/workflow.go:180\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/harness/core/workflow.go"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"b7e225c68ed62dc07fec1d2681247fae941d3c111a7eae8182cb8d2a2ad2dc24"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/ingestion/compilation/extractor/ner_relation.go:135-145 | internal/ingestion/compilation/extractor/ner_relation.go:175-185 \u2014 both copies are in the same file, so extract the block into one function there 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/ingestion/compilation/extractor/ner_relation.go"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"f6526b18f6bc5b6f1e4ebc4c6c19a2376ea27e13e90b19ae6e425c1ca90155cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/ingestion/component/chunker/group.go:163-173 | internal/ingestion/component/chunker/hierarchy.go:247-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 \u0060internal/ingestion/component/chunker/group.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ingestion/component/chunker/group.go"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb56a0c5804778de9c235cbc67a63a3ffafe52eb15567e848ae1791cd049be6b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): internal/ingestion/component/chunker/token.go:1198-1208 | internal/ingestion/component/chunker/token.go:1218-1228 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ingestion/component/chunker/token.go:1198\u0060 it begins part-way through the construct above it, so those exact 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/ingestion/component/chunker/token.go"},"region":{"startLine":1198}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a26a553d4248b1e6f60833b0a44f29108fba76148270c930edb0061ea8002c4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 50): internal/entity/models/302ai.go:446-456 | internal/entity/models/302ai.go:676-686 | internal/entity/models/aliyun.go:457-467 | internal/entity/models/astraflow.go:394-404 | internal/entity/models/baidu.go:536-546 | internal/entity/models/cohere.go:189-199 | internal/entity/models/cohere.go:706-716 | internal/entity/models/cometapi.go:441-451 | internal/entity/models/cometapi.go:515-525 | internal/entity/models/deepinfra.go:399-409 | internal/entity/models/deepinfra.go:491-501 | internal/entity/models/fishaudio.go:152-162 | internal/entity/models/fishaudio.go:231-241 | internal/entity/models/fishaudio.go:360-370 | internal/entity/models/fishaudio.go:423-433 | internal/entity/models/funasr.go:171-181 | internal/entity/models/funasr.go:240-250 | internal/entity/models/groq.go:327-337 | internal/entity/models/groq.go:400-410 | internal/entity/models/jiekouai.go:216-226 | internal/entity/models/jiekouai.go:305-315 | internal/entity/models/jiekouai.go:387-397 | internal/entity/models/jina.go:364-374 | internal/entity/models/lmstudio.go:300-310 | internal/entity/models/minimax.go:389-399 | internal/entity/models/mistral.go:440-450 | internal/entity/models/mistral.go:546-556 | internal/entity/models/openai.go:316-326 | internal/entity/models/openai.go:435-445 | internal/entity/models/openai_api_compatible.go:299-309 | internal/entity/models/openai_api_compatible.go:393-403 | internal/entity/models/openrouter.go:415-425 | internal/entity/models/openrouter.go:488-498 | internal/entity/models/orcarouter.go:172-182 | internal/entity/models/orcarouter.go:231-241 | internal/entity/models/ragcon.go:423-432 | internal/entity/models/ragcon.go:585-594 | internal/entity/models/siliconflow.go:593-603 | internal/entity/models/siliconflow.go:671-681 | internal/entity/models/stepfun.go:240-250 | internal/entity/models/togetherai.go:456-466 | internal/entity/models/togetherai.go:531-541 | internal/entity/models/xai.go:280-290 | internal/entity/models/xai.go:356-366 | internal/entity/models/xiaomi.go:173-183 | internal/entity/models/xiaomi.go:416-425 | internal/entity/models/xinference.go:422-432 | internal/entity/models/xinference.go:499-509 | internal/entity/models/zhipu-ai.go:506-515 | internal/entity/models/zhipu-ai.go:601-610 \u2014 there are 50 copies across 27 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 50 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/entity/models/302ai.go:446\u0060 it does not close everything it opens, so those exact 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/entity/models/302ai.go"},"region":{"startLine":446}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e31eb1262171395d32f235648fbb805c58352d7adfb095e17e52788ea7b9e18"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 19): internal/entity/models/gpustack.go:144-153 | internal/entity/models/gpustack.go:237-246 | internal/entity/models/lmstudio.go:193-202 | internal/entity/models/lmstudio.go:296-305 | internal/entity/models/localai.go:184-193 | internal/entity/models/localai.go:289-298 | internal/entity/models/localai.go:347-356 | internal/entity/models/mineru_local.go:149-158 | internal/entity/models/modelscope.go:183-192 | internal/entity/models/ollama.go:180-189 | internal/entity/models/openai_api_compatible.go:295-304 | internal/entity/models/openai_api_compatible.go:389-398 | internal/entity/models/vllm.go:203-212 | internal/entity/models/vllm.go:273-282 | internal/entity/models/vllm.go:396-405 | internal/entity/models/xinference.go:186-195 | internal/entity/models/xinference.go:299-308 | internal/entity/models/xinference.go:495-504 | internal/entity/models/xinference.go:552-561 \u2014 there are 19 copies across 9 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 19 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/entity/models/gpustack.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. 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/entity/models/gpustack.go"},"region":{"startLine":144}}}],"partialFingerprints":{"codehealthFindingId/v1":"475df5912f0065c0254d851d80764ab12f404b157e6703da00efdda0a398035b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 15): internal/entity/models/astraflow.go:168-177 | internal/entity/models/huggingface.go:274-283 | internal/entity/models/hunyuan.go:165-174 | internal/entity/models/lmstudio.go:316-325 | internal/entity/models/localai.go:366-375 | internal/entity/models/mistral.go:341-350 | internal/entity/models/novita.go:341-350 | internal/entity/models/openai.go:272-281 | internal/entity/models/openrouter.go:566-575 | internal/entity/models/orcarouter.go:246-255 | internal/entity/models/qiniu.go:266-275 | internal/entity/models/stepfun.go:155-164 | internal/entity/models/tokenpony.go:144-153 | internal/entity/models/upstage.go:263-272 | internal/entity/models/vllm.go:293-302 \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/entity/models/astraflow.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. 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/entity/models/astraflow.go"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"b11abeba6a258d9fe91e87e849d4bf797070a855239419d2c3f917288995b696"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 9): internal/entity/models/302ai.go:608-617 | internal/entity/models/deepinfra.go:475-484 | internal/entity/models/fishaudio.go:214-223 | internal/entity/models/mineru.go:174-183 | internal/entity/models/minimax.go:373-382 | internal/entity/models/mistral.go:530-539 | internal/entity/models/openrouter.go:472-481 | internal/entity/models/orcarouter.go:156-165 | internal/entity/models/siliconflow.go:655-664 \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/entity/models/302ai.go:608\u0060 it does not close everything it opens, so those exact 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/entity/models/302ai.go"},"region":{"startLine":608}}}],"partialFingerprints":{"codehealthFindingId/v1":"34b23440647fadebd97ae65324954d9660cc1e9cc83e4ab5c0958ecf4a818bfc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 7): internal/entity/models/aliyun.go:563-572 | internal/entity/models/baidu.go:547-557 | internal/entity/models/cometapi.go:286-295 | internal/entity/models/deepseek.go:251-261 | internal/entity/models/gitee.go:654-664 | internal/entity/models/ragcon.go:319-328 | internal/entity/models/siliconflow.go:274-284 \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/entity/models/aliyun.go:563\u0060 it begins part-way through the construct above it, so those exact 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/entity/models/aliyun.go"},"region":{"startLine":563}}}],"partialFingerprints":{"codehealthFindingId/v1":"25d9bb9fe5462078d48d4118ad37e9c778a8105ec6f0d921a5029fa37bbc1f0a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 6): internal/entity/models/baidu.go:175-184 | internal/entity/models/gitee.go:123-133 | internal/entity/models/moonshot.go:154-163 | internal/entity/models/xiaomi.go:141-151 | internal/entity/models/xunfei.go:155-168 | internal/entity/models/zhipu-ai.go:125-134 \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/entity/models/baidu.go:175\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/baidu.go"},"region":{"startLine":175}}}],"partialFingerprints":{"codehealthFindingId/v1":"87aac9cf99cc3f84272db5e7a447568318d69501e36c1e35c7fe6393318b996c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 5): internal/entity/models/cohere.go:268-277 | internal/entity/models/deepinfra.go:553-562 | internal/entity/models/fishaudio.go:277-287 | internal/entity/models/minimax.go:474-483 | internal/entity/models/siliconflow.go:719-728 \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/entity/models/cohere.go:268\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/entity/models/cohere.go"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"370179e541b2713377126a5bca904850ba07f08111864225f659a3a4e0e3876c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 5): internal/entity/models/cohere.go:685-695 | internal/entity/models/fishaudio.go:340-350 | internal/entity/models/funasr.go:218-227 | internal/entity/models/tokenhub.go:223-233 | internal/entity/models/zhipu-ai.go:236-247 \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/entity/models/cohere.go:685\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/entity/models/cohere.go"},"region":{"startLine":685}}}],"partialFingerprints":{"codehealthFindingId/v1":"97fdf8478bad15c19cd60eda4961eb416df2989c77a158ef4b2df59ba2a3d398"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): internal/entity/models/jina.go:173-182 | internal/entity/models/openrouter.go:156-165 | internal/entity/models/tokenhub.go:122-131 | internal/entity/models/zhipu-ai.go:168-178 \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/entity/models/jina.go:173\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/entity/models/jina.go"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"98a8cb93c997989ca5907f5a0623fda9b169d6f959597d943d69424697c6c56d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 4): internal/entity/models/moonshot.go:254-263 | internal/entity/models/ollama.go:287-301 | internal/entity/models/openrouter.go:605-614 | internal/entity/models/tokenhub.go:248-261 \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/entity/models/moonshot.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/moonshot.go"},"region":{"startLine":254}}}],"partialFingerprints":{"codehealthFindingId/v1":"3d8182168851b48887769df56927939da7ed5fd9316b6e76230c468634902ff3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): internal/cli/admin_command.go:222-231 | internal/cli/admin_command.go:901-910 | internal/cli/admin_command.go:967-976 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/cli/admin_command.go"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"111fabc0777eb3441b66d54a3821cbb21db684114ba2086c5d144fe7165fba57"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): internal/cli/response.go:69-78 | internal/cli/response.go:169-178 | internal/cli/response.go:493-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/cli/response.go:69\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/cli/response.go"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"7364298426ec57f685cdbe7ab75bfc9c05e176fd494d6fbbbcb63da7452cb235"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): internal/entity/models/cometapi.go:167-176 | internal/entity/models/nvidia.go:83-93 | internal/entity/models/nvidia.go:118-128 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/cometapi.go"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"87e8d56b01a5e84e514de27eee878082f3d16cf8b00bd2f9a9ec3338609c4177"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): internal/entity/models/localai.go:337-346 | internal/entity/models/modelscope.go:173-182 | internal/entity/models/xinference.go:542-551 \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/entity/models/localai.go:337\u0060 it does not close everything it opens, so those exact 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/entity/models/localai.go"},"region":{"startLine":337}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c011da431b0773cb14e374b5223a39701176213b33769991467c2d31946fc68"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): internal/entity/models/openrouter.go:393-402 | internal/entity/models/xiaomi.go:320-329 | internal/entity/models/xiaomi.go:514-523 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/openrouter.go"},"region":{"startLine":393}}}],"partialFingerprints":{"codehealthFindingId/v1":"c78c79c6804e5d2f7155115b9657debcaa04896ec094a58f0dc04c4673691eca"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/admin/handler_ee.go:340-349 | internal/handler/providers.go:137-146 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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":"internal/admin/handler_ee.go"},"region":{"startLine":340}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f743ad44efb79f0a578a56df01abca1fa936fa4f0dcaaba338651bae83e859e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/admin/handler_ee.go:392-401 | internal/handler/providers.go:227-236 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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":"internal/admin/handler_ee.go"},"region":{"startLine":392}}}],"partialFingerprints":{"codehealthFindingId/v1":"1aea58e95c18c8366327f110e892c4abd2ae53b29c1c243dcc9b0df6fc217aea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/admin/service.go:225-234 | internal/admin/service.go:559-568 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/admin/service.go"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"41cc10204a7acc49c28161585e1e8de3705b467253fb9c3548718932e9f63c7a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/agent/component/variable_aggregator.go:63-72 | internal/agent/component/variable_assigner.go:69-78 \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/agent/component/variable_aggregator.go:63\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/agent/component/variable_aggregator.go"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3d8198a0f0e0f46500e3fe17c56f91f24b96230338b739e19622897509bfef1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/agent/tool/querit.go:506-515 | internal/ingestion/component/knowledge_compiler/structure/compile.go:81-90 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/agent/tool/querit.go:506\u0060 it begins part-way through the construct above it, so those exact 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/agent/tool/querit.go"},"region":{"startLine":506}}}],"partialFingerprints":{"codehealthFindingId/v1":"19ec6d3dc3a7cffc12d13eff5c5ff4650a5226fb2cc1617799f0429d84c83b05"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/cli/admin_command.go:2513-2523 | internal/cli/admin_command.go:2540-2549 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/cli/admin_command.go:2513\u0060 it begins part-way through the construct above it, so those exact 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/cli/admin_command.go"},"region":{"startLine":2513}}}],"partialFingerprints":{"codehealthFindingId/v1":"9eaf1d250abe55cfc9adcb2269ae3fdae36f999b18ede7ff67ae17c9488a7829"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/cli/admin_command.go:2547-2556 | internal/cli/admin_command.go:2713-2723 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/cli/admin_command.go:2713\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/cli/admin_command.go"},"region":{"startLine":2547}}}],"partialFingerprints":{"codehealthFindingId/v1":"081ef185da00a501e84c500585c6b5a802720c8a00010979b9b3a3f039d714e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/cli/benchmark.go:75-84 | internal/cli/benchmark.go:156-165 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/cli/benchmark.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":"internal/cli/benchmark.go"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"3211bee8c1bf1561cfc5f09c49344d9d3fb5216eb03e8a044fa7ee3c41426aed"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/cli/cli.go:180-189 | internal/cli/cli.go:323-332 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/cli/cli.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/cli/cli.go"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"54cd0339811daec6ce943eb3db02283081b102a276eb821895a7a41a00e7211c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/cli/filesystem/skill.go:1263-1272 | internal/cli/filesystem/skill.go:1959-1968 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/cli/filesystem/skill.go:1263\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/cli/filesystem/skill.go"},"region":{"startLine":1263}}}],"partialFingerprints":{"codehealthFindingId/v1":"cb6c51213eeab13aebbc2a8200894abe0391676311b9b4db48cb1f81e898b130"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/dao/file.go:77-86 | internal/dao/kb.go:552-561 \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/dao/file.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":"internal/dao/file.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"56474ee587326781157d1a8dd4547fe647bf0528f5f0c99322caded3d7eaab24"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/engine/elasticsearch/document.go:61-70 | internal/engine/elasticsearch/document.go:249-258 \u2014 both copies are in the same file, so extract the block 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/engine/elasticsearch/document.go"},"region":{"startLine":61}}}],"partialFingerprints":{"codehealthFindingId/v1":"24674350ba4030093575023e4d01695969878822e7fd37c454368ca2882e9b93"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/engine/elasticsearch/meta_filter.go:197-206 | internal/engine/infinity/meta_filter.go:81-90 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/engine/elasticsearch/meta_filter.go:197\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/engine/elasticsearch/meta_filter.go"},"region":{"startLine":197}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2f0ca9ba93b84a3471d971f87f033282ad65a86bb0a0299ea6ff88077481de4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/entity/models/anthropic.go:82-91 | internal/entity/models/anthropic.go:397-406 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/anthropic.go"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed7e8dad396eef917e3d356a93c99e5b7401f3c224fe4ccbb951038a065b7e79"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/entity/models/anthropic.go:493-502 | internal/entity/models/zhipu-ai.go:631-640 \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/entity/models/anthropic.go:493\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/entity/models/anthropic.go"},"region":{"startLine":493}}}],"partialFingerprints":{"codehealthFindingId/v1":"3e047ef4f0b5e0429125c33f8e25287a0d6c5a23d51b6c955afda030570b7e60"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/entity/models/base_model.go:216-225 | internal/entity/models/base_model.go:247-256 \u2014 both copies are in the same file, so extract the block 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/entity/models/base_model.go"},"region":{"startLine":216}}}],"partialFingerprints":{"codehealthFindingId/v1":"89bb1f0461b82342afc8bca606133401122eb92b9ba23b31d0d2fc634c30b735"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/entity/models/huaweicloud.go:277-286 | internal/entity/models/huaweicloud.go:382-391 \u2014 both copies are in the same file, so extract the block into one function there 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/entity/models/huaweicloud.go"},"region":{"startLine":277}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fe6c2379083bb5076401992264422ee923a5446bcb1efef8b35615d00da8270"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/entity/models/mistral.go:172-181 | internal/entity/models/tokenhub.go:96-105 \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/entity/models/mistral.go"},"region":{"startLine":172}}}],"partialFingerprints":{"codehealthFindingId/v1":"5385ba6a7aeae4f3a843714e890584f35a4a7b1c559f163768fe6e4e6915e5df"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/entity/models/nvidia.go:107-116 | internal/entity/models/xiaomi.go:115-126 \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/entity/models/nvidia.go"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"20a4387627927120dac38d32c24652def029ab3c93bde6b2da1d1d6f24f5f91e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/entity/models/openrouter.go:102-115 | internal/entity/models/orcarouter.go:90-99 \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/entity/models/openrouter.go:102\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/openrouter.go"},"region":{"startLine":102}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e4d76c3f3f4be16867b75931191bdf07d369bed5b1706e6c7ee8463068a0441"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/entity/models/openrouter.go:276-285 | internal/entity/models/siliconflow.go:440-449 \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/entity/models/openrouter.go"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"0262268a8b09d6908ee70d4c3a3d23bd01d577899080c2bc651ff02b897ab708"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/entity/models/ragcon.go:272-281 | internal/entity/models/siliconflow.go:479-488 \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/entity/models/ragcon.go:272\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/entity/models/ragcon.go"},"region":{"startLine":272}}}],"partialFingerprints":{"codehealthFindingId/v1":"6747c91132ac1b9e94312e3fde02c9ef672645142dcea7059e94de03cdc6cffd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/entity/models/replicate.go:236-245 | internal/entity/models/replicate.go:276-285 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/entity/models/replicate.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. 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/entity/models/replicate.go"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf04acf0ce7ebdc775c4aca2df5cd974ba50eaadf2bc318c29ef74fe8bd8252b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/entity/models/xinference.go:150-159 | internal/entity/models/xinference.go:258-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 \u0060internal/entity/models/xinference.go:150\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/xinference.go"},"region":{"startLine":150}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e18f1d382e7595eb0165ce6b657760a89d39bd96b3c9742818c7d232600d735"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/handler/bot.go:63-72 | internal/handler/bot.go:186-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. 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/handler/bot.go"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d323897f8903afa52d0eedfc5a9e750bf61644926e0d46d4a33725ab26f7387"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/handler/bot.go:94-103 | internal/handler/bot.go:135-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. 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/handler/bot.go"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"53e13c5400b789fb58af933f0d6c0e63300f302348cf164d7b28c638f802feab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/handler/chat_session.go:361-370 | internal/handler/chat_session.go:409-418 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/handler/chat_session.go"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a10f95bfc69a0e04c39060265f5f01eec495a05123b35e21a154a06d3d4f5e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/handler/dataset_artifact.go:86-95 | internal/handler/dataset_artifact.go:316-325 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/handler/dataset_artifact.go:86\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/handler/dataset_artifact.go"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"14f5c2db8249bc42b2bdbea580ffeaf98ff5709266ed78bbf19aa8b52b92bfcd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/handler/skill_search.go:167-176 | internal/handler/skill_search.go:241-250 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/handler/skill_search.go:167\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/handler/skill_search.go"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"0132c66129d3bd21737c40e0659c3a0101e2f12b3a879e72966f26c047402d19"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/handler/user.go:132-141 | internal/handler/user.go:211-220 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/handler/user.go:132\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/handler/user.go"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3acfeb2a689e6c15e7b42e1df3e9db6bfa5c5ff3284eaccd14fad6a583fca8c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/harness/core/middlewares/plantask/plantask.go:339-348 | internal/harness/core/middlewares/plantask/plantask.go:408-417 \u2014 both copies are in the same file, so extract the block 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/harness/core/middlewares/plantask/plantask.go"},"region":{"startLine":339}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e3db9e69956bf6195440151232e62f9d890d336fb93f2dfa5041ad8bb7b936a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/harness/core/workflow.go:133-145 | internal/harness/core/workflow.go:211-220 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/harness/core/workflow.go:133\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/harness/core/workflow.go"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"5bd504222e7d3e891908fc4ff73a4e7be2059104221c397cacddcf6e5ed8c43c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/harness/core/workflow_graph.go:88-97 | internal/harness/core/workflow_graph.go:246-255 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/harness/core/workflow_graph.go:88\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/harness/core/workflow_graph.go"},"region":{"startLine":88}}}],"partialFingerprints":{"codehealthFindingId/v1":"355d192364606844fee446ab58ebef002a40a65e5b9e661c23347342193be869"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/harness/core/workflow_graph.go:119-128 | internal/harness/core/workflow_graph.go:282-293 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/harness/core/workflow_graph.go:119\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/harness/core/workflow_graph.go"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"76673d160c91708d78d3a91ed93de2f62c58d12fa7bc43510b0a1c6c31a0185e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/harness/core/workflow_graph.go:131-140 | internal/harness/core/workflow_graph.go:208-217 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/harness/core/workflow_graph.go:131\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/harness/core/workflow_graph.go"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"99caf27658850e6ff7fba9a06fd9ef8c932ed2823c2aa1e018d736d1ca53e4d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/harness/graph/channels/barrier.go:91-100 | internal/harness/graph/channels/barrier.go:279-288 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/harness/graph/channels/barrier.go"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"2794787da3bfdd0605d78065b9bf255a1b168ccd515f6a8a8a465c76fcff34f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/harness/graph/graph/compiled.go:110-121 | internal/harness/graph/graph/compiled.go:128-137 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/harness/graph/graph/compiled.go"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5ee2abd75a5e5d82fc2a7e9c20cf2400aca434464dfdc3a6a1defbedfa9da00"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/harness/graph/store/memory.go:68-77 | internal/harness/graph/store/memory.go:327-336 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/harness/graph/store/memory.go:68\u0060 it does not close everything it opens, so those exact 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/harness/graph/store/memory.go"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"67b7805fd7c01d412d1bf55032c7e834a9ee01343518d7bd21bbbfb6518c4cd6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/ingestion/compilation/extractor/ner_relation.go:118-128 | internal/ingestion/compilation/extractor/ner_relation.go:163-172 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ingestion/compilation/extractor/ner_relation.go:118\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/ingestion/compilation/extractor/ner_relation.go"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ed492c943f4887ec3f08807f0671517f87c97efee984f2fd72e4c3594c720ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/ingestion/component/chunker/qa.go:319-328 | internal/ingestion/component/chunker/qa.go:383-392 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/ingestion/component/chunker/qa.go:319\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ingestion/component/chunker/qa.go"},"region":{"startLine":319}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fd2fb64f37767456e05021c6bf405bce903cad612a98a48bab1a534363ba456"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): internal/ingestion/component/extractor_tag.go:342-351 | internal/ingestion/component/extractor_tag.go:381-390 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/ingestion/component/extractor_tag.go:342\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/ingestion/component/extractor_tag.go"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"2915bdbfa70f5d12dc1fc0177b98439163b904fb0489049ca32fa84448ca6cdb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 87): internal/entity/models/aliyun.go:245-253 | internal/entity/models/aliyun.go:351-359 | internal/entity/models/aliyun.go:549-557 | internal/entity/models/astraflow.go:151-159 | internal/entity/models/astraflow.go:218-226 | internal/entity/models/astraflow.go:299-307 | internal/entity/models/astraflow.go:391-399 | internal/entity/models/avian.go:157-165 | internal/entity/models/baidu.go:247-255 | internal/entity/models/baidu.go:346-354 | internal/entity/models/baidu.go:470-478 | internal/entity/models/baidu.go:533-541 | internal/entity/models/cometapi.go:512-520 | internal/entity/models/deepinfra.go:176-184 | internal/entity/models/deepinfra.go:260-268 | internal/entity/models/deepinfra.go:488-496 | internal/entity/models/deepinfra.go:695-703 | internal/entity/models/deepseek.go:237-245 | internal/entity/models/deepseek.go:300-308 | internal/entity/models/fishaudio.go:357-365 | internal/entity/models/fishaudio.go:420-428 | internal/entity/models/gitee.go:198-206 | internal/entity/models/gitee.go:311-319 | internal/entity/models/gitee.go:428-436 | internal/entity/models/gitee.go:525-533 | internal/entity/models/gitee.go:694-702 | internal/entity/models/gitee.go:894-902 | internal/entity/models/groq.go:192-200 | internal/entity/models/groq.go:397-405 | internal/entity/models/huggingface.go:255-263 | internal/entity/models/hunyuan.go:148-156 | internal/entity/models/hunyuan.go:219-227 | internal/entity/models/jina.go:201-209 | internal/entity/models/jina.go:309-317 | internal/entity/models/longcat.go:176-184 | internal/entity/models/mineru.go:187-195 | internal/entity/models/mineru.go:257-265 | internal/entity/models/mistral.go:256-264 | internal/entity/models/mistral.go:323-331 | internal/entity/models/mistral.go:630-638 | internal/entity/models/novita.go:324-332 | internal/entity/models/novita.go:420-428 | internal/entity/models/novita.go:540-548 | internal/entity/models/novita.go:612-620 | internal/entity/models/nvidia.go:187-195 | internal/entity/models/nvidia.go:306-314 | internal/entity/models/openai.go:199-207 | internal/entity/models/openai.go:254-262 | internal/entity/models/openrouter.go:188-196 | internal/entity/models/openrouter.go:296-304 | internal/entity/models/openrouter.go:412-420 | internal/entity/models/openrouter.go:485-493 | internal/entity/models/openrouter.go:547-555 | internal/entity/models/openrouter.go:597-605 | internal/entity/models/orcarouter.go:169-177 | internal/entity/models/orcarouter.go:228-236 | internal/entity/models/perplexity.go:154-162 | internal/entity/models/perplexity.go:241-249 | internal/entity/models/ppio.go:146-154 | internal/entity/models/ppio.go:236-244 | internal/entity/models/ppio.go:330-338 | internal/entity/models/qiniu.go:249-257 | internal/entity/models/ragcon.go:177-185 | internal/entity/models/ragcon.go:249-257 | internal/entity/models/ragcon.go:306-314 | internal/entity/models/replicate.go:520-528 | internal/entity/models/siliconflow.go:260-268 | internal/entity/models/siliconflow.go:316-324 | internal/entity/models/siliconflow.go:668-676 | internal/entity/models/stepfun.go:137-145 | internal/entity/models/stepfun.go:237-245 | internal/entity/models/togetherai.go:170-178 | internal/entity/models/togetherai.go:253-261 | internal/entity/models/togetherai.go:337-345 | internal/entity/models/togetherai.go:528-536 | internal/entity/models/tokenhub.go:150-158 | internal/entity/models/tokenhub.go:240-248 | internal/entity/models/tokenpony.go:127-135 | internal/entity/models/upstage.go:178-186 | internal/entity/models/upstage.go:245-253 | internal/entity/models/voyage.go:108-116 | internal/entity/models/voyage.go:215-223 | internal/entity/models/xai.go:353-361 | internal/entity/models/zhipu-ai.go:255-263 | internal/entity/models/zhipu-ai.go:408-416 | internal/entity/models/zhipu-ai.go:598-606 | internal/entity/models/zhipu-ai.go:768-776 \u2014 there are 87 copies across 35 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 87 sites; resolving a subset leaves the remainder to drift apart. 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/entity/models/aliyun.go"},"region":{"startLine":245}}}],"partialFingerprints":{"codehealthFindingId/v1":"82b36feb8cec9c24d87347a74efc936c30c240eb271ddc56d0ddb4edb3ba4291"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 22): internal/entity/models/cometapi.go:274-282 | internal/entity/models/cometapi.go:314-322 | internal/entity/models/gpustack.go:147-155 | internal/entity/models/gpustack.go:240-248 | internal/entity/models/lmstudio.go:196-204 | internal/entity/models/lmstudio.go:299-307 | internal/entity/models/localai.go:187-195 | internal/entity/models/localai.go:292-300 | internal/entity/models/localai.go:350-358 | internal/entity/models/mineru_local.go:152-160 | internal/entity/models/modelscope.go:186-194 | internal/entity/models/ollama.go:183-191 | internal/entity/models/openai_api_compatible.go:298-306 | internal/entity/models/openai_api_compatible.go:392-400 | internal/entity/models/replicate.go:235-243 | internal/entity/models/vllm.go:206-214 | internal/entity/models/vllm.go:276-284 | internal/entity/models/vllm.go:399-407 | internal/entity/models/xinference.go:189-197 | internal/entity/models/xinference.go:302-310 | internal/entity/models/xinference.go:498-506 | internal/entity/models/xinference.go:555-563 \u2014 there are 22 copies across 11 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 22 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/entity/models/cometapi.go:274\u0060 it does not close everything it opens, so those exact 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/entity/models/cometapi.go"},"region":{"startLine":274}}}],"partialFingerprints":{"codehealthFindingId/v1":"ea4aea327a26b0d3bf08104fdee3dc52e8f27f5a4a3ba022a9de03a0536341ae"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 12): internal/entity/models/anthropic.go:506-514 | internal/entity/models/cohere.go:284-292 | internal/entity/models/deepinfra.go:568-576 | internal/entity/models/minimax.go:489-497 | internal/entity/models/openai.go:344-352 | internal/entity/models/ragcon.go:450-458 | internal/entity/models/replicate.go:425-433 | internal/entity/models/siliconflow.go:734-742 | internal/entity/models/stepfun.go:301-309 | internal/entity/models/xiaomi.go:212-220 | internal/entity/models/xiaomi.go:446-454 | internal/entity/models/zhipu-ai.go:645-653 \u2014 there are 12 copies across 11 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 12 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/entity/models/anthropic.go:506\u0060 it does not close everything it opens, so those exact 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/entity/models/anthropic.go"},"region":{"startLine":506}}}],"partialFingerprints":{"codehealthFindingId/v1":"5213c6fc579d940051e229e2ef17c95c8cc8ac3708c49d80d9cdff8ae52a0f71"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 9): internal/entity/models/baichuan.go:65-73 | internal/entity/models/gpustack.go:72-80 | internal/entity/models/hunyuan.go:85-93 | internal/entity/models/modelscope.go:86-94 | internal/entity/models/stepfun.go:71-79 | internal/entity/models/tokenhub.go:75-83 | internal/entity/models/tokenpony.go:68-76 | internal/entity/models/xai.go:81-89 | internal/entity/models/xinference.go:90-98 \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/entity/models/baichuan.go:65\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/entity/models/baichuan.go"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"00ceb6f00443c3713e6fa7cf448fd01c92efd01392e378440a9ccbb6b8d181d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 7): internal/entity/models/302ai.go:461-470 | internal/entity/models/cometapi.go:456-465 | internal/entity/models/funasr.go:185-194 | internal/entity/models/groq.go:342-351 | internal/entity/models/openai_api_compatible.go:407-415 | internal/entity/models/siliconflow.go:608-617 | internal/entity/models/xai.go:295-304 \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/entity/models/302ai.go:461\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/entity/models/302ai.go"},"region":{"startLine":461}}}],"partialFingerprints":{"codehealthFindingId/v1":"39d2b3429266adfc13f77120eb1f4fdc14954feecc3c3528b83d35250d9d77d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 5): internal/cli/response.go:206-214 | internal/cli/response.go:242-250 | internal/cli/response.go:278-286 | internal/cli/response.go:314-322 | internal/cli/response.go:350-358 \u2014 all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/cli/response.go:206\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/cli/response.go"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"83041fe55811f0e4bf4078ce0862ca4de12b06dc850c2cc4641b3c96f89041d1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): internal/entity/models/cohere.go:624-632 | internal/entity/models/deepinfra.go:387-395 | internal/entity/models/fishaudio.go:141-149 | internal/entity/models/siliconflow.go:580-588 \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/entity/models/cohere.go"},"region":{"startLine":624}}}],"partialFingerprints":{"codehealthFindingId/v1":"816a2609d384ecf08d62bcd5a3c7fd0af800d68f9b69cb0d3844083abf024487"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 4): internal/entity/models/deepinfra.go:147-155 | internal/entity/models/jina.go:176-184 | internal/entity/models/openrouter.go:159-167 | internal/entity/models/tokenhub.go:125-133 \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/entity/models/deepinfra.go:147\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/entity/models/deepinfra.go"},"region":{"startLine":147}}}],"partialFingerprints":{"codehealthFindingId/v1":"c367c3cdec8aefd53df28e487f65889b6d2fda74e132ff063a58f36dbddf177f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): internal/agent/component/agent.go:1379-1387 | internal/agent/component/categorize.go:405-413 | internal/agent/component/categorize.go:620-628 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/agent/component/agent.go"},"region":{"startLine":1379}}}],"partialFingerprints":{"codehealthFindingId/v1":"d846ad2cb5d19b4ba54c24c6bfba4051da0bcb25f2d5f14c3e1964a2fef03354"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): internal/cli/admin_command.go:1575-1583 | internal/cli/admin_command.go:1611-1619 | internal/cli/admin_command.go:1647-1655 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it 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/cli/admin_command.go"},"region":{"startLine":1575}}}],"partialFingerprints":{"codehealthFindingId/v1":"00b2884d4f96d7fc1a26e9a4af0a098c0ee4e2d066d8236df3b18f910fc59f89"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): internal/entity/models/302ai.go:733-741 | internal/entity/models/fishaudio.go:412-420 | internal/entity/models/nvidia.go:385-393 \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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/entity/models/302ai.go"},"region":{"startLine":733}}}],"partialFingerprints":{"codehealthFindingId/v1":"21b9c3a2ba5936bd362c660a38ce94a9ed90e37c15e3201a5b4378c487910223"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): internal/entity/models/aliyun.go:400-408 | internal/entity/models/openai_api_compatible.go:244-253 | internal/entity/models/xiaomi.go:478-486 \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/entity/models/aliyun.go:400\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/entity/models/aliyun.go"},"region":{"startLine":400}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa306e829fefd8a44fe582fa78d2ed6f93cb94fb2bc93b5ef9abf84d101e0f26"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): internal/entity/models/aliyun.go:433-441 | internal/entity/models/base_model.go:185-194 | internal/entity/models/openai_api_compatible.go:284-293 \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/entity/models/aliyun.go"},"region":{"startLine":433}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9b85def51ac7efe2f838f27d1a9946a8b40f8a49dea63011f8722e1d0eb48bc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): internal/entity/models/openai_api_compatible.go:328-336 | internal/entity/models/openrouter.go:357-365 | internal/entity/models/xiaomi.go:270-278 \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/entity/models/openai_api_compatible.go:328\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/entity/models/openai_api_compatible.go"},"region":{"startLine":328}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7550df806a2d8717fd42270825172e66fbb2c992c55ffeebd34ae012cfe0efa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): internal/harness/graph/runnable/runnable.go:190-198 | internal/harness/graph/runnable/runnable.go:270-278 | internal/harness/graph/runnable/runnable.go:353-361 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the 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/harness/graph/runnable/runnable.go:190\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/harness/graph/runnable/runnable.go"},"region":{"startLine":190}}}],"partialFingerprints":{"codehealthFindingId/v1":"7f4f9ab2766421be60c4c93708903ff9cdcd4308f3ea8f289f1b6de02eb1e3be"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/agent/component/llm.go:925-933 | internal/agent/component/llm.go:1328-1336 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/agent/component/llm.go"},"region":{"startLine":925}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed87fa063a229e619e503f7d98be41b97c5214875201b8c695b1fe966f927793"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/agent/tool/duckduckgo.go:225-233 | internal/agent/tool/duckduckgo.go:356-364 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. 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/agent/tool/duckduckgo.go"},"region":{"startLine":225}}}],"partialFingerprints":{"codehealthFindingId/v1":"8299bb824af1df73fa6bd3c1bb1b97d6faee7490685e0d55f0b29c7cbf211fee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/agent/workflowx/parallel.go:518-526 | internal/agent/workflowx/parallel.go:534-542 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/agent/workflowx/parallel.go:518\u0060 it begins part-way through the construct above it, so those exact 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/agent/workflowx/parallel.go"},"region":{"startLine":518}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cd94b1fe65be4b31ba9e8baad8673071018826e42f42074f9fc25b960af0258"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/channels/feishu.go:256-266 | internal/channels/line.go:268-276 \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/channels/feishu.go:256\u0060 it does not close everything it opens, so those exact 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/channels/feishu.go"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"ec04bf69e1fc6481e8be235855cb7172305a1b635cceb9840d2dd5b586f95ba8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/cli/admin_command.go:1464-1473 | internal/cli/admin_command.go:1722-1730 \u2014 both copies are in the same file, so extract the block into one function there 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/cli/admin_command.go"},"region":{"startLine":1464}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b2a0074b380591f1b15d0a117c823371083e5aca96951307e271393ea53298a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/cli/response.go:1013-1021 | internal/cli/response.go:1072-1080 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/cli/response.go"},"region":{"startLine":1013}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f6839b58f89f90a1028007ed6e76baaeef197ca2c41cac7bc557013f382e762"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/common/multimodal.go:101-109 | internal/common/multimodal.go:123-131 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/common/multimodal.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/common/multimodal.go"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"30fbe3ff7b86a9da58317494468130d19b20cc89936dfd22471f521653ff6975"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/dao/chat.go:195-203 | internal/dao/chat_session.go:82-90 \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/dao/chat.go"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"c24bc1405d3e35294c49cfd71e5feece8818dc2198c54467b04d300c02f7b9fb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/engine/elasticsearch/chunk.go:134-142 | internal/engine/elasticsearch/document.go:59-67 \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/engine/elasticsearch/chunk.go:134\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/engine/elasticsearch/chunk.go"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe7834e6546fecf55ef8a3f226df160576fe589b600d65cf320a46c3838501bf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/engine/infinity/chunk.go:1444-1452 | internal/engine/infinity/chunk.go:1662-1670 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/engine/infinity/chunk.go:1444\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/engine/infinity/chunk.go"},"region":{"startLine":1444}}}],"partialFingerprints":{"codehealthFindingId/v1":"b6779092a0b4b49cda397d08c0d1088552c88e7a33df1f8e5feb119fc1a17707"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/entity/models/baidu.go:128-138 | internal/entity/models/localai.go:108-116 \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/entity/models/baidu.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/entity/models/baidu.go"},"region":{"startLine":128}}}],"partialFingerprints":{"codehealthFindingId/v1":"833a533b54dba5ded4e51705e6e89b34daafca5fcadc6e1dc28dba478ea22107"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/entity/models/fishaudio.go:294-302 | internal/entity/models/togetherai.go:597-605 \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/entity/models/fishaudio.go:294\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/entity/models/fishaudio.go"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"081b9f75425dea81941693a4f10a83d7c71eb4666cd9101953f4740aa172224d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/entity/models/funasr.go:159-167 | internal/entity/models/xinference.go:412-421 \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/entity/models/funasr.go"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c7b1d1ac63dcf136c47ff1ddd625c77e1d38273d81a67b6494e53da56b2d229"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/entity/models/huaweicloud.go:308-316 | internal/entity/models/huaweicloud.go:413-421 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. 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/entity/models/huaweicloud.go"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"127d2f11c852f14efeb9896c5ad2fef1651ace8a4cf4ee5bdd1000e713bd9537"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/entity/models/jiekouai.go:164-172 | internal/entity/models/jina.go:154-162 \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/entity/models/jiekouai.go:164\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/entity/models/jiekouai.go"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd808334a31341c5fb0daf458218d609dbdb22ad86a1aa336b7024592126026d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/entity/models/mineru.go:249-257 | internal/entity/models/volcengine.go:488-496 \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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/entity/models/mineru.go"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"d3abd12d7d25d05f92e1fbc109ed934eb746eab3f958b2bd7ccfc19f74f04bbd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/entity/models/novita.go:108-116 | internal/entity/models/upstage.go:101-109 \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/entity/models/novita.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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/entity/models/novita.go"},"region":{"startLine":108}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf71b5bfbdc5873c9231fb8cf3b40fcafb742ec0c6e49894b3a6c7dc93835b24"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/entity/models/novita.go:512-520 | internal/entity/models/xinference.go:270-278 \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/entity/models/novita.go:512\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/novita.go"},"region":{"startLine":512}}}],"partialFingerprints":{"codehealthFindingId/v1":"68dcd76497ec9e43e3c8747f2c856d8186d953530bb571adb0ee2380f61adaf1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/entity/models/ollama.go:105-113 | internal/entity/models/vllm.go:117-125 \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/entity/models/ollama.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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/entity/models/ollama.go"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5e86facea75a9642fceb483f9f4f2421a830612314721460226ae71ef7a3bfb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/entity/models/openai.go:701-709 | internal/entity/models/xai.go:231-239 \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/entity/models/openai.go:701\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/entity/models/openai.go"},"region":{"startLine":701}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fc3f7ace66f41fc09b9907d3697f10fef8c151d37f8022295963b48efd400e9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/entity/models/openrouter.go:403-411 | internal/entity/models/zhipu-ai.go:759-767 \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/entity/models/openrouter.go"},"region":{"startLine":403}}}],"partialFingerprints":{"codehealthFindingId/v1":"558e8cc69c8d40b7b3083a5d77d7b8881b7dc473462c7d7fa3c0686accbccd94"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/entity/models/ragcon.go:87-96 | internal/entity/models/siliconflow.go:83-91 \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/entity/models/ragcon.go:87\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/entity/models/ragcon.go"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"584c43a0296131d37e57b8a9b12422b66292e087cee58b4e05209fce3d3e557e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/entity/models/voyage.go:76-84 | internal/entity/models/voyage.go:179-187 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/entity/models/voyage.go:76\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/voyage.go"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"541da05cc8f48b724649c0d6ca7ac9cc3411bad03e7639beaf6f7151cfebf58f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/entity/types.go:56-64 | internal/entity/types.go:86-94 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/entity/types.go:56\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/entity/types.go"},"region":{"startLine":56}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9e6c52a0760f2259cd5ac129badfd1a7c677626ab9e1a9158c4187555cec75b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/handler/chat_session.go:458-466 | internal/handler/chat_session.go:495-503 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/handler/chat_session.go"},"region":{"startLine":458}}}],"partialFingerprints":{"codehealthFindingId/v1":"df471bc5b0179daecdfbefc9927a70a15f54659bf6daf1a8272ad1a6451d1f0e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/handler/searchbot.go:181-190 | internal/handler/searchbot.go:329-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/handler/searchbot.go:181\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/handler/searchbot.go"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"6289ca7a6506656ff078db5879ecbf1788a86f0c5b9f379ce61ca1cbff0dba8c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/handler/user.go:163-172 | internal/handler/user.go:251-259 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/handler/user.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/handler/user.go"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"7718dda00bf77a687756a440d57e8149abdabad69e2c736799b252c13acf189e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/harness/core/event_sender.go:76-84 | internal/harness/core/event_sender.go:100-108 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/harness/core/event_sender.go:76\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/harness/core/event_sender.go"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"b47d5d1da23713f29de217fa2a921265380b2bc72b125958d14387c26add1575"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/harness/graph/types/scratchpad.go:572-580 | internal/harness/graph/types/scratchpad.go:652-660 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/harness/graph/types/scratchpad.go:572\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/harness/graph/types/scratchpad.go"},"region":{"startLine":572}}}],"partialFingerprints":{"codehealthFindingId/v1":"b5b085ac7cdfada065c81b5a3a80d55b5880401b18e9dad2deb0ee67c7ac7cb2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/ingestion/compilation/extractor/dep_relation.go:300-308 | internal/ingestion/compilation/extractor/dep_relation.go:314-322 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ingestion/compilation/extractor/dep_relation.go:300\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/ingestion/compilation/extractor/dep_relation.go"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"0110c2885d5e6ca3d3eed00493607066c014917bfecf3397c8c0f0890d8b70ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/ingestion/component/chunker/qa.go:212-220 | internal/ingestion/component/chunker/tag.go:245-253 \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/ingestion/component/chunker/qa.go:212\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/ingestion/component/chunker/qa.go"},"region":{"startLine":212}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3b8b2d986dac7fd2698346c6e18c7c86c4b92dee9cb2f886badb22f3f39b28d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): internal/ingestion/component/schema/chunk_types.go:82-90 | internal/ingestion/component/schema/chunk_types.go:159-167 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/ingestion/component/schema/chunk_types.go:82\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/ingestion/component/schema/chunk_types.go"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"40dae9b8791d57db1dfa3f8c4a6c5188f44b6d6398c81b43fe7f866491040439"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 8): internal/entity/models/lmstudio.go:184-192 | internal/entity/models/localai.go:175-183 | internal/entity/models/localai.go:280-288 | internal/entity/models/ollama.go:171-179 | internal/entity/models/siliconflow.go:184-192 | internal/entity/models/vllm.go:194-202 | internal/entity/models/vllm.go:387-395 | internal/entity/models/xinference.go:178-185 \u2014 there are 8 copies across 6 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 8 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/entity/models/lmstudio.go:184\u0060 it does not close everything it opens, so those exact 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/entity/models/lmstudio.go"},"region":{"startLine":184}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f24ff39df64cee8d8ddace0590db27409c1350f0aceea1258dbb01430db556c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 6): internal/entity/models/localai.go:122-129 | internal/entity/models/mistral.go:182-189 | internal/entity/models/stepfun.go:102-109 | internal/entity/models/togetherai.go:137-144 | internal/entity/models/xai.go:108-115 | internal/entity/models/xinference.go:124-131 \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/entity/models/localai.go:122\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/localai.go"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"dbde76791a20a08e47a85b4f8b03ed1d9bc79c993d5ce046868b7be4a637739a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): internal/admin/handler_ee.go:1958-1965 | internal/admin/handler_ee.go:1984-1991 | internal/admin/handler_ee.go:2009-2016 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/admin/handler_ee.go"},"region":{"startLine":1958}}}],"partialFingerprints":{"codehealthFindingId/v1":"76155444a32e82781d583e138cd4e2c36467438621ab1d5c5feb182fdff56d70"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): internal/entity/models/futurmix.go:107-114 | internal/entity/models/openrouter.go:101-112 | internal/entity/models/orcarouter.go:89-96 \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/entity/models/futurmix.go:107\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/entity/models/futurmix.go"},"region":{"startLine":107}}}],"partialFingerprints":{"codehealthFindingId/v1":"ed1e16dc1c2bc34679454e15fd7be86b1c9398c770f659227cb36547beae15a7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): internal/ingestion/component/knowledge_compiler/wiki/wiki.go:1213-1220 | internal/ingestion/component/knowledge_compiler/wiki/wiki.go:1242-1249 | internal/ingestion/component/knowledge_compiler/wiki/wiki.go:1271-1278 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the 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/ingestion/component/knowledge_compiler/wiki/wiki.go:1213\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/ingestion/component/knowledge_compiler/wiki/wiki.go"},"region":{"startLine":1213}}}],"partialFingerprints":{"codehealthFindingId/v1":"07cc073226284ee8c994567c6bbf05d73bd25d3a403ff0682de69d25d70faf52"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/admin/service.go:1160-1167 | internal/admin/service.go:1172-1179 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/admin/service.go:1160\u0060 it begins part-way through the construct above it, so those exact 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/admin/service.go"},"region":{"startLine":1160}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf55442722d26ec9c85bc43a13fa36bc55d279842d7792fb33596e50292248b3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/agent/canvas/loop_subgraph.go:246-253 | internal/agent/canvas/scheduler.go:569-576 \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/agent/canvas/loop_subgraph.go"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"e6afca3fd07f8dc06a87ed2f226b80d653ae503cadee64db7a9544ca4d9e20eb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/agent/component/categorize.go:374-381 | internal/agent/component/categorize.go:538-548 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/agent/component/categorize.go:374\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/agent/component/categorize.go"},"region":{"startLine":374}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9e1fb7b2f14fdf0db57b3689f3654a675950653a5a107dadf298f94ae52215d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/agent/component/data_operations.go:146-153 | internal/agent/component/loop.go:200-207 \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/agent/component/data_operations.go:146\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/agent/component/data_operations.go"},"region":{"startLine":146}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad9d526e5d5789d4ad5c0019e54f6e0ea539d23f90f0d147ad4ec1034d794bac"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/agent/component/llm.go:909-916 | internal/agent/component/llm.go:1289-1296 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/agent/component/llm.go:909\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/agent/component/llm.go"},"region":{"startLine":909}}}],"partialFingerprints":{"codehealthFindingId/v1":"377a5b7a295d9427ff3424c753fabb6ea9ae428ca32b6bba517b7aa91a7e467a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/agent/runtime/state.go:711-718 | internal/agent/runtime/state.go:728-735 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/agent/runtime/state.go:711\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/agent/runtime/state.go"},"region":{"startLine":711}}}],"partialFingerprints":{"codehealthFindingId/v1":"d363e17ad4638d1860bf109870c9b9bf96404baa3c7e9b9a0cfe37fb5f80a5cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/agent/workflowx/loop.go:911-918 | internal/agent/workflowx/parallel.go:758-765 \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/agent/workflowx/loop.go"},"region":{"startLine":911}}}],"partialFingerprints":{"codehealthFindingId/v1":"300417bd55ab345e56421f43dc19f879f25bb73841800de17b0f00d6bc3f8af2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/channels/dingtalk.go:449-457 | internal/channels/line.go:425-432 \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/channels/dingtalk.go:449\u0060 it does not close everything it opens, so those exact 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/channels/dingtalk.go"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"2222c4bf8aecf6b6b3f26e8ad40c1f7744f95218c9c92834ab5d2bc5d5c2e893"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/cli/filesystem/file.go:115-122 | internal/cli/filesystem/file.go:499-508 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/cli/filesystem/file.go:115\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/cli/filesystem/file.go"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"d95bcc6c842646352f8c62fe80997994607f5a525f4dd9832893ee7a915e9c19"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/cli/filesystem/skill.go:810-817 | internal/cli/filesystem/skill.go:871-878 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/cli/filesystem/skill.go:810\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/cli/filesystem/skill.go"},"region":{"startLine":810}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d330fc6b9647305581a343eef3a8a50f075d42ab94da49c8626f69c8bd01c3f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/common/multimodal.go:313-320 | internal/common/multimodal.go:334-341 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/common/multimodal.go:313\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/common/multimodal.go"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfc43085bc2bc8b070789bed97ffa59209fbb1ad1e0b45ff60816eb3180a9568"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/engine/infinity/chunk.go:279-286 | internal/engine/infinity/document.go:46-53 \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/engine/infinity/chunk.go:279\u0060 it does not close everything it opens, so those exact 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/engine/infinity/chunk.go"},"region":{"startLine":279}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b4a51a070cd63e6fa6035ab52205c9d62f0e3d897e827bbc5a99b0b753b70e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/entity/base.go:91-98 | internal/entity/base.go:113-120 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/entity/base.go:91\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/entity/base.go"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc99bc6da522fc8419451870ad560badc2af1870405049ab3da535d07ef5eb7a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/entity/models/aliyun.go:413-420 | internal/entity/models/openai_api_compatible.go:261-268 \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/entity/models/aliyun.go:413\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/entity/models/aliyun.go"},"region":{"startLine":413}}}],"partialFingerprints":{"codehealthFindingId/v1":"4995867e70945c3dcbd1aa7f2412136b3adc07c9ccb82480ab717d52ad0d99e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/entity/models/baichuan.go:85-93 | internal/entity/models/tokenhub.go:101-108 \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/entity/models/baichuan.go:85\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/baichuan.go"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"f925f80e6b988e2cba9b64dca62a3f9d5e6f9c943bf238e89b267f9156411734"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/entity/models/base_model.go:280-287 | internal/entity/models/replicate.go:426-433 \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/entity/models/base_model.go:280\u0060 it does not close everything it opens, so those exact 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/entity/models/base_model.go"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f77217a0d12f2aac5fbc2f9cfcacf09f55dd76c52eddc3bfe2f457db7b88216"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/entity/models/base_model.go:488-495 | internal/entity/models/replicate.go:221-229 \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/entity/models/base_model.go"},"region":{"startLine":488}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8bf64055360d4702ac835a25b85bbd41bf491d5db2a80daf5f5372d3f850878"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/entity/models/gpustack.go:256-263 | internal/entity/models/xinference.go:205-212 \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/entity/models/gpustack.go:256\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/entity/models/gpustack.go"},"region":{"startLine":256}}}],"partialFingerprints":{"codehealthFindingId/v1":"6fda0e976bb2c67a1f77133d189be61c3c381672fc63a22f9ae71dd69351bfc2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/entity/models/huaweicloud.go:501-508 | internal/entity/models/perplexity.go:147-154 \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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/entity/models/huaweicloud.go"},"region":{"startLine":501}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad15222888b732030676b27c7f65a71b6f655490254277b55802645fc8b93991"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/entity/models/jiekouai.go:208-215 | internal/entity/models/jiekouai.go:297-304 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/jiekouai.go"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"cd445742af28af5fc638944cdc869805e1cd3eb2d10f12a43983da11300050d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/entity/models/mistral.go:370-378 | internal/entity/models/mistral.go:499-506 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/entity/models/mistral.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/mistral.go"},"region":{"startLine":370}}}],"partialFingerprints":{"codehealthFindingId/v1":"758a0f080012391bd344ede6ea79ab65e200b51f9d018515c5c1233b985fece8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/entity/models/ollama.go:77-84 | internal/entity/models/ollama.go:114-121 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/entity/models/ollama.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":"internal/entity/models/ollama.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1ac6e14e4d838cef27e75387bf1358488a1b5e310ec62d9fbdbc9236c40a15e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/entity/models/openai.go:483-490 | internal/entity/models/openai.go:559-566 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/entity/models/openai.go:483\u0060 it does not close everything it opens, so those exact 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/entity/models/openai.go"},"region":{"startLine":483}}}],"partialFingerprints":{"codehealthFindingId/v1":"e59eaae6af9192f71c1125ba2f7a5dbef6639114bfc71912f49e15cabc8a690c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/entity/models/openai.go:651-658 | internal/entity/models/stepfun.go:323-330 \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/entity/models/openai.go:651\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/openai.go"},"region":{"startLine":651}}}],"partialFingerprints":{"codehealthFindingId/v1":"935bdb5183f92ff1d20b9a075b7ea683607299f3702e8b975c94bae4217d3326"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/entity/models/openai_api_compatible.go:257-264 | internal/entity/models/openai_api_compatible.go:340-347 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. 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/entity/models/openai_api_compatible.go"},"region":{"startLine":257}}}],"partialFingerprints":{"codehealthFindingId/v1":"c843598ac7dcfa741e3ea7145a015bc4cd1ac9e9e49da23b10397663faba9af1"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/entity/models/paddleocr.go:178-185 | internal/entity/models/paddleocr.go:216-223 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/entity/models/paddleocr.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. 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/entity/models/paddleocr.go"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"054b117a7f686e7710233efadfac73eb5533d32db761e8fec941bc583a439d13"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/entity/models/xai.go:262-270 | internal/entity/models/zhipu-ai.go:488-495 \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/entity/models/xai.go"},"region":{"startLine":262}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7de9a8f927f5aaebb0a388313f1ae9e56737f32b5364c371fbb569fdf24d269"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/handler/agent.go:486-493 | internal/handler/bot.go:161-168 \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/handler/agent.go:486\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/handler/agent.go"},"region":{"startLine":486}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c7f73a387a3e59c7874974a0eb371383763ff710f53a4d0363da2bf0bdb61fa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/handler/chat_session.go:449-456 | internal/handler/chat_session.go:471-479 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/handler/chat_session.go"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"6461942827b0df47e33df81f6866d27f2f36b75c59eae5fac224e68ec28be1cc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/handler/document.go:1266-1273 | internal/handler/document.go:1394-1401 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/handler/document.go:1266\u0060 it begins part-way through the construct above it, so those exact 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/handler/document.go"},"region":{"startLine":1266}}}],"partialFingerprints":{"codehealthFindingId/v1":"692effc0256d622b4627dfa04508570473a8ee284a397d7a624eee7694d9353a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/handler/document.go:1310-1317 | internal/handler/document.go:1405-1412 \u2014 both copies are in the same file, so extract the block 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/handler/document.go"},"region":{"startLine":1310}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0276fda71c61b8916ce058825fa31aa9cd953c8624b8994b8bdcdbcf7f9aa07"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/handler/document.go:1431-1438 | internal/handler/document.go:1443-1450 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/handler/document.go:1431\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/handler/document.go"},"region":{"startLine":1431}}}],"partialFingerprints":{"codehealthFindingId/v1":"37bb30e559d36416746d4c883724d04dafc1272c51b470ac7d666aa597b0f4f0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/harness/core/middlewares/reduction/reduction.go:83-90 | internal/harness/core/middlewares/reduction/reduction.go:115-122 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/harness/core/middlewares/reduction/reduction.go:83\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/harness/core/middlewares/reduction/reduction.go"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"90fc76f1811a87d0bdd58d3c21c66ab5c5ceeb3cef5d4283e1825657e130a32f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/harness/core/subagent_node.go:155-162 | internal/harness/core/workflow_graph.go:357-364 \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/harness/core/subagent_node.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":"internal/harness/core/subagent_node.go"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f6906eaceb11edf15c41c50015e84b3316077800c064092793663ef2fbac83e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/harness/graph/channels/barrier.go:131-138 | internal/harness/graph/channels/barrier.go:321-328 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/harness/graph/channels/barrier.go:131\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/harness/graph/channels/barrier.go"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"af3622f06bed93eba78d63d213c638946354bd42f66c62649e8fa7b5edd7af63"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/harness/graph/pregel/engine.go:1804-1811 | internal/harness/graph/pregel/traced_engine.go:171-178 \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/harness/graph/pregel/engine.go:1804\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/harness/graph/pregel/engine.go"},"region":{"startLine":1804}}}],"partialFingerprints":{"codehealthFindingId/v1":"af9950efc9e4dd9afafe5c0674504b27b01ba50a71a532a34b0547a3afe4b618"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/harness/graph/pregel/optimized.go:161-168 | internal/harness/graph/pregel/optimized.go:380-387 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/harness/graph/pregel/optimized.go"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"2da061a2a2f599cfce0483776dd968943cb1d37e0394f93133c0a39b6fbc275e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/ingestion/component/dispatch_model.go:166-173 | internal/ingestion/component/dispatch_model.go:224-231 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ingestion/component/dispatch_model.go:166\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ingestion/component/dispatch_model.go"},"region":{"startLine":166}}}],"partialFingerprints":{"codehealthFindingId/v1":"a8010025fb6a51dd356fa8c64b78398dcb606a2e700c873b2758d20dbbfa735c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): internal/ingestion/component/knowledge_compiler/wiki/wiki.go:879-886 | internal/ingestion/component/knowledge_compiler/wiki/wiki.go:896-903 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ingestion/component/knowledge_compiler/wiki/wiki.go:879\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ingestion/component/knowledge_compiler/wiki/wiki.go"},"region":{"startLine":879}}}],"partialFingerprints":{"codehealthFindingId/v1":"b69c7ec390e3f397af87e9ca7a2b0350644f530a54f5994a40bccb6d0c014c56"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 11): internal/agent/tool/arxiv.go:313-319 | internal/agent/tool/bgpt.go:223-229 | internal/agent/tool/duckduckgo.go:269-275 | internal/agent/tool/github.go:223-229 | internal/agent/tool/google.go:259-265 | internal/agent/tool/google_scholar.go:241-247 | internal/agent/tool/keenable.go:354-360 | internal/agent/tool/pubmed.go:274-280 | internal/agent/tool/searxng.go:271-277 | internal/agent/tool/tavily.go:428-434 | internal/agent/tool/wikipedia.go:302-308 \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/agent/tool/arxiv.go:313\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/agent/tool/arxiv.go"},"region":{"startLine":313}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bc02c35a00bf9d5aef64856636ddcde2f5ac6629f5155acd1113741dcb79fd2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 10): internal/entity/models/cometapi.go:228-234 | internal/entity/models/gpustack.go:255-261 | internal/entity/models/localai.go:203-209 | internal/entity/models/mistral.go:274-280 | internal/entity/models/novita.go:438-444 | internal/entity/models/ppio.go:254-260 | internal/entity/models/togetherai.go:271-277 | internal/entity/models/upstage.go:196-202 | internal/entity/models/voyage.go:126-132 | internal/entity/models/xinference.go:204-210 \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/entity/models/cometapi.go:228\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/cometapi.go"},"region":{"startLine":228}}}],"partialFingerprints":{"codehealthFindingId/v1":"18ea9d0ead63966309a6910832b42e3a4223dd9b46c56c3ca36e413733f54ca3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): internal/entity/models/jina.go:142-149 | internal/entity/models/openai.go:107-114 | internal/entity/models/stepfun.go:96-102 | internal/entity/models/xai.go:102-108 \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/entity/models/openai.go:107\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/entity/models/jina.go"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"5655a52629e1ed222897d2d315de583f09c89190b6157bdd2c43a498344f10c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 4): internal/entity/models/openai_api_compatible.go:359-365 | internal/entity/models/xai.go:257-265 | internal/entity/models/xinference.go:369-377 | internal/entity/models/zhipu-ai.go:485-491 \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/entity/models/openai_api_compatible.go:359\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/entity/models/openai_api_compatible.go"},"region":{"startLine":359}}}],"partialFingerprints":{"codehealthFindingId/v1":"8fb8357249eae6c8c055f2a62a39bb77cf3f1c30bd681958b6eff19f571f680d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): internal/agent/component/data_operations.go:478-484 | internal/agent/component/data_operations.go:515-521 | internal/agent/component/data_operations.go:533-539 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the 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/agent/component/data_operations.go:478\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/agent/component/data_operations.go"},"region":{"startLine":478}}}],"partialFingerprints":{"codehealthFindingId/v1":"86da2e95268b85a5f37b00f2de703cba68b44cefcb19dd6bba62c65c10b0b94c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): internal/entity/models/cometapi.go:74-80 | internal/entity/models/futurmix.go:52-58 | internal/entity/models/n1n.go:55-61 \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/entity/models/cometapi.go:74\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/entity/models/cometapi.go"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"34d36a4612fe4868ea588b3a4c31ac3c1a2756111d3dbda8ae493ba4dac99f09"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): internal/ingestion/component/knowledge_compiler/component.go:720-726 | internal/ingestion/component/knowledge_compiler/structure/merge.go:536-542 | internal/ingestion/knowledge_compile/writer.go:271-277 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ingestion/component/knowledge_compiler/component.go:720\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/ingestion/component/knowledge_compiler/component.go"},"region":{"startLine":720}}}],"partialFingerprints":{"codehealthFindingId/v1":"8859a130ee9368e30feae83418cba6aca650092598cbdca6e48942179d33e4cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/agent/sandbox/http.go:118-124 | internal/agent/tool/http_helper.go:301-307 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/agent/sandbox/http.go:118\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/agent/sandbox/http.go"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"107acc60bdbd92177b9f774631399bd2776bcf6b8ac277955b29e28d92ccd839"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/cli/filesystem/file.go:364-370 | internal/cli/filesystem/file.go:453-459 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/cli/filesystem/file.go:453\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/cli/filesystem/file.go"},"region":{"startLine":364}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f64fad75ce8a478342e893d109d83f4bcf3c0d26ab4ef741734ff361978274a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/dao/kb.go:218-224 | internal/dao/kb.go:545-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/dao/kb.go:218\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/dao/kb.go"},"region":{"startLine":218}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3ea5291b14d1d03b2d85f29866cf11b23831dc645fc5b68cdd58ddeb9589fe9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/deepdoc/parser/pdf/table/table_post.go:57-63 | internal/deepdoc/parser/pdf/table/table_post.go:135-143 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/deepdoc/parser/pdf/table/table_post.go:57\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/deepdoc/parser/pdf/table/table_post.go"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"f187f35b1415310e1b6ba342810536a819dafc8d2335c66c178843670f5a62ab"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/deepdoc/parser/pdf/tool/compare.go:511-517 | internal/deepdoc/parser/pdf/tool/compare.go:582-588 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/deepdoc/parser/pdf/tool/compare.go:511\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/deepdoc/parser/pdf/tool/compare.go"},"region":{"startLine":511}}}],"partialFingerprints":{"codehealthFindingId/v1":"23c54e5568d147a47690e0afc9bfed0c09d9ad537d5516743ff1ddf7ecbaf8b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/deepdoc/parser/pdf/util/crop.go:220-227 | internal/deepdoc/parser/pdf/util/crop.go:419-425 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/deepdoc/parser/pdf/util/crop.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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/deepdoc/parser/pdf/util/crop.go"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"43517e6813c77f7a53e827bcfcff337489b0e106088c208b129a3331ee14a85d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/engine/elasticsearch/chunk.go:482-488 | internal/engine/elasticsearch/chunk.go:1949-1955 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/engine/elasticsearch/chunk.go:482\u0060 it does not close everything it opens, so those exact 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/engine/elasticsearch/chunk.go"},"region":{"startLine":482}}}],"partialFingerprints":{"codehealthFindingId/v1":"5557ac81a8e8f84d50950cdb3929298524e941706e850e28a3841abe98f67b91"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/engine/elasticsearch/chunk.go:658-664 | internal/engine/elasticsearch/chunk.go:862-868 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/engine/elasticsearch/chunk.go:658\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/engine/elasticsearch/chunk.go"},"region":{"startLine":658}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe7c8c753b9f79c65d97bf54d2786b1e8c953bd1a0dd14c309c6670ad4fff8b5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/engine/elasticsearch/chunk.go:1949-1955 | internal/engine/elasticsearch/chunk.go:2390-2396 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/engine/elasticsearch/chunk.go:1949\u0060 it does not close everything it opens, so those exact 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/engine/elasticsearch/chunk.go"},"region":{"startLine":1949}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ceb294e4cd5a570011681d25808bd8d2737ef5d64511747ae2694f7b648ecb5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/entity/models/anthropic.go:409-415 | internal/entity/models/huaweicloud.go:501-507 \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. 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/entity/models/anthropic.go"},"region":{"startLine":409}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdd0260943a3501ab189e5c76448f91cc9bffa3514a8eb5a55609314ecf4f095"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/entity/models/base_model.go:585-591 | internal/handler/dataset.go:1440-1446 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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/entity/models/base_model.go:585\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/entity/models/base_model.go"},"region":{"startLine":585}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cf6cafe267b4ef92691eefbd0c60676c372151b5d0023bd4c539606a11a3681"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/entity/models/novita.go:559-565 | internal/entity/models/xinference.go:319-325 \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/entity/models/novita.go:559\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/entity/models/novita.go"},"region":{"startLine":559}}}],"partialFingerprints":{"codehealthFindingId/v1":"5b295b60fa37f2cfe70b6a3d8dbbac3bac9e9846e803e02d97c529e1f903387d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/entity/models/openai.go:549-556 | internal/entity/models/ragcon.go:404-410 \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/entity/models/openai.go:549\u0060 it begins part-way through the construct above it, so those exact 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/entity/models/openai.go"},"region":{"startLine":549}}}],"partialFingerprints":{"codehealthFindingId/v1":"5400411105740574adbd9760fd54e315d1f552607a7d98102e0efc5940da9cba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/entity/models/openai.go:618-625 | internal/entity/models/ragcon.go:567-573 \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/entity/models/openai.go:618\u0060 it begins part-way through the construct above it, so those exact 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/entity/models/openai.go"},"region":{"startLine":618}}}],"partialFingerprints":{"codehealthFindingId/v1":"e9a8d16b6873d6ae2e7461e956726bd23e39edd5a63f2a7e6bbfb4669b29fc65"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/entity/models/ragcon.go:123-129 | internal/entity/models/siliconflow.go:119-125 \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/entity/models/ragcon.go:123\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/ragcon.go"},"region":{"startLine":123}}}],"partialFingerprints":{"codehealthFindingId/v1":"4144d1319cb812609d54e4d5f85791bb7385247412e471803c93f25fd0d622ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/entity/models/ragcon.go:341-347 | internal/entity/models/ragcon.go:515-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/entity/models/ragcon.go:341\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/entity/models/ragcon.go"},"region":{"startLine":341}}}],"partialFingerprints":{"codehealthFindingId/v1":"bda9d97c03b914253e3144b2525fce227166e02f22c280252e9509265e4543ce"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/entity/models/xiaomi.go:189-196 | internal/entity/models/xiaomi.go:377-383 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/entity/models/xiaomi.go:189\u0060 it begins part-way through the construct above it, so those exact 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/entity/models/xiaomi.go"},"region":{"startLine":189}}}],"partialFingerprints":{"codehealthFindingId/v1":"55bd05ae173ff9ad5a23eba9999814a69facd49d77fd551fc48b26db70c13db9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/handler/bot.go:158-164 | internal/handler/bot.go:209-215 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/handler/bot.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/handler/bot.go"},"region":{"startLine":158}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f1fbe55077887d4a21c2e1db0d6b22f76671abc4aaccd21a9066d439bf46e19"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/handler/compilation_template_group.go:134-140 | internal/handler/compilation_template_group.go:176-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/handler/compilation_template_group.go:134\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/handler/compilation_template_group.go"},"region":{"startLine":134}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d501724cd0985f8f3dcd666a29a3ff2a7a0b99547bc20820a2f51c998fbd2d9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/handler/providers.go:1359-1365 | internal/handler/providers.go:1422-1428 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/handler/providers.go:1359\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/handler/providers.go"},"region":{"startLine":1359}}}],"partialFingerprints":{"codehealthFindingId/v1":"7839924f087959fa5ef94f926dcfec9d0febc3212107a55f63ac523a620c648e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/handler/user.go:153-159 | internal/handler/user.go:232-238 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/handler/user.go:153\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/handler/user.go"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"b26484d6b30a4f9fbe229497b224005dac0e4f72d1bc2ce76395fb9d00cc8404"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/harness/core/agent_handoff.go:87-93 | internal/harness/core/agent_handoff.go:110-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/harness/core/agent_handoff.go:87\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/harness/core/agent_handoff.go"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"54697958391282c3dfde39b9d13d68c71971bfa786286e76d80df03abe94eb4f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/harness/core/middlewares/subagent/subagent.go:231-237 | internal/harness/core/middlewares/subagent/subagent.go:303-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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/harness/core/middlewares/subagent/subagent.go"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccd940b23a14aa851d9714a39701284e127fe07703672d889cca8898540ebc48"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/harness/core/react_agent.go:133-139 | internal/harness/core/react_agent.go:149-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 \u0060internal/harness/core/react_agent.go:133\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/harness/core/react_agent.go"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"659e26619a53e399abc4d6adc602f6bb035aa92fcf9487323b2023af2dc6a81b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/harness/core/react_agent.go:443-449 | internal/harness/core/tool_registry.go:195-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/harness/core/react_agent.go:443\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/harness/core/react_agent.go"},"region":{"startLine":443}}}],"partialFingerprints":{"codehealthFindingId/v1":"b820319e3d93e2644467654bad069be1ac335dacde83916df4d281e142e88a4a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/harness/core/workflow.go:66-72 | internal/harness/core/workflow.go:91-97 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/harness/core/workflow.go:66\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/harness/core/workflow.go"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc25f8c0da49b5dc653b5202f8caa141abd40a364e1b2127a2cb1acb7980bae4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/ingestion/compilation/extractor/dep_relation.go:406-412 | internal/ingestion/compilation/extractor/ner_relation.go:82-89 \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/ingestion/compilation/extractor/dep_relation.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/ingestion/compilation/extractor/dep_relation.go"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bdc07f8ddf449479ab3b175b72903cbc69bc5760634a1fe10a7a0c520e10459"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): internal/ingestion/component/file.go:219-229 | internal/ingestion/component/file.go:234-240 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/ingestion/component/file.go:219\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/ingestion/component/file.go"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"c46c8fc09532f944c20a49e29f1ac4ef5591fe4c6962f126a662b435b9ca2faf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): internal/handler/agent.go:894-899 | internal/handler/agent.go:962-967 | internal/handler/chat_session.go:433-439 \u2014 there are 3 copies across 2 file(s) \u2014 more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/handler/agent.go:962\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/handler/agent.go"},"region":{"startLine":894}}}],"partialFingerprints":{"codehealthFindingId/v1":"2fc47775f5ae0ef84a41152e81fdac479b75d5d8c5bb5f0a7f2acc9f5e0a2d58"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/agent/component/list_operations.go:180-185 | internal/ingestion/task/knowledge_compiler_wiring.go:311-316 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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":"internal/agent/component/list_operations.go"},"region":{"startLine":180}}}],"partialFingerprints":{"codehealthFindingId/v1":"e06f5e2e93b839a76ab117ab617b3ea17e8db79560a528d1760b8be2f91c7b7b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/agent/component/stagehand_runtime.go:406-414 | internal/agent/component/stagehand_runtime.go:561-566 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. 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/agent/component/stagehand_runtime.go"},"region":{"startLine":406}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f92b884a0d1cfa553cdbd833b0d2a144932c20b2e471034677ffa5db412d248"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/engine/elasticsearch/chunk.go:1700-1705 | internal/engine/elasticsearch/chunk.go:1742-1747 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/engine/elasticsearch/chunk.go:1700\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/engine/elasticsearch/chunk.go"},"region":{"startLine":1700}}}],"partialFingerprints":{"codehealthFindingId/v1":"318d59cd906e4649bf796f98ea40fc52122be082e876a4bc1ecef8ceae46efa5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/engine/infinity/chunk.go:2247-2252 | internal/engine/infinity/chunk.go:2254-2259 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/engine/infinity/chunk.go:2247\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/engine/infinity/chunk.go"},"region":{"startLine":2247}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d71ce9ea7d1381b8f0d4c0ac53a87d7866afe95069856d2ed2631ab2768b914"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/entity/models/fishaudio.go:226-231 | internal/entity/models/fishaudio.go:290-295 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/entity/models/fishaudio.go:226\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/entity/models/fishaudio.go"},"region":{"startLine":226}}}],"partialFingerprints":{"codehealthFindingId/v1":"e02ee54ec6109ed1e189d8eeca66947b14a5003e2dc9113b55962ec659ec2c81"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/entity/models/lmstudio.go:136-141 | internal/entity/models/nvidia.go:128-133 \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/entity/models/lmstudio.go:136\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/lmstudio.go"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"24dcad0f37d0f44d287c4c06cabd6e0a3daa847f33fa893a90024e555d993ad5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/entity/models/volcengine.go:323-328 | internal/entity/models/volcengine.go:576-581 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/entity/models/volcengine.go:323\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. 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/entity/models/volcengine.go"},"region":{"startLine":323}}}],"partialFingerprints":{"codehealthFindingId/v1":"bc85dbe2b940eb9b593a9eca9bfb6f3e887edbd515b196fd620ed1bb102199f5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/handler/document.go:1320-1325 | internal/handler/document.go:1429-1434 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift 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/handler/document.go:1320\u0060 it does not close everything it opens, so those exact lines cannot be lifted 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/handler/document.go"},"region":{"startLine":1320}}}],"partialFingerprints":{"codehealthFindingId/v1":"55f4a06ab62a1156e0939269f674c6800fb70a365360e20ab1b07c4e89d012f3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/harness/core/profile/providers/providers.go:93-98 | internal/harness/core/profile/providers/providers.go:308-313 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060internal/harness/core/profile/providers/providers.go:93\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted 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/harness/core/profile/providers/providers.go"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"a68b6aa26a07d4ffb83511bd1b8043d16d3d06f7bbda85b0e2cb45cd9f806f59"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/harness/graph/graph/graph.go:152-157 | internal/harness/graph/graph/graph.go:196-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/harness/graph/graph/graph.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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the 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/harness/graph/graph/graph.go"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"53deeca7953fb2cabbfe0307c45d5d718f9f0b28aa2c19b2be32aa2fe9a2507b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): internal/ingestion/component/chunker/token.go:1095-1100 | internal/ingestion/component/tokenizer.go:627-632 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or 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":"internal/ingestion/component/chunker/token.go"},"region":{"startLine":1095}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b7ef09ebe307f4425c1ed11e672269454305fc267ce223ae86e7b97c1f4810a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): internal/agent/component/variable_aggregator.go:77-81 | internal/agent/component/variable_assigner.go:83-87 \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/agent/component/variable_aggregator.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. 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/agent/component/variable_aggregator.go"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c6f51f353dd4bcf619de5b797b0ad85bfbb54b20167c0a571d295394f1d5da8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): internal/entity/models/groq.go:159-163 | internal/entity/models/perplexity.go:120-125 \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/entity/models/groq.go:159\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/entity/models/groq.go"},"region":{"startLine":159}}}],"partialFingerprints":{"codehealthFindingId/v1":"998682e5794e125e301bc073443ac4c422ff457447af7910b75eb5eec123b9ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): internal/harness/graph/store/memory.go:196-200 | internal/harness/graph/store/memory.go:261-265 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/harness/graph/store/memory.go"},"region":{"startLine":196}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe7c96b7e3a0b1925ba0193fcedc457d28fa900253eb6e1dd950a16c6d1d6e6e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): internal/ingestion/task/tool/compare_pipeline_golden.go:161-165 | internal/ingestion/task/tool/compare_pipeline_golden.go:179-183 \u2014 both copies are in the same file, so extract the block into one function there 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/ingestion/task/tool/compare_pipeline_golden.go"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d37629fd203f99b52851348535f4aaa75ebaeb1a47386fe9a3805446dce906b"}},{"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":"ca5e3ffc7c464fdb2c42eeee11f928d87182afe3aa191a6349e36314d01f9071"},"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":"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":"131c2501097607d5048f6f03d0f2d5fbe30db003f021574700af9010710f8f2a"},"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/cli/cli_http.go: internal/cli/cli_http.go changed 42 times in last 90 days, max complexity 138. 11 of those changes were fix/bug commits, and the other 31 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, 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/cli/cli_http.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"76f37deb213be4ed0171cbc7f5ed2e7c23e6a5159b3b4a9892b76732b7ac3bf3"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/cli/lexer.go: internal/cli/lexer.go changed 25 times in last 90 days, max complexity 198. 2 of those changes were fix/bug commits, and the other 23 changed it for other reasons \u2014 this file is under both repair and feature pressure. 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/cli/lexer.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b6299e461bc0dd33d94c49f29243491a4cad04da3822d1d36e8d942140b3f2e"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/service/chat_pipeline.go: internal/service/chat_pipeline.go changed 18 times in last 90 days, max complexity 213. 5 of those changes were fix/bug commits, and the other 13 changed it for other reasons \u2014 this file is under both repair and feature pressure. 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/service/chat_pipeline.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"df75a22c93c04d1f2abceac45a8471111ae0bac34db1f2360257f2958a8892eb"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/service/agent.go: internal/service/agent.go changed 47 times in last 90 days, max complexity 75. 24 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/service/agent.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"864edca874f8cf168d0adff65aefd3d321664c1693d1eab1d1cb5acf4816b45d"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/entity/models/factory.go: internal/entity/models/factory.go changed 49 times in last 90 days, max complexity 65. 3 of those changes were fix/bug commits, and the other 46 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, 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/entity/models/factory.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"00297768576f68f2cb193358e62f55d5deb3c371bf537fe83aabd3d467babcb6"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/service/model_service.go: internal/service/model_service.go changed 67 times in last 90 days, max complexity 46. 30 of those changes were fix/bug commits, and the other 37 changed it for other reasons \u2014 this file is under both repair and feature pressure. 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/service/model_service.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8c52ff615d6ff016696638f22cfcb7c8c5e3442ef93aa3111e65f752195ac43"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/cli/user_parser.go: internal/cli/user_parser.go changed 52 times in last 90 days, max complexity 59. 15 of those changes were fix/bug commits, and the other 37 changed it for other reasons \u2014 this file is under both repair and feature pressure. 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/cli/user_parser.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c340304a8024ed11a51c6e7003d2eae56961350bc27a7271920765704334b2f8"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/service/memory.go: internal/service/memory.go changed 27 times in last 90 days, max complexity 98. 13 of those changes were fix/bug commits, and the other 14 changed it for other reasons \u2014 this file is under both repair and feature pressure. 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/service/memory.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4f23fd96edf7dd9ae3544d23d0901fe18b35205feacb04d86e97f7bff121ce0"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/cli/user_command.go: internal/cli/user_command.go changed 52 times in last 90 days, max complexity 47. 14 of those changes were fix/bug commits, and the other 38 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, 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/cli/user_command.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"447393d800bc97fd948e18792b0c8402ee4e55a8cd9f8b9a68d24d7e80c7d96c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: internal/engine/infinity/chunk.go: internal/engine/infinity/chunk.go changed 19 times in last 90 days, max complexity 122. 5 of those changes were fix/bug commits, and the other 14 changed it for other reasons \u2014 this file is under both repair and feature pressure. 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/engine/infinity/chunk.go"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"43f659e9dc73c1f9f45fa5955864df1448bdd76b59f1ce30e07a66d121ab0961"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 36 significant file(s) lose their only recent owner: web/src/pages/agent/form/switch-form/index.tsx, web/src/pages/agent/form/variable-assigner-form/dynamic-variables.tsx, web/src/components/ui/calendar.tsx, web/src/pages/agent/hooks.tsx, web/src/pages/agent/form/components/select-with-secondary-menu.tsx, web/src/pages/agent/form/categorize-form/dynamic-categorize.tsx, web/src/pages/agent/form/tavily-form/index.tsx, web/src/pages/dataset/setting/hooks.ts (\u002B28 more). Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"4c6e554cc625acf6ecf34fb59027628c14d561e9e752d8689672c70a57284a53"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #2: If anonymized user #2 becomes unavailable, 17 significant file(s) lose their only recent owner: internal/cli/admin_parser.go, internal/cli/common_command.go, internal/cli/cli_http.go, internal/cli/filesystem_command.go, internal/storage/minio.go, internal/storage/s3.go, internal/storage/oss.go, admin/client/http_client.py (\u002B9 more). Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"143ea035a54d0a3914dea285cf3b666c62575fe033d2194ceef1d11a495879f1"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #3: If anonymized user #3 becomes unavailable, 11 significant file(s) lose their only recent owner: internal/harness/core/react_agent.go, internal/harness/graph/types/scratchpad.go, internal/harness/core/react_graph.go, internal/harness/harness.go, internal/harness/graph/graph/state_inspector.go, internal/harness/core/workflow_graph.go, internal/harness/graph/pregel/stream.go, internal/harness/graph/pregel/subgraph.go (\u002B3 more). Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"e897f79a17997272745fd2b260c85a42a70566d296c498e23268990cccbaab7b"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #4: If anonymized user #4 becomes unavailable, 17 significant file(s) lose their only recent owner: web/src/components/ui/input-select.tsx, web/src/components/ui/time-picker.tsx, web/src/pages/memory/memory-message/message-table.tsx, web/src/components/ui/toggle-list.tsx, web/src/components/originui/time-range-picker.tsx, web/src/pages/memory/memory-message/hook.ts, web/src/pages/dataflow-result/components/parse-editer/json-parser.tsx, web/src/pages/login-next/bg.tsx (\u002B9 more). Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"709915bbad0a00db26962620fa7c81ca88cc226ec31cbf8da25029a5a99fbe2c"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #5: If anonymized user #5 becomes unavailable, 7 significant file(s) lose their only recent owner: web/src/pages/admin/users.tsx, web/src/pages/admin/whitelist.tsx, web/src/pages/admin/service-status.tsx, web/src/pages/admin/roles.tsx, web/src/pages/admin/user-detail.tsx, web/src/pages/admin/forms/user-form.tsx, web/src/pages/admin/task-executor-detail.tsx. Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"9e132c606d0cff15252fe5915280c41bbb656dbcf3432c2314dc38f40864e850"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #6: If anonymized user #6 becomes unavailable, 3 significant file(s) lose their only recent owner: common/data_source/bitbucket/connector.py, rag/flow/parser/pdf_chunk_metadata.py, common/data_source/box_connector.py. Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"f26c7f4ca10c22436812ba6c4fb44b3b26646ff5b4be69909926214250aa2e1f"}},{"ruleId":"D16","level":"note","message":{"text":"Further sole-owners (lower concentration): 14 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold \u2014 folded into the bus-factor score and metrics (110 single-owned of 1892 analysed files in total, counted over production source files of roughly 100 lines or more, excluding tests, vendored, generated and example/demo trees, largest first). They are anonymized user #7 (2 file(s)), anonymized user #8 (2 file(s)), anonymized user #9 (2 file(s)), anonymized user #10 (2 file(s)), anonymized user #11 (2 file(s)), anonymized user #12 (1 file(s)) (\u002B8 more) \u2014 spread or document their files in the same way, at lower priority than the named off-boarding risks above."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6eac528f2429e724e1a97ed868f79eefbcf1888dab4af9a9e673429369bb5b2f"}},{"ruleId":"D19","level":"note","message":{"text":"The Virtual Filesystem section mentions a design principle \u0027Provider Pattern\u0027 but does not explain how to register new providers or the filesystem\u0027s routing table.: Add a brief Provider Registration subsection describing how to implement and register new dataset/file providers with the virtual filesystem."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"internal/cli/README.md"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f185793d40ecc2cc63680deb9e0c302745d657d27f52dc118e43b06b21a05c82"}},{"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":"bf1f6a8abdfc2a1e774bbef89a56ed0e354298bbafa9373b0e468cc605d5a618"}},{"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":"f3f0491479b67eab0918d97ba779dc2f4960811a90897a187eb071f0b9a2f0a9"}},{"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":"c087316b924f7b56ba8fd1e6319f8341b26fa15aab05088841fa333d8bb04736"}},{"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":"44fd4aceef9a2c6b311a23180263f5c4b067d26ede3cf6873a83b60008a6c5a6"},"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":"5fb863ae9124fb1107403b4a52bf6f343870101f31f6836596b441079c514b9c"},"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":"232526e51ccc0bf9ff8267d90534161f3528ad85581672f0d670037239eac468"},"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":"65f3548892301fb7882aacf0a13e39b1ee82008c2279b57f34e1883d9ee1f246"},"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":"10af382bbadbb7345dc46e028cfcbbbe9df50101b9277233e8257c1d12bf30dd"},"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":"90a204dd54a7927f27f5cfb37fef4e6eb1e704395cbd1766cc81a0948d002741"},"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":"b2cb6774344a669c35f0c24800a2d5d3e0e7b07d3de51d97557baccba582463b"},"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":"e7dcb79707666a99b9c379fad9fab274ae1b18001a8180a58bf4dea1cc39cbcd"},"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":"4004fe598fe849146fc53145f3481491ab020849b72c28e03a4dc1a9b96a8974"},"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":"52991125ca831a4cdac1703e94b3aadaac9d54d959cde540185252b2460c4542"},"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":"91e76f7a7d13fe7966e9671184f98bc642b379fe82d278486f14e9c0f8ef2966"},"taxa":[{"id":"CWE-415","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":"672ad259582732de23a732a9f5d0547cd8ecef3f2a395b9d3faf0fdca8c1c238"},"taxa":[{"id":"CWE-676","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":"7f6d669c3a38b589c68334b2d4d159181f2ae3002914af1f3702dd22dfa6f404"},"taxa":[{"id":"CWE-676","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":"a10b8d8437f366544c7c694769198740e001185d2240adc1c78983d4f70e02b3"},"taxa":[{"id":"CWE-676","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":"2f59e320e9e9fcf9759f982671d247616c3ae2bc293eb01eb29fc10813ec6356"},"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":"8beef763f0c5d98994396819b2027ee7916d3f4a947008a4ebf1835a91b64e47"},"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":"8b802141d208351496c730d4cdca03857afe5d0abb117096023e6ef527e63c23"},"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":"d3951a26dd24135ac05c2f9e37e6649714eed1cbce83a28bbdd819164c24e53a"},"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":"31a5f38a34c5d037ee5b468ee30d63b851a372f6a72a1a3b6fc59685263ceedf"},"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":"f98b2e4f6e19e1e2626d865840872ed014c4db94b94d43a47320b7695d32949c"},"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":"d62c83b7b87c22990322fa2e2300a4e6636e11802fc3a1b047ae11a873a28f17"},"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":"4271a1a3ccb8b2f09cca4e3b4945af36a590b12d3f5c86a32df806c2c4b00319"},"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":"a3256e4e00e78870f400ef2ba219f64602cb041514c476ac2d13d2b76b7775e2"},"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":"d728bbb7320f524cd29ad361d37c8724237a4806b41a1147c05d0ff143a6a923"},"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":"3097ea7fc076bcd916c65f7d9efc4ab19fb50879c78b7f11b2b4bbfed449f247"},"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":"036b8011722377ed1eb88f66f04e00449c31394034241e8f8ee47791b6cf7538"},"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":"ddf524026f480eb6056293e2ddff38b250f0553e75011616100bbbe97bd1931b"},"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":"909720594026b15de651d7b097d2395f692232c4922cb78ff0e63cdf6a0ac557"},"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":"e796c79816a454f450b3337bc73f42e4d7e7a39ae731f5df8518310be2a37eec"},"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":"7e4f6409a8128633da2238b38ae380a0b003ed107c43aa231d966d4d42b0fee2"},"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":"6ed059458dc0d864f79fffc2c8cd3f09ac2213f256b255ba1e07734350228541"},"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":"75c04eaedeb92fdb1c007a5b896930470f25bd307f5b568746e1286cc7e7236b"},"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":"e625dbf7d7d44d57ee7705c32e701f366521f08c51603b3e6081c84a219c4c7a"},"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":"3ce409c65b7ac4402765ec29d42c644f91f55891dfe5df710a16e2ad12b524a9"},"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":"2e24f1196745d5c78dc075016dd3c3095d35335ba9b0df57171d0d60ae6ef25a"},"taxa":[{"id":"CWE-330","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":"bc8c5ec1e163edbede2b958055c7610d91323908fd51cd7918e2d33b06eb2937"},"taxa":[{"id":"CWE-330","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":"ce97e9d24a207dbd7e6bbb9c4f1598682a4826690d31a2d2ad63f2d0b9dea066"},"taxa":[{"id":"CWE-327","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":"3111ef282e81f47034f676f52a6d481407f10994901b2720e03e9d50bea67bec"},"taxa":[{"id":"CWE-611","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":"054374cddca7674d3c4d6f5d9b77e36ac16aa1a82ea9dcf477012f30423f875d"},"taxa":[{"id":"CWE-327","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":"785bfef2a55ea2cfa1b8b2fca05174ceef6f142c8fb86bc8c164df218a9d72d2"},"taxa":[{"id":"CWE-327","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":"825245cb6855ba79e3f08181b848487c3e137cca93ac2f208d097efee6b853de"},"taxa":[{"id":"CWE-327","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":"52f0adbdd3972058626caa9868d6ba5c83188d2260cb8826919195caae68149b"},"taxa":[{"id":"CWE-330","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":"24daf26cde82c6abc18a1a59673b1f8b289183338c9f55653ab946512f98136f"},"taxa":[{"id":"CWE-330","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":"cb28764325b371c7cb562e174488949b3f208120db3267bffbb46e48fe0b73a0"},"taxa":[{"id":"CWE-330","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":"124741f509667c123b7a381f235c2173a4b94877f826c227f662e32a8ec18373"},"taxa":[{"id":"CWE-330","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":"440b8fad316d7437e6c0d40c882eb6a424ab0fae637cd2cb0d7741e88258b9ba"},"taxa":[{"id":"CWE-327","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":"600e5ba29068490860996d2b868b1083fde40c730ddacefa1b41e814f8fa71f4"},"taxa":[{"id":"CWE-327","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":"4cb7625813673769f54c594f73e588d0b12d96bdc997388259a573be233a8353"},"taxa":[{"id":"CWE-502","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":"7c1afd6ad93d85ebec1a9d7f8a97cb8fd177bd45fb8844b9d113ba55a911e819"},"taxa":[{"id":"CWE-502","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":"fe2d688610b51e0a5a02c7c5dd1724a4986e40f2689fb84510e2ec0164c27d6a"}},{"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":"1f762ec2aa4a8ab823ae2f3bf853a78bc170c2eea7ae1a6d63fabdba6dc15e3a"}},{"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":"0f5df9491dc7782ef74d041beb1700781cad62a436456204e125908b6da4dc04"}},{"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":"d1ab3b0271bc34d0a097f95fef9e2d0a3fa9c4c87b1900546b51f7a5ed19de06"}},{"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":"39b8c7b5f22153a27b68ab40f0781cab9855969323e7243edcb5bfaca69b611e"}},{"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":"cc02395057da82a7137741b9592fd0bd4d03ab3e14eb9516269576f796b4e8d7"}},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"9ff1ee9dd5615e2d512c1b5a7eb9a731208830cdc6ec1c07d8913d2a5c081e3c"}},{"ruleId":"D31","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"5c71966bc61ee99c35072f6439b6f134d91998b503f5847ddb5e7117f4efc1db"}},{"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":"a2cc64d1fe860d2948190bafe8f29ca2d29fa9d10db5953e1944c91e58e842cb"}},{"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":"f7ae34279b653b566d0b0b72faf43eb91c8949fa2e3798f38ca5d95791bca7eb"}},{"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":"b9d65c228e05b9f0bd40c81cebe3a9a34c6aa575ee024a97f7a0bd7698752066"}},{"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":"6f5fc0c3e4b176c872d2eecc8f2399b90e66ab3dd366b526171aa77c67cc0fe4"}},{"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":"53f5ae3929ffc88eb9ed178eecf04262eea5fb3a16839526ae87f946668ab23c"}},{"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":"0166904ae7827254626906a9e96ae72c9ccdf355da7bd4900b42dedffe136e01"}},{"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":"1232aac158b119f40d95633bd3e1167b19089d1fab5b35fde834e2b7513b2b54"}},{"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":"ff4dd4ac0ed14536dd5035a8da4ba557ccb43da041ba38ad0e5277e378ad66e2"}},{"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":"6c9e0411edee261ebda96299e617ab3af142a01b1e43bbe107cf9c3c8e901235"}},{"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":"b8e3a59c5cdf577aab12d84a333c4e60f4d457db1920f6b93c3bc889f214afa5"}},{"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":"d6c7b191637f8223392a196f394027a62d3186bec5779e76be08dec0fc2b462b"}},{"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":"8cea585f172f31d447442166f606f8b57a63ea6d0b19b11a7496f866b2da6fd3"}},{"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":"b6bc68a9cfb18fa05352288f4bfc8b1eff8b0eb7180dcc549334064e4f276593"}},{"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":"f0b2db365bf1322400a6e9d89e5660d7982461b5394a7eca1b22b38fcf867391"}},{"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":"239ca269be8e4499bdea8ef8d30426061191265d35658ee0b0f243013ad5dc06"}},{"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":"41cc2c62e861b02f409a9729ba91d510ed43c408d7589d58531b21a319c8dee2"}},{"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":"1710aa74441859979b197dc27a6682e8c2ebf8fdac4fd5a51adfb5e6c5ff41fb"}},{"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":"e03a3fbfc49d953777552004e1a844dfb14a868f241b43be73479a2ed29194e7"}},{"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":"3cd2cfc33c84994cca1f2e6562869e5275f44fc2eadd412f5070a84acdf4165d"}},{"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":"62ba3f391b97d680ac34e630794a6a7fc0f3b16bd44bab9e323085ff4fa2c944"}},{"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":"1a71f72bc209a247fd0b0dde4d210785c67111fe4ae9a1c54965e349bb7a75e5"}},{"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":"cabfbbea2b7d29ab5c2675d5dcfb862ccf804032887d8cc3fbab2e811201b31b"}},{"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":"50e7132043e56baa2841e02bac6abde878dae084b8192fcc8dc8a5f19e47abe5"}},{"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":"e4d1aa3802a4ccedc37a9a9e89b7699801177073d6459ae966abc28d2499195d"}},{"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":"a9de3e50f8249cb0d6426b43b2a5ba5c9a3cf9b466fd6ad9f5c22f2b2077c5aa"}},{"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":"2afcba7822409138a279dbf133d3b2065d44f36f0c7f52b9dde8c8e9efc2ff30"}},{"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":"e11a10d65eada0547ab686f701cd1c6b84c96f9d534963c7425f7e021c73908d"}},{"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":"a80bcc81fc88bb6088a9cf96437ac3954a25451b9b6a757c2616974cfe45faaf"}},{"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":"426d01f7788b212deae9f091649e8efda45fba40b5d3c8ce1420a0db6d0ef625"}},{"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":"5483d22dfbb42e967babc3e186d44e0901fbd276f71ad4df0284593c3280b6a8"}},{"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":"81e46463a9c89ed810b3de2521269d5b5b0452bb30aea4d731e50185c0c4b0fb"}},{"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":"9efbf118ab1ee067934694c854a27c1f33a80989fe78769789af701e4b2a6a29"}},{"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":"8843162b96045431de84e47c9f0266dab4912373e37d5a57390bc3291c8086ba"}},{"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":"aba4d70dd3e2992710a03bb7f44bba40ef1105c4c665f047ce890cabe396e9c8"}},{"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":"e6fe63d17ffbbdd03760557357ddcfe4acdfca2842b491d36bc2eafa00865164"}},{"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":"4b8669f855b7511b2e0a93ab9a54a95d1960f2c18f5aae5a8d97e961c2a9f84a"}},{"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":"e8e237133967bb1b48b8c4a54cc2ddd8f83584b72d61cc7487e2253e61c7501f"}},{"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":"cfd4ab3f3117b8ea4ea8fcd1643e1f3c2c269df5aaed518d6fd119000962a75a"}},{"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":"3982a249a5e6aa1f8ecd9f8afb140446d45e5aee013476e0303271d4b0e1a8fb"}},{"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":"002db9e0b7f1a452f1f59fc6d5c8f317cf2bd841c4bff0fcfd41d09806d67884"}},{"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":"b2ffd7f786955e1ac4718a9bb786ef641d03617898670a46fca2162d573ac4b4"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/data_source/google_drive/doc_conversion.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4aba4504115bbbe344dad7f92d01cd4d04396fc148f92c96264ff8d9aa830f46"}},{"ruleId":"D34","level":"note","message":{"text":"Further orphaned files (smaller): 17 smaller file(s) also have no living knowledge \u2014 folded into the freshness score and metrics rather than listed individually (18 orphaned of 1892 analysed files in total, counted over production source files of roughly 100 lines or more, excluding tests, vendored, generated and example/demo trees, largest first)."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"ce861fd78f6935114d3a342cb90ad25870f984e1042954fcbbe27c0e23be3658"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: __init__.py \u2194 index.tsx: \u0060common/data_source/__init__.py\u0060 and \u0060web/src/pages/user-setting/data-source/constant/index.tsx\u0060 change together 83% of the time (15 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit \u2014 they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary \u2014 an event or message name, a route, a serialised shape \u2014 that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other\u0027s build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"common/data_source/__init__.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"e82d9d504451cafa31e3b16cd3f982c85a685a4a0e4b18d29b4729f898155d69"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: en.ts \u2194 available-models.tsx: \u0060web/src/locales/en.ts\u0060 and \u0060web/src/pages/user-setting/setting-model/instance-card/available-models.tsx\u0060 change together 80% of the time (8 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/locales/en.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"868acf044e3dc8baf666c3554bbfb1489ca87c7f2072d231d2682bfbd7a85241"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: use-manage-modal.ts \u2194 manage-values-modal.tsx: \u0060web/src/pages/dataset/components/metedata/hooks/use-manage-modal.ts\u0060 and \u0060web/src/pages/dataset/components/metedata/manage-values-modal.tsx\u0060 change together 80% of the time (8 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/dataset/components/metedata/hooks/use-manage-modal.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3adb724771d7c0c7e3259e2af0b1b59654f57a6602aac14631e73f86934e435f"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: hooks.tsx \u2194 index.tsx: \u0060web/src/pages/user-setting/setting-model/hooks.tsx\u0060 and \u0060web/src/pages/user-setting/setting-model/index.tsx\u0060 change together 78% of the time (29 of the 37 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module \u2014 a sibling reference still needs an import \u2014 so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/user-setting/setting-model/hooks.tsx"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9cced583d262cb539ad001798548b1474da3ec46fac4a9f52eefbc3eab1fd58"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: form-config-map.tsx \u2194 use-add-node.ts: \u0060web/src/pages/agent/form-sheet/form-config-map.tsx\u0060 and \u0060web/src/pages/agent/hooks/use-add-node.ts\u0060 change together 77% of the time (10 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/agent/form-sheet/form-config-map.tsx"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ca09c988f1b912d02fac5bb062ec81958d81b5acfc9592549a6e3a979778e46"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: index.tsx \u2194 tool-command.tsx: \u0060web/src/pages/agent/constant/index.tsx\u0060 and \u0060web/src/pages/agent/form/agent-form/tool-popover/tool-command.tsx\u0060 change together 75% of the time (12 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/agent/constant/index.tsx"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"070c46bfabbb879e4d4bef120ffeaece1cf15ad03fa5ee3bc57c8c844ff3bd5b"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: __init__.py \u2194 constants.ts: \u0060rag/llm/__init__.py\u0060 and \u0060web/src/pages/user-setting/setting-model/constants.ts\u0060 change together 74% of the time (17 of the 23 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit \u2014 they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary \u2014 an event or message name, a route, a serialised shape \u2014 that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other\u0027s build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"rag/llm/__init__.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d196fb6d1ca2d3728b07e82a2cab3877c31f4b9718bd2aab5b6fbd794ad48557"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: next-step-dropdown.tsx \u2194 use-agent-tool-initial-values.ts: \u0060web/src/pages/agent/canvas/node/dropdown/next-step-dropdown.tsx\u0060 and \u0060web/src/pages/agent/hooks/use-agent-tool-initial-values.ts\u0060 change together 73% of the time (8 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/agent/canvas/node/dropdown/next-step-dropdown.tsx"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"505973df5ce25c58eb88a6d9efa9612315f7fb1ee4d246b2f25a684b13e7a0d8"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: next-step-dropdown.tsx \u2194 index.tsx: \u0060web/src/pages/agent/canvas/node/dropdown/next-step-dropdown.tsx\u0060 and \u0060web/src/pages/agent/constant/index.tsx\u0060 change together 72% of the time (18 of the 25 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"web/src/pages/agent/canvas/node/dropdown/next-step-dropdown.tsx"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0dbd7bed1e8a4794b5401b30c31707e80d834add402d5081ea59649bcc8f1028"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: base.py \u2194 ragflow.py: \u0060sdk/python/ragflow_sdk/modules/base.py\u0060 and \u0060sdk/python/ragflow_sdk/ragflow.py\u0060 change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"sdk/python/ragflow_sdk/modules/base.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"80fa728a7651d1bf01f678fbfc656db92016917b0af5a47bbdeb5676ab9e51cd"}},{"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":"d657599f6f99da1927d3377533dfc0888b34c4d84aa7d5579841fd72d0e39bce"}},{"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":"779748c7e39b230a925ee0647d323704f4d0aea36b5f3ace7c185fb195a3a31a"}},{"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":"512cedd745ed39f295039214d31f8ecd69d04d4118b9cbbe82f0ac6de9f2e4a3"}},{"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":"75ec7ab36e0bddaf35e644438966905dc8536b38953aa14d6289861bf06ffed4"}},{"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":"c0b34ce1367d7ea240aa45bbac1b4a58fca41a191469ee0880371acff97d98bf"}},{"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":"71540dbd9f4ea593e6da11af1ef68b2a69b7482ea6e6706031b40c053a3acb06"}},{"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":"484dae31015f348b3c5504f4eb32b93dd303ab23f77a3997fab70591461efc78"}},{"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":"0c1fc433977d578f19698f08c45c16c2a007d3ad256af301692174d71648a7e0"}},{"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":"afea6813c3d923855799c3aa07b39cf35f64b9fd32f6b4f860e16ea150fd63f5"}},{"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":"82e82ad024c41e6db58a72df26e6ed39f87bd30fc8cd6276f82bea6506bdfecc"}},{"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":"23cf1e66700fbe7e3f3bf0b3ac76ed7660c9e654893ad78ff9a342d41c91015f"}},{"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":"466435ea811cc5a652d3f4d82d2bcc6a9365d0e0a41ed7face53ff143417afd6"}},{"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":"42d99abb322e043b71659b00c4f63293f728b5717417e9459f3810865bd4aaf0"}},{"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":"24fcae53239a1ac72bc974dcc3442f0bef6a331b9ed40849b5e99c9cb4cbc05a"}},{"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":"44bf51aeeac9e49c34419eabfc1c472ea45258fcc8f286e4b5a4adb469d73cef"}},{"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":"1b89dcb33fa7374620fa968012d536fb6b7a07ee4b459911652c641a2e8d7da7"}},{"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":"dc1fa0187f3697c0d7f6fff40b51a3bfd0717dee08512878cd0034337f29e8f5"}},{"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":"77b7d3cb43ea35875ba29b8becb6ca1834b321bf4078359596c34c3d1216a7b9"}},{"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":"f7049af3fcd28e33a0988e8196684d5654ada12b9cc9a28d17a5f50ae388a7e7"}},{"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":"5df04f7c2252b80f0f23f58489b7f4983ac868383d53111561bcd4d6939336bb"}},{"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":"90a48f01fac5f4f1ebaade117bad00e051911bc411eff846dcf6e9d2917ae005"}},{"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":"e2443c95b4532b96a81bf5563ad6616a3d9b10ebcf3c13ea8170ba4052aa5f88"}},{"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":"42e2f60467ee049f56764d7afb02fb71c83164bd455f4ad39d89ecc1aae413b2"}},{"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":"46c67af7fa51e9676c90d655878f2d1614efc0822a6ce2b6c420a53a23beeb18"}},{"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":"677e7e0f7668eba2eab45fb907c3c55d61ed5dd671c37fa39e50c7af9a56b37e"}},{"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":"b69ba727c91bede1130193ab52b1e06c6dcf73ec343f0ce9ecb352c4f655bdfd"}},{"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":"ad2665f3f6b19ed35f4b26a0d4fad76ccdebfa19135a13a61c7c7bd3e282582b"}},{"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":"95d5cc2973578e38313de95b934d505e7f45b39b8ee58aa1f2eb0ea3b4e54d29"}},{"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":"f8b6fab781d3debcc89cde85b576957905bef8273c2c76017604e5150460ac66"}},{"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":"74ba0a103637a980177c1d2041197fb37c8a49d6a50ff71fd02036e6862b06dd"}},{"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":"775fde5d85adaf692d8bdd5c2a259722bfec21c894388e3994462dec407359e1"}},{"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":"3bc6c1e4de5bbb2f55dcd2fd3da5ccda58e5bd66b405c0a30e4c010e73f8fd24"}},{"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":"ed14e9fd1c77ac9e929d6afbab212770200bfc9f737e0ed8755db81ebd6fa489"}},{"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":"a8be12631f24fec43e6770ba665efe13269fc4b387093797e57a283934b26e4f"}},{"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":"7eecd95a8feb6fbbcdba3131a2aea1feec0826a83fea65447db104502b5a6d40"}},{"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":"be4b32ecb429dbe645f847f62f79446a2167bfb58e972c26942b50e04e5d4868"}},{"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":"64ae947fe9e5202385597a6b2ef70871cc8048578b01139ebc287eb82c7724ea"}},{"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":"aed4924aae0d147397b6a0bf6fad46adf847a383bf20a6653946ad2091fdc0d5"}},{"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":"c193407bacedae165b47698a9406e7231ec7ff9468ef563bdc7b3017033a8f9d"}},{"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":"752aa0e336dc5a729a0a887d33bfaed256eb7bfcdc8c091ab02de68c49291e99"}},{"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":"14dd065188ab207fef637ef6df4528badfa8bbf25a78ece3807092967543b95f"}},{"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":"af8867abf5b772cafd4898d83bfb985f580c3176cb4333f56ff93aac382f38ca"}},{"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":"754472bcaa48e53d8264cb62b9cdbe74e7e52ad0fda32297ff9fd7d367f8a405"}},{"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":"45df33505380c6e468718648b125a55e289eac239343c3f2d7e4ded514ea714e"}},{"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":"a06f71af9588045de5759f2cd63b813e5ca9cd85e995d51e2637efbba109bbcc"}},{"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":"7b499a25a77088a1fbb2c84d5fe23245ae3be73a1d14f5492c8386a0f5cc0313"}},{"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":"c3101d36131a52584dde37b042bdfe9fc6a1d1edad6398c91ef166385743b007"}},{"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":"510bb401a969ac852411378ef48f6a3eb103efc6a53c3f02b78552d692165ae7"}},{"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":"50c379534161bb30611d421e82af3666b891a67b9a6a35df5a4fc4b4977e653b"}},{"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":"97f017ec8ddf00b18a6a6734894c5a99aa8d7beafdfa34718a93734e15577468"}},{"ruleId":"D40","level":"note","message":{"text":"No network policy: No Kubernetes NetworkPolicy (or Cilium policy) found. Without one, every pod can talk to every other pod and reach out to the internet by default. Add a default-deny policy and open only the flows you need."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"295828650a2aaa1b03ae9b32ae6843a0c38011e5a70b1926442c4fa7187de5f0"}},{"ruleId":"D41","level":"note","message":{"text":"No AppArmor/SELinux confinement: Workloads declare no AppArmor or SELinux profile. A mandatory-access-control profile confines what a compromised container can touch on the host, complementing seccomp\u0027s syscall filter."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"e83fbc31033373d6c51983ed230eb4ba61f7775ed02afb30f5fc1840bde01d4f"}}],"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-327","guid":"e51910ff-67b5-3c51-aa3d-92837d9eab90","name":"CWE-327","shortDescription":{"text":"CWE-327"},"helpUri":"https://cwe.mitre.org/data/definitions/327.html"},{"id":"CWE-330","guid":"f811ddf9-2e54-865b-9c76-f97905849790","name":"CWE-330","shortDescription":{"text":"CWE-330"},"helpUri":"https://cwe.mitre.org/data/definitions/330.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-415","guid":"5d94f4b3-d3aa-0c5c-a4f9-897bc66edcd7","name":"CWE-415","shortDescription":{"text":"CWE-415"},"helpUri":"https://cwe.mitre.org/data/definitions/415.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-611","guid":"1afbae66-ea29-2d59-aaa2-134e3ae2e85a","name":"CWE-611","shortDescription":{"text":"CWE-611"},"helpUri":"https://cwe.mitre.org/data/definitions/611.html"},{"id":"CWE-676","guid":"550e6fab-2881-3252-8a05-c688a6b19c14","name":"CWE-676","shortDescription":{"text":"CWE-676"},"helpUri":"https://cwe.mitre.org/data/definitions/676.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":160,"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."]}]}